![]() |
OpenMesh
|
Base class for all decimation modules. More...
#include <OpenMesh/Tools/Decimater/ModBaseT.hh>

Public Types | |
| enum | { ILLEGAL_COLLAPSE = -1 , LEGAL_COLLAPSE = 0 } |
| typedef MeshT | Mesh |
| typedef CollapseInfoT< MeshT > | CollapseInfo |
Public Member Functions | |
| 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... | |
Protected Member Functions | |
| ModBaseT (MeshT &_mesh, bool _is_binary) | |
| Default constructor. More... | |
| MeshT & | mesh () |
| Access the mesh associated with the decimater. | |
Protected Attributes | |
| double | error_tolerance_factor_ |
Base class for all decimation modules.
Each module has to implement this interface. To build your own module you have to
A module has two major working modes:
In the binary mode collapse_priority() checks a constraint and returns LEGAL_COLLAPSE or ILLEGAL_COLLAPSE.
In the non-binary mode the module computes a float error value in the range [0, inf) and returns it. In the case a constraint has been set, e.g. the error must be lower than a upper bound, and the constraint is violated, collapse_priority() must return ILLEGAL_COLLAPSE.
| anonymous enum |
|
inlineprotected |
Default constructor.
|
inlinevirtual |
Return collapse priority.
In the binary mode collapse_priority() checks a constraint and returns LEGAL_COLLAPSE or ILLEGAL_COLLAPSE.
In the non-binary mode the module computes a float error value in the range [0, inf) and returns it. In the case a constraint has been set, e.g. the error must be lower than a upper bound, and the constraint is violated, collapse_priority() must return ILLEGAL_COLLAPSE.
LEGAL_COLLAPSE or ILLEGAL_COLLAPSE. Reimplemented in OpenMesh::Decimater::ModEdgeLengthT< MeshT >, OpenMesh::Decimater::ModHausdorffT< MeshT >, OpenMesh::Decimater::ModNormalDeviationT< MeshT >, OpenMesh::Decimater::ModNormalFlippingT< MeshT >, OpenMesh::Decimater::ModQuadricT< MeshT >, OpenMesh::Decimater::ModQuadricT< D >, and OpenMesh::Decimater::ModRoundnessT< MeshT >.
|
inlinevirtual |
Initialize module-internal stuff.
Reimplemented in OpenMesh::Decimater::ModAspectRatioT< MeshT >, OpenMesh::Decimater::ModHausdorffT< MeshT >, OpenMesh::Decimater::ModNormalDeviationT< MeshT >, ModBalancerT< D >, OpenMesh::Decimater::ModQuadricT< MeshT >, and OpenMesh::Decimater::ModQuadricT< D >.
|
inlinevirtual |
Set module's name.
Reimplemented in ModBalancerT< D >, OpenMesh::Decimater::ModAspectRatioT< MeshT >, OpenMesh::Decimater::ModEdgeLengthT< MeshT >, OpenMesh::Decimater::ModHausdorffT< MeshT >, OpenMesh::Decimater::ModIndependentSetsT< MeshT >, OpenMesh::Decimater::ModNormalDeviationT< MeshT >, OpenMesh::Decimater::ModNormalFlippingT< MeshT >, OpenMesh::Decimater::ModProgMeshT< MeshT >, OpenMesh::Decimater::ModQuadricT< MeshT >, OpenMesh::Decimater::ModQuadricT< D >, and OpenMesh::Decimater::ModRoundnessT< MeshT >.
|
inlinevirtual |
After _from_vh has been collapsed into _to_vh, this method will be called.
Reimplemented in OpenMesh::Decimater::ModHausdorffT< MeshT >, OpenMesh::Decimater::ModIndependentSetsT< MeshT >, OpenMesh::Decimater::ModNormalDeviationT< MeshT >, OpenMesh::Decimater::ModProgMeshT< MeshT >, OpenMesh::Decimater::ModQuadricT< MeshT >, and OpenMesh::Decimater::ModQuadricT< D >.
|
inlinevirtual |
This provides a function that allows the setting of a percentage of the original contraint.
Note that the module might need to be re-initialized again after setting the percentage
| _factor | has to be in the closed interval between 0.0 and 1.0 |
Reimplemented in OpenMesh::Decimater::ModAspectRatioT< MeshT >, OpenMesh::Decimater::ModEdgeLengthT< MeshT >, OpenMesh::Decimater::ModHausdorffT< MeshT >, OpenMesh::Decimater::ModNormalDeviationT< MeshT >, OpenMesh::Decimater::ModNormalFlippingT< MeshT >, OpenMesh::Decimater::ModQuadricT< MeshT >, OpenMesh::Decimater::ModQuadricT< D >, and OpenMesh::Decimater::ModRoundnessT< MeshT >.