From 83e7abf04271b33d3136d4ffa4258dfafb3aee71 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 21 Jul 2021 12:47:03 +0200 Subject: [PATCH] Changes after review --- .../Polygon_mesh_processing/orient_polygon_soup.h | 14 +++++++------- .../demo/Polyhedron/Scene_polygon_soup_item.cpp | 5 +---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h index 6d1e7d3857d..c4a59d49f74 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h @@ -42,10 +42,10 @@ namespace internal { struct Polygon_soup_orientation_visitor{ inline virtual void non_manifold_edge(const std::size_t&, const std::size_t&){} - inline virtual void duplicate_vertex(const std::size_t&, const std::size_t&){} + inline virtual void duplicated_vertex(const std::size_t&, const std::size_t&){} inline virtual void non_manifold_vertex(const std::size_t&){} - inline virtual void update_polygon_id(const std::size_t&, const std::size_t&, const std::size_t&){} - inline virtual void reverse_polygon(const std::size_t&) {} + inline virtual void point_id_in_polygon_updated(const std::size_t&, const std::size_t&, const std::size_t&){} + inline virtual void polygon_orientation_reversed(const std::size_t&) {} }; template @@ -134,7 +134,7 @@ struct Polygon_soup_orienter } void inverse_orientation(const std::size_t index) { - visitor.reverse_polygon(index); + visitor.polygon_orientation_reversed(index); std::reverse(polygons[index].begin(), polygons[index].end()); } @@ -143,7 +143,7 @@ struct Polygon_soup_orienter V_ID old_index, V_ID new_index) { - visitor.update_polygon_id(polygon_id, old_index, new_index); + visitor.point_id_in_polygon_updated(polygon_id, old_index, new_index); for(V_ID& i : polygons[polygon_id]) if( i==old_index ) i=new_index; @@ -331,7 +331,7 @@ struct Polygon_soup_orienter } // end while loop on all non-oriented polygons remaining } - /// A vertex is said to be .3 if its link is neither a cycle nor a chain, + /// A vertex is said to be singular if its link is neither a cycle nor a chain, /// but several cycles and chains. /// For each such vertex v, we consider each set of polygons incident to v /// and sharing a non-marked edge incident to v. A copy of v is assigned to @@ -402,7 +402,7 @@ struct Polygon_soup_orienter for(const V_ID_and_Polygon_ids& vid_and_pids : vertices_to_duplicate) { V_ID new_index = static_cast(points.size()); - visitor.duplicate_vertex(vid_and_pids.first, new_index); + visitor.duplicated_vertex(vid_and_pids.first, new_index); points.push_back( points[vid_and_pids.first] ); for(P_ID polygon_id : vid_and_pids.second) replace_vertex_index_in_polygon(polygon_id, vid_and_pids.first, new_index); diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index bb3f56b14a6..3cce78bd51b 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -429,10 +429,7 @@ Scene_polygon_soup_item::orient(std::vector Visitor(std::vector >& nm_vertices) :nm_vertices(nm_vertices){} - Visitor(const Visitor& other) - :nm_vertices(other.nm_vertices){} - - void duplicate_vertex(const std::size_t& v1, const std::size_t& v2) final + void duplicated_vertex(const std::size_t& v1, const std::size_t& v2) final { nm_vertices.push_back(std::make_pair(v1, v2)); }