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

Description

Definition at line 7 of file ObjectAurora.hh.

Inheritance diagram for Field::ObjectAurora:

Public Member Functions

 ObjectAurora (const System::MapdataGeoObj &params)
 
void init () override
 
u32 loadFlags () const override
 
void createCollision () override
 
void calcCollisionTransform () override
 
f32 getCollisionRadius () const override
 
bool checkPointPartial (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointPartialPush (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointFull (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointFullPush (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkSpherePartial (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSpherePartialPush (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSphereFull (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSphereFullPush (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkPointCachedPartial (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointCachedPartialPush (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointCachedFull (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkPointCachedFullPush (const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut) override
 
bool checkSphereCachedPartial (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSphereCachedPartialPush (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSphereCachedFull (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
bool checkSphereCachedFullPush (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset) override
 
- Public Member Functions inherited from Field::ObjectDrivable
 ObjectDrivable (const System::MapdataGeoObj &params)
 
void load () override
 
f32 getCollisionRadius () const override
 
virtual void initCollision ()
 
virtual void loadAABB (f32 radius)
 
virtual void narrScLocal (f32, const EGG::Vector3f &, KCLTypeMask, u32)
 
- Public Member Functions inherited from Field::ObjectBase
 ObjectBase (const System::MapdataGeoObj &params)
 
virtual void calc ()
 
virtual void calcModel ()
 
virtual void loadRail ()
 
virtual const char * getKclName () const
 
virtual const EGG::Vector3fgetPosition () const
 
ObjectId id () const
 

Private Member Functions

bool checkSpherePartialImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset)
 
bool checkSpherePartialPushImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset)
 
bool checkSphereFullImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset)
 
bool checkSphereFullPushImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset)
 
bool checkSpherePartialImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfoPartial *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset, bool push)
 Helper function which contains frequently re-used code. Behavior branches depending on whether it is a push (push entry in the CollisionDirector).
 
bool checkSphereFullImpl (f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset, bool push)
 Helper function which contains frequently re-used code. Behavior branches depending on whether it is a push (push entry in the CollisionDirector).
 
bool calcCollision (f32 radius, const EGG::Vector3f &vel, u32 time, EGG::Vector3f &v0, EGG::Vector3f &fnrm, f32 &dist)
 Calculates the sin-like collision of the wavy road.
 

Static Private Attributes

static constexpr EGG::Vector3f COLLISION_SIZE = EGG::Vector3f(2000.0f, 2000.0f, 15000.0f)
 

Additional Inherited Members

- Protected Member Functions inherited from Field::ObjectBase
void calcTransform ()
 
- 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

◆ ObjectAurora()

Field::ObjectAurora::ObjectAurora ( const System::MapdataGeoObj & params)
0x807FAB58

Definition at line 10 of file ObjectAurora.cc.

Member Function Documentation

◆ calcCollision()

bool Field::ObjectAurora::calcCollision ( f32 radius,
const EGG::Vector3f & vel,
u32 time,
EGG::Vector3f & v0,
EGG::Vector3f & fnrm,
f32 & dist )
nodiscardprivate0x807FB060

Calculates the sin-like collision of the wavy road.

It seems to be modeled as a quadratic chirp with a starting frequency of 1 and a max frequency of 4. The minimum frequency of 1 occurs 30s into the race, and the maximum frequency occurs 2min 13s into the race. The "observed" frequency is dependent on the player's velocity towards the wavy road as well.

Definition at line 280 of file ObjectAurora.cc.

◆ calcCollisionTransform()

void Field::ObjectAurora::calcCollisionTransform ( )
overridevirtual0x807FB680

Implements Field::ObjectBase.

Definition at line 27 of file ObjectAurora.cc.

◆ checkPointCachedFull()

bool Field::ObjectAurora::checkPointCachedFull ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB56C

Implements Field::ObjectDrivable.

Definition at line 96 of file ObjectAurora.cc.

◆ checkPointCachedFullPush()

bool Field::ObjectAurora::checkPointCachedFullPush ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB57C

Implements Field::ObjectDrivable.

Definition at line 102 of file ObjectAurora.cc.

◆ checkPointCachedPartial()

bool Field::ObjectAurora::checkPointCachedPartial ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB54C

Implements Field::ObjectDrivable.

Definition at line 84 of file ObjectAurora.cc.

◆ checkPointCachedPartialPush()

bool Field::ObjectAurora::checkPointCachedPartialPush ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB55C

Implements Field::ObjectDrivable.

Definition at line 90 of file ObjectAurora.cc.

◆ checkPointFull()

bool Field::ObjectAurora::checkPointFull ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB5BC

Implements Field::ObjectDrivable.

Definition at line 47 of file ObjectAurora.cc.

◆ checkPointFullPush()

bool Field::ObjectAurora::checkPointFullPush ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB5CC

Implements Field::ObjectDrivable.

Definition at line 53 of file ObjectAurora.cc.

◆ checkPointPartial()

bool Field::ObjectAurora::checkPointPartial ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB59C

Implements Field::ObjectDrivable.

Definition at line 35 of file ObjectAurora.cc.

◆ checkPointPartialPush()

bool Field::ObjectAurora::checkPointPartialPush ( const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut )
nodiscardoverridevirtual0x807FB5AC

Implements Field::ObjectDrivable.

Definition at line 41 of file ObjectAurora.cc.

◆ checkSphereCachedFull()

bool Field::ObjectAurora::checkSphereCachedFull ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB544

Implements Field::ObjectDrivable.

Definition at line 122 of file ObjectAurora.cc.

◆ checkSphereCachedFullPush()

bool Field::ObjectAurora::checkSphereCachedFullPush ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB548

Implements Field::ObjectDrivable.

Definition at line 129 of file ObjectAurora.cc.

◆ checkSphereCachedPartial()

bool Field::ObjectAurora::checkSphereCachedPartial ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB53C

Implements Field::ObjectDrivable.

Definition at line 108 of file ObjectAurora.cc.

◆ checkSphereCachedPartialPush()

bool Field::ObjectAurora::checkSphereCachedPartialPush ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB540

Implements Field::ObjectDrivable.

Definition at line 115 of file ObjectAurora.cc.

◆ checkSphereFull()

bool Field::ObjectAurora::checkSphereFull ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB594

Implements Field::ObjectDrivable.

Definition at line 72 of file ObjectAurora.cc.

◆ checkSphereFullImpl() [1/2]

bool Field::ObjectAurora::checkSphereFullImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardprivate0x807FBAC0

Definition at line 150 of file ObjectAurora.cc.

◆ checkSphereFullImpl() [2/2]

bool Field::ObjectAurora::checkSphereFullImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset,
bool push )
nodiscardprivate

Helper function which contains frequently re-used code. Behavior branches depending on whether it is a push (push entry in the CollisionDirector).

Parameters
pushWhether to push a collision entry

Definition at line 220 of file ObjectAurora.cc.

◆ checkSphereFullPush()

bool Field::ObjectAurora::checkSphereFullPush ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB598

Implements Field::ObjectDrivable.

Definition at line 78 of file ObjectAurora.cc.

◆ checkSphereFullPushImpl()

bool Field::ObjectAurora::checkSphereFullPushImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfo * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardprivate0x807FBE6C

Definition at line 156 of file ObjectAurora.cc.

◆ checkSpherePartial()

bool Field::ObjectAurora::checkSpherePartial ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB58C

Implements Field::ObjectDrivable.

Definition at line 59 of file ObjectAurora.cc.

◆ checkSpherePartialImpl() [1/2]

bool Field::ObjectAurora::checkSpherePartialImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardprivate0x807FB6D0

Definition at line 136 of file ObjectAurora.cc.

◆ checkSpherePartialImpl() [2/2]

bool Field::ObjectAurora::checkSpherePartialImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset,
bool push )
nodiscardprivate

Helper function which contains frequently re-used code. Behavior branches depending on whether it is a push (push entry in the CollisionDirector).

Parameters
pushWhether to push a collision entry

Definition at line 165 of file ObjectAurora.cc.

◆ checkSpherePartialPush()

bool Field::ObjectAurora::checkSpherePartialPush ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardoverridevirtual0x807FB590

Implements Field::ObjectDrivable.

Definition at line 65 of file ObjectAurora.cc.

◆ checkSpherePartialPushImpl()

bool Field::ObjectAurora::checkSpherePartialPushImpl ( f32 radius,
const EGG::Vector3f & v0,
const EGG::Vector3f & v1,
KCLTypeMask flags,
CollisionInfoPartial * pInfo,
KCLTypeMask * pFlagsOut,
u32 timeOffset )
nodiscardprivate0x807FB8B0

Definition at line 143 of file ObjectAurora.cc.

◆ createCollision()

void Field::ObjectAurora::createCollision ( )
overridevirtual0x807FB684

Implements Field::ObjectBase.

Definition at line 24 of file ObjectAurora.cc.

◆ getCollisionRadius()

f32 Field::ObjectAurora::getCollisionRadius ( ) const
overridevirtual0x807FB5DC

Reimplemented from Field::ObjectBase.

Definition at line 30 of file ObjectAurora.cc.

◆ init()

void Field::ObjectAurora::init ( )
overridevirtual0x807FABC4

Reimplemented from Field::ObjectBase.

Definition at line 16 of file ObjectAurora.cc.

◆ loadFlags()

u32 Field::ObjectAurora::loadFlags ( ) const
nodiscardoverridevirtual0x807FB688

Reimplemented from Field::ObjectBase.

Definition at line 19 of file ObjectAurora.cc.

Member Data Documentation

◆ COLLISION_SIZE

EGG::Vector3f Field::ObjectAurora::COLLISION_SIZE = EGG::Vector3f(2000.0f, 2000.0f, 15000.0f)
staticconstexprprivate

Definition at line 84 of file ObjectAurora.hh.