3#include "game/kart/KartParam.hh"
7#include <egg/math/Matrix.hh>
35 f32 colPerpendicularity;
43 bool bInvisibleWallOnly;
49 bool bWallAtLeftCloser;
50 bool bWallAtRightCloser;
68 void setRadius(f32 radius) {
72 void setBspHitbox(
const BSP::Hitbox *hitbox,
bool owns =
false) {
89 [[nodiscard]]
const BSP::Hitbox *bspHitbox()
const {
105 [[nodiscard]] f32 radius()
const {
127 [[nodiscard]] f32
initHitboxes(
const std::array<BSP::Hitbox, 16> &hitboxes);
133 void resetCollision();
134 void setHitboxScale(f32 scale);
138 [[nodiscard]] f32 boundingRadius()
const {
139 return m_boundingRadius;
142 [[nodiscard]]
Hitbox &hitbox(
u16 hitboxIdx) {
143 return m_hitboxes[hitboxIdx];
146 [[nodiscard]]
u16 hitboxCount()
const {
147 return m_hitboxes.size();
151 return m_collisionData;
155 return m_collisionData;
160 f32 m_boundingRadius;
Houses hitbox and collision info for an object (body or wheel).
f32 computeCollisionLimits()
Sets the bounding radius.
f32 initHitboxes(const std::array< BSP::Hitbox, 16 > &hitboxes)
Initializes the hitbox array based on the KartParam's BSP hitboxes.
void createSingleHitbox(f32 radius, const EGG::Vector3f &relPos)
Creates a hitbox to represent a tire.
Represents a hitbox for the kart body or a wheel.
void calc(f32 totalScale, f32 sinkDepth, const EGG::Vector3f &scale, const EGG::Quatf &rot, const EGG::Vector3f &pos)
Calculates the position of a given hitbox, both relative to the player and world.
A contiguous storage container that manages the lifecycle of a buffer of a given size.
Pertains to kart-related functionality.
A quaternion, used to represent 3D rotation.
Represents one of the many hitboxes that make up a vehicle.
Information about the current collision and its properties.
bool bWall3
Set if colliding with COL_TYPE_WALL_2.
Field::KCLTypeMask closestFloorFlags
The colliding floor KCL flag's KColType.
bool bMovingWaterDecaySpeed
Player speed will drop if not in mushroom.
bool bMovingWaterStickyRoad
KC pipe vertical water section.
s32 intensity
The KCL flag's "wheel depth".
bool bMovingWaterVertical
KC last turn vertical water.
bool bMovingWaterMomentum
Player will maintain speed for a bit after leaving KCL.
bool bFloor
Set if colliding with KCL which satisfies KCL_TYPE_FLOOR.
u32 closestWallSettings
The colliding wall KCL flag's "variant".
bool bMovingWaterDisableAccel
KC last turn prevents mini-turbo acceleration.
u32 closestFloorSettings
The colliding floor KCL flag's "variant".
bool bWall
Set if colliding with KCL which satisfies KCL_TYPE_WALL.
Field::KCLTypeMask closestWallFlags
The colliding wall KCL flag's KColType.