From 559b3a3d64678458c79d8f66e75dfbbe573a620c Mon Sep 17 00:00:00 2001 From: Lingjie Zhu Date: Sun, 23 Jul 2017 11:42:56 +0800 Subject: [PATCH] rename _3 suffix --- .../vsa_example.cpp | 18 +++++------ .../vsa_metric_example.cpp | 32 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_example.cpp index 472c2896a50..b1d542d4637 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_example.cpp @@ -12,12 +12,12 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; typedef Kernel::FT FT; -typedef Kernel::Vector_3 Vector; -typedef Kernel::Point_3 Point; +typedef Kernel::Vector_3 Vector_3; +typedef Kernel::Point_3 Point_3; typedef Polyhedron::Facet_const_handle Facet_const_handle; typedef Polyhedron::Halfedge_const_handle Halfedge_const_handle; typedef Polyhedron::Facet_const_iterator Facet_const_iterator; -typedef boost::associative_property_map > FacetNormalMap; +typedef boost::associative_property_map > FacetNormalMap; typedef boost::associative_property_map > FacetAreaMap; typedef boost::property_map::type VertexPointMap; @@ -41,15 +41,15 @@ int main(int argc, char *argv[]) } // construct facet normal & area map - std::map facet_normals; + std::map facet_normals; std::map facet_areas; for(Facet_const_iterator fitr = mesh.facets_begin(); fitr != mesh.facets_end(); ++fitr) { const Halfedge_const_handle he = fitr->halfedge(); - const Point p1 = he->opposite()->vertex()->point(); - const Point p2 = he->vertex()->point(); - const Point p3 = he->next()->vertex()->point(); - Vector normal = CGAL::unit_normal(p1, p2, p3); - facet_normals.insert(std::pair(fitr, normal)); + const Point_3 p1 = he->opposite()->vertex()->point(); + const Point_3 p2 = he->vertex()->point(); + const Point_3 p3 = he->next()->vertex()->point(); + Vector_3 normal = CGAL::unit_normal(p1, p2, p3); + facet_normals.insert(std::pair(fitr, normal)); FT area(std::sqrt(CGAL::to_double(CGAL::squared_area(p1, p2, p3)))); facet_areas.insert(std::pair(fitr, area)); } diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_metric_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_metric_example.cpp index a3be094e3a7..303d5c42f7d 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_metric_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_metric_example.cpp @@ -12,21 +12,21 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; typedef Kernel::FT FT; -typedef Kernel::Vector_3 Vector; -typedef Kernel::Point_3 Point; +typedef Kernel::Vector_3 Vector_3; +typedef Kernel::Point_3 Point_3; typedef Polyhedron::Facet_handle Facet_handle; typedef Polyhedron::Facet_const_handle Facet_const_handle; typedef Polyhedron::Halfedge_const_handle Halfedge_const_handle; typedef Polyhedron::Facet_const_iterator Facet_const_iterator; -typedef boost::associative_property_map > FacetNormalMap; +typedef boost::associative_property_map > FacetNormalMap; typedef boost::associative_property_map > FacetAreaMap; -typedef boost::associative_property_map > FacetCenterMap; +typedef boost::associative_property_map > FacetCenterMap; typedef boost::property_map::type VertexPointMap; struct PointProxy { Facet_handle seed; - Point center; - Vector normal; + Point_3 center; + Vector_3 normal; }; struct CompactMetric { @@ -56,14 +56,14 @@ struct PointProxyFitting { CGAL_assertion(beg != end); // fitting normal - Vector norm = CGAL::NULL_VECTOR; + Vector_3 norm = CGAL::NULL_VECTOR; for (FacetIterator fitr = beg; fitr != end; ++fitr) { norm = norm + normal_pmap[*fitr] * area_pmap[*fitr]; } norm = norm / std::sqrt(CGAL::to_double(norm.squared_length())); // fitting center - Vector center = CGAL::NULL_VECTOR; + Vector_3 center = CGAL::NULL_VECTOR; FT area(0); for (FacetIterator fitr = beg; fitr != end; ++fitr) { center = center + (center_pmap[*fitr] - CGAL::ORIGIN) * area_pmap[*fitr]; @@ -143,19 +143,19 @@ int main(int argc, char *argv[]) } // construct facet normal & area map - std::map facet_normals; + std::map facet_normals; std::map facet_areas; - std::map facet_centers; + std::map facet_centers; for(Facet_const_iterator fitr = mesh.facets_begin(); fitr != mesh.facets_end(); ++fitr) { const Halfedge_const_handle he = fitr->halfedge(); - const Point p1 = he->opposite()->vertex()->point(); - const Point p2 = he->vertex()->point(); - const Point p3 = he->next()->vertex()->point(); - Vector normal = CGAL::unit_normal(p1, p2, p3); - facet_normals.insert(std::pair(fitr, normal)); + const Point_3 p1 = he->opposite()->vertex()->point(); + const Point_3 p2 = he->vertex()->point(); + const Point_3 p3 = he->next()->vertex()->point(); + Vector_3 normal = CGAL::unit_normal(p1, p2, p3); + facet_normals.insert(std::pair(fitr, normal)); FT area(std::sqrt(CGAL::to_double(CGAL::squared_area(p1, p2, p3)))); facet_areas.insert(std::pair(fitr, area)); - facet_centers.insert(std::pair(fitr, CGAL::centroid(p1, p2, p3))); + facet_centers.insert(std::pair(fitr, CGAL::centroid(p1, p2, p3))); } FacetNormalMap normal_pmap(facet_normals); FacetAreaMap area_pmap(facet_areas);