OpenMesh
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenMesh::Decimater::ModNormalFlippingT< DecimaterT > Class Template Reference

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

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

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

List of all members.

Public Types

typedef ModNormalFlippingT
< DecimaterT
Self
typedef
OpenMesh::Decimater::ModHandleT
< Self
Handle
typedef
OpenMesh::Decimater::ModBaseT
< DecimaterT
Base
typedef Base::Mesh Mesh
typedef Base::CollapseInfo CollapseInfo
- Public Types inherited from OpenMesh::Decimater::ModBaseT< DecimaterType >
enum  { ILLEGAL_COLLAPSE = -1, LEGAL_COLLAPSE = 0 }

Public Member Functions

virtual const std::string & name () const
 Set module's name (using DECIMATER_MODNAME macro)
 ModNormalFlippingT (DecimaterT &_dec)
 Constructor.
float collapse_priority (const CollapseInfo &_ci)
 Compute collapse priority due to angular deviation of face normals before and after a collapse.
float max_normal_deviation () const
 get normal deviation
void set_max_normal_deviation (float _f)
 Set normal deviation.
- Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< DecimaterType >
virtual ~ModBaseT ()
 Virtual desctructor.
bool is_binary (void) const
 Returns true if criteria returns a binary value.
virtual void initialize ()
 Initialize module-internal stuff.
virtual float collapse_priority (const CollapseInfoT< Mesh > &)
 Return collapse priority.
virtual void preprocess_collapse (const CollapseInfoT< Mesh > &)
 Before _from_vh has been collapsed into _to_vh, this method will be called.
virtual void postprocess_collapse (const CollapseInfoT< Mesh > &)
 After _from_vh has been collapsed into _to_vh, this method will be called.

Additional Inherited Members

- Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< DecimaterType >
 ModBaseT (DecimaterType &_dec, bool _is_binary)
 Default constructor.
Mesh & mesh ()
 Access the mesh associated with the decimater.

Detailed Description

template<typename DecimaterT>
class OpenMesh::Decimater::ModNormalFlippingT< DecimaterT >

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

template<typename DecimaterT >
float OpenMesh::Decimater::ModNormalFlippingT< DecimaterT >::collapse_priority ( const CollapseInfo _ci)
inline

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.
  1. 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()
template<typename DecimaterT >
void OpenMesh::Decimater::ModNormalFlippingT< DecimaterT >::set_max_normal_deviation ( float  _f)
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:

acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .