added deleted objects control for GridClosest() function call

This commit is contained in:
Nico Pietroni 2005-12-06 18:00:39 +00:00
parent 1485e93b2b
commit aa0575519c
1 changed files with 20 additions and 11 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.7 2005/12/02 00:30:27 cignoni
Corrected typename usage and removed excess ';' from end of template functions, for gcc compiling
Revision 1.6 2005/10/03 13:57:32 pietroni
added GridGetInSphere and GridGetInBox functions
@ -105,6 +108,8 @@ namespace vcg{
for(l=first;l!=last;++l)
{
ObjPtr elem=&(**l);
if (!elem->IsD())
{
if (_getPointDistance((**l), _p,_minDist, t_res)) // <-- NEW: use of distance functor
{
winner=elem;
@ -113,6 +118,7 @@ namespace vcg{
}
_marker.Mark(elem);
}
}
iboxdone=Box3i(_ip,_ip);
}
@ -138,6 +144,8 @@ namespace vcg{
for(l=first;l!=last;++l) if (!(**l).IsD())
{
ObjPtr elem=&(**l);
if (!elem->IsD())
{
if( ! _marker.IsMarked(elem))
{
if (_getPointDistance((**l), _p, _minDist, t_res))
@ -150,6 +158,7 @@ namespace vcg{
}
}
}
}
if(!winner) newradius=radius+Si.voxel.Norm();
else newradius = _minDist;
}