changes to compile previous commit with gcc

This commit is contained in:
ganovelli 2008-09-24 09:15:38 +00:00
parent f7da79d507
commit 68d900ec7e
4 changed files with 15 additions and 15 deletions

View File

@ -233,7 +233,7 @@ namespace vcg {
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
vcg::face::PointDistanceFunctor PDistFunct; vcg::face::PointDistanceFunctor<ScalarType> PDistFunct;
_minDist=_maxDist; _minDist=_maxDist;
return (gr.GetClosest(PDistFunct,mf,_p,_maxDist,_minDist,_closestPt)); return (gr.GetClosest(PDistFunct,mf,_p,_maxDist,_minDist,_closestPt));
} }
@ -251,7 +251,7 @@ namespace vcg {
VDistFunct fn; VDistFunct fn;
_minDist=_maxDist; _minDist=_maxDist;
Point3x _closestPt; Point3x _closestPt;
return (gr.GetClosest/*<VDistFunct,MarkerVert>*/(fn,mv,_p,_maxDist,_minDist,_closestPt)); return (gr.template GetClosest<VDistFunct,MarkerVert>(fn,mv,_p,_maxDist,_minDist,_closestPt));
} }
template <class MESH, class GRID> template <class MESH, class GRID>
@ -267,7 +267,7 @@ namespace vcg {
VDistFunct fn; VDistFunct fn;
_minDist=_maxDist; _minDist=_maxDist;
Point3x _closestPt; Point3x _closestPt;
return (gr.GetClosest<VDistFunct,MarkerVert>(fn,mv,_p,_maxDist,_minDist,_closestPt)); return (gr.template GetClosest <VDistFunct,MarkerVert>(fn,mv,_p,_maxDist,_minDist,_closestPt));
} }
template <class MESH, class GRID, class OBJPTRCONTAINER,class DISTCONTAINER, class POINTCONTAINER> template <class MESH, class GRID, class OBJPTRCONTAINER,class DISTCONTAINER, class POINTCONTAINER>
@ -278,7 +278,7 @@ namespace vcg {
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
vcg::face::PointDistanceFunctor FDistFunct; vcg::face::PointDistanceFunctor<typename MESH::ScalarType> FDistFunct;
return (gr.GetKClosest /*<vcg::face::PointDistanceFunctor, MarkerFace,OBJPTRCONTAINER,DISTCONTAINER,POINTCONTAINER>*/ return (gr.GetKClosest /*<vcg::face::PointDistanceFunctor, MarkerFace,OBJPTRCONTAINER,DISTCONTAINER,POINTCONTAINER>*/
(FDistFunct,mf,_k,_p,_maxDist,_objectPtrs,_distances,_points)); (FDistFunct,mf,_k,_p,_maxDist,_objectPtrs,_distances,_points));
} }
@ -309,7 +309,7 @@ namespace vcg {
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
typedef vcg::face::PointDistanceFunctor FDistFunct; typedef vcg::face::PointDistanceFunctor<typename MESH::ScalarType> FDistFunct;
return (gr.GetInSphere/*<FDistFunct,MarkerFace,OBJPTRCONTAINER,DISTCONTAINER,POINTCONTAINER>*/ return (gr.GetInSphere/*<FDistFunct,MarkerFace,OBJPTRCONTAINER,DISTCONTAINER,POINTCONTAINER>*/
(FDistFunct(),mf,_p,_r,_objectPtrs,_distances,_points)); (FDistFunct(),mf,_p,_r,_objectPtrs,_distances,_points));
} }

View File

@ -68,8 +68,8 @@ namespace vcg {
namespace face{ namespace face{
/* /*
Point face distance Point face distance
trova il punto <p> sulla faccia piu' vicino a <q>, con possibilità di trova il punto <p> sulla faccia piu' vicino a <q>, con possibilit<EFBFBD> di
rejection veloce su se la distanza trovata è maggiore di <rejdist> rejection veloce su se la distanza trovata <EFBFBD> maggiore di <rejdist>
Commenti del 12/11/02 Commenti del 12/11/02
Funziona solo se la faccia e di quelle di tipo E (con edge e piano per faccia gia' calcolati) 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 S> template <class S>
class PointDistanceFunctor { class PointDistanceFunctor {
public: public:
typedef typename S ScalarType; typedef S ScalarType;
typedef typename Point3<ScalarType> QueryType; typedef Point3<ScalarType> QueryType;
static inline const Point3<ScalarType> & Pos(const QueryType & qt) {return qt;} static inline const Point3<ScalarType> & Pos(const QueryType & qt) {return qt;}
template <class FACETYPE, class SCALARTYPE> template <class FACETYPE, class SCALARTYPE>
@ -438,7 +438,7 @@ namespace vcg {
template <class S> template <class S>
class PointDistanceBaseFunctor { class PointDistanceBaseFunctor {
public: public:
typedef typename S ScalarType; typedef S ScalarType;
typedef Point3<ScalarType> QueryType; typedef Point3<ScalarType> QueryType;
static inline const Point3<ScalarType> & Pos(const Point3<ScalarType> & qt) {return qt;} static inline const Point3<ScalarType> & Pos(const Point3<ScalarType> & qt) {return qt;}

View File

@ -76,12 +76,12 @@ template <class SCALARTYPE>
} }
}; };
template <class VERTEXTYPE> template <class VERTYPE>
class PointNormalDistanceFunctor { class PointNormalDistanceFunctor {
public: public:
typedef typename VERTEXTYPE QueryType; typedef VERTYPE QueryType;
typedef typename VERTEXTYPE::ScalarType ScalarType; typedef typename VERTYPE::ScalarType ScalarType;
static inline const Point3<typename VERTEXTYPE::ScalarType> & Pos(const QueryType & qt) {return qt.P();} static inline const Point3<typename VERTYPE::ScalarType> & Pos(const QueryType & qt) {return qt.P();}
static ScalarType & Alpha(){static ScalarType alpha = 1.0; return alpha;} static ScalarType & Alpha(){static ScalarType alpha = 1.0; return alpha;}
static ScalarType & Beta(){static ScalarType beta= 1.0; return beta;} static ScalarType & Beta(){static ScalarType beta= 1.0; return beta;}

View File

@ -106,7 +106,7 @@ namespace vcg{
typedef typename SPATIAL_INDEX::ScalarType ScalarType; typedef typename SPATIAL_INDEX::ScalarType ScalarType;
typedef typename SPATIAL_INDEX::Box3x Box3x; typedef typename SPATIAL_INDEX::Box3x Box3x;
Point3<ScalarType> _p = typename OBJPOINTDISTFUNCTOR::Pos(_p_obj); Point3<ScalarType> _p = OBJPOINTDISTFUNCTOR::Pos(_p_obj);
// Initialize min_dist with _maxDist to exploit early rejection test. // Initialize min_dist with _maxDist to exploit early rejection test.
_minDist = _maxDist; _minDist = _maxDist;