33#ifndef DVD_QUAD_TREE_NODE
34#define DVD_QUAD_TREE_NODE
55class SceneRenderState;
60class QuadtreeChildren;
73 U32 targetChunkDimension,
83 [[nodiscard]]
U8 LoD() const noexcept {
return _LoD; }
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
std::array< QuadtreeNode *, 4 > _children
Node children.
void build(U8 depth, vec2< U16 > pos, vec2< U16 > HMsize, U32 targetChunkDimension, Terrain *terrain, U32 &chunkCount)
recursive node building function
void drawBBox(GFXDevice &context)
TerrainChunk_uptr _terrainChunk
Terrain Chunk contained in node.
BoundingSphere _boundingSphere
Node BoundingSphere.
bool computeBoundingBox(BoundingBox &parentBB)
TerrainChunk * getChunk() const noexcept
BoundingBox _boundingBox
Node BoundingBox.
QuadtreeNode & getChild(const U32 index) const noexcept
QuadtreeNode & getChild(const ChildPosition pos) const noexcept
PROPERTY_R_IW(U32, targetChunkDimension, 0u)
bool isALeaf() const noexcept
void toggleBoundingBoxes()
void setBoundingBox(const BoundingBox &bbox) noexcept
const BoundingBox & getBoundingBox() const noexcept
Handle console commands that start with a forward slash.
constexpr auto to_base(const Type value) -> Type