From 5e910a005879b843f5f28bb8f5c58369039e8bd4 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 1 Jul 2014 10:08:30 +0000 Subject: [PATCH] Improved float/double consistency removing some wrong Point3f and substitued with MeshType::CoordType --- vcg/space/index/grid_util.h | 7 +++---- wrap/gl/pick.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vcg/space/index/grid_util.h b/vcg/space/index/grid_util.h index 79e32845..7077de73 100644 --- a/vcg/space/index/grid_util.h +++ b/vcg/space/index/grid_util.h @@ -107,10 +107,9 @@ public: template inline void IPiToPf(const Point3i & pi, Point3 &p ) const { - p[0] = ((OtherScalarType)pi[0])*voxel[0]; - p[1] = ((OtherScalarType)pi[1])*voxel[1]; - p[2] = ((OtherScalarType)pi[2])*voxel[2]; - p += bbox.min; + p[0] = bbox.min[0] + ((OtherScalarType)pi[0])*voxel[0]; + p[1] = bbox.min[1] + ((OtherScalarType)pi[1])*voxel[1]; + p[2] = bbox.min[2] + ((OtherScalarType)pi[2])*voxel[2]; } /* Returns the matrix that applied to a point in grid space * transforms it in the original space. diff --git a/wrap/gl/pick.h b/wrap/gl/pick.h index 4cc98703..f1b5f28c 100644 --- a/wrap/gl/pick.h +++ b/wrap/gl/pick.h @@ -217,7 +217,7 @@ public: float LocalEpsilon = 0.001f; for(size_t i =0;i=0 && p[0]=0 && p[1]