mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 03:06:43 +00:00
Prune empty quad tree nodes
This commit is contained in:
parent
aecbc2f01c
commit
4f387fdf1c
1 changed files with 4 additions and 1 deletions
|
@ -163,7 +163,10 @@ public:
|
||||||
boundingBox.expandBy(child->getBoundingBox());
|
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)
|
QuadTreeNode* addChild(QuadTreeNode* parent, ChildDirection direction, float size)
|
||||||
|
|
Loading…
Reference in a new issue