Fernando Cacciola, Mael Rouxel-Labbé, Baskın Şenbaşlar, and Julian Komaromy
This package provides an algorithm to simplify a triangulated surface mesh by edge collapsing. Users can define cost, constraints, and placement strategies to decide when and how should edges be collapsed. A few strategies are offered by default, such as the Turk/Lindstrom and Garland-Heckbert memoryless approaches.
Extra: The geometric traits class must be compatible with the vertex point type.
a property map associating to each halfedge of tmesh a unique index between 0 and num_halfedges(tmesh) - 1
Type: a class model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a policy which returns the collapse cost for an edge
a property map associating to each vertex of tmesh a unique index between 0 and num_vertices(tmesh) - 1
Type: a class model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
Extra: This parameter is only used by debug functions and is usually not needed for users.
a Boolean tag indicating if the ordering of elements to be collapsed in the priority queue can be relaxed
Extra: Using a relaxed order will allow the algorithm to use a faster priority queue. However, the ordering of the priority queue is no longer strict and there is a possibility that some elements that ought to have been collapsed are not actually collapsed.
Semantics
The simplification process continues until the should_stop policy returns true or until the surface mesh cannot be simplified any further due to topological constraints.
get_cost and get_placement are the policies which control the cost-strategy, that is, the order in which edges are collapsed and the remaining vertex is re-positioned.
visitor is used to keep track of the simplification process. It has several member functions which are called at certain points in the simplification code.