CGAL 5.6.1 - 2D Polyline Simplification
PolylineSimplificationStopPredicate Concept Reference


Public Member Functions

template<class CDT >
bool operator() (const CGAL::Constrained_triangulation_plus_2< CDT > &ct, CGAL::Constrained_triangulation_plus_2< CDT >::Vertex_handle q, typename CDT::Geom_traits::FT cost, std::size_t initial_count, std::size_t current_count) const
 Indicates if the simplification must be stopped. More...

Member Function Documentation

◆ operator()()

template<class CDT >
bool PolylineSimplificationStopPredicate::operator() ( const CGAL::Constrained_triangulation_plus_2< CDT > &  ct,
CGAL::Constrained_triangulation_plus_2< CDT >::Vertex_handle  q,
typename CDT::Geom_traits::FT  cost,
std::size_t  initial_count,
std::size_t  current_count 
) const

Indicates if the simplification must be stopped.

This is called right before each vertex is about to be removed.

ctThe underlying constrained Delaunay triangulation which embeds the polyline constraints
qThe current vertex about to be removed
costThe associated cost for removing the current vertex (as given by PolylineSimplificationCostFunction)
initial_countThe initial number of vertices in the entire polyline set (including intersection vertices not in any source polyline)
current_countThe current number of vertices
true if the algorithm should stop, false if it should continue.
Template Parameters
CDTmust be CGAL::Constrained_triangulation_plus_2 with a vertex type that is model of PolylineSimplificationVertexBase_2.