3#include <egg/core/BitFlag.hh>
4#include <egg/math/Vector.hh>
20class ObjectCollidable;
45 void resize(f32 radius, f32 maxSpeed);
86 void resetIterators();
91 bool alwaysRecalc,
void *userData);
93 bool alwaysRecalc,
void *userData);
99 [[nodiscard]]
bool isSphereInSpatialCache(f32 radius,
const EGG::Vector3f &pos,
103 static void DestroyInstance();
115 static constexpr size_t MAX_UNIT_COUNT = 0x100;
120 std::array<BoxColUnit *, MAX_UNIT_COUNT>
m_units;
128 s32 m_nextDrivableID;
An interface for ensuring certain structures and classes are destroyed with the heap.
Spatial indexing manager for entities with dynamic collision.
std::array< BoxColUnit *, MAX_UNIT_COUNT > m_units
Units within our search bounds.
void * getNextImpl(s32 &id, const BoxColFlag &flag)
Helper function since the getters share all code except the flag.
std::array< BoxColHighPoint, MAX_UNIT_COUNT > m_highPoints
A unit's rightmost Z-axis point.
BoxColManager()
Creates two intangible units to represent the spatial bounds.
std::array< BoxColLowPoint, MAX_UNIT_COUNT > m_lowPoints
A unit's leftmost Z-axis point;.
std::array< u32, MAX_UNIT_COUNT > m_unitIDs
Specifies what unit to retrieve from the pool during allocation.
std::array< BoxColUnit, MAX_UNIT_COUNT > m_unitPool
Where all the units live.
void calc()
Recalculate the bounds of all active units having PermRecalcAABB or TempRecalcAABB flag,...
Contexts can be used to restore a previous memory state for the current session.
The highest level abstraction for a kart.
eBoxColFlag
A bitfield that represents the state and type of a given BoxColUnit.
@ TempRecalcAABB
Only recalculate once.
@ PermRecalcAABB
Recalculate this unit's spatial indexing every frame.
@ Intangible
Ignore collision with the unit.
Represents the host application.
Pertains to kart-related functionality.
Wrapper around an integral type with an enum corresponding to its bits.
A representation of the boundaries of an entity that has dynamic collision.