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

Mesh decimation module computing collapse priority based on error quadrics. More...

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

Inheritance diagram for OpenMesh::Decimater::ModQuadricT< MeshT >:
OpenMesh::Decimater::ModBaseT< MeshT > ModBalancerT< D >

Public Member Functions

 DECIMATING_MODULE (ModQuadricT, MeshT, Quadric)
 
 ModQuadricT (MeshT &_mesh)
 
virtual ~ModQuadricT ()
 Destructor. More...
 
virtual void initialize (void) override
 Initalize the module and prepare the mesh for decimation. More...
 
virtual float collapse_priority (const CollapseInfo &_ci) override
 
virtual void postprocess_collapse (const CollapseInfo &_ci) override
 Post-process halfedge collapse (accumulate quadrics) More...
 
void set_error_tolerance_factor (double _factor) override
 set the percentage of maximum quadric error More...
 
void set_max_err (double _err, bool _binary=true)
 
void unset_max_err (void)
 
double max_err () const
 Return value of max. allowed error. More...
 
- Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
virtual ~ModBaseT ()
 Virtual desctructor. More...
 
virtual const std::string & name () const
 Set module's name. More...
 
bool is_binary (void) const
 Returns true if criteria returns a binary value. More...
 
void set_binary (bool _b)
 Set whether module is binary or not. More...
 
virtual void initialize ()
 Initialize module-internal stuff. More...
 
virtual float collapse_priority (const CollapseInfoT< MeshT > &)
 
virtual void preprocess_collapse (const CollapseInfoT< MeshT > &)
 
virtual void postprocess_collapse (const CollapseInfoT< MeshT > &)
 
virtual void set_error_tolerance_factor (double _factor)
 

Private Attributes

double max_err_
 
VPropHandleT< Geometry::QuadricT< double > > quadrics_
 

Additional Inherited Members

- Public Types inherited from OpenMesh::Decimater::ModBaseT< MeshT >
enum  { ILLEGAL_COLLAPSE = -1 , LEGAL_COLLAPSE = 0 }
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshTCollapseInfo
 
- Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
 ModBaseT (MeshT &_mesh, bool _is_binary)
 
MeshTmesh ()
 Access the mesh associated with the decimater. More...
 
- Protected Attributes inherited from OpenMesh::Decimater::ModBaseT< MeshT >
double error_tolerance_factor_
 

Detailed Description

template<class MeshT>
class OpenMesh::Decimater::ModQuadricT< MeshT >

Mesh decimation module computing collapse priority based on error quadrics.

This module can be used as a binary and non-binary module.

Definition at line 75 of file ModQuadricT.hh.

Constructor & Destructor Documentation

◆ ModQuadricT()

template<class MeshT >
OpenMesh::Decimater::ModQuadricT< MeshT >::ModQuadricT ( MeshT _mesh)
inlineexplicit

Constructor

Definition at line 88 of file ModQuadricT.hh.

◆ ~ModQuadricT()

template<class MeshT >
virtual OpenMesh::Decimater::ModQuadricT< MeshT >::~ModQuadricT ( )
inlinevirtual

Destructor.

Definition at line 97 of file ModQuadricT.hh.

Member Function Documentation

◆ collapse_priority()

template<class MeshT >
virtual float OpenMesh::Decimater::ModQuadricT< MeshT >::collapse_priority ( const CollapseInfo _ci)
inlineoverridevirtual

Compute collapse priority based on error quadrics.

See also
ModBaseT::collapse_priority() for return values
set_max_err()

Reimplemented in ModBalancerT< D >.

Definition at line 113 of file ModQuadricT.hh.

◆ initialize()

template<class DecimaterType >
void OpenMesh::Decimater::ModQuadricT< DecimaterType >::initialize ( void  )
overridevirtual

Initalize the module and prepare the mesh for decimation.

Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.

Reimplemented in ModBalancerT< D >.

Definition at line 72 of file ModQuadricT_impl.hh.

◆ max_err()

template<class MeshT >
double OpenMesh::Decimater::ModQuadricT< MeshT >::max_err ( ) const
inline

Return value of max. allowed error.

Definition at line 168 of file ModQuadricT.hh.

◆ postprocess_collapse()

template<class MeshT >
virtual void OpenMesh::Decimater::ModQuadricT< MeshT >::postprocess_collapse ( const CollapseInfo _ci)
inlineoverridevirtual

Post-process halfedge collapse (accumulate quadrics)

Reimplemented in ModBalancerT< D >.

Definition at line 134 of file ModQuadricT.hh.

◆ set_error_tolerance_factor()

template<class MeshT >
void OpenMesh::Decimater::ModQuadricT< MeshT >::set_error_tolerance_factor ( double  _factor)
overridevirtual

set the percentage of maximum quadric error

Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.

Definition at line 136 of file ModQuadricT_impl.hh.

◆ set_max_err()

template<class MeshT >
void OpenMesh::Decimater::ModQuadricT< MeshT >::set_max_err ( double  _err,
bool  _binary = true 
)
inline

Set maximum quadric error constraint and enable binary mode.

Parameters
_errMaximum error allowed
_binaryLet the module work in non-binary mode in spite of the enabled constraint.
See also
unset_max_err()

Definition at line 153 of file ModQuadricT.hh.

◆ unset_max_err()

template<class MeshT >
void OpenMesh::Decimater::ModQuadricT< MeshT >::unset_max_err ( void  )
inline

Unset maximum quadric error constraint and restore non-binary mode.

See also
set_max_err()

Definition at line 161 of file ModQuadricT.hh.

Member Data Documentation

◆ max_err_

template<class MeshT >
double OpenMesh::Decimater::ModQuadricT< MeshT >::max_err_
private

Definition at line 174 of file ModQuadricT.hh.

◆ quadrics_

template<class MeshT >
VPropHandleT< Geometry::QuadricT<double> > OpenMesh::Decimater::ModQuadricT< MeshT >::quadrics_
private

Definition at line 177 of file ModQuadricT.hh.


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