51 #ifndef OPENMESH_DECIMATER_DECIMATERT_HH
52 #define OPENMESH_DECIMATER_DECIMATERT_HH
59 #include <OpenMesh/Core/Utils/Property.hh>
77 template <
typename MeshT >
86 typedef std::vector< Module* > ModuleList;
87 typedef typename ModuleList::iterator ModuleListIterator;
102 size_t decimate(
size_t _n_collapses = 0 );
107 return ( (_n_vertices < this->
mesh().n_vertices()) ?
108 decimate( this->
mesh().n_vertices() - _n_vertices ) : 0 );
130 : mesh_(_mesh), prio_(_prio), pos_(_pos)
134 less( VertexHandle _vh0, VertexHandle _vh1 )
135 {
return mesh_.property(prio_, _vh0) < mesh_.property(prio_, _vh1); }
138 greater( VertexHandle _vh0, VertexHandle _vh1 )
139 {
return mesh_.property(prio_, _vh0) > mesh_.property(prio_, _vh1); }
142 get_heap_position(VertexHandle _vh)
143 {
return mesh_.property(pos_, _vh); }
146 set_heap_position(VertexHandle _vh,
int _pos)
147 { mesh_.property(pos_, _vh) = _pos; }
162 void heap_vertex(VertexHandle _vh);
171 std::auto_ptr<DeciHeap> heap_;
184 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_DECIMATERT_CC)
185 #define OPENMESH_DECIMATER_TEMPLATES
189 #endif // OPENMESH_DECIMATER_DECIMATERT_HH defined
Mesh & mesh()
access mesh. used in modules.
Definition: BaseDecimaterT.hh:136
DecimaterT(Mesh &_mesh)
Constructor.
Definition: DecimaterT.cc:71
~DecimaterT()
Destructor.
Definition: DecimaterT.cc:84
Heap interface.
Definition: DecimaterT.hh:123
Handle for a vertex entity.
Definition: Handles.hh:114
size_t decimate_to(size_t _n_vertices)
Decimate to target complexity, returns number of collapses.
Definition: DecimaterT.hh:105
An efficient, highly customizable heap.
Definition: HeapT.hh:133
Decimater framework.
Definition: DecimaterT.hh:78
Handle for a halfedge entity.
Definition: Handles.hh:121
Base class for all decimation modules.
Definition: ModBaseT.hh:190
Stores information about a halfedge collapse.
Definition: CollapseInfoT.hh:73
size_t decimate_to_faces(size_t _n_vertices=0, size_t _n_faces=0)
Decimate to target complexity (vertices and faces).
Definition: DecimaterT.cc:236
Definition: BaseDecimaterT.hh:83
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
size_t decimate(size_t _n_collapses=0)
Decimate (perform _n_collapses collapses).
Definition: DecimaterT.cc:142