From bf84eeafe0d1fe1da2299b964c7f2e0b003ae018 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Wed, 28 Sep 2005 21:23:03 +0000 Subject: [PATCH] Added Import() to box and barycenter functors to handle tree and objects with different ScalarType. --- vcg/space/index/aabb_binary_tree/aabb_binary_tree.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vcg/space/index/aabb_binary_tree/aabb_binary_tree.h b/vcg/space/index/aabb_binary_tree/aabb_binary_tree.h index 746a0f6a..0b549125 100644 --- a/vcg/space/index/aabb_binary_tree/aabb_binary_tree.h +++ b/vcg/space/index/aabb_binary_tree/aabb_binary_tree.h @@ -25,6 +25,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2005/09/28 20:10:41 m_di_benedetto +First Commit. + ****************************************************************************/ @@ -67,14 +70,16 @@ public: class GetBoxFunctor { public: void operator () (const ObjType & obj, Box3 & box) { - obj.GetBBox(box); + Box3 tb; + obj.GetBBox(tb); + box.Import(tb); } }; class GetBarycenterFunctor { public: void operator () (const ObjType & obj, CoordType & bar) { - bar = obj.Barycenter(); + bar.Import(obj.Barycenter()); } };