From 44937573d08c1929ead9cf50a7827d54b7d74ed3 Mon Sep 17 00:00:00 2001 From: korialis Date: Fri, 26 Nov 2021 17:51:50 +0100 Subject: [PATCH] fix computeQuality --- vcg/complex/algorithms/isotropic_remeshing.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcg/complex/algorithms/isotropic_remeshing.h b/vcg/complex/algorithms/isotropic_remeshing.h index 9985e4ed..6d79897a 100644 --- a/vcg/complex/algorithms/isotropic_remeshing.h +++ b/vcg/complex/algorithms/isotropic_remeshing.h @@ -437,10 +437,10 @@ private: assert(ff.size() > 0); - const Point3 & fNormal = NormalizedTriangleNormal(**it); + const Point3 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)));