mirror of https://github.com/CGAL/cgal
forgotten line - added in dihedral angle computation.
This commit is contained in:
parent
d04a716854
commit
299b48fcfb
|
|
@ -14,12 +14,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//#include "Expectation_maximization.h"
|
#include "Expectation_maximization.h"
|
||||||
//#include "K_means_clustering.h"
|
#include "K_means_clustering.h"
|
||||||
//#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
||||||
#include <CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h>
|
//#include <CGAL/internal/Surface_mesh_segmentation/Expectation_maximization.h>
|
||||||
#include <CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h>
|
//#include <CGAL/internal/Surface_mesh_segmentation/K_means_clustering.h>
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/AABB_tree.h>
|
#include <CGAL/AABB_tree.h>
|
||||||
|
|
@ -162,12 +162,12 @@ inline Surface_mesh_segmentation<Polyhedron>::Surface_mesh_segmentation(
|
||||||
SEG_DEBUG(Timer t)
|
SEG_DEBUG(Timer t)
|
||||||
|
|
||||||
disk_sampling_concentric_mapping();
|
disk_sampling_concentric_mapping();
|
||||||
calculate_sdf_values();
|
//calculate_sdf_values();
|
||||||
SEG_DEBUG(std::cout << t)
|
SEG_DEBUG(std::cout << t)
|
||||||
apply_GMM_fitting();
|
//apply_GMM_fitting();
|
||||||
//write_sdf_values("sdf_values_sample_dino_ws.txt");
|
//write_sdf_values("sdf_values_sample_dino_ws.txt");
|
||||||
//read_sdf_values("sdf_values_sample_camel.txt");
|
//read_sdf_values("sdf_values_sample_camel.txt");
|
||||||
//calculate_dihedral_angles();
|
calculate_dihedral_angles();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Polyhedron>
|
template <class Polyhedron>
|
||||||
|
|
@ -561,6 +561,9 @@ double Surface_mesh_segmentation<Polyhedron>::calculate_dihedral_angle_of_edge(
|
||||||
dot = -1.0;
|
dot = -1.0;
|
||||||
}
|
}
|
||||||
double angle = acos(dot) / CGAL_PI; // [0-1] normalize
|
double angle = acos(dot) / CGAL_PI; // [0-1] normalize
|
||||||
|
if(angle < epsilon) {
|
||||||
|
angle = epsilon;
|
||||||
|
}
|
||||||
return angle;
|
return angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue