added temporary mark for closest iteartor

This commit is contained in:
Nico Pietroni 2005-09-20 14:02:16 +00:00
parent e469fef8bd
commit 69b2d6596c
1 changed files with 12 additions and 11 deletions

View File

@ -384,6 +384,8 @@ public:
Elems.clear(); Elems.clear();
end=false; end=false;
tm.UnMarkAll();
_FindSphereRadius(); _FindSphereRadius();
Refresh(); Refresh();
///until don't find an element ///until don't find an element
@ -424,16 +426,15 @@ public:
for(l=first;l!=last;++l) for(l=first;l!=last;++l)
{ {
ObjType *elem=&(**l); ObjType *elem=&(**l);
if (!tm.IsMarked(elem))
///to change with functor {
CoordType nearest;
ScalarType dist; CoordType nearest;
dist_funct((**l),p,dist,nearest); ScalarType dist;
//ScalarType dist=(elem->P()-p).Norm(); dist_funct((**l),p,dist,nearest);
//if (dist>radius_min){ Elems.push_back(Entry_Type(elem,fabs(dist),nearest));
//CoordType intersect=elem->P(); tm.Mark(elem);
Elems.push_back(Entry_Type(elem,fabs(dist),nearest)); }
//}
} }
} }
if( ( ( y == explored.min.Y()) || ( y == explored.max.Y())) || if( ( ( y == explored.min.Y()) || ( y == explored.max.Y())) ||
@ -445,7 +446,7 @@ public:
} }
std::sort(Elems.begin(),Elems.end()); std::sort(Elems.begin(),Elems.end());
std::unique(Elems.begin(),Elems.end()); //std::unique(Elems.begin(),Elems.end());
CurrentElem=Elems.end(); CurrentElem=Elems.end();
CurrentElem--; CurrentElem--;