diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp index 673215ffa98..622f3352488 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp @@ -16,7 +16,7 @@ typedef Mesh_approximation::Error_metric L21_metric; int main() { - // read input surface triangle mesh + // reads input surface triangle mesh Polyhedron input; std::ifstream file("data/mask.off"); if (!file || !(file >> input) || input.empty()) { @@ -24,34 +24,36 @@ int main() return EXIT_FAILURE; } - // create VSA algorithm instance + // creates VSA algorithm instance Mesh_approximation approx(input, get(boost::vertex_point, const_cast(input))); - // set error and fitting functors + // sets error and fitting functors L21_metric metric(input, get(boost::vertex_point, const_cast(input))); approx.set_metric(metric); - // seeding 100 random proxies + // seeds 100 random proxies approx.seeding(CGAL::Random, 100); - // run 30 iterations + // runs 30 iterations approx.run(30); - // add 3 proxies to the one with the maximum fitting error - // run 5 iterations between each addition + // adds 3 proxies to the one with the maximum fitting error, + // running 5 iterations between each addition approx.add_to_furthest_proxies(3, 5); - // run 10 iterations + // runs 10 iterations approx.run(10); - // teleport 2 proxies to tunnel out of local minima - // run 5 iterations between each teleport + // teleports 2 proxies to tunnel out of local minima, + // running 5 iterations between each teleport approx.teleport_proxies(2, 5); + + // runs 10 iterations approx.run(10); - // meshing with default parameters + // generates output mesh with default parameters approx.extract_mesh(); return EXIT_SUCCESS; diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp index e3ed4c763d0..cfb6e07323d 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp @@ -62,7 +62,7 @@ typedef CGAL::VSA_approximation< int main() { - // create polyhedral surface and read input mesh + // creates polyhedral surface and reads input mesh Polyhedron input; std::ifstream file("data/bear.off"); if (!file || !(file >> input) || input.empty()) { @@ -70,7 +70,7 @@ int main() return EXIT_FAILURE; } - // construct precomputed facet normal and area map + // constructs precomputed facet normal and area map std::map facet_areas; std::map facet_centers; for(Facet_iterator fitr = input.facets_begin(); fitr != input.facets_end(); ++fitr) { @@ -86,15 +86,15 @@ int main() Facet_area_map area_pmap(facet_areas); Facet_center_map center_pmap(facet_centers); - // create compact metric approximation algorithm instance + // creates compact metric approximation algorithm instance Approximation approx(input, get(boost::vertex_point, const_cast(input))); - // construct and set metric + // constructs and set metric Compact_metric metric(center_pmap, area_pmap); approx.set_metric(metric); - // approximation via 200 proxies and 30 iterations + // approximates via 200 proxies and 30 iterations approx.seeding(CGAL::Hierarchical, 200); approx.run(30); diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp index fdad52cd354..85f1dfc8ffb 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp @@ -13,7 +13,7 @@ typedef boost::associative_property_map Facet_proxy_pmap; int main() { - // create polyhedral surface and read input surface triangle mesh + // creates polyhedral surface and reads input mesh Polyhedron input; std::ifstream file("data/mask.off"); if (!file || !(file >> input) || input.empty()) { @@ -36,7 +36,7 @@ int main() nb_of_iterations(30). // number of iterations after seeding facet_proxy_map(fpxmap)); // output facet proxy-id map - // TODO: retrieve segments of the segmentation + // TODO: iterates over segments and outputs to console return EXIT_SUCCESS; }