Added typenames, ending cr and removed a MAXFLT disliked by gcc

This commit is contained in:
Paolo Cignoni 2005-12-02 00:20:32 +00:00
parent 0e5890dd55
commit 703e2d7dce
1 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,7 @@ namespace vcg{
dist=(r.Origin()-goal).Norm(); dist=(r.Origin()-goal).Norm();
const float MAXFLOAT = FLT_MAX; const float LocalMaxScalar = std::numeric_limits<float>::max();
const float EPSILON = 1e-50f; const float EPSILON = 1e-50f;
/* Parametri della linea */ /* Parametri della linea */
@ -65,17 +65,17 @@ namespace vcg{
if( fabs(r.Direction().X())>EPSILON ) if( fabs(r.Direction().X())>EPSILON )
tx = (gx-r.Origin().X())/r.Direction().X(); tx = (gx-r.Origin().X())/r.Direction().X();
else else
tx =MAXFLOAT; tx =LocalMaxScalar;
if( fabs(r.Direction().Y())>EPSILON ) if( fabs(r.Direction().Y())>EPSILON )
ty = (gy-r.Origin().Y())/r.Direction().Y(); ty = (gy-r.Origin().Y())/r.Direction().Y();
else else
ty =MAXFLOAT; ty =LocalMaxScalar;
if( fabs(r.Direction().Z())>EPSILON ) if( fabs(r.Direction().Z())>EPSILON )
tz = (gz-r.Origin().Z())/r.Direction().Z(); tz = (gz-r.Origin().Z())/r.Direction().Z();
else else
tz =MAXFLOAT; tz =LocalMaxScalar;
t=CoordType(tx,ty,tz); t=CoordType(tx,ty,tz);
} }
@ -158,7 +158,7 @@ namespace vcg{
{ {
//Elems.clear(); //Elems.clear();
Spatial_Idexing::CellIterator first,last,l; typename Spatial_Idexing::CellIterator first,last,l;
///take first, last iterators to elements in the cell ///take first, last iterators to elements in the cell
Si.Grid(CurrentCell.X(),CurrentCell.Y(),CurrentCell.Z(),first,last); Si.Grid(CurrentCell.X(),CurrentCell.Y(),CurrentCell.Z(),first,last);
@ -389,7 +389,7 @@ namespace vcg{
iy<explored.min[1] || iy>explored.max[1] || iy<explored.min[1] || iy>explored.max[1] ||
iz<explored.min[2] || iz>explored.max[2] )) iz<explored.min[2] || iz>explored.max[2] ))
{ {
Spatial_Idexing::CellIterator first,last,l; typename Spatial_Idexing::CellIterator first,last,l;
Si.Grid(ix,iy,iz,first,last); Si.Grid(ix,iy,iz,first,last);
for(l=first;l!=last;++l) for(l=first;l!=last;++l)