Developer Documentation
|
Use Roundness of triangles to control decimation. More...
#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh>
Public Types | |
typedef MeshT::Point | Point |
typedef vector_traits< Point >::value_type | value_type |
![]() | |
enum | { ILLEGAL_COLLAPSE = -1 , LEGAL_COLLAPSE = 0 } |
typedef MeshT | Mesh |
typedef CollapseInfoT< MeshT > | CollapseInfo |
Public Member Functions | |
DECIMATING_MODULE (ModRoundnessT, MeshT, Roundness) | |
ModRoundnessT (MeshT &_dec) | |
Constructor. More... | |
~ModRoundnessT () | |
Destructor. More... | |
float | collapse_priority (const CollapseInfo &_ci) override |
void | set_error_tolerance_factor (double _factor) override |
set the percentage of minimum roundness More... | |
void | set_min_angle (float _angle, bool) |
void | set_min_roundness (value_type _min_roundness, bool _binary=true) |
void | unset_min_roundness () |
Unset minimum value constraint and enable non-binary mode. More... | |
double | roundness (const Vec3f &A, const Vec3f &B, const Vec3f &C) |
![]() | |
virtual | ~ModBaseT () |
Virtual desctructor. More... | |
virtual const std::string & | name () const |
Set module's name. More... | |
bool | is_binary (void) const |
Returns true if criteria returns a binary value. More... | |
void | set_binary (bool _b) |
Set whether module is binary or not. More... | |
virtual void | initialize () |
Initialize module-internal stuff. More... | |
virtual float | collapse_priority (const CollapseInfoT< MeshT > &) |
virtual void | preprocess_collapse (const CollapseInfoT< MeshT > &) |
virtual void | postprocess_collapse (const CollapseInfoT< MeshT > &) |
virtual void | set_error_tolerance_factor (double _factor) |
Private Attributes | |
value_type | min_r_ |
Additional Inherited Members | |
![]() | |
ModBaseT (MeshT &_mesh, bool _is_binary) | |
MeshT & | mesh () |
Access the mesh associated with the decimater. More... | |
![]() | |
double | error_tolerance_factor_ |
Use Roundness of triangles to control decimation.
In binary and mode, the collapse is legal if:
In continuous mode the roundness after the collapse is returned
Definition at line 86 of file ModRoundnessT.hh.
typedef MeshT::Point OpenMesh::Decimater::ModRoundnessT< MeshT >::Point |
Definition at line 94 of file ModRoundnessT.hh.
typedef vector_traits<Point>::value_type OpenMesh::Decimater::ModRoundnessT< MeshT >::value_type |
Definition at line 95 of file ModRoundnessT.hh.
|
inlineexplicit |
Constructor.
Definition at line 100 of file ModRoundnessT.hh.
|
inline |
Destructor.
Definition at line 106 of file ModRoundnessT.hh.
|
inlineoverride |
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.
Definition at line 120 of file ModRoundnessT.hh.
|
inline |
Definition at line 280 of file ModRoundnessT.hh.
|
inlineoverridevirtual |
set the percentage of minimum roundness
Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.
Definition at line 177 of file ModRoundnessT.hh.
|
inline |
Definition at line 193 of file ModRoundnessT.hh.
|
inline |
Set a minimum roundness value.
_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. |
Definition at line 225 of file ModRoundnessT.hh.
|
inline |
Unset minimum value constraint and enable non-binary mode.
Definition at line 233 of file ModRoundnessT.hh.
|
private |
Definition at line 307 of file ModRoundnessT.hh.