From 299b48fcfb91cbef83ad15aed2e36ea64c57b735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dlker=20Yaz?= Date: Mon, 11 Jun 2012 18:25:49 +0000 Subject: [PATCH] forgotten line - added in dihedral angle computation. --- .../include/CGAL/Surface_mesh_segmentation.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h index d67fa775da6..07d37d7e553 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h @@ -14,12 +14,12 @@ */ -//#include "Expectation_maximization.h" -//#include "K_means_clustering.h" -//#include "Timer.h" +#include "Expectation_maximization.h" +#include "K_means_clustering.h" +#include "Timer.h" -#include -#include +//#include +//#include #include #include @@ -162,12 +162,12 @@ inline Surface_mesh_segmentation::Surface_mesh_segmentation( SEG_DEBUG(Timer t) disk_sampling_concentric_mapping(); - calculate_sdf_values(); + //calculate_sdf_values(); SEG_DEBUG(std::cout << t) - apply_GMM_fitting(); + //apply_GMM_fitting(); //write_sdf_values("sdf_values_sample_dino_ws.txt"); //read_sdf_values("sdf_values_sample_camel.txt"); - //calculate_dihedral_angles(); + calculate_dihedral_angles(); } template @@ -561,6 +561,9 @@ double Surface_mesh_segmentation::calculate_dihedral_angle_of_edge( dot = -1.0; } double angle = acos(dot) / CGAL_PI; // [0-1] normalize + if(angle < epsilon) { + angle = epsilon; + } return angle; }