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 17ecf86f246..1caad11fe12 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 @@ -89,9 +89,6 @@ std::string getFileNameWithoutExtension(const std::string& filePath) { return path.stem().string(); // 'stem' gets the filename without extension } -// Usage: -// ./command [input] [ratio] [policy] [output] -// policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle) int main(int argc, char** argv) { Surface_mesh mesh; 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 01844b213ce..4c567a18e86 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 @@ -4,7 +4,7 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef -since \cgal 6.2, this class is an alias for the current state of the art of Garland-Heckbert policies +This class is an alias for the current state-of-the-art Garland-Heckbert policies (Section \ref SurfaceMeshSimplificationGarlandHeckbertStrategy). It is currently an alias of `GarlandHeckbert_plane_and_line_policies`. 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 be2cc83f45e..2f88ce3394e 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 @@ -188,11 +188,11 @@ face normals). This variance naturally deteriorates the tightness of the result, hand it enables creating more uniform triangulations and the approach is more tolerant to noise, while still maintaining feature sensitivity. -Another extension of the Garland–Heckbert approach was introduced by Liu et al. \cgalCite{10.1111:cgf.70184}, who -proposed the concept of line quadrics. In these quadrics, the cost is defined as the distance to the line passing -through the input vertices and aligned with their normals. These line quadrics are combined with the traditional -plane quadrics, but with a small weight (0.01 by default), producing more uniform triangulations while preserving -the tightness of the approximation. +Another extension of the Garland–Heckbert approach was introduced by Liu et al. \cgalCite{10.1111:cgf.70184}, +who enhance the classic plane-based quadric error metrics with line quadrics. +More precisely, line quadrics, which encode the distance to a line, are defined at all input vertices using the supporting lines of the normals. +These quadrics are then combined with the classic plane quadrics, but with a small weight (0.01 by default). +This results in more uniform triangulations, while preserving the tightness of the approximation. \cgalFigureAnchor{SurfaceMeshSimplification_GH}
@@ -406,7 +406,7 @@ steps of the simplification algorithm. Each Garland-Heckbert simplification strategy is implemented with a single class that regroups both the cost and the placement policies, which must be used together as they share vertex quadric data. -The state of the art strategy of using plane-based quadric error metrics plus line-base quadric error metrics is implemented with the class +The state-of-the-art strategy of combining plane and line-based quadric error metrics is implemented with the class `Surface_mesh_simplification::GarlandHeckbert_policies`. Although both policies must be used together, it is still possible to wrap either policy using behavior modifiers such as `Surface_mesh_simplification::Bounded_normal_change_placement`. @@ -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. -Léo Valque added the `GarlandHeckbert_plane_and_line_policies` functionality in \cgal 6.2. +Léo Valque added the `Surface_mesh_simplification::GarlandHeckbert_plane_and_line_policies` functionality in \cgal 6.2. */ } /* namespace CGAL */ diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h index 033a0258bbe..0d6bb9c08fa 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h @@ -43,7 +43,7 @@ public: public: GarlandHeckbert_plane_and_line_policies(TriangleMesh& tmesh, - const FT line_weight=FT(0.01), + const FT line_weight = FT(0.01), const FT dm = FT(100)) : Base(tmesh, FT(1.)/line_weight, dm) { } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_composed_policies.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_composed_policies.h index 5c80d1ebe50..791b0a8fa34 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_composed_policies.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_composed_policies.h @@ -96,9 +96,9 @@ class GarlandHeckbert_composed_policies { public: typedef internal::Composed_quadric_calculator + typename GH_policies_1::Quadric_calculator, + typename GH_policies_2::Quadric_calculator, + invertible> Quadric_calculator; private: diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h index 9d617597106..ec5b1242686 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h @@ -280,8 +280,8 @@ construct_optimal_point_singular(const typename GarlandHeckbert_matrix_types 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_and_line_policies Classic_plane_and_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;