From 7c08094a50c9a6ec493ce7a627f4e51ef8f1b75c Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Sat, 21 Sep 2013 00:54:21 +0000 Subject: [PATCH] corrected AnisotropicDistance --- vcg/complex/algorithms/geodesic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/geodesic.h b/vcg/complex/algorithms/geodesic.h index 67bbf4e5..45fe5c66 100644 --- a/vcg/complex/algorithms/geodesic.h +++ b/vcg/complex/algorithms/geodesic.h @@ -127,8 +127,8 @@ public: ScalarType operator()( VertexType * v0, VertexType * v1) { Point3f dd = v0->cP()-v1->cP(); - float x = dd * (wxH[v0]+wxH[v1])/2.0f; - float y = dd * (wyH[v0]+wyH[v1])/2.0f; + float x = (fabs(dd * wxH[v0])+fabs(dd *wxH[v1]))/2.0f; + float y = (fabs(dd * wyH[v0])+fabs(dd *wyH[v1]))/2.0f; return sqrt(x*x+y*y); }