58 #ifndef OPENMESH_DECIMATER_MODHAUSDORFFT_HH 59 #define OPENMESH_DECIMATER_MODHAUSDORFFT_HH 64 #include <OpenMesh/Core/Utils/Property.hh> 92 typedef typename Mesh::FaceHandle FaceHandle;
93 typedef std::vector<Point> Points;
97 Base(_mesh, true), mesh_(Base::
mesh()), tolerance_(_error_tolerance) {
98 mesh_.add_property(points_);
103 mesh_.remove_property(points_);
160 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_MODHAUSDORFFT_C) 161 #define OPENMESH_DECIMATER_MODHAUSDORFFT_TEMPLATES 165 #endif // OPENMESH_DECIMATER_MODHAUSDORFFT_HH defined
MeshT & mesh()
Access the mesh associated with the decimater.
virtual void postprocess_collapse(const CollapseInfo &_ci)
re-distribute points
virtual float collapse_priority(const CollapseInfo &_ci)
compute Hausdorff error for one-ring
Scalar tolerance() const
get max error tolerance
~ModHausdorffT()
Destructor.
Scalar compute_sqr_error(FaceHandle _fh, const Point &_p) const
compute max error for face _fh w.r.t. its point list and _p
ModHausdorffT(MeshT &_mesh, Scalar _error_tolerance=FLT_MAX)
Constructor.
void set_tolerance(Scalar _e)
set max error tolerance
void set_error_tolerance_factor(double _factor)
set the percentage of tolerance
Scalar distPointTriangleSquared(const Point &_p, const Point &_v0, const Point &_v1, const Point &_v2)
squared distance from point _p to triangle (_v0, _v1, _v2)
Kernel::Point Point
Coordinate type.
Use Hausdorff distance to control decimation.
Kernel::Scalar Scalar
Scalar type.
Points tmp_points_
Temporary point storage.
virtual void initialize()
reset per-face point lists