fix computeQuality

This commit is contained in:
korialis 2021-11-26 17:51:50 +01:00
parent d55c7aa215
commit 44937573d0
1 changed files with 3 additions and 3 deletions

View File

@ -437,10 +437,10 @@ private:
assert(ff.size() > 0);
const Point3<ScalarType> & fNormal = NormalizedTriangleNormal(**it);
const Point3<ScalarType> fNormal = NormalizedTriangleNormal(**(ff.begin()));
const auto tot = std::accumulate(++ff.begin(), ff.end(), 0.d, [&](const ScalarType acc, const FaceType * f) {
return acc + (1 - math::Abs(fastAngle(n, NormalizedTriangleNormal(*f))));
const auto tot = std::accumulate(++ff.begin(), ff.end(), 0., [&](const ScalarType acc, const FaceType * f) {
return acc + (1 - math::Abs(fastAngle(fNormal, NormalizedTriangleNormal(*f))));
});
vi->Q() = tot / (std::max(1, ((int)ff.size()-1)));