class
GUICulling
Object that maintains a list of GUI elements visible within a certain area.
Public
Constructors
GUICulling
Builds a quad-tree from provided child elements and their current relative positions and size.
- elements
- Elements to register into the quad-tree.
- maximumQuadTreeSize
- Maximum allowed bounds of the internal quad tree.
Methods
RebuildQuadTree
Recreates the internal quad-tree and adds all the provided elements.
The elements should be the same as currently in the quad-tree.
UpdateVisibleElements
Traverses the built oct-tree and tags all elements within the provided bounds as visible, and the remainder as invisible.
RegisterElement
Sets up necessary information for culling the provided element.
Should be called on every element added to the layout, if culling is enabled.
UnregisterElement
Removes the element from culling related data structures.
Should be called before the element is removed from the layout, if culling is enabled.
ClearElements
Clears quad-tree IDs and culling flags from all the child elements.
GetVisibleElements
Returns currently visible elements.