53 #ifndef OPENMESH_MC_DECIMATER_DECIMATERT_HH 54 #define OPENMESH_MC_DECIMATER_DECIMATERT_HH 76 template <
typename MeshT >
85 typedef std::vector< Module* > ModuleList;
86 typedef typename ModuleList::iterator ModuleListIterator;
110 size_t decimate(
size_t _n_collapses ,
bool _only_selected =
false);
122 size_t decimate_to(
size_t _n_vertices ,
bool _only_selected =
false)
124 return ( (_n_vertices < this->
mesh().n_vertices()) ?
125 decimate( this->
mesh().n_vertices() - _n_vertices , _only_selected ) : 0 );
141 size_t decimate_to_faces(
size_t _n_vertices=0,
size_t _n_faces=0 ,
bool _only_selected =
false);
149 size_t samples(){
return randomSamples_;}
150 void set_samples(
const size_t _value){randomSamples_ = _value;}
158 size_t randomSamples_;
166 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_MULTIPLE_CHOICE_DECIMATER_DECIMATERT_CC) 167 #define OPENMESH_MULTIPLE_CHOICE_DECIMATER_TEMPLATES 171 #endif // OPENMESH_MC_DECIMATER_DECIMATERT_HH defined ~McDecimaterT()
Destructor.
size_t decimate_to(size_t _n_vertices, bool _only_selected=false)
Decimate the mesh to a desired target vertex complexity.
Mesh & mesh()
access mesh. used in modules.
size_t decimate(size_t _n_collapses, bool _only_selected=false)
Decimate (perform _n_collapses collapses). Return number of performed collapses. If _n_collapses is n...
size_t decimate_constraints_only(float _factor, bool _only_selected=false)
size_t decimate_to_faces(size_t _n_vertices=0, size_t _n_faces=0, bool _only_selected=false)
Attempts to decimate the mesh until a desired vertex or face complexity is achieved.
McDecimaterT(Mesh &_mesh)
Constructor.