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 );
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; }
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
DecimaterT(Mesh &_mesh)
Constructor.
Mesh & mesh()
access mesh. used in modules.
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.
void heap_vertex(VertexHandle _vh)
Insert vertex in heap.
size_t decimate(size_t _n_collapses=0)
Perform a number of collapses on the mesh.
size_t decimate_to(size_t _n_vertices)
Decimate the mesh to a desired target vertex complexity.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.