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;
107 size_t decimate(
size_t _n_collapses = 0 );
112 return ( (_n_vertices < this->
mesh().n_vertices()) ?
113 decimate( this->
mesh().n_vertices() - _n_vertices ) : 0 );
135 : mesh_(_mesh), prio_(_prio), pos_(_pos)
139 less( VertexHandle _vh0, VertexHandle _vh1 )
140 {
return mesh_.property(prio_, _vh0) < mesh_.property(prio_, _vh1); }
143 greater( VertexHandle _vh0, VertexHandle _vh1 )
144 {
return mesh_.property(prio_, _vh0) > mesh_.property(prio_, _vh1); }
147 get_heap_position(VertexHandle _vh)
148 {
return mesh_.property(pos_, _vh); }
151 set_heap_position(VertexHandle _vh,
int _pos)
152 { mesh_.property(pos_, _vh) = _pos; }
176 #if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
177 std::unique_ptr<DeciHeap> heap_;
179 std::auto_ptr<DeciHeap> heap_;
193 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_DECIMATERT_CC)
194 #define OPENMESH_DECIMATER_TEMPLATES
198 #endif // OPENMESH_DECIMATER_DECIMATERT_HH defined
Mesh & mesh()
access mesh. used in modules.
size_t decimate_to_faces(size_t _n_vertices=0, size_t _n_faces=0)
DecimaterT(Mesh &_mesh)
Constructor.
size_t decimate(size_t _n_collapses=0)
Handle for a halfedge entity.
Handle for a vertex entity.
void heap_vertex(VertexHandle _vh)
Insert vertex in heap.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
size_t decimate_to(size_t _n_vertices)
Decimate to target complexity, returns number of collapses.