58 #ifndef OPENMESH_DECIMATER_MODASPECTRATIOT_HH 59 #define OPENMESH_DECIMATER_MODASPECTRATIOT_HH 64 #include <OpenMesh/Core/Utils/Property.hh> 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 void set_aspect_ratio(float _f)
set aspect ratio
MeshT & mesh()
Access the mesh associated with the decimater.
Use aspect ratio to control decimation.
Scalar aspectRatio(const Point &_v0, const Point &_v1, const Point &_v2)
return aspect ratio (length/height) of triangle
void initialize()
precompute face aspect ratio
void preprocess_collapse(const CollapseInfo &_ci)
update aspect ratio of one-ring
float aspect_ratio() const
get aspect ratio
~ModAspectRatioT()
destructor
float collapse_priority(const CollapseInfo &_ci)
Returns the collapse priority.
ModAspectRatioT(MeshT &_mesh, float _min_aspect=5.0, bool _is_binary=true)
constructor
Kernel::Point Point
Coordinate type.
#define DECIMATING_MODULE(Classname, MeshT, Name)
void set_error_tolerance_factor(double _factor)
set percentage of aspect ratio
Kernel::Scalar Scalar
Scalar type.