Prune empty quad tree nodes

pull/2192/head
bzzt 6 years ago committed by Capostrophic
parent aecbc2f01c
commit 4f387fdf1c

@ -163,7 +163,10 @@ public:
boundingBox.expandBy(child->getBoundingBox());
}
parent->setBoundingBox(boundingBox);
if (!boundingBox.valid())
parent->removeChildren(0, 4);
else
parent->setBoundingBox(boundingBox);
}
QuadTreeNode* addChild(QuadTreeNode* parent, ChildDirection direction, float size)

Loading…
Cancel
Save