OpenMesh::Decimater::ModBaseT< DecimaterType > Class Template Reference

#include <ModBaseT.hh>

Inheritance diagram for OpenMesh::Decimater::ModBaseT< DecimaterType >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { ILLEGAL_COLLAPSE = -1, LEGAL_COLLAPSE = 0 }
typedef CollapseInfoT< MeshCollapseInfo
typedef DecimaterType::Mesh Mesh

Public Member Functions

virtual float collapse_priority (const CollapseInfoT< Mesh > &)
 DECIMATER_MODNAME (ModBase)
 Set module's name (using DECIMATER_MODNAME macro).
virtual void initialize ()
 Initialize module-internal stuff.
bool is_binary (void) const
 Returns true if criteria returns a binary value.
virtual void postprocess_collapse (const CollapseInfoT< Mesh > &)
void set_binary (bool _b)
 Set whether module is binary or not.
virtual ~ModBaseT ()
 Virtual desctructor.

Protected Member Functions

Meshmesh ()
 Access the mesh associated with the decimater.
 ModBaseT (DecimaterType &_dec, bool _is_binary)

Private Member Functions

 ModBaseT (const ModBaseT &_cpy)
ModBaseToperator= (const ModBaseT &)

Private Attributes

DecimaterType & dec_
bool is_binary_

Detailed Description

template<typename DecimaterType>
class OpenMesh::Decimater::ModBaseT< DecimaterType >

Base class for all decimation modules.

Each module has to implement this interface. To build your own module you have to

  1. derive from this class.
  2. create the basic settings with DECIMATING_MODULE().
  3. override collapse_priority(), if necessary.
  4. override initialize(), if necessary.
  5. override postprocess_collapse(), if necessary.

A module has two major working modes:

  1. binary mode
  2. non-binary mode

In the binary mode collapse_priority() checks a constraint and returns LEGAL_COLLAPSE or ILLEGAL_COLLAPSE.

In the non-binary mode the module computes a float error value in the range [0, inf) and returns it. In the case a constraint has been set, e.g. the error must be lower than a upper bound, and the constraint is violated, collapse_priority() must return ILLEGAL_COLLAPSE.

See also:
collapse_priority()
Todo:
"Tutorial on building a custom decimation module."

Definition at line 188 of file ModBaseT.hh.


Member Typedef Documentation

template<typename DecimaterType>
typedef CollapseInfoT<Mesh> OpenMesh::Decimater::ModBaseT< DecimaterType >::CollapseInfo

Definition at line 193 of file ModBaseT.hh.

template<typename DecimaterType>
typedef DecimaterType::Mesh OpenMesh::Decimater::ModBaseT< DecimaterType >::Mesh

Definition at line 192 of file ModBaseT.hh.


Member Enumeration Documentation

template<typename DecimaterType>
anonymous enum
Enumerator:
ILLEGAL_COLLAPSE 

indicates an illegal collapse

LEGAL_COLLAPSE 

indicates a legal collapse

Definition at line 195 of file ModBaseT.hh.


Constructor & Destructor Documentation

template<typename DecimaterType>
OpenMesh::Decimater::ModBaseT< DecimaterType >::ModBaseT ( DecimaterType &  _dec,
bool  _is_binary 
) [inline, protected]

Default constructor

See also:
decimater_docu

Definition at line 204 of file ModBaseT.hh.

template<typename DecimaterType>
virtual OpenMesh::Decimater::ModBaseT< DecimaterType >::~ModBaseT (  )  [inline, virtual]

Virtual desctructor.

Definition at line 210 of file ModBaseT.hh.

template<typename DecimaterType>
OpenMesh::Decimater::ModBaseT< DecimaterType >::ModBaseT ( const ModBaseT< DecimaterType > &  _cpy  )  [private]

Member Function Documentation

template<typename DecimaterType>
virtual float OpenMesh::Decimater::ModBaseT< DecimaterType >::collapse_priority ( const CollapseInfoT< Mesh > &   )  [inline, virtual]

Return collapse priority.

In the binary mode collapse_priority() checks a constraint and returns LEGAL_COLLAPSE or ILLEGAL_COLLAPSE.

In the non-binary mode the module computes a float error value in the range [0, inf) and returns it. In the case a constraint has been set, e.g. the error must be lower than a upper bound, and the constraint is violated, collapse_priority() must return ILLEGAL_COLLAPSE.

Returns:
Collapse priority in the range [0,inf), LEGAL_COLLAPSE or ILLEGAL_COLLAPSE.

Definition at line 242 of file ModBaseT.hh.

template<typename DecimaterType>
OpenMesh::Decimater::ModBaseT< DecimaterType >::DECIMATER_MODNAME ( ModBase   ) 

Set module's name (using DECIMATER_MODNAME macro).

template<typename DecimaterType>
virtual void OpenMesh::Decimater::ModBaseT< DecimaterType >::initialize ( void   )  [inline, virtual]

Initialize module-internal stuff.

Reimplemented in OpenMesh::Decimater::ModQuadricT< DecimaterType >.

Definition at line 226 of file ModBaseT.hh.

template<typename DecimaterType>
bool OpenMesh::Decimater::ModBaseT< DecimaterType >::is_binary ( void   )  const [inline]

Returns true if criteria returns a binary value.

Reimplemented in OpenMesh::Decimater::ModProgMeshT< DecimaterType >.

Definition at line 217 of file ModBaseT.hh.

template<typename DecimaterType>
Mesh& OpenMesh::Decimater::ModBaseT< DecimaterType >::mesh (  )  [inline, protected]

Access the mesh associated with the decimater.

Definition at line 256 of file ModBaseT.hh.

template<typename DecimaterType>
ModBaseT& OpenMesh::Decimater::ModBaseT< DecimaterType >::operator= ( const ModBaseT< DecimaterType > &   )  [private]
template<typename DecimaterType>
virtual void OpenMesh::Decimater::ModBaseT< DecimaterType >::postprocess_collapse ( const CollapseInfoT< Mesh > &   )  [inline, virtual]

After _from_vh has been collapsed into _to_vh, this method will be called.

Definition at line 248 of file ModBaseT.hh.

template<typename DecimaterType>
void OpenMesh::Decimater::ModBaseT< DecimaterType >::set_binary ( bool  _b  )  [inline]

Member Data Documentation

template<typename DecimaterType>
DecimaterType& OpenMesh::Decimater::ModBaseT< DecimaterType >::dec_ [private]

Definition at line 265 of file ModBaseT.hh.

template<typename DecimaterType>
bool OpenMesh::Decimater::ModBaseT< DecimaterType >::is_binary_ [private]

Definition at line 267 of file ModBaseT.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:17 2013