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 );
124 typedef typename Mesh::VertexHandle VertexHandle;
125 typedef typename Mesh::HalfedgeHandle HalfedgeHandle;
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; }
167 void heap_vertex(VertexHandle _vh);
176 #if __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 Decimater framework.
Definition: DecimaterT.hh:83
Stores information about a halfedge collapse.
Definition: CollapseInfoT.hh:80
~DecimaterT()
Destructor.
Definition: DecimaterT.cc:98
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Mesh & mesh()
access mesh. used in modules.
Definition: BaseDecimaterT.hh:143
size_t decimate_to(size_t _n_vertices)
Decimate to target complexity, returns number of collapses.
Definition: DecimaterT.hh:110
size_t decimate(size_t _n_collapses=0)
Decimate (perform _n_collapses collapses).
Definition: DecimaterT.cc:156
Base class for all decimation modules.
Definition: ModBaseT.hh:197
DecimaterT(Mesh &_mesh)
Constructor.
Definition: DecimaterT.cc:78
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:257
Definition: BaseDecimaterT.hh:90
An efficient, highly customizable heap.
Definition: HeapT.hh:140
Heap interface.
Definition: DecimaterT.hh:128