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