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

Decimating module to avoid flipping of faces. More...

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

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

Public Types

typedef ModNormalFlippingT< MeshT > Self
 
typedef OpenMesh::Decimater::ModHandleT< SelfHandle
 
typedef OpenMesh::Decimater::ModBaseT< MeshT > Base
 
typedef Base::Mesh Mesh
 
typedef Base::CollapseInfo CollapseInfo
 
- 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...
 
 ModNormalFlippingT (MeshT &_mesh)
 Constructor.
 
float collapse_priority (const CollapseInfo &_ci) override
 Compute collapse priority due to angular deviation of face normals before and after a collapse. More...
 
void set_error_tolerance_factor (double _factor) override
 set the percentage of maximum normal deviation More...
 
double max_normal_deviation () const
 get normal deviation
 
void set_max_normal_deviation (double _d)
 Set normal deviation. 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<typename MeshT>
class OpenMesh::Decimater::ModNormalFlippingT< MeshT >

Decimating module to avoid flipping of faces.

This module can be used only as a binary module. The criterion of allowing/disallowing the collapse is the angular deviation between the face normal of the original faces and normals of the faces after the collapse. The collapse will pass the test, if the deviation is below a given threshold.

Member Function Documentation

◆ collapse_priority()

template<typename MeshT >
float OpenMesh::Decimater::ModNormalFlippingT< MeshT >::collapse_priority ( const CollapseInfo _ci)
inlineoverridevirtual

Compute collapse priority due to angular deviation of face normals before and after a collapse.

  1. Compute for each adjacent face of _ci.v0 the face normal if the collpase would be executed.
  2. Prevent the collapse, if the cosine of the angle between the original and the new normal is below a given threshold.
Parameters
_ciThe collapse description
Returns
LEGAL_COLLAPSE or ILLEGAL_COLLAPSE
See also
set_max_normal_deviation()

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

◆ name()

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

Set module's name.

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

◆ set_error_tolerance_factor()

template<typename MeshT >
void OpenMesh::Decimater::ModNormalFlippingT< MeshT >::set_error_tolerance_factor ( double  _factor)
inlineoverridevirtual

set the percentage of maximum normal deviation

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

◆ set_max_normal_deviation()

template<typename MeshT >
void OpenMesh::Decimater::ModNormalFlippingT< MeshT >::set_max_normal_deviation ( double  _d)
inline

Set normal deviation.

Set the maximum angular deviation of the orignal normal and the new normal in degrees.


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

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