added optional FF adjacency update when computing border length

This commit is contained in:
Luigi Malomo 2020-03-17 10:53:31 +01:00
parent 5c21b15d36
commit f7ed8fd13d
1 changed files with 5 additions and 2 deletions

View File

@ -276,11 +276,14 @@ public:
return area;
}
static ScalarType ComputeBorderLength(MeshType & m)
static ScalarType ComputeBorderLength(MeshType & m, bool computeFFTopology = true)
{
RequireFFAdjacency(m);
ScalarType sum = 0;
tri::UpdateTopology<MeshType>::FaceFace(m);
if (computeFFTopology)
{
tri::UpdateTopology<MeshType>::FaceFace(m);
}
ForEachFace(m, [&](FaceType &f) {
for (int k=0; k<f.VN(); k++)
if (face::IsBorder(f, k))