From 68d900ec7ef0051124f559211a12d4412833826f Mon Sep 17 00:00:00 2001 From: ganovelli Date: Wed, 24 Sep 2008 09:15:38 +0000 Subject: [PATCH] changes to compile previous commit with gcc --- vcg/complex/trimesh/closest.h | 10 +++++----- vcg/simplex/face/distance.h | 10 +++++----- vcg/simplex/vertex/distance.h | 8 ++++---- vcg/space/index/grid_closest.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/vcg/complex/trimesh/closest.h b/vcg/complex/trimesh/closest.h index 955b1c57..c6df19a0 100644 --- a/vcg/complex/trimesh/closest.h +++ b/vcg/complex/trimesh/closest.h @@ -233,7 +233,7 @@ namespace vcg { typedef FaceTmark MarkerFace; MarkerFace mf; mf.SetMesh(&mesh); - vcg::face::PointDistanceFunctor PDistFunct; + vcg::face::PointDistanceFunctor PDistFunct; _minDist=_maxDist; return (gr.GetClosest(PDistFunct,mf,_p,_maxDist,_minDist,_closestPt)); } @@ -251,7 +251,7 @@ namespace vcg { VDistFunct fn; _minDist=_maxDist; Point3x _closestPt; - return (gr.GetClosest/**/(fn,mv,_p,_maxDist,_minDist,_closestPt)); + return (gr.template GetClosest(fn,mv,_p,_maxDist,_minDist,_closestPt)); } template @@ -267,7 +267,7 @@ namespace vcg { VDistFunct fn; _minDist=_maxDist; Point3x _closestPt; - return (gr.GetClosest(fn,mv,_p,_maxDist,_minDist,_closestPt)); + return (gr.template GetClosest (fn,mv,_p,_maxDist,_minDist,_closestPt)); } template @@ -278,7 +278,7 @@ namespace vcg { typedef FaceTmark MarkerFace; MarkerFace mf; mf.SetMesh(&mesh); - vcg::face::PointDistanceFunctor FDistFunct; + vcg::face::PointDistanceFunctor FDistFunct; return (gr.GetKClosest /**/ (FDistFunct,mf,_k,_p,_maxDist,_objectPtrs,_distances,_points)); } @@ -309,7 +309,7 @@ namespace vcg { typedef FaceTmark MarkerFace; MarkerFace mf; mf.SetMesh(&mesh); - typedef vcg::face::PointDistanceFunctor FDistFunct; + typedef vcg::face::PointDistanceFunctor FDistFunct; return (gr.GetInSphere/**/ (FDistFunct(),mf,_p,_r,_objectPtrs,_distances,_points)); } diff --git a/vcg/simplex/face/distance.h b/vcg/simplex/face/distance.h index 6d0f317d..9f867352 100644 --- a/vcg/simplex/face/distance.h +++ b/vcg/simplex/face/distance.h @@ -68,8 +68,8 @@ namespace vcg { namespace face{ /* Point face distance - trova il punto

sulla faccia piu' vicino a , con possibilità di - rejection veloce su se la distanza trovata è maggiore di + trova il punto

sulla faccia piu' vicino a , con possibilit� di + rejection veloce su se la distanza trovata � maggiore di Commenti del 12/11/02 Funziona solo se la faccia e di quelle di tipo E (con edge e piano per faccia gia' calcolati) @@ -237,8 +237,8 @@ namespace vcg { template class PointDistanceFunctor { public: - typedef typename S ScalarType; - typedef typename Point3 QueryType; + typedef S ScalarType; + typedef Point3 QueryType; static inline const Point3 & Pos(const QueryType & qt) {return qt;} template @@ -438,7 +438,7 @@ namespace vcg { template class PointDistanceBaseFunctor { public: - typedef typename S ScalarType; + typedef S ScalarType; typedef Point3 QueryType; static inline const Point3 & Pos(const Point3 & qt) {return qt;} diff --git a/vcg/simplex/vertex/distance.h b/vcg/simplex/vertex/distance.h index 29d5cef8..9a972b69 100644 --- a/vcg/simplex/vertex/distance.h +++ b/vcg/simplex/vertex/distance.h @@ -76,12 +76,12 @@ template } }; -template +template class PointNormalDistanceFunctor { public: - typedef typename VERTEXTYPE QueryType; - typedef typename VERTEXTYPE::ScalarType ScalarType; - static inline const Point3 & Pos(const QueryType & qt) {return qt.P();} + typedef VERTYPE QueryType; + typedef typename VERTYPE::ScalarType ScalarType; + static inline const Point3 & Pos(const QueryType & qt) {return qt.P();} static ScalarType & Alpha(){static ScalarType alpha = 1.0; return alpha;} static ScalarType & Beta(){static ScalarType beta= 1.0; return beta;} diff --git a/vcg/space/index/grid_closest.h b/vcg/space/index/grid_closest.h index b6407f84..c3a11077 100644 --- a/vcg/space/index/grid_closest.h +++ b/vcg/space/index/grid_closest.h @@ -106,7 +106,7 @@ namespace vcg{ typedef typename SPATIAL_INDEX::ScalarType ScalarType; typedef typename SPATIAL_INDEX::Box3x Box3x; - Point3 _p = typename OBJPOINTDISTFUNCTOR::Pos(_p_obj); + Point3 _p = OBJPOINTDISTFUNCTOR::Pos(_p_obj); // Initialize min_dist with _maxDist to exploit early rejection test. _minDist = _maxDist;