51 #define OPENMESH_DECIMATER_MODEDGELENGTHT_C 67 Base(_mesh, _is_binary), mesh_(Base::mesh()) {
75 typename Mesh::Scalar sqr_length = (_ci.
p0 - _ci.
p1).sqrnorm();
77 return ( (sqr_length <= sqr_edge_length_) ? sqr_length : float(Base::ILLEGAL_COLLAPSE));
84 if (_factor >= 0.0 && _factor <= 1.0) {
88 typename Mesh::Scalar
edge_length = edge_length_ *
static_cast<typename Mesh::Scalar
>(_factor / this->error_tolerance_factor_);
90 this->error_tolerance_factor_ = _factor;
void set_edge_length(typename Mesh::Scalar _f)
set edge_length
Definition: ModEdgeLengthT.hh:91
ModEdgeLengthT(MeshT &_mesh, float _edge_length=FLT_MAX, bool _is_binary=true)
Constructor.
Definition: ModEdgeLengthT_impl.hh:65
void set_error_tolerance_factor(double _factor) override
set the percentage of edge length
Definition: ModEdgeLengthT_impl.hh:83
Mesh::Point p0
Position of removed vertex.
Definition: CollapseInfoT.hh:93
float edge_length() const
get edge_length
Definition: ModEdgeLengthT.hh:86
Mesh::Point p1
Positions of remaining vertex.
Definition: CollapseInfoT.hh:94
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
float collapse_priority(const CollapseInfo &_ci) override
Compute priority: Binary mode: Don't collapse edges longer then edge_length_ Cont.
Definition: ModEdgeLengthT_impl.hh:74
Stores information about a halfedge collapse.
Definition: CollapseInfoT.hh:74