58 #ifndef OPENMESH_DECIMATER_MODASPECTRATIOT_HH 59 #define OPENMESH_DECIMATER_MODASPECTRATIOT_HH 64 #include <OpenMesh/Core/Utils/Property.hh> 93 typedef typename Mesh::Scalar Scalar;
94 typedef typename Mesh::Point Point;
99 Base(_mesh, _is_binary), mesh_(Base::
mesh()), min_aspect_(
101 mesh_.add_property(aspect_);
106 mesh_.remove_property(aspect_);
111 return 1.f / min_aspect_;
116 min_aspect_ = 1.f / _f;
136 Scalar aspectRatio(
const Point& _v0,
const Point& _v1,
const Point& _v2);
149 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_MODASPECTRATIOT_C) 150 #define OPENMESH_DECIMATER_MODASPECTRATIOT_TEMPLATES 154 #endif // OPENMESH_DECIMATER_MODASPECTRATIOT_HH defined Base class for all decimation modules.
void initialize()
precompute face aspect ratio
Definition: ModAspectRatioT.cc:102
~ModAspectRatioT()
destructor
Definition: ModAspectRatioT.hh:105
Base class for all decimation modules.
Definition: ModBaseT.hh:197
ModAspectRatioT(MeshT &_mesh, float _min_aspect=5.0, bool _is_binary=true)
constructor
Definition: ModAspectRatioT.hh:97
void preprocess_collapse(const CollapseInfo &_ci)
update aspect ratio of one-ring
Definition: ModAspectRatioT.cc:119
float collapse_priority(const CollapseInfo &_ci)
Returns the collapse priority.
Definition: ModAspectRatioT.cc:139
MeshT & mesh()
Access the mesh associated with the decimater.
Definition: ModBaseT.hh:282
float aspect_ratio() const
get aspect ratio
Definition: ModAspectRatioT.hh:110
void set_error_tolerance_factor(double _factor)
set percentage of aspect ratio
Definition: ModAspectRatioT.cc:189
void set_aspect_ratio(float _f)
set aspect ratio
Definition: ModAspectRatioT.hh:115
#define DECIMATING_MODULE(Classname, MeshT, Name)
Convenience macro, to be used in derived modules The macro defines the types.
Definition: ModBaseT.hh:154
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Use aspect ratio to control decimation.
Definition: ModAspectRatioT.hh:87