From f4cf3b9221952abf629f730f643c300720a9628e Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 18 Jan 2012 11:44:42 +0000 Subject: [PATCH] Changed the name of the Distance from point to plane from DistancePointPlane to SignedDistancePointPlane to underline the fact that it is SIGNED!!! --- vcg/complex/algorithms/update/quality.h | 2 +- vcg/simplex/face/distance.h | 2 +- vcg/space/plane3.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index df86f2db..51fb5179 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -234,7 +234,7 @@ static void VertexFromPlane(MeshType &m, const Plane3 &pl) { VertexIterator vi; for(vi=m.vert.begin();vi!=m.vert.end();++vi) if(!(*vi).IsD()) - (*vi).Q() =DistancePlanePoint(pl,(*vi).cP()); + (*vi).Q() =SignedDistancePlanePoint(pl,(*vi).cP()); } static void VertexFromGaussianCurvature(MeshType &m) diff --git a/vcg/simplex/face/distance.h b/vcg/simplex/face/distance.h index bfd8ed3b..6479535b 100644 --- a/vcg/simplex/face/distance.h +++ b/vcg/simplex/face/distance.h @@ -341,7 +341,7 @@ namespace vcg { const ScalarType EPS = ScalarType( 0.000001); ScalarType b,b0,b1,b2; // Calcolo distanza punto piano - ScalarType d = DistancePlanePoint( fPlane, q ); + ScalarType d = SignedDistancePlanePoint( fPlane, q ); if( d>dist || d<-dist ) // Risultato peggiore: niente di fatto return false; diff --git a/vcg/space/plane3.h b/vcg/space/plane3.h index 96e13f55..8ee8dbef 100644 --- a/vcg/space/plane3.h +++ b/vcg/space/plane3.h @@ -141,15 +141,15 @@ typedef Plane3 Plane3f; typedef Plane3 Plane3d; ///Distance plane - point and vv. (Move these function to somewhere else) -template T DistancePlanePoint(const Plane3 & plane, const Point3 & point) +template T SignedDistancePlanePoint(const Plane3 & plane, const Point3 & point) { return plane.Direction().dot(point) - plane.Offset(); } -template T DistancePointPlane(const Point3 & point, const Plane3 & plane) +template T SignedDistancePointPlane(const Point3 & point, const Plane3 & plane) { - return DistancePlanePoint(plane, point); + return SignedDistancePlanePoint(plane, point); } } // end namespace