21 _root->toggleBoundingBoxes();
29 _root->drawBBox(context);
32 descriptor.
min =
_root->getBoundingBox().getMin();
33 descriptor.
max =
_root->getBoundingBox().getMax();
45 for (i = 0; i < 4; i++) {
64 Terrain*
const terrain) {
66 _targetChunkDimension = std::max(HMSize.
maxComponent() / 8u, 8u);
68 _root->setBoundingBox(terrainBBox);
75 if (!
_root->computeBoundingBox(rootBB)) {
79 return _root->getBoundingBox();
vec3< F32 > getCenter() const noexcept
bool containsPoint(const vec3< F32 > &point) const noexcept
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
void debugDrawBox(const I64 ID, IM::BoxDescriptor descriptor) noexcept
void build(const BoundingBox &terrainBBox, const vec2< U16 > HMSize, Terrain *terrain)
void toggleBoundingBoxes()
QuadtreeNode * findLeaf(vec2< F32 > pos) const noexcept
const BoundingBox & computeBoundingBox() const
void drawBBox(GFXDevice &context) const
QuadtreeNode & getChild(const ChildPosition pos) const noexcept
bool isALeaf() const noexcept
const BoundingBox & getBoundingBox() const noexcept
T maxComponent() const noexcept
get the largest value of X or Y
Handle console commands that start with a forward slash.