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

#include <KartHalfPipe.hh>

Description

Handles the physics and boosts associated with zippers.

Definition at line 11 of file KartHalfPipe.hh.

Inheritance diagram for Kart::KartHalfPipe:

Classes

struct  StuntManager
 
struct  StuntProperties
 Angle properties corresponding with the stunts. More...
 

Public Member Functions

void reset ()
 
void calc ()
 
void calcTrick ()
 
void calcRot ()
 
void calcLanding (bool)
 
void activateTrick (s32 duration, System::Trick trick)
 
void end (bool boost)
 
- Public Member Functions inherited from Kart::KartObjectProxy
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
 

Static Public Member Functions

static consteval f32 TerminalVelocity ()
 
- Static Public Member Functions inherited from Kart::KartObjectProxy
static std::list< KartObjectProxy * > & proxyList ()
 

Private Types

enum class  StuntType {
  None = -1 ,
  Backflip = 0 ,
  Frontflip = 1 ,
  Side360 = 2 ,
  Backside = 3 ,
  Frontside = 4 ,
  Side720 = 5
}
 

Private Attributes

bool m_touchingZipper
 
s16 m_timer
 
f32 m_nextSign
 
s32 m_attemptedTrickTimer
 When attempting a trick, tracks how long the animation would be.
 
EGG::Quatf m_rot
 
EGG::Vector3f m_prevPos
 
StuntType m_stunt
 
f32 m_rotSign
 
s16 m_nextTimer
 
System::Trick m_trick
 
EGG::Quatf m_stuntRot
 
StuntManager m_stuntManager
 

Additional Inherited Members

- Protected Member Functions inherited from Kart::KartObjectProxy
void apply (size_t idx)
 

Member Enumeration Documentation

◆ StuntType

enum class Kart::KartHalfPipe::StuntType
strongprivate

Definition at line 30 of file KartHalfPipe.hh.

Member Function Documentation

◆ activateTrick()

void Kart::KartHalfPipe::activateTrick ( s32 duration,
System::Trick trick )
0x80574E60

Definition at line 231 of file KartHalfPipe.cc.

◆ calc()

void Kart::KartHalfPipe::calc ( )
0x80574340

Definition at line 30 of file KartHalfPipe.cc.

◆ calcLanding()

void Kart::KartHalfPipe::calcLanding ( bool )
0x805752E8

Definition at line 160 of file KartHalfPipe.cc.

◆ calcRot()

void Kart::KartHalfPipe::calcRot ( )
0x805750CC

Definition at line 119 of file KartHalfPipe.cc.

◆ calcTrick()

void Kart::KartHalfPipe::calcTrick ( )
0x80574C90

Definition at line 98 of file KartHalfPipe.cc.

◆ end()

void Kart::KartHalfPipe::end ( bool boost)
0x805758E4

Definition at line 263 of file KartHalfPipe.cc.

◆ reset()

void Kart::KartHalfPipe::reset ( )
0x805741B0

Definition at line 23 of file KartHalfPipe.cc.

◆ TerminalVelocity()

static consteval f32 Kart::KartHalfPipe::TerminalVelocity ( )
inlinestaticconsteval0x80574108

Definition at line 25 of file KartHalfPipe.hh.

Member Data Documentation

◆ m_attemptedTrickTimer

s32 Kart::KartHalfPipe::m_attemptedTrickTimer
private

When attempting a trick, tracks how long the animation would be.

Definition at line 65 of file KartHalfPipe.hh.

◆ m_nextSign

f32 Kart::KartHalfPipe::m_nextSign
private

Definition at line 64 of file KartHalfPipe.hh.

◆ m_nextTimer

s16 Kart::KartHalfPipe::m_nextTimer
private

Definition at line 70 of file KartHalfPipe.hh.

◆ m_prevPos

EGG::Vector3f Kart::KartHalfPipe::m_prevPos
private

Definition at line 67 of file KartHalfPipe.hh.

◆ m_rot

EGG::Quatf Kart::KartHalfPipe::m_rot
private

Definition at line 66 of file KartHalfPipe.hh.

◆ m_rotSign

f32 Kart::KartHalfPipe::m_rotSign
private

Definition at line 69 of file KartHalfPipe.hh.

◆ m_stunt

StuntType Kart::KartHalfPipe::m_stunt
private

Definition at line 68 of file KartHalfPipe.hh.

◆ m_stuntManager

StuntManager Kart::KartHalfPipe::m_stuntManager
private

Definition at line 73 of file KartHalfPipe.hh.

◆ m_stuntRot

EGG::Quatf Kart::KartHalfPipe::m_stuntRot
private

Definition at line 72 of file KartHalfPipe.hh.

◆ m_timer

s16 Kart::KartHalfPipe::m_timer
private

Definition at line 63 of file KartHalfPipe.hh.

◆ m_touchingZipper

bool Kart::KartHalfPipe::m_touchingZipper
private

Definition at line 62 of file KartHalfPipe.hh.

◆ m_trick

System::Trick Kart::KartHalfPipe::m_trick
private

Definition at line 71 of file KartHalfPipe.hh.