*** empty log message ***

This commit is contained in:
Paolo Cignoni 2006-08-23 15:22:14 +00:00
parent ca680b6a32
commit f942fd8a4f
1 changed files with 21 additions and 10 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.10 2006/05/17 12:48:52 pietroni
corrected bug in GridGetInBox function
Revision 1.9 2006/01/27 09:58:47 corsini Revision 1.9 2006/01/27 09:58:47 corsini
fix signed/unsigned mismatch fix signed/unsigned mismatch
@ -111,21 +114,27 @@ namespace vcg{
Point3i _ip; Point3i _ip;
Si.PToIP(_p,_ip); Si.PToIP(_p,_ip);
Si.Grid( _ip[0],_ip[1],_ip[2], first, last ); Si.Grid( _ip[0],_ip[1],_ip[2], first, last );
for(l=first;l!=last;++l)
if (first != last)
{ {
ObjPtr elem=&(**l); l = first - 1;
if (!elem->IsD()) do
{ {
if (_getPointDistance((**l), _p,_minDist, t_res)) // <-- NEW: use of distance functor l++;
ObjPtr elem=&(**l);
if (!elem->IsD())
{ {
winner=elem; if (_getPointDistance((**l), _p,_minDist, t_res)) // <-- NEW: use of distance functor
_closestPt=t_res; {
newradius=_minDist; // winner=elem;
_closestPt=t_res;
newradius=_minDist; //
}
_marker.Mark(elem);
} }
_marker.Mark(elem); } while (l != last);
} iboxdone=Box3i(_ip,_ip);
} }
iboxdone=Box3i(_ip,_ip);
} }
int ix,iy,iz; int ix,iy,iz;
@ -243,12 +252,14 @@ namespace vcg{
_objectPtrs.clear(); _objectPtrs.clear();
_distances.clear(); _distances.clear();
_points.clear(); _points.clear();
int i = 0;
while (!Cli.End()) while (!Cli.End())
{ {
_objectPtrs.push_back(&(*Cli)); _objectPtrs.push_back(&(*Cli));
_distances.push_back(Cli.Dist()); _distances.push_back(Cli.Dist());
_points.push_back(Cli.NearestPoint()); _points.push_back(Cli.NearestPoint());
++Cli; ++Cli;
i++;
} }
return (_objectPtrs.size()); return (_objectPtrs.size());
} }