From f44089209e02e8c3055047bf3e871b471bf89c54 Mon Sep 17 00:00:00 2001 From: cignoni Date: Sun, 2 Oct 2005 23:13:30 +0000 Subject: [PATCH] Changed the default strategy for building a AABB tree. Now the max num of elem per leaf is a constant (10) --- vcg/space/index/aabb_binary_tree/aabb_binary_tree.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 e6e8a75d..d23f7234 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.5 2005/09/29 22:18:16 m_di_benedetto +Added frustum culling methods, renamed some parameters. + Revision 1.4 2005/09/28 21:23:03 m_di_benedetto Added Import() to box and barycenter functors to handle tree and objects with different ScalarType. @@ -75,9 +78,10 @@ public: GetPointerFunctor getPtr; GetBox3Functor getBox; GetBarycenter3Functor getBarycenter; - const unsigned int divs = 100; - const unsigned int size = (unsigned int)(std::distance(_oBegin, _oEnd)); - const unsigned int maxObjectsPerLeaf = (size < divs) ? (size) : ((unsigned int)((float)(std::distance(_oBegin, _oEnd)) / (float)divs)); + //const unsigned int divs = 100; + //const unsigned int size = (unsigned int)(std::distance(_oBegin, _oEnd)); + //const unsigned int maxObjectsPerLeaf = (size < divs) ? (size) : ((unsigned int)((float)(std::distance(_oBegin, _oEnd)) / (float)divs)); + const unsigned int maxObjectsPerLeaf = 10; const ScalarType leafBoxMaxVolume = ((ScalarType)0); const bool useVariance = true;