58 #ifndef OPENMESH_DECIMATER_DECIMATERT_HH 59 #define OPENMESH_DECIMATER_DECIMATERT_HH 66 #include <OpenMesh/Core/Utils/Property.hh> 82 template <
typename MeshT >
91 typedef std::vector< Module* > ModuleList;
92 typedef typename ModuleList::iterator ModuleListIterator;
113 size_t decimate(
size_t _n_collapses = 0 );
126 return ( (_n_vertices < this->
mesh().n_vertices()) ?
127 decimate( this->
mesh().n_vertices() - _n_vertices ) : 0 );
147 typedef typename Mesh::HalfedgeHandle HalfedgeHandle;
157 : mesh_(_mesh), prio_(_prio), pos_(_pos)
161 less( VertexHandle _vh0, VertexHandle _vh1 )
162 {
return mesh_.property(prio_, _vh0) < mesh_.property(prio_, _vh1); }
165 greater( VertexHandle _vh0, VertexHandle _vh1 )
166 {
return mesh_.property(prio_, _vh0) > mesh_.property(prio_, _vh1); }
169 get_heap_position(VertexHandle _vh)
170 {
return mesh_.property(pos_, _vh); }
173 set_heap_position(VertexHandle _vh,
int _pos)
174 { mesh_.property(pos_, _vh) = _pos; }
198 #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ ) 199 std::unique_ptr<DeciHeap> heap_;
201 std::auto_ptr<DeciHeap> heap_;
215 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_DECIMATERT_CC) 216 #define OPENMESH_DECIMATER_TEMPLATES 220 #endif // OPENMESH_DECIMATER_DECIMATERT_HH defined
void heap_vertex(VertexHandle _vh)
Insert vertex in heap.
size_t decimate(size_t _n_collapses=0)
Perform a number of collapses on the mesh.
Mesh & mesh()
access mesh. used in modules.
size_t decimate_to(size_t _n_vertices)
Decimate the mesh to a desired target vertex complexity.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
size_t decimate_to_faces(size_t _n_vertices=0, size_t _n_faces=0)
Attempts to decimate the mesh until a desired vertex or face complexity is achieved.
DecimaterT(Mesh &_mesh)
Constructor.