53 #ifndef OPENMESH_DECIMATER_DECIMATERT_HH 54 #define OPENMESH_DECIMATER_DECIMATERT_HH 61 #include <OpenMesh/Core/Utils/Property.hh> 77 template <
typename MeshT >
86 typedef std::vector< Module* > ModuleList;
87 typedef typename ModuleList::iterator ModuleListIterator;
108 size_t decimate(
size_t _n_collapses = 0 );
121 return ( (_n_vertices < this->
mesh().n_vertices()) ?
122 decimate( this->
mesh().n_vertices() - _n_vertices ) : 0 );
141 typedef typename Mesh::VertexHandle VertexHandle;
142 typedef typename Mesh::HalfedgeHandle HalfedgeHandle;
152 : mesh_(_mesh), prio_(_prio), pos_(_pos)
156 less( VertexHandle _vh0, VertexHandle _vh1 )
157 {
return mesh_.property(prio_, _vh0) < mesh_.property(prio_, _vh1); }
160 greater( VertexHandle _vh0, VertexHandle _vh1 )
161 {
return mesh_.property(prio_, _vh0) > mesh_.property(prio_, _vh1); }
164 get_heap_position(VertexHandle _vh)
165 {
return mesh_.property(pos_, _vh); }
168 set_heap_position(VertexHandle _vh,
int _pos)
169 { mesh_.property(pos_, _vh) = _pos; }
184 void heap_vertex(VertexHandle _vh);
193 #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ ) 194 std::unique_ptr<DeciHeap> heap_;
196 std::auto_ptr<DeciHeap> heap_;
210 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_DECIMATERT_CC) 211 #define OPENMESH_DECIMATER_TEMPLATES 215 #endif // OPENMESH_DECIMATER_DECIMATERT_HH defined An efficient, highly customizable heap.
Definition: HeapT.hh:138
Base class for all decimation modules.
Definition: ModBaseT.hh:192
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_impl.hh:254
Definition: BaseDecimaterT.hh:85
Mesh & mesh()
access mesh. used in modules.
Definition: BaseDecimaterT.hh:138
size_t decimate(size_t _n_collapses=0)
Perform a number of collapses on the mesh.
Definition: DecimaterT_impl.hh:150
DecimaterT(Mesh &_mesh)
Constructor.
Definition: DecimaterT_impl.hh:72
size_t decimate_to(size_t _n_vertices)
Decimate the mesh to a desired target vertex complexity.
Definition: DecimaterT.hh:119
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Decimater framework.
Definition: DecimaterT.hh:78
Stores information about a halfedge collapse.
Definition: CollapseInfoT.hh:74
Heap interface.
Definition: DecimaterT.hh:145
~DecimaterT()
Destructor.
Definition: DecimaterT_impl.hh:92