Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
OpenMesh::Decimater::McDecimaterT< MeshT > Class Template Reference

`#include <libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/McDecimaterT.hh>`

Inheritance diagram for OpenMesh::Decimater::McDecimaterT< MeshT >:

## 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::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 Member Functions
| McDecimaterT (Mesh &_mesh)
| Constructor.
| ~McDecimaterT ()
| Destructor.
size_t | decimate (size_t _n_collapses)
size_t | decimate_to (size_t _n_vertices)
| Decimate to target complexity, returns number of collapses.
size_t | decimate_to_faces (size_t _n_vertices=0, size_t _n_faces=0)
size_t | decimate_constraints_only (float _factor)
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...
Observer * | observer ()
| 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 >
Module & | module (ModHandleT< Module > &_mh)
| get module referenced by handle _mh

## Private Attributes
Mesh & | mesh_
size_t | randomSamples_

## 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::McDecimaterT< MeshT >

Multiple choice decimater framework

See also
  BaseModT, Mesh Decimation Framework

Definition at line 82 of file McDecimaterT.hh.

## Member Function Documentation

template<class Mesh >

size_t OpenMesh::Decimater::McDecimaterT< Mesh >::decimate | ( | size_t | _n_collapses | ) |

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

Definition at line 108 of file McDecimaterT.cc.

template<class Mesh >

size_t OpenMesh::Decimater::McDecimaterT< Mesh >::decimate_constraints_only | ( | float | _factor | ) |

Decimate only with constraints, while _factor gives the percentage of the constraints that should be used

Definition at line 375 of file McDecimaterT.cc.

template<class Mesh >

size_t OpenMesh::Decimater::McDecimaterT< Mesh >::decimate_to_faces | ( | size_t | _n_vertices = `0`,
|  | size_t | _n_faces = `0`
| ) |  |

Decimate to target complexity (vertices and faces). Stops when the number of vertices or the number of faces is reached. Returns number of performed collapses.

Definition at line 232 of file McDecimaterT.cc.

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

- libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/McDecimaterT.hh
- libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/McDecimaterT.cc