Improved float/double consistency removing some wrong Point3f and substitued with MeshType::CoordType
This commit is contained in:
parent
cf856d0a6b
commit
5e910a0058
|
@ -107,10 +107,9 @@ public:
|
|||
template <class OtherScalarType>
|
||||
inline void IPiToPf(const Point3i & pi, Point3<OtherScalarType> &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.
|
||||
|
|
|
@ -217,7 +217,7 @@ public:
|
|||
float LocalEpsilon = 0.001f;
|
||||
for(size_t i =0;i<result.size();++i)
|
||||
{
|
||||
Point3f p = Proj(M,vp,Point3f::Construct(Barycenter(*(result[i]))));
|
||||
Point3f p = Proj(M,vp,Point3f::Construct(Barycenter(*(result[i])))) ;
|
||||
if(p[0] >=0 && p[0]<screenW && p[1] >=0 && p[1]<screenH)
|
||||
{
|
||||
float bufZ = buffer[int(p[0])+int(p[1])*screenW];
|
||||
|
|
Loading…
Reference in New Issue