|
Nebula
|
#include <occupancyquadtree.h>
Classes | |
| struct | Node |
Public Member Functions | |
| OccupancyQuadTree () | |
| constructor | |
| ~OccupancyQuadTree () | |
| destructor | |
| void | Setup (uint textureSize, uint maxSize, uint minSize) |
| setup with a world size and a biggest allocation size | |
| Math::uint2 | Allocate (uint size) |
| allocate a region, return region | |
| bool | Deallocate (const Math::uint2 coord, uint size) |
| deallocate region | |
| bool | IsOccupied (const Math::uint2 coord, uint size) |
| check if region is alloced | |
| void | Clear () |
| Clear the tree. | |
| void | DebugRender (ImDrawList *drawList, ImVec2 offset, float scale) |
| debug render | |
Private Member Functions | |
| bool | RecursiveAllocate (Node *node, uint size, Math::uint2 &outCoord) |
| recursively traverse tree to allocate node from tree | |
| bool | RecursiveDeallocate (Node *node, Math::uint2 coord, uint size) |
| recursively traverse tree and deallocate | |
| bool | RecursiveSearch (Node *node, Math::uint2 coord, uint size) |
| recursively traverse tree and find if allocated | |
| void | RecursiveDebugRender (Node *node, ImDrawList *drawList, ImVec2 offset, float scale) |
| recursively debug render | |
Private Attributes | |
| Memory::ArenaAllocator< sizeof(Node) *64 > | allocator |
| Util::FixedArray< Util::FixedArray< Node > > | topLevelNodes |
| uint | minSize |
|
inline |
constructor
|
inline |
destructor
|
inline |
allocate a region, return region
|
inline |
Clear the tree.
|
inline |
deallocate region
|
inline |
debug render
|
inline |
check if region is alloced
|
inlineprivate |
recursively traverse tree to allocate node from tree
|
inlineprivate |
recursively traverse tree and deallocate
|
inlineprivate |
recursively debug render
|
inlineprivate |
recursively traverse tree and find if allocated
setup with a world size and a biggest allocation size
|
private |
|
private |
|
private |