Loading...
Searching...
No Matches
OpenMesh::Decimater::ModRoundnessT< MeshT > Class Template Reference

Use Roundness of triangles to control decimation. More...

`#include <OpenMesh/Tools/Decimater/ModRoundnessT.hh>`

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

## Public Types

typedef ModRoundnessT< MeshT > | Self
typedef OpenMesh::Decimater::ModHandleT< Self > | Handle
typedef OpenMesh::Decimater::ModBaseT< MeshT > | Base
typedef Base::Mesh | Mesh
typedef Base::CollapseInfo | CollapseInfo
typedef MeshT::Point | Point
typedef vector_traits< Point >::value_type | value_type
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.
| ModRoundnessT (MeshT &_dec)
| Constructor.
| ~ModRoundnessT ()
| Destructor.
float | collapse_priority (const CollapseInfo &_ci) override
| Compute collapse priority due to roundness of triangle.
void | set_error_tolerance_factor (double _factor) override
| set the percentage of minimum roundness
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)
Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
virtual | ~ModBaseT ()
| Virtual desctructor.
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.
virtual float | collapse_priority (const CollapseInfoT< MeshT > &)
| Return collapse priority.
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.

## Additional Inherited Members

Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
| ModBaseT (MeshT &_mesh, bool _is_binary)
| Default constructor.
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::ModRoundnessT< MeshT >

Use Roundness of triangles to control decimation.

In binary and mode, the collapse is legal if:

- The roundness after the collapse is greater than the given value

In continuous mode the roundness after the collapse is returned

## Member Function Documentation

## collapse_priority()

template<class MeshT >

float OpenMesh::Decimater::ModRoundnessT< MeshT >::collapse_priority | ( | const CollapseInfo & | _ci | ) |

inline override

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()

## name()

template<class MeshT >

virtual const std::string & OpenMesh::Decimater::ModRoundnessT< MeshT >::name | ( |  | ) | const

inline override virtual

Set module's name.

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

## set_error_tolerance_factor()

template<class MeshT >

void OpenMesh::Decimater::ModRoundnessT< MeshT >::set_error_tolerance_factor | ( | double | _factor | ) |

inline override virtual

set the percentage of minimum roundness

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

## set_min_roundness()

template<class MeshT >

void OpenMesh::Decimater::ModRoundnessT< MeshT >::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 constraint does not apply and ILLEGAL_COLLAPSE else.

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

- OpenMesh/Tools/Decimater/ModRoundnessT.hh