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

Mesh decimation module computing collapse priority based on error quadrics. More...

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

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

## Public Types

typedef ModQuadricT< MeshT > | Self
typedef OpenMesh::Decimater::ModHandleT< Self > | Handle
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.
| ModQuadricT (MeshT &_mesh)
| Constructor.
virtual | ~ModQuadricT ()
| Destructor.
virtual void | initialize (void) override
| Initalize the module and prepare the mesh for decimation.
virtual float | collapse_priority (const CollapseInfo &_ci) override
| Compute collapse priority based on error quadrics.
virtual void | postprocess_collapse (const CollapseInfo &_ci) override
| Post-process halfedge collapse (accumulate quadrics).
void | set_error_tolerance_factor (double _factor) override
| set the percentage of maximum quadric error
void | set_max_err (double _err, bool _binary=true)
| Set maximum quadric error constraint and enable binary mode.
void | unset_max_err (void)
| Unset maximum quadric error constraint and restore non-binary mode.
double | max_err () const
| Return value of max. allowed error.
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 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::ModQuadricT< MeshT >

Mesh decimation module computing collapse priority based on error quadrics.

This module can be used as a binary and non-binary module.

## Constructor & Destructor Documentation

## ModQuadricT()

template<class MeshT>

OpenMesh::Decimater::ModQuadricT< MeshT >::ModQuadricT | ( | MeshT & | _mesh | ) |

inline explicit

Constructor.

## Member Function Documentation

## collapse_priority()

template<class MeshT>

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

inline override virtual

Compute collapse priority based on error quadrics.

See also
  ModBaseT::collapse_priority() for return values
  set_max_err()

Reimplemented in ModBalancerT< D >, and ModBalancerT< Mesh >.

## initialize()

template<class DecimaterType>

void OpenMesh::Decimater::ModQuadricT< DecimaterType >::initialize | ( | void |  | ) |

override virtual

Initalize the module and prepare the mesh for decimation.

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

Reimplemented in ModBalancerT< D >, and ModBalancerT< Mesh >.

## name()

template<class MeshT>

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

inline override virtual

Set module's name.

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

Reimplemented in ModBalancerT< D >, and ModBalancerT< Mesh >.

## postprocess_collapse()

template<class MeshT>

virtual void OpenMesh::Decimater::ModQuadricT< MeshT >::postprocess_collapse | ( | const CollapseInfo & | _ci | ) |

inline override virtual

Post-process halfedge collapse (accumulate quadrics).

Reimplemented in ModBalancerT< D >, and ModBalancerT< Mesh >.

## set_error_tolerance_factor()

template<class MeshT>

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

override virtual

set the percentage of maximum quadric error

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

## set_max_err()

template<class MeshT>

void OpenMesh::Decimater::ModQuadricT< MeshT >::set_max_err | ( | double | _err,
|  | bool | _binary = true )

inline

Set maximum quadric error constraint and enable binary mode.

Parameters

  _err | Maximum error allowed
  _binary | Let the module work in non-binary mode in spite of the enabled constraint.

See also
  unset_max_err()

## unset_max_err()

template<class MeshT>

void OpenMesh::Decimater::ModQuadricT< MeshT >::unset_max_err | ( | void |  | ) |

inline

Unset maximum quadric error constraint and restore non-binary mode.

See also
  set_max_err()

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

- OpenMesh/Tools/Decimater/ModQuadricT.hh
- OpenMesh/Tools/Decimater/ModQuadricT_impl.hh