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

Description

Definition at line 16 of file ObjectCollidable.hh.

Inheritance diagram for Field::ObjectCollidable:

Public Member Functions

 ObjectCollidable (const System::MapdataGeoObj &params)
 
void load () override
 
void calcCollisionTransform () override
 
f32 getCollisionRadius () const override
 Finds the radius that fits fully in a BoxColUnit.
 
virtual void loadAABB (f32 maxSpeed)
 
virtual void loadAABB (f32 radius, f32 maxSpeed)
 
virtual void processKartReactions (Kart::KartObject *kartObj, Kart::Reaction &reactionOnKart, Kart::Reaction &reactionOnObj)
 
virtual Kart::Reaction onCollision (Kart::KartObject *, Kart::Reaction reactionOnKart, Kart::Reaction, EGG::Vector3f &)
 
virtual void onWallCollision (Kart::KartObject *, const EGG::Vector3f &)
 
virtual void onObjectCollision (Kart::KartObject *)
 
virtual bool checkCollision (ObjectCollisionBase *lhs, EGG::Vector3f &dist)
 
virtual const EGG::Vector3fgetCollisionTranslation () const
 
virtual ObjectCollisionBasecollision () const
 
- Public Member Functions inherited from Field::ObjectBase
 ObjectBase (const System::MapdataGeoObj &params)
 
virtual void init ()
 
virtual void calc ()
 
virtual void calcModel ()
 
virtual void loadRail ()
 
virtual u32 loadFlags () const
 
virtual const char * getKclName () const
 
virtual const EGG::Vector3fgetPosition () const
 
ObjectId id () const
 

Protected Member Functions

void createCollision () override
 
virtual const EGG::Vector3fcollisionCenter () const
 
- Protected Member Functions inherited from Field::ObjectBase
void calcTransform ()
 

Protected Attributes

ObjectCollisionBasem_collision
 
- Protected Attributes inherited from Field::ObjectBase
ObjectId m_id
 
RailInterpolatorm_railInterpolator
 
BoxColUnitm_boxColUnit
 
u16 m_flags
 
EGG::Vector3f m_pos
 
EGG::Vector3f m_rot
 
EGG::Vector3f m_scale
 
EGG::Matrix34f m_transform
 
const System::MapdataGeoObjm_mapObj
 

Constructor & Destructor Documentation

◆ ObjectCollidable()

Field::ObjectCollidable::ObjectCollidable ( const System::MapdataGeoObj & params)
0x8081EFEC

Definition at line 13 of file ObjectCollidable.cc.

◆ ~ObjectCollidable()

Field::ObjectCollidable::~ObjectCollidable ( )
override0x8067E384

Definition at line 16 of file ObjectCollidable.cc.

Member Function Documentation

◆ calcCollisionTransform()

void Field::ObjectCollidable::calcCollisionTransform ( )
overridevirtual0x8081F7C8

Implements Field::ObjectBase.

Definition at line 32 of file ObjectCollidable.cc.

◆ checkCollision()

bool Field::ObjectCollidable::checkCollision ( ObjectCollisionBase * lhs,
EGG::Vector3f & dist )
virtual0x80681748

Definition at line 87 of file ObjectCollidable.cc.

◆ collision()

virtual ObjectCollisionBase * Field::ObjectCollidable::collision ( ) const
inlinenodiscardvirtual0x80573518

Definition at line 49 of file ObjectCollidable.hh.

◆ collisionCenter()

virtual const EGG::Vector3f & Field::ObjectCollidable::collisionCenter ( ) const
inlineprotectedvirtual0x806816B8

Definition at line 57 of file ObjectCollidable.hh.

◆ createCollision()

void Field::ObjectCollidable::createCollision ( )
overrideprotectedvirtual0x8081F224

Implements Field::ObjectBase.

Definition at line 92 of file ObjectCollidable.cc.

◆ getCollisionRadius()

f32 Field::ObjectCollidable::getCollisionRadius ( ) const
nodiscardoverridevirtual0x806815A0

Finds the radius that fits fully in a BoxColUnit.

We refer to the collision parameters as a box due to its use of axes. This does not imply that all collidable objects are boxes!

Reimplemented from Field::ObjectBase.

Definition at line 41 of file ObjectCollidable.cc.

◆ getCollisionTranslation()

virtual const EGG::Vector3f & Field::ObjectCollidable::getCollisionTranslation ( ) const
inlinevirtual0x8068173C

Definition at line 44 of file ObjectCollidable.hh.

◆ load()

void Field::ObjectCollidable::load ( )
overridevirtual0x8081F0A0

Implements Field::ObjectBase.

Definition at line 21 of file ObjectCollidable.cc.

◆ loadAABB() [1/2]

void Field::ObjectCollidable::loadAABB ( f32 maxSpeed)
virtual0x806816D8

Definition at line 52 of file ObjectCollidable.cc.

◆ loadAABB() [2/2]

void Field::ObjectCollidable::loadAABB ( f32 radius,
f32 maxSpeed )
virtual0x8081F180

Definition at line 57 of file ObjectCollidable.cc.

◆ onCollision()

virtual Kart::Reaction Field::ObjectCollidable::onCollision ( Kart::KartObject * ,
Kart::Reaction reactionOnKart,
Kart::Reaction ,
EGG::Vector3f &  )
inlinevirtual0x8068179C

Definition at line 31 of file ObjectCollidable.hh.

◆ onObjectCollision()

virtual void Field::ObjectCollidable::onObjectCollision ( Kart::KartObject * )
inlinevirtual

Definition at line 38 of file ObjectCollidable.hh.

◆ onWallCollision()

virtual void Field::ObjectCollidable::onWallCollision ( Kart::KartObject * ,
const EGG::Vector3f &  )
inlinevirtual

Definition at line 37 of file ObjectCollidable.hh.

◆ processKartReactions()

void Field::ObjectCollidable::processKartReactions ( Kart::KartObject * kartObj,
Kart::Reaction & reactionOnKart,
Kart::Reaction & reactionOnObj )
virtual0x8081F66C

Definition at line 65 of file ObjectCollidable.cc.

Member Data Documentation

◆ m_collision

ObjectCollisionBase* Field::ObjectCollidable::m_collision
protected

Definition at line 61 of file ObjectCollidable.hh.