diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h index a665821f54c..36d98b88af4 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation.h @@ -1,18 +1,18 @@ #ifndef CGAL_SURFACE_MESH_SEGMENTATION_H #define CGAL_SURFACE_MESH_SEGMENTATION_H -/* NEED TO BE DONE */ -/* About implementation: -/* +) I am not using BGL, as far as I checked there is a progress on BGL redesign +/* NEED TO BE DONE + * About implementation: + * +) I am not using BGL, as far as I checked there is a progress on BGL redesign (https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/BGL) which introduces some features - for face-based traversal / manipulation by FaceGraphs */ -/* +) Deciding on which parameters will be taken from user */ -/* +) Make it more readable: calculate_sdf_value_of_facet function. - -/* About paper (and correctness / efficiency etc.): -/* +) Weighting ray distances with inverse of their angles: not sure how to weight exactly */ -/* +) Anisotropic smoothing: have no idea what it is exactly, should read some material (google search is not enough) */ -/* +) Deciding how to generate rays in cone: for now using "polar angle" and "generate in square then accept-reject" techniques */ + for face-based traversal / manipulation by FaceGraphs + * +) Deciding on which parameters will be taken from user + * +) Make it more readable: calculate_sdf_value_of_facet function. + * About paper (and correctness / efficiency etc.): + * +) Weighting ray distances with inverse of their angles: not sure how to weight exactly + * +) Anisotropic smoothing: have no idea what it is exactly, should read some material (google search is not enough) + * +) Deciding how to generate rays in cone: for now using "polar angle" and "generate in square then accept-reject" techniques + */ #include #include #include @@ -58,7 +58,7 @@ protected: typedef std::map Face_center_map; /*Sampled points from disk, t1 = coordinate-x, t2 = coordinate-y, t3 = angle with cone-normal. */ typedef CGAL::Triple Disk_sample; - typedef std::vector> Disk_samples_list; + typedef std::vector > Disk_samples_list; template struct compare_pairs { @@ -69,7 +69,7 @@ protected: template struct compare_pairs_using_first { - bool operator()(ValueTypeName& v1, ValueTypeName& v2) { + bool operator()(const ValueTypeName& v1, const ValueTypeName& v2) { return v1.first < v2.first; } }; @@ -346,7 +346,7 @@ Surface_mesh_segmentation::calculate_sdf_value_from_rays_with_trimme std::vector& ray_distances, std::vector& ray_weights) const { - std::vector> distances_with_weights; + std::vector > distances_with_weights; distances_with_weights.reserve(ray_distances.size()); typename std::vector::iterator w_it = ray_weights.begin(); for(std::vector::iterator dist_it = ray_distances.begin(); @@ -355,7 +355,7 @@ Surface_mesh_segmentation::calculate_sdf_value_from_rays_with_trimme (*w_it))); } std::sort(distances_with_weights.begin(), distances_with_weights.end(), - compare_pairs_using_first>()); + compare_pairs_using_first >()); int b = floor(distances_with_weights.size() / 20.0 + 0.5); // Eliminate %5. int e = distances_with_weights.size() - b; // Eliminate %5.