|
Developer Documentation
|
Use Hausdorff distance to control decimation. More...
#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh>
Public Types | |
| typedef Mesh::Scalar | Scalar |
| typedef Mesh::Point | Point |
| typedef Mesh::FaceHandle | FaceHandle |
| typedef std::vector< Point > | Points |
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 | |
| DECIMATING_MODULE (ModHausdorffT, MeshT, Hausdorff) | |
| ModHausdorffT (MeshT &_mesh, Scalar _error_tolerance=FLT_MAX) | |
| Constructor. | |
| ~ModHausdorffT () | |
| Destructor. | |
| Scalar | tolerance () const |
| get max error tolerance | |
| void | set_tolerance (Scalar _e) |
| set max error tolerance | |
| virtual void | initialize () override |
| reset per-face point lists | |
| virtual float | collapse_priority (const CollapseInfo &_ci) override |
| compute Hausdorff error for one-ring | |
| virtual void | postprocess_collapse (const CollapseInfo &_ci) override |
| re-distribute points | |
| void | set_error_tolerance_factor (double _factor) override |
| set the percentage of tolerance | |
Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
| virtual | ~ModBaseT () |
| Virtual desctructor. | |
| virtual const std::string & | name () const |
| Set module's name. | |
| 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 > &) |
| virtual void | preprocess_collapse (const CollapseInfoT< MeshT > &) |
| virtual void | postprocess_collapse (const CollapseInfoT< MeshT > &) |
Private Member Functions | |
| Scalar | distPointTriangleSquared (const Point &_p, const Point &_v0, const Point &_v1, const Point &_v2) |
| squared distance from point _p to triangle (_v0, _v1, _v2) | |
| Scalar | compute_sqr_error (FaceHandle _fh, const Point &_p) const |
| compute max error for face _fh w.r.t. its point list and _p | |
Private Attributes | |
| Points | tmp_points_ |
| Temporary point storage. | |
| Mesh & | mesh_ |
| Scalar | tolerance_ |
| OpenMesh::FPropHandleT< Points > | points_ |
Additional Inherited Members | |
Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
| ModBaseT (MeshT &_mesh, bool _is_binary) | |
| MeshT & | mesh () |
| Access the mesh associated with the decimater. | |
Protected Attributes inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
| double | error_tolerance_factor_ |
Use Hausdorff distance to control decimation.
This module computes the aspect ratio.
In binary mode, the collapse is legal if:
No continuous mode
Definition at line 79 of file ModHausdorffT.hh.
| typedef Mesh::FaceHandle OpenMesh::Decimater::ModHausdorffT< MeshT >::FaceHandle |
Definition at line 86 of file ModHausdorffT.hh.
| typedef Mesh::Point OpenMesh::Decimater::ModHausdorffT< MeshT >::Point |
Definition at line 85 of file ModHausdorffT.hh.
| typedef std::vector<Point> OpenMesh::Decimater::ModHausdorffT< MeshT >::Points |
Definition at line 87 of file ModHausdorffT.hh.
| typedef Mesh::Scalar OpenMesh::Decimater::ModHausdorffT< MeshT >::Scalar |
Definition at line 84 of file ModHausdorffT.hh.
|
inlineexplicit |
Constructor.
Definition at line 90 of file ModHausdorffT.hh.
|
inline |
Destructor.
Definition at line 96 of file ModHausdorffT.hh.
|
overridevirtual |
compute Hausdorff error for one-ring
This mod only allows collapses if the Hausdorff distance after a collapse is lower than the given tolerance.
| _ci | Collapse info data |
Definition at line 204 of file ModHausdorffT_impl.hh.
|
private |
compute max error for face _fh w.r.t. its point list and _p
Definition at line 356 of file ModHausdorffT_impl.hh.
|
private |
squared distance from point _p to triangle (_v0, _v1, _v2)
Definition at line 70 of file ModHausdorffT_impl.hh.
|
overridevirtual |
reset per-face point lists
Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.
Definition at line 189 of file ModHausdorffT_impl.hh.
|
overridevirtual |
re-distribute points
Definition at line 280 of file ModHausdorffT_impl.hh.
|
overridevirtual |
set the percentage of tolerance
Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.
Definition at line 265 of file ModHausdorffT_impl.hh.
|
inline |
set max error tolerance
Definition at line 106 of file ModHausdorffT.hh.
|
inline |
get max error tolerance
Definition at line 101 of file ModHausdorffT.hh.
|
private |
Definition at line 144 of file ModHausdorffT.hh.
|
private |
Definition at line 147 of file ModHausdorffT.hh.
|
private |
Temporary point storage.
Definition at line 142 of file ModHausdorffT.hh.
|
private |
Definition at line 145 of file ModHausdorffT.hh.