3#include "game/kart/KartParam.hh"
7#include <egg/math/Matrix.hh>
33 f32 colPerpendicularity;
39 bool bInvisibleWallOnly;
43 bool bWallAtLeftCloser;
44 bool bWallAtRightCloser;
61 void setRadius(f32 radius) {
65 void setBspHitbox(
const BSP::Hitbox *hitbox,
bool owns =
false) {
82 [[nodiscard]]
const BSP::Hitbox *bspHitbox()
const {
98 [[nodiscard]] f32 radius()
const {
120 [[nodiscard]] f32
initHitboxes(
const std::array<BSP::Hitbox, 16> &hitboxes);
126 void resetCollision();
127 void setHitboxScale(f32 scale);
131 [[nodiscard]] f32 boundingRadius()
const {
132 return m_boundingRadius;
135 [[nodiscard]]
Hitbox &hitbox(
u16 hitboxIdx) {
136 return m_hitboxes[hitboxIdx];
139 [[nodiscard]]
u16 hitboxCount()
const {
140 return m_hitboxes.size();
144 return m_collisionData;
148 return m_collisionData;
153 f32 m_boundingRadius;
155 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.
u32 closestFloorSettings
The KCL flag's "variant".
bool bFloor
Set if colliding with KCL which satisfies KCL_TYPE_FLOOR.
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 KCL flag's KColType.
s32 intensity
The KCL flag's "wheel depth".