AABB Tree : Do resize based on number of leaf nodes

This commit is contained in:
Magne Sjaastad 2020-01-27 10:23:57 +01:00
parent b958db0b1f
commit 6f54d176cc

View File

@ -515,6 +515,8 @@ bool AABBTree::buildTree()
if (m_iNumLeaves == 0) return true;
m_nodePool.resize(m_iNumLeaves);
// Then find the bounding box of all items in the tree
cvf::BoundingBox box;
leafBoundingBox(box, 0, m_iNumLeaves - 1);