From 82e9d4e5b9f0e6810af8ad5c738a2584594cb4ca Mon Sep 17 00:00:00 2001 From: lvalque Date: Mon, 8 Sep 2025 18:10:25 +0200 Subject: [PATCH] rename plane_plus_line to plane_and_line --- .../bench_garland_heckbert.cpp | 12 ++++++------ .../Edge_collapse/GarlandHeckbert_plane_policies.h | 2 +- .../Edge_collapse/GarlandHeckbert_policies.h | 4 ++-- .../GarlandHeckbert_probabilistic_plane_policies.h | 2 +- ...rlandHeckbert_probabilistic_triangle_policies.h | 2 +- .../PackageDescription.txt | 2 +- .../Surface_mesh_simplification.txt | 2 +- .../edge_collapse_garland_heckbert.cpp | 6 +++--- ...h => GarlandHeckbert_plane_and_line_policies.h} | 10 +++++----- .../Edge_collapse/GarlandHeckbert_policies.h | 4 ++-- .../edge_collapse_garland_heckbert_variations.cpp | 14 +++++++------- 11 files changed, 30 insertions(+), 30 deletions(-) rename Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/{GarlandHeckbert_plane_plus_line_policies.h => GarlandHeckbert_plane_and_line_policies.h} (92%) diff --git a/Surface_mesh_simplification/benchmark/Surface_mesh_simplification/bench_garland_heckbert.cpp b/Surface_mesh_simplification/benchmark/Surface_mesh_simplification/bench_garland_heckbert.cpp index 6ff4ba18c24..17ecf86f246 100644 --- a/Surface_mesh_simplification/benchmark/Surface_mesh_simplification/bench_garland_heckbert.cpp +++ b/Surface_mesh_simplification/benchmark/Surface_mesh_simplification/bench_garland_heckbert.cpp @@ -36,11 +36,11 @@ typedef SMS::GarlandHeckbert_plane_policies typedef SMS::GarlandHeckbert_probabilistic_plane_policies Prob_plane; typedef SMS::GarlandHeckbert_triangle_policies Classic_tri; typedef SMS::GarlandHeckbert_probabilistic_triangle_policies Prob_tri; -typedef SMS::GarlandHeckbert_policies Classic_plane_plus_line; +typedef SMS::GarlandHeckbert_policies Classic_plane_and_line; // Old policies composed with line policies typedef SMS::internal::GarlandHeckbert_line_policies Line_quadric; -typedef SMS::internal::GarlandHeckbert_composed_policies Proba_plane_plus_line; +typedef SMS::internal::GarlandHeckbert_composed_policies Proba_plane_and_line; typedef SMS::internal::GarlandHeckbert_composed_policies Classic_tri_plus_line; typedef SMS::internal::GarlandHeckbert_composed_policies Proba_tri_plus_line; @@ -125,15 +125,15 @@ int main(int argc, char** argv) else if(policy == "Prob_triangle") time=collapse_gh(tmesh, ratio, Prob_tri(tmesh)); else if(policy == "Plane_plus_line_0.1") - time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.1)); + time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.1)); else if(policy == "Plane_plus_line_0.01") - time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.01)); + time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.01)); else if(policy == "Plane_plus_line_0.001") - time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.001)); + time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.001)); else if(policy == "Classic_tri_line") time=collapse_gh(tmesh, ratio, Classic_tri_plus_line(tmesh, 100)); else if(policy == "Proba_plane_line") - time=collapse_gh(tmesh, ratio, Proba_plane_plus_line(tmesh, Prob_plane(tmesh), Line_quadric(tmesh), 100)); + time=collapse_gh(tmesh, ratio, Proba_plane_and_line(tmesh, Prob_plane(tmesh), Line_quadric(tmesh), 100)); else if(policy == "Proba_tri_line") time=collapse_gh(tmesh, ratio, Proba_tri_plus_line(tmesh, Prob_tri(tmesh), Line_quadric(tmesh), 100)); diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h index e0e7be23668..271502c26ca 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h @@ -25,7 +25,7 @@ These policies depend on the third party \ref thirdpartyEigen library. \sa `GarlandHeckbert_probabilistic_plane_policies` \sa `GarlandHeckbert_triangle_policies` \sa `GarlandHeckbert_probabilistic_triangle_policies` -\sa `GarlandHeckbert_plane_plus_line_policies` +\sa `GarlandHeckbert_plane_and_line_policies` */ template class GarlandHeckbert_plane_policies diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h index 9a292e76255..01844b213ce 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h @@ -6,7 +6,7 @@ namespace Surface_mesh_simplification { since \cgal 6.2, this class is an alias for the current state of the art of Garland-Heckbert policies (Section \ref SurfaceMeshSimplificationGarlandHeckbertStrategy). -It is currently an alias of `GarlandHeckbert_plane_plus_line_policies`. +It is currently an alias of `GarlandHeckbert_plane_and_line_policies`. The class `GarlandHeckbert_policies` regroups the cost and placement policies based on the Garland-Heckbert strategy (Section \ref SurfaceMeshSimplificationGarlandHeckbertStrategy), @@ -27,7 +27,7 @@ These policies depend on the third party \ref thirdpartyEigen library. \sa `GarlandHeckbert_probabilistic_plane_policies` \sa `GarlandHeckbert_triangle_policies` \sa `GarlandHeckbert_probabilistic_triangle_policies` -\sa `GarlandHeckbert_plane_plus_line_policies` +\sa `GarlandHeckbert_plane_and_line_policies` */ template diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h index 967978947db..63601750de0 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h @@ -26,7 +26,7 @@ These policies depend on the third party \ref thirdpartyEigen library. \sa `GarlandHeckbert_plane_policies` \sa `GarlandHeckbert_triangle_policies` \sa `GarlandHeckbert_probabilistic_triangle_policies` -\sa `GarlandHeckbert_plane_plus_line_policies` +\sa `GarlandHeckbert_plane_and_line_policies` */ template class GarlandHeckbert_probabilistic_plane_policies diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h index 458b85e57b4..5d0870d0c52 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h @@ -26,7 +26,7 @@ These policies depend on the third party \ref thirdpartyEigen library. \sa `GarlandHeckbert_plane_policies` \sa `GarlandHeckbert_probabilistic_plane_policies` \sa `GarlandHeckbert_triangle_policies` -\sa `GarlandHeckbert_plane_plus_line_policies` +\sa `GarlandHeckbert_plane_and_line_policies` */ template class GarlandHeckbert_probabilistic_triangle_policies diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt index 57aa8418e79..548234de826 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt @@ -49,7 +49,7 @@ - `CGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_plane_policies` - `CGAL::Surface_mesh_simplification::GarlandHeckbert_triangle_policies` - `CGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_triangle_policies` -- `CGAL::Surface_mesh_simplification::GarlandHeckbert_plane_plus_line_policies` +- `CGAL::Surface_mesh_simplification::GarlandHeckbert_plane_and_line_policies` - `CGAL::Surface_mesh_simplification::GarlandHeckbert_policies` \cgalCRPSection{Policy Enhancements} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index d95c03313c9..e2ca3decf18 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -426,7 +426,7 @@ The implementation of the Garland-Heckbert simplification policies is the result of Baskın Şenbaşlar (Google Summer of Code 2019), and Julian Komaromy (Google Summer of Code 2021) They both were mentored by Mael Rouxel-Labbé, who also contributed to the code and to the documentation. -Valque Léo added the `GarlandHeckbert_plane_plus_line_policies` functionality in \cgal 6.2. +Valque Léo added the `GarlandHeckbert_plane_and_line_policies` functionality in \cgal 6.2. */ } /* namespace CGAL */ diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp index 6b2b21bd401..7a077e23441 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp @@ -24,7 +24,7 @@ typedef SMS::GarlandHeckbert_plane_policies typedef SMS::GarlandHeckbert_probabilistic_plane_policies Prob_plane; typedef SMS::GarlandHeckbert_triangle_policies Classic_tri; typedef SMS::GarlandHeckbert_probabilistic_triangle_policies Prob_tri; -typedef SMS::GarlandHeckbert_plane_plus_line_policies Plane_plus_line; +typedef SMS::GarlandHeckbert_plane_and_line_policies Plane_and_line; template void collapse_gh(Surface_mesh& mesh, @@ -60,7 +60,7 @@ void collapse_gh(Surface_mesh& mesh, // Usage: // ./command [input] [ratio] [policy] [output] -// policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle), "pl" (plane plus line) +// policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle), "pl" (plane and line) int main(int argc, char** argv) { Surface_mesh mesh; @@ -95,7 +95,7 @@ int main(int argc, char** argv) else if(policy == "pt") collapse_gh(mesh, ratio); else - collapse_gh(mesh, ratio); + collapse_gh(mesh, ratio); CGAL::IO::write_polygon_mesh((argc > 4) ? argv[4] : "out.off", mesh, CGAL::parameters::stream_precision(17)); diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_plus_line_policies.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h similarity index 92% rename from Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_plus_line_policies.h rename to Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h index 0321e09bff8..11ff1edccc1 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_plus_line_policies.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h @@ -8,8 +8,8 @@ // // Author(s) : Leo Valque -#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H -#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H #include @@ -25,7 +25,7 @@ namespace CGAL { namespace Surface_mesh_simplification { template -class GarlandHeckbert_plane_plus_line_policies +class GarlandHeckbert_plane_and_line_policies : public internal::GarlandHeckbert_composed_policies, internal::GarlandHeckbert_line_policies, @@ -42,7 +42,7 @@ public: typedef typename GeomTraits::FT FT; public: - GarlandHeckbert_plane_plus_line_policies(TriangleMesh& tmesh, + GarlandHeckbert_plane_and_line_policies(TriangleMesh& tmesh, const FT dm = FT(100), const FT line_weight=FT(0.01)) : Base(tmesh, FT(1.)/line_weight, dm) @@ -57,4 +57,4 @@ public: } // namespace Surface_mesh_simplification } // namespace CGAL -#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H \ No newline at end of file +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H \ No newline at end of file diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h index 77b9780a447..1be69571481 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h @@ -21,13 +21,13 @@ #include #include #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { template -using GarlandHeckbert_policies = GarlandHeckbert_plane_plus_line_policies; +using GarlandHeckbert_policies = GarlandHeckbert_plane_and_line_policies; } // namespace Surface_mesh_simplification } // namespace CGAL diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp index 5ee14dee891..8a9fd28bd46 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp @@ -32,7 +32,7 @@ typedef SMS::GarlandHeckbert_plane_policies typedef SMS::GarlandHeckbert_probabilistic_plane_policies Prob_plane; typedef SMS::GarlandHeckbert_triangle_policies Classic_tri; typedef SMS::GarlandHeckbert_probabilistic_triangle_policies Prob_tri; -typedef SMS::GarlandHeckbert_plane_plus_line_policies Classic_plane_plus_line; +typedef SMS::GarlandHeckbert_plane_and_line_policies Classic_plane_and_line; // settings for benchmarking - throw away the first n_burns results and keep the n_samples samples constexpr int n_burns = 1; @@ -42,7 +42,7 @@ constexpr std::size_t classic_plane_index = 0; constexpr std::size_t prob_plane_index = 1; constexpr std::size_t classic_tri_index = 2; constexpr std::size_t prob_tri_index = 3; -constexpr std::size_t plane_plus_line_index = 4; +constexpr std::size_t plane_and_line_index = 4; // ================================================================================================= // ================================================================================================= @@ -157,7 +157,7 @@ void time_all_policies(const TriangleMesh& mesh, time_mesh(mesh, out); time_mesh(mesh, out); time_mesh(mesh, out); - time_mesh(mesh, out); + time_mesh(mesh, out); } // ================================================================================================= @@ -193,7 +193,7 @@ std::array hausdorff_errors(const TriangleMesh& mesh, ret[prob_plane_index] = hausdorff_error(mesh, ratio); ret[classic_tri_index] = hausdorff_error(mesh, ratio); ret[prob_tri_index] = hausdorff_error(mesh, ratio); - ret[plane_plus_line_index] = hausdorff_error(mesh, ratio); + ret[plane_and_line_index] = hausdorff_error(mesh, ratio); return ret; } @@ -214,7 +214,7 @@ void hausdorff_errors(const TriangleMesh& mesh, out << "prob plane : " << errs[prob_plane_index] << std::endl; out << "classic tri : " << errs[classic_tri_index] << std::endl; out << "prob tri : " << errs[prob_tri_index] << std::endl; - out << "plane + line : " << errs[plane_plus_line_index] << std::endl; + out << "plane + line : " << errs[plane_and_line_index] << std::endl; } } @@ -248,7 +248,7 @@ void gather_face_aspect_ratio(const TriangleMesh& mesh, edge_collapse(pp); edge_collapse(ct); edge_collapse(pt); - edge_collapse(pl); + edge_collapse(pl); out << "Face aspect-ratio: classic plane\n"; write_aspect_ratios(cp, out); @@ -258,7 +258,7 @@ void gather_face_aspect_ratio(const TriangleMesh& mesh, write_aspect_ratios(ct, out); out << "Face aspect-ratio: prob triangle\n"; write_aspect_ratios(pt, out); - out << "Face aspect-ratio: classic plane plus line\n"; + out << "Face aspect-ratio: classic plane and line\n"; write_aspect_ratios(pl, out); }