OpenMesh
OpenMesh::Decimater::ModNormalDeviationT< MeshT > Class Template Reference

Use Normal deviation to control decimation. More...

#include <OpenMesh/Tools/Decimater/ModNormalDeviationT.hh>

Inheritance diagram for OpenMesh::Decimater::ModNormalDeviationT< MeshT >:
Collaboration diagram for OpenMesh::Decimater::ModNormalDeviationT< MeshT >:

Public Types

typedef ModNormalDeviationT< MeshT > Self
 
typedef OpenMesh::Decimater::ModHandleT< SelfHandle
 
typedef OpenMesh::Decimater::ModBaseT< MeshT > Base
 
typedef Base::Mesh Mesh
 
typedef Base::CollapseInfo CollapseInfo
 
typedef Mesh::Scalar Scalar
 
typedef Mesh::Point Point
 
typedef Mesh::Normal Normal
 
typedef Mesh::VertexHandle VertexHandle
 
typedef Mesh::FaceHandle FaceHandle
 
typedef Mesh::EdgeHandle EdgeHandle
 
typedef NormalConeT< Normal > NormalCone
 
- Public Types inherited from OpenMesh::Decimater::ModBaseT< MeshT >
enum  { ILLEGAL_COLLAPSE = -1 , LEGAL_COLLAPSE = 0 }
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 

Public Member Functions

virtual const std::string & name () const override
 Set module's name. More...
 
 ModNormalDeviationT (MeshT &_mesh, float _max_dev=180.0)
 Constructor.
 
 ~ModNormalDeviationT ()
 Destructor.
 
Scalar normal_deviation () const
 Get normal deviation ( 0 .. 360 )
 
void set_normal_deviation (Scalar _s)
 Set normal deviation ( 0 .. 360 )
 
void initialize () override
 Allocate and init normal cones. More...
 
float collapse_priority (const CollapseInfo &_ci) override
 Control normals when Decimating. More...
 
void set_error_tolerance_factor (double _factor) override
 set the percentage of normal deviation More...
 
void postprocess_collapse (const CollapseInfo &_ci) override
 After _from_vh has been collapsed into _to_vh, this method will be called. More...
 
- Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
virtual ~ModBaseT ()
 Virtual desctructor.
 
virtual const std::string & name () const
 Set module's name. More...
 
bool is_binary (void) const
 Returns true if criteria returns a binary value.
 
void set_binary (bool _b)
 Set whether module is binary or not.
 
virtual void initialize ()
 Initialize module-internal stuff. More...
 
virtual float collapse_priority (const CollapseInfoT< MeshT > &)
 Return collapse priority. More...
 
virtual void preprocess_collapse (const CollapseInfoT< MeshT > &)
 Before _from_vh has been collapsed into _to_vh, this method will be called.
 
virtual void postprocess_collapse (const CollapseInfoT< MeshT > &)
 After _from_vh has been collapsed into _to_vh, this method will be called. More...
 
virtual void set_error_tolerance_factor (double _factor)
 This provides a function that allows the setting of a percentage of the original contraint. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
 ModBaseT (MeshT &_mesh, bool _is_binary)
 Default constructor. More...
 
MeshT & mesh ()
 Access the mesh associated with the decimater.
 
- Protected Attributes inherited from OpenMesh::Decimater::ModBaseT< MeshT >
double error_tolerance_factor_
 

Detailed Description

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

Use Normal deviation to control decimation.

The module tracks the normals while decimating a normal cone consisting of all normals of the faces collapsed together is computed and if a collapse would increase the size of the cone to a value greater than the given value the collapse will be illegal.

In binary and mode, the collapse is legal if:

  • The normal deviation after the collapse is lower than the given value

In continuous mode the maximal deviation is returned

Member Function Documentation

◆ collapse_priority()

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

Control normals when Decimating.

Binary and Cont. mode.

The module tracks the normals while decimating a normal cone consisting of all normals of the faces collapsed together is computed and if a collapse would increase the size of the cone to a value greater than the given value the collapse will be illegal.

Parameters
_ciCollapse info data
Returns
Half of the normal cones size (radius in radians)

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

◆ initialize()

template<class MeshT >
void OpenMesh::Decimater::ModNormalDeviationT< MeshT >::initialize ( void  )
inlineoverridevirtual

Allocate and init normal cones.

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

◆ name()

template<class MeshT >
virtual const std::string & OpenMesh::Decimater::ModNormalDeviationT< MeshT >::name ( ) const
inlineoverridevirtual

Set module's name.

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

◆ postprocess_collapse()

template<class MeshT >
void OpenMesh::Decimater::ModNormalDeviationT< MeshT >::postprocess_collapse ( const CollapseInfo )
inlineoverridevirtual

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

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

◆ set_error_tolerance_factor()

template<class MeshT >
void OpenMesh::Decimater::ModNormalDeviationT< MeshT >::set_error_tolerance_factor ( double  _factor)
inlineoverridevirtual

set the percentage of normal deviation

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


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

Project OpenMesh, ©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen .