DynamicVolumeRenderTree3D

Package: Libraries.Game.Graphics.Trees · Inherits from: Libraries.Language.Object, Libraries.Game.Graphics.Trees.StaticDynamicRenderTree3D, Libraries.Game.Graphics.Trees.RenderTree3D

DynamicVolumeRenderTree3D is a render tree made of boxes that fit around the items, like the tree physics uses to find what might collide. It is a good choice for most scenes, and especially for scenes whose items are bunched together unevenly or move a lot, since the tree shapes itself around them and needs no region set ahead of time. Its two parts are RenderBoundingVolumeTree3D trees. Boxes in the static part fit their items exactly. Boxes in the dynamic part are DYNAMIC_MARGIN bigger on every side, so small moves do not change the tree. Everything else, the actions every render tree has, comes from StaticDynamicRenderTree3D.

Example Code

use Libraries.Game.Graphics.Trees.DynamicVolumeRenderTree3D
use Libraries.Interface.Item3D
use Libraries.Containers.Array

DynamicVolumeRenderTree3D tree
Item3D box
box:SetDimensions(1, 1, 1)
tree:Add(box)
Array<Item3D> found
tree:CollectInSphere(0, 0, 0, 5, found)
output found:GetSize()

Inherited Actions

7 actions from Libraries.Game.Graphics.Trees.RenderTree3D
26 actions from Libraries.Game.Graphics.Trees.StaticDynamicRenderTree3D
3 actions from Libraries.Language.Object