From 7fb7f4b40111c2f23e2005b610a4ea4cab20736f Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Thu, 31 Aug 2006 13:19:59 +0000 Subject: [PATCH] ClosestIterator avoids to put the query point p into the result set --- vcg/space/index/space_iterators.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vcg/space/index/space_iterators.h b/vcg/space/index/space_iterators.h index eadc20d5..ad359739 100644 --- a/vcg/space/index/space_iterators.h +++ b/vcg/space/index/space_iterators.h @@ -25,6 +25,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.16 2006/08/23 15:22:14 marfr960 +*** empty log message *** + Revision 1.14 2006/06/01 20:53:56 cignoni added missing header @@ -434,8 +437,9 @@ namespace vcg{ CoordType nearest; ScalarType dist=max_dist; - if (dist_funct((**l),p,dist,nearest)) - Elems.push_back(Entry_Type(elem,fabs(dist),nearest)); + if (dist_funct((**l), p, dist, nearest)) + if (dist > 0.f) // avoids to insert p in the query result + Elems.push_back(Entry_Type(elem,fabs(dist),nearest)); tm.Mark(elem); } }