From 5799203aaf5c7201ced15f61b70bc6cdea8b8d0d Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Wed, 25 Oct 2006 09:47:53 +0000 Subject: [PATCH] added max dist control and constructor --- vcg/space/index/space_iterators.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/vcg/space/index/space_iterators.h b/vcg/space/index/space_iterators.h index 82adbfc7..091d3c39 100644 --- a/vcg/space/index/space_iterators.h +++ b/vcg/space/index/space_iterators.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.19 2006/10/02 07:47:57 cignoni +Reverted to version 1.14 to nullify dangerous marfr960's changes + Revision 1.14 2006/06/01 20:53:56 cignoni added missing header @@ -54,6 +57,7 @@ namespace vcg{ typedef typename Spatial_Idexing::ObjType ObjType; typedef typename vcg::Point3 CoordType; typedef typename Spatial_Idexing::CellIterator CellIterator; + ScalarType max_dist; ///control right bonding current cell index (only on initialization) void _ControlLimits() @@ -121,6 +125,12 @@ namespace vcg{ void _NextCell() { assert(!end); + ScalarType testmax_dist=(r.Origin()-goal).Norm(); + + if (testmax_dist>max_dist) + end=true; + else + { if( t.X()IsD())&&(!tm.IsMarked(elem))&&(int_funct((**l),r,t))) { Int=r.Origin()+r.Direction()*t; Elems.push_back(Entry_Type(elem,t,Int));