+ if (collision == Frustum::INSIDE)
+ {
+ node->getAll(insertables);
+ }
+ else // collision == Frustum::INTERSECT
+ {
+ node->getIfVisible(insertables, frustum);
+ }
+
+ if (mTree.children(node) > 0)
+ {
+ if (collision == Frustum::INSIDE)
+ {
+ for (unsigned i = 0; i < mTree.children(node); ++i)
+ {
+ NodeP child = mTree.child(node, i);
+ ASSERT(child.valid() && "expected valid child node");
+
+ getAll(insertables, child);
+ }
+ }
+ else // collision == Frustum::INTERSECT
+ {
+ for (unsigned i = 0; i < mTree.children(node); ++i)
+ {
+ NodeP child = mTree.child(node, i);
+ ASSERT(child.valid() && "expected valid child node");
+
+ getIfVisible(insertables, frustum, child);
+ }
+ }
+ }