Merge branch 'Edge_Length' into 'master'

ModEdgeLength Fix incompatibility with Eigen vector type

Closes #81

See merge request OpenMesh/OpenMesh!320
This commit is contained in:
Jan Möbius
2022-05-05 13:57:17 +00:00
3 changed files with 145 additions and 1 deletions

View File

@@ -72,7 +72,7 @@ ModEdgeLengthT<MeshT>::ModEdgeLengthT(MeshT &_mesh, float _edge_length,
template<class MeshT>
float ModEdgeLengthT<MeshT>::collapse_priority(const CollapseInfo& _ci) {
typename Mesh::Scalar sqr_length = (_ci.p0 - _ci.p1).sqrnorm();
typename Mesh::Scalar sqr_length = sqrnorm(_ci.p0 - _ci.p1);
return ( (sqr_length <= sqr_edge_length_) ? sqr_length : float(Base::ILLEGAL_COLLAPSE));
}