51 #ifndef OPENMESH_DECIMATER_MODHAUSDORFFT_HH
52 #define OPENMESH_DECIMATER_MODHAUSDORFFT_HH
57 #include <OpenMesh/Core/Utils/Property.hh>
83 typedef typename Mesh::Scalar Scalar;
84 typedef typename Mesh::Point Point;
85 typedef typename Mesh::FaceHandle FaceHandle;
86 typedef std::vector<Point> Points;
90 Base(_mesh, true), mesh_(Base::
mesh()), tolerance_(_error_tolerance) {
91 mesh_.add_property(points_);
96 mesh_.remove_property(points_);
133 Scalar distPointTriangleSquared(
const Point& _p,
const Point& _v0,
const Point& _v1,
const Point& _v2);
136 Scalar compute_sqr_error(FaceHandle _fh,
const Point& _p)
const;
153 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_MODHAUSDORFFT_C)
154 #define OPENMESH_DECIMATER_MODHAUSDORFFT_TEMPLATES
158 #endif // OPENMESH_DECIMATER_MODHAUSDORFFT_HH defined
MeshT & mesh()
Access the mesh associated with the decimater.
Definition: ModBaseT.hh:275
~ModHausdorffT()
Destructor.
Definition: ModHausdorffT.hh:95
#define DECIMATING_MODULE(Classname, MeshT, Name)
Convenience macro, to be used in derived modules The macro defines the types.
Definition: ModBaseT.hh:147
void set_tolerance(Scalar _e)
set max error tolerance
Definition: ModHausdorffT.hh:105
void set_error_tolerance_factor(double _factor)
set the percentage of tolerance
Definition: ModHausdorffT.cc:264
virtual float collapse_priority(const CollapseInfo &_ci)
compute Hausdorff error for one-ring
Definition: ModHausdorffT.cc:204
virtual void initialize()
reset per-face point lists
Definition: ModHausdorffT.cc:189
Use Hausdorff distance to control decimation.
Definition: ModHausdorffT.hh:78
Base class for all decimation modules.
Base class for all decimation modules.
Definition: ModBaseT.hh:190
Scalar tolerance() const
get max error tolerance
Definition: ModHausdorffT.hh:100
virtual void postprocess_collapse(const CollapseInfo &_ci)
re-distribute points
Definition: ModHausdorffT.cc:280
ModHausdorffT(MeshT &_mesh, Scalar _error_tolerance=FLT_MAX)
Constructor.
Definition: ModHausdorffT.hh:89
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56