#include <CollisionGroup.hh>
Houses hitbox and collision info for an object (body or wheel).
Definition at line 113 of file CollisionGroup.hh.
Public Member Functions | |
f32 | initHitboxes (const std::array< BSP::Hitbox, 16 > &hitboxes) |
Initializes the hitbox array based on the KartParam's BSP hitboxes. | |
f32 | computeCollisionLimits () |
Sets the bounding radius. | |
void | createSingleHitbox (f32 radius, const EGG::Vector3f &relPos) |
Creates a hitbox to represent a tire. | |
Setters | |
void | reset () |
void | resetCollision () |
void | setHitboxScale (f32 scale) |
Getters | |
f32 | boundingRadius () const |
Hitbox & | hitbox (u16 hitboxIdx) |
u16 | hitboxCount () const |
CollisionData & | collisionData () |
const CollisionData & | collisionData () const |
Private Attributes | |
f32 | m_boundingRadius |
CollisionData | m_collisionData |
std::span< Hitbox > | m_hitboxes |
f32 | m_hitboxScale |
|
0x805B82BC |
Definition at line 81 of file CollisionGroup.cc.
Kart::CollisionGroup::~CollisionGroup | ( | ) |
Definition at line 85 of file CollisionGroup.cc.
|
inlinenodiscard |
Definition at line 129 of file CollisionGroup.hh.
|
inlinenodiscard |
Definition at line 141 of file CollisionGroup.hh.
|
inlinenodiscard |
Definition at line 145 of file CollisionGroup.hh.
|
nodiscard0x805B883C |
Sets the bounding radius.
Definition at line 120 of file CollisionGroup.cc.
|
0x805B875C |
Creates a hitbox to represent a tire.
radius | The radius of the tire |
Definition at line 152 of file CollisionGroup.cc.
Definition at line 133 of file CollisionGroup.hh.
|
inlinenodiscard |
Definition at line 137 of file CollisionGroup.hh.
|
nodiscard0x805B84C0 |
Initializes the hitbox array based on the KartParam's BSP hitboxes.
The BSP always contains 16 hitboxes, but only some of them are valid/enabled. The game iterates the BSP::Hitbox array to see how many are enabled, allocates a Hitbox array of that size, and then sets all the enabled BSP hitboxes.
hitboxes | The hitboxes from KartParam.bin |
Definition at line 96 of file CollisionGroup.cc.
|
0x805B8330 |
Definition at line 169 of file CollisionGroup.cc.
void Kart::CollisionGroup::resetCollision | ( | ) |
Definition at line 178 of file CollisionGroup.cc.
|
0x805B83D8 |
Definition at line 183 of file CollisionGroup.cc.
|
private |
Definition at line 151 of file CollisionGroup.hh.
|
private |
Definition at line 152 of file CollisionGroup.hh.
|
private |
Definition at line 153 of file CollisionGroup.hh.
|
private |
Definition at line 154 of file CollisionGroup.hh.