Public Types | Public Member Functions

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

Compute error value based on roundness criteria. More...

#include </data1/home1/moebius/projects/release/OpenMesh-2.0/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh>

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

List of all members.

Public Types

typedef ModRoundnessT
< DecimaterType > 
Self
typedef
OpenMesh::Decimater::ModHandleT
< Self
Handle
typedef
OpenMesh::Decimater::ModBaseT
< DecimaterType > 
Base
typedef Base::Mesh Mesh
typedef Base::CollapseInfo CollapseInfo
typedef Mesh::Point Point
typedef vector_traits< Point >
::value_type 
value_type

Public Member Functions

virtual const std::string & name () const
 Set module's name (using DECIMATER_MODNAME macro).
 ModRoundnessT (DecimaterType &_dec)
 Constructor.
 ~ModRoundnessT ()
 Destructor.
float collapse_priority (const CollapseInfo &_ci)
 Compute collapse priority due to roundness of triangle.
void set_min_angle (float _angle, bool)
void set_min_roundness (value_type _min_roundness, bool _binary=true)
 Set a minimum roundness value.
void unset_min_roundness ()
 Unset minimum value constraint and enable non-binary mode.
double roundness (const Vec3f &A, const Vec3f &B, const Vec3f &C)

Detailed Description

template<class DecimaterType>
class OpenMesh::Decimater::ModRoundnessT< DecimaterType >

Compute error value based on roundness criteria.


Member Function Documentation

template<class DecimaterType >
float OpenMesh::Decimater::ModRoundnessT< DecimaterType >::collapse_priority ( const CollapseInfo _ci  )  [inline]

Compute collapse priority due to roundness of triangle.

The roundness is computed by dividing the radius of the circumference by the length of the shortest edge. The result is normalized.

Returns:
[0:1] or ILLEGAL_COLLAPSE in non-binary mode
LEGAL_COLLAPSE or ILLEGAL_COLLAPSE in binary mode
See also:
set_min_roundness()
template<class DecimaterType >
void OpenMesh::Decimater::ModRoundnessT< DecimaterType >::set_min_roundness ( value_type  _min_roundness,
bool  _binary = true 
) [inline]

Set a minimum roundness value.

Parameters:
_min_roundness in range (0,1)
_binary Set true, if the binary mode should be enabled, else false. In latter case the collapse_priority() returns a float value if the constrain does not apply and ILLEGAL_COLLAPSE else.

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

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