Developer Documentation
OpenMesh::Decimater::MixedDecimaterT< MeshT > Class Template Reference

#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/MixedDecimaterT.hh>

Inheritance diagram for OpenMesh::Decimater::MixedDecimaterT< MeshT >:
OpenMesh::Decimater::McDecimaterT< MeshT > OpenMesh::Decimater::DecimaterT< MeshT > OpenMesh::Decimater::BaseDecimaterT< MeshT > OpenMesh::Decimater::BaseDecimaterT< MeshT > OpenMesh::Utils::Noncopyable OpenMesh::Utils::Noncopyable

Public Types

typedef McDecimaterT< MeshT > Self
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 
typedef ModBaseT< MeshT > Module
 
typedef std::vector< Module *> ModuleList
 
typedef ModuleList::iterator ModuleListIterator
 
- Public Types inherited from OpenMesh::Decimater::McDecimaterT< MeshT >
typedef McDecimaterT< MeshT > Self
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 
typedef ModBaseT< MeshT > Module
 
typedef std::vector< Module *> ModuleList
 
typedef ModuleList::iterator ModuleListIterator
 
- Public Types inherited from OpenMesh::Decimater::BaseDecimaterT< MeshT >
typedef BaseDecimaterT< MeshT > Self
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 
typedef ModBaseT< MeshT > Module
 
typedef std::vector< Module *> ModuleList
 
typedef ModuleList::iterator ModuleListIterator
 
- Public Types inherited from OpenMesh::Decimater::DecimaterT< MeshT >
typedef DecimaterT< MeshT > Self
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 
typedef ModBaseT< MeshT > Module
 
typedef std::vector< Module *> ModuleList
 
typedef ModuleList::iterator ModuleListIterator
 
typedef Mesh::VertexHandle VertexHandle
 
typedef Mesh::HalfedgeHandle HalfedgeHandle
 
typedef Utils::HeapT< VertexHandle, HeapInterfaceDeciHeap
 

Public Member Functions

 MixedDecimaterT (Mesh &_mesh)
 Constructor.
 
 ~MixedDecimaterT ()
 Destructor.
 
size_t decimate (const size_t _n_collapses, const float _mc_factor, bool _only_selected=false)
 Decimate (perform _n_collapses collapses). Return number of performed collapses. If _n_collapses is not given reduce as much as possible. More...
 
size_t decimate_to (size_t _n_vertices, const float _mc_factor, bool _only_selected=false)
 Decimate the mesh to a desired target vertex complexity. More...
 
size_t decimate_to_faces (const size_t _n_vertices=0, const size_t _n_faces=0, const float _mc_factor=0.8, bool _only_selected=false)
 Attempts to decimate the mesh until a desired vertex or face complexity is achieved. More...
 
- Public Member Functions inherited from OpenMesh::Decimater::McDecimaterT< MeshT >
 McDecimaterT (Mesh &_mesh)
 Constructor.
 
 ~McDecimaterT ()
 Destructor.
 
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 not given reduce as much as possible. More...
 
size_t decimate_to (size_t _n_vertices, bool _only_selected=false)
 Decimate the mesh to a desired target vertex complexity. More...
 
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. More...
 
size_t decimate_constraints_only (float _factor, bool _only_selected=false)
 
size_t samples ()
 
void set_samples (const size_t _value)
 
- Public Member Functions inherited from OpenMesh::Decimater::BaseDecimaterT< MeshT >
 BaseDecimaterT (Mesh &_mesh)
 
bool initialize ()
 
bool is_initialized () const
 Returns whether decimater has been successfully initialized.
 
void info (std::ostream &_os)
 Print information about modules to _os.
 
void set_observer (Observer *_o)
 Add observer. More...
 
Observerobserver ()
 Get current observer of a decimater.
 
Mesh & mesh ()
 access mesh. used in modules.
 
template<typename _Module >
bool add (ModHandleT< _Module > &_mh)
 add module to decimater
 
template<typename _Module >
bool remove (ModHandleT< _Module > &_mh)
 remove module
 
template<typename Module >
Modulemodule (ModHandleT< Module > &_mh)
 get module referenced by handle _mh
 
- Public Member Functions inherited from OpenMesh::Decimater::DecimaterT< MeshT >
 DecimaterT (Mesh &_mesh)
 Constructor.
 
 ~DecimaterT ()
 Destructor.
 
size_t decimate (size_t _n_collapses=0, bool _only_selected=false)
 Perform a number of collapses on the mesh. More...
 
size_t decimate_to (size_t _n_vertices, bool _only_selected=false)
 Decimate the mesh to a desired target vertex complexity. More...
 
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. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMesh::Decimater::BaseDecimaterT< MeshT >
bool notify_observer (size_t _n_collapses)
 returns false, if abort requested by observer
 
void set_uninitialized ()
 Reset the initialized flag, and clear the bmodules_ and cmodule_.
 
void update_modules (CollapseInfo &_ci)
 
bool is_collapse_legal (const CollapseInfo &_ci)
 
float collapse_priority (const CollapseInfo &_ci)
 Calculate priority of an halfedge collapse (using the modules)
 
void preprocess_collapse (CollapseInfo &_ci)
 Pre-process a collapse.
 
void postprocess_collapse (CollapseInfo &_ci)
 Post-process a collapse.
 
void set_error_tolerance_factor (double _factor)
 
void reset ()
 

Detailed Description

template<typename MeshT>
class OpenMesh::Decimater::MixedDecimaterT< MeshT >

Mixed decimater framework

See also
BaseModT, Mesh Decimation Framework

Definition at line 77 of file MixedDecimaterT.hh.

Member Function Documentation

◆ decimate()

template<class Mesh >
size_t OpenMesh::Decimater::MixedDecimaterT< Mesh >::decimate ( const size_t  _n_collapses,
const float  _mc_factor,
bool  _only_selected = false 
)

Decimate (perform _n_collapses collapses). Return number of performed collapses. If _n_collapses is not given reduce as much as possible.

Parameters
_n_collapsesDesired number of collapses. If zero (default), attempt to do as many collapses as possible.
_mc_factorNumber between 0 and one defining how much percent of the collapses should be performed by MC Decimater before switching to Fixed decimation
_only_selectedOnly consider vertices which are selected for decimation
Returns
Number of collapses that were actually performed.
Note
This operation only marks the removed mesh elements for deletion. In order to actually remove the decimated elements from the mesh, a subsequent call to ArrayKernel::garbage_collection() is required.

Definition at line 85 of file MixedDecimaterT_impl.hh.

◆ decimate_to()

template<typename MeshT >
size_t OpenMesh::Decimater::MixedDecimaterT< MeshT >::decimate_to ( size_t  _n_vertices,
const float  _mc_factor,
bool  _only_selected = false 
)
inline

Decimate the mesh to a desired target vertex complexity.

Parameters
_n_verticesTarget complexity, i.e. desired number of remaining vertices after decimation.
_only_selectedOnly consider vertices which are selected for decimation
_mc_factorNumber between 0 and one defining how much percent of the collapses should be performed by MC Decimater before switching to Fixed decimation
Returns
Number of collapses that were actually performed.
Note
This operation only marks the removed mesh elements for deletion. In order to actually remove the decimated elements from the mesh, a subsequent call to ArrayKernel::garbage_collection() is required.

Definition at line 129 of file MixedDecimaterT.hh.

◆ decimate_to_faces()

template<class Mesh >
size_t OpenMesh::Decimater::MixedDecimaterT< Mesh >::decimate_to_faces ( const size_t  _n_vertices = 0,
const size_t  _n_faces = 0,
const float  _mc_factor = 0.8,
bool  _only_selected = false 
)

Attempts to decimate the mesh until a desired vertex or face complexity is achieved.

Parameters
_n_verticesTarget vertex complexity.
_n_facesTarget face complexity.
_mc_factorNumber between 0 and one defining how much percent of the collapses should be performed by MC Decimater before switching to Fixed decimation
_only_selectedOnly consider vertices which are selected for decimation
Returns
Number of collapses that were actually performed.
Note
Decimation stops as soon as either one of the two complexity bounds is satisfied.
This operation only marks the removed mesh elements for deletion. In order to actually remove the decimated elements from the mesh, a subsequent call to ArrayKernel::garbage_collection() is required.

Definition at line 109 of file MixedDecimaterT_impl.hh.


The documentation for this class was generated from the following files: