From 49c72bc54e551383b7ee53bf41475600d225187a Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 30 Oct 2008 09:01:03 +0000 Subject: [PATCH] Disambiguated some grid utility names (IPtoTP into IPfToPf and IPiToPf) in order to avoid ambiguities (due to automatic cast?) --- vcg/complex/trimesh/create/resampler.h | 4 ++-- vcg/space/index/grid_static_obj.h | 8 ++++---- vcg/space/index/grid_util.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vcg/complex/trimesh/create/resampler.h b/vcg/complex/trimesh/create/resampler.h index 4d6f09a2..0430c963 100644 --- a/vcg/complex/trimesh/create/resampler.h +++ b/vcg/complex/trimesh/create/resampler.h @@ -153,7 +153,7 @@ template typename Old_Mesh::FaceType *f=NULL; const float max_dist = max_dim; vcg::Point3f testPt; - this->IPToP(Point3i(x,y,z),testPt); + this->IPiToPf(Point3i(x,y,z),testPt); vcg::Point3f closestNorm; vcg::Point3f closestPt; @@ -249,7 +249,7 @@ template for(vi=new_mesh.vert.begin();vi!=new_mesh.vert.end();++vi) if(!(*vi).IsD()) { - IPToP((*vi).cP(),(*vi).P()); + IPfToPf((*vi).cP(),(*vi).P()); } } diff --git a/vcg/space/index/grid_static_obj.h b/vcg/space/index/grid_static_obj.h index 3cfa0991..392ee7a5 100644 --- a/vcg/space/index/grid_static_obj.h +++ b/vcg/space/index/grid_static_obj.h @@ -77,12 +77,12 @@ class GridStaticObj : public BasicGrid /// Date le coordinate ritorna la cella - inline ObjType & Grid( const int x, const int y, const int z ) {return grid[GridInd(Point3i(x,y,z))]; } + inline ObjType & Grid( const int x, const int y, const int z ) {return grid[GridIndI(Point3i(x,y,z))]; } // Dato un punto ritorna la cella - inline ObjType & Grid( const Point3 & p ) { return grid[GridInd(p)]; } + inline ObjType & Grid( const Point3 & p ) { return grid[GridIndF(p)]; } - inline int GridInd( const Point3i & pi ) const + inline int GridIndI( const Point3i & pi ) const { #ifndef NDEBUG if ( pi[0]<0 || pi[0]>=this->siz[0] || pi[1]<0 || pi[1]>=this->siz[1] || pi[2]<0 || pi[2]>=this->siz[2] ) @@ -94,7 +94,7 @@ class GridStaticObj : public BasicGrid } // Dato un punto ritorna l'indice della cella - inline int GridInd( const Point3 & p ) const { return GridInd(GridP(p)); } + inline int GridIndF( const Point3 & p ) const { return GridIndI(GridP(p)); } void Create( const Point3i &_siz, const ObjType & init ) { diff --git a/vcg/space/index/grid_util.h b/vcg/space/index/grid_util.h index 0a966817..6f48c070 100644 --- a/vcg/space/index/grid_util.h +++ b/vcg/space/index/grid_util.h @@ -145,7 +145,7 @@ public: * @param integer coordinates pi of the cell * @return p is a 3D point representing the lower corner of the cell */ - inline void IPToP(const Point3i & pi, CoordType &p ) const + inline void IPiToPf(const Point3i & pi, CoordType &p ) const { p[0] = ((ScalarType)pi[0])*voxel[0]; p[1] = ((ScalarType)pi[1])*voxel[1]; @@ -155,7 +155,7 @@ public: // Same of above but for the case that you just want to transform // from a space to the other. - inline void IPToP(const CoordType & pi, CoordType &p ) const + inline void IPfToPf(const CoordType & pi, CoordType &p ) const { p[0] = ((ScalarType)pi[0])*voxel[0]; p[1] = ((ScalarType)pi[1])*voxel[1];