A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Kart::KartJump Class Reference

#include <KartJump.hh>

Description

Manages trick inputs and state.

Definition at line 30 of file KartJump.hh.

Inheritance diagram for Kart::KartJump:

Classes

struct  AngleProperties
 
struct  TrickProperties
 

Public Member Functions

 KartJump (KartMove *move)
 
virtual void calcRot ()
 
void setupProperties ()
 
void reset ()
 
void tryStart (const EGG::Vector3f &left)
 
void calc ()
 
bool someFlagCheck ()
 
void calcInput ()
 
void end ()
 
void setAngle (const EGG::Vector3f &left)
 

Setters

void setBoostRampEnabled (bool isSet)
 

Getters

bool isBoostRampEnabled () const
 
TrickType type () const
 
SurfaceVariant variant () const
 
s16 cooldown () const
 

Protected Member Functions

virtual void start (const EGG::Vector3f &left)
 
virtual void init ()
 
- Protected Member Functions inherited from Kart::KartObjectProxy
void apply (size_t idx)
 
void setPos (const EGG::Vector3f &pos)
 
void setRot (const EGG::Quatf &q)
 
void setInertiaScale (const EGG::Vector3f &scale)
 
KartActionaction ()
 
const KartActionaction () const
 
KartBodybody ()
 
const KartBodybody () const
 
KartCollidecollide ()
 
const KartCollidecollide () const
 
CollisionGroupcollisionGroup ()
 
const CollisionGroupcollisionGroup () const
 
KartMovemove ()
 
const KartMovemove () const
 
KartHalfPipehalfPipe ()
 
const KartHalfPipehalfPipe () const
 
KartJumpjump ()
 
const KartJumpjump () const
 
KartParamparam ()
 
const KartParamparam () const
 
const BSPbsp () const
 
KartPhysicsphysics ()
 
const KartPhysicsphysics () const
 
KartDynamicsdynamics ()
 
const KartDynamicsdynamics () const
 
KartStatestate ()
 
const KartStatestate () const
 
KartSubsub ()
 
const KartSubsub () const
 
KartSuspensionsuspension (u16 suspIdx)
 
const KartSuspensionsuspension (u16 suspIdx) const
 
KartSuspensionPhysicssuspensionPhysics (u16 suspIdx)
 
const KartSuspensionPhysicssuspensionPhysics (u16 suspIdx) const
 
KartTiretire (u16 tireIdx)
 
const KartTiretire (u16 tireIdx) const
 
WheelPhysicstirePhysics (u16 tireIdx)
 
const WheelPhysicstirePhysics (u16 tireIdx) const
 
CollisionDatacollisionData ()
 
const CollisionDatacollisionData () const
 
CollisionDatacollisionData (u16 tireIdx)
 
const CollisionDatacollisionData (u16 tireIdx) const
 
const System::KPadinputs () const
 
Render::KartModelmodel ()
 
const Render::KartModelmodel () const
 
Field::ObjectCollisionKartobjectCollisionKart ()
 
const Field::ObjectCollisionKartobjectCollisionKart () const
 
Field::BoxColUnitboxColUnit ()
 
const Field::BoxColUnitboxColUnit () const
 
const EGG::Vector3fscale () const
 
const EGG::Matrix34fpose () const
 
EGG::Vector3f bodyFront () const
 Returns the third column of the rotation matrix, which is the facing vector.
 
EGG::Vector3f bodyForward () const
 Returns the first column of the rotation matrix, which is the "right" direction.
 
EGG::Vector3f bodyUp () const
 Returns the second column of the rotation matrix, which is the "up" direction.
 
const EGG::Vector3fcomponentXAxis () const
 
const EGG::Vector3fcomponentYAxis () const
 
const EGG::Vector3fcomponentZAxis () const
 
const EGG::Vector3fpos () const
 
const EGG::Vector3fprevPos () const
 
const EGG::QuatffullRot () const
 
const EGG::Vector3fextVel () const
 
const EGG::Vector3fintVel () const
 
const EGG::Vector3fvelocity () const
 
f32 speed () const
 
f32 acceleration () const
 
f32 softSpeedLimit () const
 
const EGG::QuatfmainRot () const
 
const EGG::Vector3fangVel2 () const
 
bool isBike () const
 
u16 suspCount () const
 
u16 tireCount () const
 
bool hasFloorCollision (const WheelPhysics *wheelPhysics) const
 
std::pair< EGG::Vector3f, EGG::Vector3fgetCannonPosRot ()
 
f32 speedRatio () const
 
f32 speedRatioCapped () const
 
bool isInRespawn () const
 

Protected Attributes

TrickType m_type
 
SurfaceVariant m_variant
 
System::Trick m_nextTrick
 
f32 m_rotSign
 
TrickProperties m_properties
 
f32 m_angle
 
f32 m_angleDelta
 
f32 m_angleDeltaFactor
 
f32 m_angleDeltaFactorDec
 
f32 m_finalAngle
 
s16 m_cooldown
 
EGG::Quatf m_rot
 
KartMovem_move
 

Private Attributes

s16 m_nextAllowTimer
 
bool m_boostRampEnabled
 

Additional Inherited Members

- Static Protected Member Functions inherited from Kart::KartObjectProxy
static std::list< KartObjectProxy * > & proxyList ()
 

Constructor & Destructor Documentation

◆ KartJump()

Kart::KartJump::KartJump ( KartMove * move)
0x80575A44

Definition at line 16 of file KartJump.cc.

Member Function Documentation

◆ calc()

void Kart::KartJump::calc ( )
0x805763E4

Definition at line 110 of file KartJump.cc.

◆ calcInput()

void Kart::KartJump::calcInput ( )
0x80575B38

Definition at line 126 of file KartJump.cc.

◆ calcRot()

void Kart::KartJump::calcRot ( )
virtual0x805764FC

Reimplemented in Kart::KartJumpBike.

Definition at line 27 of file KartJump.cc.

◆ cooldown()

s16 Kart::KartJump::cooldown ( ) const
inlinenodiscard

Definition at line 76 of file KartJump.hh.

◆ end()

void Kart::KartJump::end ( )
0x805766B8

Definition at line 155 of file KartJump.cc.

◆ init()

void Kart::KartJump::init ( )
protectedvirtual0x8057616C

Definition at line 218 of file KartJump.cc.

◆ isBoostRampEnabled()

bool Kart::KartJump::isBoostRampEnabled ( ) const
inlinenodiscard

Definition at line 66 of file KartJump.hh.

◆ reset()

void Kart::KartJump::reset ( )
0x80575AE8

Definition at line 82 of file KartJump.cc.

◆ setAngle()

void Kart::KartJump::setAngle ( const EGG::Vector3f & left)
0x80576230

Definition at line 166 of file KartJump.cc.

◆ setBoostRampEnabled()

void Kart::KartJump::setBoostRampEnabled ( bool isSet)
inline

Definition at line 60 of file KartJump.hh.

◆ setupProperties()

void Kart::KartJump::setupProperties ( )
0x80576460

Definition at line 51 of file KartJump.cc.

◆ someFlagCheck()

bool Kart::KartJump::someFlagCheck ( )

Definition at line 120 of file KartJump.cc.

◆ start()

void Kart::KartJump::start ( const EGG::Vector3f & left)
protectedvirtual0x80575EE8

Definition at line 210 of file KartJump.cc.

◆ tryStart()

void Kart::KartJump::tryStart ( const EGG::Vector3f & left)
0x80575D7C

Definition at line 87 of file KartJump.cc.

◆ type()

TrickType Kart::KartJump::type ( ) const
inlinenodiscard

Definition at line 70 of file KartJump.hh.

◆ variant()

SurfaceVariant Kart::KartJump::variant ( ) const
inlinenodiscard

Definition at line 73 of file KartJump.hh.

Member Data Documentation

◆ m_angle

f32 Kart::KartJump::m_angle
protected

Definition at line 90 of file KartJump.hh.

◆ m_angleDelta

f32 Kart::KartJump::m_angleDelta
protected

Definition at line 91 of file KartJump.hh.

◆ m_angleDeltaFactor

f32 Kart::KartJump::m_angleDeltaFactor
protected

Definition at line 92 of file KartJump.hh.

◆ m_angleDeltaFactorDec

f32 Kart::KartJump::m_angleDeltaFactorDec
protected

Definition at line 93 of file KartJump.hh.

◆ m_boostRampEnabled

bool Kart::KartJump::m_boostRampEnabled
private

Definition at line 101 of file KartJump.hh.

◆ m_cooldown

s16 Kart::KartJump::m_cooldown
protected

Definition at line 95 of file KartJump.hh.

◆ m_finalAngle

f32 Kart::KartJump::m_finalAngle
protected

Definition at line 94 of file KartJump.hh.

◆ m_move

KartMove* Kart::KartJump::m_move
protected

Definition at line 97 of file KartJump.hh.

◆ m_nextAllowTimer

s16 Kart::KartJump::m_nextAllowTimer
private

Definition at line 100 of file KartJump.hh.

◆ m_nextTrick

System::Trick Kart::KartJump::m_nextTrick
protected

Definition at line 87 of file KartJump.hh.

◆ m_properties

TrickProperties Kart::KartJump::m_properties
protected

Definition at line 89 of file KartJump.hh.

◆ m_rot

EGG::Quatf Kart::KartJump::m_rot
protected

Definition at line 96 of file KartJump.hh.

◆ m_rotSign

f32 Kart::KartJump::m_rotSign
protected

Definition at line 88 of file KartJump.hh.

◆ m_type

TrickType Kart::KartJump::m_type
protected

Definition at line 85 of file KartJump.hh.

◆ m_variant

SurfaceVariant Kart::KartJump::m_variant
protected

Definition at line 86 of file KartJump.hh.