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; }
167 void heap_vertex(VertexHandle _vh);
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.
Definition: BaseDecimaterT.hh:143
Stores information about a halfedge collapse.
Definition: CollapseInfoT.hh:80
Definition: BaseDecimaterT.hh:90
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
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:260
Heap interface.
Definition: DecimaterT.hh:128
Handle for a vertex entity.
Definition: Handles.hh:125
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
~DecimaterT()
Destructor.
Definition: DecimaterT.cc:98
An efficient, highly customizable heap.
Definition: HeapT.hh:143
Decimater framework.
Definition: DecimaterT.hh:83
Handle for a halfedge entity.
Definition: Handles.hh:132
Base class for all decimation modules.
Definition: ModBaseT.hh:197