Cleanup of GetFilter

This commit is contained in:
Andreas Fabri 2020-11-10 10:52:53 +00:00
parent c510a89ea0
commit ac1200fe28
10 changed files with 18 additions and 18 deletions

View File

@ -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)

View File

@ -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 <typename GetFilter_>
template <typename Filter_>
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);
/// @}

View File

@ -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 <typename GeomTraits, typename GetFilter_>
template <typename GeomTraits, typename Filter_>
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);
/// @}

View File

@ -2,7 +2,7 @@
\ingroup PkgSurfaceMeshSimplificationConcepts
\cgalConcept
The concept `GetFilter` describes the requirements for the <I>policy
The concept `Filter` describes the requirements for the <I>policy
function object</I> 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:

View File

@ -27,7 +27,7 @@
- `StopPredicate`
- `GetCost`
- `GetPlacement`
- `GetFilter`
- `Filter`
- `EdgeCollapseSimplificationVisitor`
\cgalCRPSection{Functions}

View File

@ -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<Surface_mesh>())
.get_filter(filter)
.filter(filter)
.get_placement(Placement()));
std::cout << t.time() << " sec" << std::endl;

View File

@ -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;

View File

@ -100,7 +100,7 @@ int edge_collapse(TM& tmesh,
choose_parameter<No_constrained_edge_map<TM> >(get_parameter(np, internal_np::edge_is_constrained)),
choose_parameter<LindstromTurk_cost<TM> >(get_parameter(np, internal_np::get_cost_policy)),
choose_parameter<LindstromTurk_placement<TM> >(get_parameter(np, internal_np::get_placement_policy)),
choose_parameter<internal::Dummy_filter>(get_parameter(np, internal_np::get_filter_policy)),
choose_parameter<internal::Dummy_filter>(get_parameter(np, internal_np::filter)),
choose_parameter<internal::Dummy_visitor>(get_parameter(np, internal_np::visitor)));
}