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