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 Points tmp_points_
Temporary point storage.
virtual float collapse_priority(const CollapseInfo &_ci) override
compute Hausdorff error for one-ring
Scalar tolerance() const
get max error tolerance
Kernel::Point Point
Coordinate type.
void set_error_tolerance_factor(double _factor) override
set the percentage of tolerance
void set_tolerance(Scalar _e)
set max error tolerance
Scalar compute_sqr_error(FaceHandle _fh, const Point &_p) const
compute max error for face _fh w.r.t. its point list and _p
virtual void initialize() override
reset per-face point lists
virtual void postprocess_collapse(const CollapseInfo &_ci) override
re-distribute points
Scalar distPointTriangleSquared(const Point &_p, const Point &_v0, const Point &_v1, const Point &_v2)
squared distance from point _p to triangle (_v0, _v1, _v2)
ModHausdorffT(MeshT &_mesh, Scalar _error_tolerance=FLT_MAX)
Constructor.
Kernel::Scalar Scalar
Scalar type.
MeshT & mesh()
Access the mesh associated with the decimater.
Use Hausdorff distance to control decimation.
~ModHausdorffT()
Destructor.