3#include "game/kart/CollisionGroup.hh"
4#include "game/kart/KartDynamics.hh"
5#include "game/kart/KartParam.hh"
7#include <egg/math/Matrix.hh>
32 void set_fc(f32 val) {
38 m_instantaneousStuntRot *= rot;
43 m_instantaneousExtraRot *= rot;
47 void composeDecayingStuntRot(
const EGG::Quatf &rot) {
48 m_decayingStuntRot *= rot;
52 void composeDecayingExtraRot(
const EGG::Quatf &rot) {
58 m_movingObjVel += (vel - m_movingObjVel) * t;
59 dynamics()->setMovingObjVel(m_movingObjVel);
63 void composeDecayingMovingObjVel(f32 floorScalar, f32 airScalar,
bool floor) {
64 m_movingObjVel *= floor ? floorScalar : airScalar;
65 dynamics()->setMovingObjVel(m_movingObjVel);
70 m_movingRoadVel += (vel - m_movingRoadVel) * t;
71 dynamics()->setMovingRoadVel(m_movingRoadVel);
74 void shiftDecayMovingRoadVel(
const EGG::Vector3f &v, f32 maxPullSpeed);
77 void decayMovingRoadVel(f32 floorScalar, f32 airScalar,
bool floor) {
78 m_movingRoadVel *= floor ? floorScalar : airScalar;
79 m_movingRoadVel.y = 0.0f;
80 dynamics()->setMovingRoadVel(m_movingRoadVel);
84 void clearDecayingRot() {
85 m_decayingStuntRot = EGG::Quatf::ident;
104 return m_hitboxGroup;
123 [[nodiscard]] f32 fc()
const {
Houses hitbox and collision info for an object (body or wheel).
State management for most components of a kart's physics.
Houses stats regarding a given character/vehicle combo.
Manages the lifecycle of KartDynamics, handles moving floors and trick rotation.
void updatePose()
Constructs a transformation matrix from rotation and position.
void calc(f32 dt, f32 maxSpeed, const EGG::Vector3f &scale, bool air)
Computes trick rotation and calls to KartDynamics::calc().
EGG::Quatf m_decayingExtraRot
Rotation that occurs when landing from a trick.
EGG::Vector3f m_zAxis
The third column of the pose.
EGG::Vector3f m_xAxis
The first column of the pose.
EGG::Vector3f m_velocity
Copied from KartDynamics.
EGG::Vector3f m_yAxis
The second column of the pose.
EGG::Matrix34f m_pose
The kart's current rotation and position.
Pertains to kart-related functionality.
A quaternion, used to represent 3D rotation.