diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 5a43ac0b601..776df8125f4 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -106,7 +106,7 @@ CGAL_add_named_parameter(do_not_modify_t, do_not_modify, do_not_modify) // List of named parameters that we use in the package 'Surface Mesh Simplification' CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost) CGAL_add_named_parameter(get_placement_policy_t, get_placement_policy, get_placement) -CGAL_add_named_parameter(get_filter_policy_t, get_filter_policy, get_filter) +CGAL_add_named_parameter(filter_t, filter, filter) //to be documented CGAL_add_named_parameter(face_normal_t, face_normal, face_normal_map) diff --git a/Polygon_mesh_processing/include/CGAL/Envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h similarity index 100% rename from Polygon_mesh_processing/include/CGAL/Envelope.h rename to Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h similarity index 100% rename from Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Envelope_filter.h rename to Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h index 7f0d229a753..de36e822ce4 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h @@ -5,18 +5,18 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef -The class `Bounded_normal_change_filter` is a model for the `GetFilter` concept. +The class `Bounded_normal_change_filter` is a model for the `Filter` concept. It rejects the placement if the nested filter rejects it, or if any triangle in the profile changes the normal by more than 90 degree, in this order. -\tparam Get_filter_ must be a model of the concept `GetFilter`. It defaults to a class that does +\tparam Filter_ must be a model of the concept `Filter`. It defaults to a class that does not filter any placement. -\cgalModels `GetFilter` +\cgalModels `Filter` */ -template +template class Bounded_normal_change_filter { public: @@ -31,9 +31,9 @@ public: /*! Constructor - \param get_filter is the filter that will be filtered. + \param filter is the filter that will be filtered. */ - Bounded_normal_change_filter(const GetFilter_& get_filter); + Bounded_normal_change_filter(const Filter_& filter); /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Envelope_filter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h similarity index 77% rename from Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Envelope_filter.h rename to Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index 2a464f0fece..617005d0a4b 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Envelope_filter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -5,20 +5,20 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef -The class `Polyhedral_envelope_filter` is a model for the `GetFilter` concept. +The class `Polyhedral_envelope_filter` is a model for the `Filter` concept. It rejects the placement if the nested filter rejects it, or if any triangle in the profile is not inside the polyhedral envelope, in this order. -\tparam Get_filter_ must be a model of the concept `GetFilter`. It defaults to a class that does +\tparam Filter_ must be a model of the concept `Filter`. It defaults to a class that does not filter any placement. -\cgalModels `GetFilter` +\cgalModels `Filter` \sa `Polyhedral_envelope` */ -template +template class Polyhedral_envelope_filter { public: @@ -38,7 +38,7 @@ public: \param get_filter is the filter that will be filtered. */ - Polyhedral_envelope_filter(const FT& dist, const GetFilter_& get_filter); + Polyhedral_envelope_filter(const FT& dist, const Filter_& get_filter); /// @} diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetFilter.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetFilter.h index 40dbb608c38..13a38fe0275 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetFilter.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/GetFilter.h @@ -2,7 +2,7 @@ \ingroup PkgSurfaceMeshSimplificationConcepts \cgalConcept -The concept `GetFilter` describes the requirements for the policy +The concept `Filter` describes the requirements for the policy function object which gets the profile and placement of an edge and which can filter the placement. The filtering is only done when an edge is taken from the priority queue in order to get collapsed, @@ -19,7 +19,7 @@ be absent). The value `boost::none` indicates that the edge should not be collap */ -class GetFilter +class Filter { public: diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt index cddaee10da5..173ca2870fb 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt @@ -27,7 +27,7 @@ - `StopPredicate` - `GetCost` - `GetPlacement` -- `GetFilter` +- `Filter` - `EdgeCollapseSimplificationVisitor` \cgalCRPSection{Functions} diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index b82def29fb1..bf28c03ee8a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -66,7 +66,7 @@ int main(int argc, char** argv) SMS::Bounded_normal_change_filter<> filter; SMS::edge_collapse(surface_mesh, stop, CGAL::parameters::get_cost(SMS::LindstromTurk_cost()) - .get_filter(filter) + .filter(filter) .get_placement(Placement())); std::cout << t.time() << " sec" << std::endl; diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp index 386c4c4156a..3ce6fe960d1 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp @@ -46,7 +46,7 @@ int main(int argc, char** argv) std::cout << "eps = " << 0.01*diag << std::endl; Placement placement; Filter filter(0.01*diag); - SMS::edge_collapse(mesh, stop, CGAL::parameters::get_cost(Cost()).get_filter(filter).get_placement(placement)); + SMS::edge_collapse(mesh, stop, CGAL::parameters::get_cost(Cost()).filter(filter).get_placement(placement)); std::ofstream out("out.off"); out << mesh << std::endl; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h index 0f7bfc8ad15..37dcc4f65cf 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h @@ -100,7 +100,7 @@ int edge_collapse(TM& tmesh, choose_parameter >(get_parameter(np, internal_np::edge_is_constrained)), choose_parameter >(get_parameter(np, internal_np::get_cost_policy)), choose_parameter >(get_parameter(np, internal_np::get_placement_policy)), - choose_parameter(get_parameter(np, internal_np::get_filter_policy)), + choose_parameter(get_parameter(np, internal_np::filter)), choose_parameter(get_parameter(np, internal_np::visitor))); }