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

#include <KartItem.hh>

Description

State management for item usage.

Definition at line 13 of file KartItem.hh.

Inheritance diagram for Item::KartItem:

Public Member Functions

void init (size_t playerIdx)
 
void calc ()
 Calculates item activation based on the controller input state.
 
void clear ()
 
void activateMushroom ()
 
void useMushroom ()
 

Getters

ItemInventoryinventory ()
 

Private Types

enum class  eFlags {
  Lockout = 10 ,
  ItemButtonHold = 12 ,
  ItemButtonActivation = 14
}
 
typedef EGG::TBitFlag< u16, eFlags > Flags
 

Private Attributes

Flags m_flags
 
ItemInventory m_inventory
 

Additional Inherited Members

- Private 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
 
void apply (size_t idx)
 
- Static Private Member Functions inherited from Kart::KartObjectProxy
static std::list< KartObjectProxy * > & proxyList ()
 

Member Typedef Documentation

◆ Flags

Definition at line 37 of file KartItem.hh.

Member Enumeration Documentation

◆ eFlags

enum class Item::KartItem::eFlags
strongprivate

Definition at line 32 of file KartItem.hh.

Constructor & Destructor Documentation

◆ KartItem()

Item::KartItem::KartItem ( )
0x8079754C

Definition at line 11 of file KartItem.cc.

Member Function Documentation

◆ activateMushroom()

void Item::KartItem::activateMushroom ( )
0x8079864C

Definition at line 67 of file KartItem.cc.

◆ calc()

void Item::KartItem::calc ( )
0x80797928

Calculates item activation based on the controller input state.

Definition at line 25 of file KartItem.cc.

◆ clear()

void Item::KartItem::clear ( )
0x80798848

Definition at line 60 of file KartItem.cc.

◆ init()

void Item::KartItem::init ( size_t playerIdx)
0x807976E0

Definition at line 19 of file KartItem.cc.

◆ inventory()

ItemInventory & Item::KartItem::inventory ( )
inlinenodiscard

Definition at line 26 of file KartItem.hh.

◆ useMushroom()

void Item::KartItem::useMushroom ( )
0x807A9D3C

Definition at line 72 of file KartItem.cc.

Member Data Documentation

◆ m_flags

Flags Item::KartItem::m_flags
private

Definition at line 39 of file KartItem.hh.

◆ m_inventory

ItemInventory Item::KartItem::m_inventory
private

Definition at line 40 of file KartItem.hh.