\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.3 - Triangulated Surface Mesh Simplification
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
EdgeCollapseSimplificationVisitor Concept Reference

Definition

The concept EdgeCollapseSimplificationVisitor describes the requirements for the visitor object which is used to track the edge collapse simplification algorithm.

The several callbacks given as member functions in the visitor are called from certain places in the algorithm implementation.

Types

typedef unspecified_type ECM
 The type of the surface to simplify. More...
 
typedef unspecified_type FT
 A field type representing the collapse cost.
 
typedef unspecified_type Profile
 The type of the edge profile cache. More...
 
typedef unspecified_type size_type
 An integer type representing the number of edges.
 
CGAL::halfedge_graph_traits
< ECM >::Point 
Point
 The point type for the surface vertex. More...
 

Operations

void OnStarted (ECM &surface)
 Called before the algorithm starts.
 
void OnFinished (ECM &surface)
 Called after the algorithm finishes.
 
void OnStopConditionReached (ECM &surface)
 Called when the StopPredicate returned true (but not if the algorithm terminates because the surface could not be simplified any further).
 
void OnCollected (Profile const &profile, boost::optional< FT > cost)
 Called during the collecting phase (when a cost is assigned to the edges), for each edge collected.
 
void OnSelected (Profile const &profile, boost::optional< FT > cost, size_type initial_count, size_type current_count)
 Called during the processing phase (when edges are collapsed), for each edge that is selected. More...
 
void OnCollapsing (Profile const &profile, boost::optional< Point > placement)
 Called when an edge is about to be collapsed and replaced by a vertex whose position is *placement. More...
 
void OnNonCollapsable (Profile const &profile)
 Called for each selected edge which cannot be collapsed because doing so would change the topological type of the surface (turn it into a non-manifold for instance).
 

Member Typedef Documentation

The type of the surface to simplify.

Must be a model of the EdgeCollapsableMesh concept.

The type of the edge profile cache.

Must be a model of the EdgeProfile concept.

Member Function Documentation

void EdgeCollapseSimplificationVisitor::OnCollapsing ( Profile const &  profile,
boost::optional< Point placement 
)

Called when an edge is about to be collapsed and replaced by a vertex whose position is *placement.

If placement is absent (meaning that it could not be computed) the edge will not be collapsed.

void EdgeCollapseSimplificationVisitor::OnSelected ( Profile const &  profile,
boost::optional< FT cost,
size_type  initial_count,
size_type  current_count 
)

Called during the processing phase (when edges are collapsed), for each edge that is selected.

This method is called before the algorithm checks if the edge is collapsable.

cost indicates the current collapse cost for the edge. If absent (meaning that it could not be computed) the edge will not be collapsed.

initial_count and current_count refer to the number of edges.

Member Data Documentation

CGAL::halfedge_graph_traits<ECM>::Point EdgeCollapseSimplificationVisitor::Point

The point type for the surface vertex.

Must be a model of Point_3.