3#include "game/kart/KartParam.hh"
7#include <egg/math/Matrix.hh>
35 f32 colPerpendicularity;
41 bool bInvisibleWallOnly;
45 bool bWallAtLeftCloser;
46 bool bWallAtRightCloser;
63 void setRadius(f32 radius) {
67 void setBspHitbox(
const BSP::Hitbox *hitbox,
bool owns =
false) {
84 [[nodiscard]]
const BSP::Hitbox *bspHitbox()
const {
100 [[nodiscard]] f32 radius()
const {
122 [[nodiscard]] f32
initHitboxes(
const std::array<BSP::Hitbox, 16> &hitboxes);
128 void resetCollision();
129 void setHitboxScale(f32 scale);
133 [[nodiscard]] f32 boundingRadius()
const {
134 return m_boundingRadius;
137 [[nodiscard]]
Hitbox &hitbox(
u16 hitboxIdx) {
138 return m_hitboxes[hitboxIdx];
141 [[nodiscard]]
u16 hitboxCount()
const {
142 return m_hitboxes.size();
146 return m_collisionData;
150 return m_collisionData;
155 f32 m_boundingRadius;
157 std::span<Hitbox> m_hitboxes;
Houses hitbox and collision info for an object (body or wheel).
void createSingleHitbox(f32 radius, const EGG::Vector3f &relPos)
Creates a hitbox to represent a tire.
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.
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.
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.
Field::KCLTypeMask closestWallFlags
The colliding wall KCL flag's KColType.
u32 closestFloorSettings
The colliding floor KCL flag's "variant".
bool bFloor
Set if colliding with KCL which satisfies KCL_TYPE_FLOOR.
u32 closestWallSettings
The colliding wall KCL flag's "variant".
bool bWall3
Set if colliding with COL_TYPE_WALL_2.
bool bWall
Set if colliding with KCL which satisfies KCL_TYPE_WALL.
Field::KCLTypeMask closestFloorFlags
The colliding floor KCL flag's KColType.
s32 intensity
The KCL flag's "wheel depth".