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

Description

Definition at line 5 of file ObjectTownBridge.hh.

Inheritance diagram for Field::ObjectTownBridge:

Public Types

enum class  State {
  Raising = 0 ,
  Raised = 1 ,
  Lowering = 2 ,
  Lowered = 3
}
 
- Public Types inherited from Field::ObjectBase
enum class  eFlags {
  Position = 0 ,
  Rotation = 1 ,
  Matrix = 2 ,
  Scale = 3
}
 
typedef EGG::TBitFlag< u16, eFlags > Flags
 

Public Member Functions

 ObjectTownBridge (const System::MapdataGeoObj &params)
 
void calc () override
 
u32 loadFlags () const override
 
void createCollision () override
 
f32 colRadiusAdditionalLength () const override
 
- Public Member Functions inherited from Field::ObjectKCL
 ObjectKCL (const System::MapdataGeoObj &params)
 
void calcCollisionTransform () override
 
const EGG::Vector3fgetPosition () const override
 
f32 getCollisionRadius () const override
 
void initCollision () override
 
bool checkPointPartial (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointPartialPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointFull (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkPointFullPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkSpherePartial (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSpherePartialPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereFull (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereFullPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
void narrScLocal (f32 radius, const EGG::Vector3f &pos, KCLTypeMask mask, u32 timeOffset) override
 
bool checkPointCachedPartial (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedPartialPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedFull (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedFullPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkSphereCachedPartial (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedPartialPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedFull (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedFullPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
virtual void update (u32 timeOffset)
 
virtual void calcScale (u32 timeOffset)
 
virtual void setMovingObjVel (const EGG::Vector3f &v)
 
virtual const EGG::Matrix34fgetUpdatedMatrix (u32 timeOffset)
 
virtual f32 getScaleY (u32) const
 
virtual bool shouldCheckColNoPush () const
 
virtual bool shouldCheckColPush () const
 
virtual bool checkCollision (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset)
 
virtual bool checkCollisionCached (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset)
 
- Public Member Functions inherited from Field::ObjectDrivable
 ObjectDrivable (const System::MapdataGeoObj &params)
 
void load () override
 
virtual void loadAABB (f32 radius)
 
- Public Member Functions inherited from Field::ObjectBase
 ObjectBase (const System::MapdataGeoObj &params)
 
 ObjectBase (const char *name, const EGG::Vector3f &pos, const EGG::Vector3f &rot, const EGG::Vector3f &scale)
 
virtual void init ()
 
virtual void calcModel ()
 
virtual const char * getResources () const
 
virtual void loadGraphics ()
 
virtual void loadAnims ()
 
virtual void loadRail ()
 
virtual const char * getName () const
 
virtual const char * getKclName () const
 
virtual ObjectId id () const
 
const EGG::Vector3fpos () const
 
void setPos (const EGG::Vector3f &pos)
 

Private Member Functions

f32 calcBridgeAngle (u32 t) const
 
State calcState (u32 t) const
 Helper function which determines the current state of the bridge based on t.
 

Private Attributes

bool m_rotateUpwards
 Normally 1, otherwise the bridge will open downwards.
 
f32 m_angVel
 Speed of the bridge's movement.
 
u32 m_pivotFrames
 
u32 m_raisedFrames
 
u32 m_loweredFrames
 
u32 m_fullAnimFrames
 The full duration of a bridge raise/lower loop.
 
State m_state
 
ObjColMgrm_raisedColMgr
 
ObjColMgrm_midColMgr
 
ObjColMgrm_flatColMgr
 

Additional Inherited Members

- Protected Member Functions inherited from Field::ObjectBase
void calcTransform ()
 
void linkAnims (const std::span< const char * > &names, const std::span< Render::AnmType > types)
 
void setMatrixTangentTo (const EGG::Vector3f &up, const EGG::Vector3f &tangent)
 
- Static Protected Member Functions inherited from Field::ObjectBase
static EGG::Vector3f RotateAxisAngle (f32 angle, const EGG::Vector3f &axis, const EGG::Vector3f &v1)
 
static void SetRotTangentHorizontal (EGG::Matrix34f &mat, const EGG::Vector3f &up, const EGG::Vector3f &tangent)
 
static EGG::Matrix34f OrthonormalBasis (const EGG::Vector3f &v)
 
static EGG::Vector3f Interpolate (f32 t, const EGG::Vector3f &v0, const EGG::Vector3f &v1)
 
- Protected Attributes inherited from Field::ObjectKCL
ObjColMgrm_objColMgr
 
EGG::Vector3f m_kclMidpoint
 
f32 m_bboxHalfSideLength
 
s32 m_lastMtxUpdateFrame
 
s32 m_lastScaleUpdateFrame
 
- Protected Attributes inherited from Field::ObjectBase
Render::DrawMdlm_drawMdl
 
Abstract::g3d::ResFilem_resFile
 
ObjectId m_id
 
RailInterpolatorm_railInterpolator
 
BoxColUnitm_boxColUnit
 
Flags m_flags
 
EGG::Vector3f m_pos
 
EGG::Vector3f m_rot
 
EGG::Vector3f m_scale
 
EGG::Matrix34f m_transform
 
const System::MapdataGeoObjm_mapObj
 

Member Enumeration Documentation

◆ State

enum class Field::ObjectTownBridge::State
strong

Definition at line 7 of file ObjectTownBridge.hh.

Constructor & Destructor Documentation

◆ ObjectTownBridge()

Field::ObjectTownBridge::ObjectTownBridge ( const System::MapdataGeoObj & params)
0x80809448

Definition at line 10 of file ObjectTownBridge.cc.

◆ ~ObjectTownBridge()

Field::ObjectTownBridge::~ObjectTownBridge ( )
override0x8080ACE0

Definition at line 21 of file ObjectTownBridge.cc.

Member Function Documentation

◆ calc()

void Field::ObjectTownBridge::calc ( )
overridevirtual0x80809774

Reimplemented from Field::ObjectBase.

Definition at line 38 of file ObjectTownBridge.cc.

◆ calcBridgeAngle()

f32 Field::ObjectTownBridge::calcBridgeAngle ( u32 t) const
nodiscardprivate0x80809CDC

Definition at line 78 of file ObjectTownBridge.cc.

◆ calcState()

ObjectTownBridge::State Field::ObjectTownBridge::calcState ( u32 t) const
nodiscardprivate

Helper function which determines the current state of the bridge based on t.

Definition at line 107 of file ObjectTownBridge.cc.

◆ colRadiusAdditionalLength()

f32 Field::ObjectTownBridge::colRadiusAdditionalLength ( ) const
inlinenodiscardoverridevirtual0x8080A8D0

Reimplemented from Field::ObjectKCL.

Definition at line 27 of file ObjectTownBridge.hh.

◆ createCollision()

void Field::ObjectTownBridge::createCollision ( )
overridevirtual0x808095B8

Reimplemented from Field::ObjectKCL.

Definition at line 61 of file ObjectTownBridge.cc.

◆ loadFlags()

u32 Field::ObjectTownBridge::loadFlags ( ) const
inlinenodiscardoverridevirtual0x8080ACD8

Reimplemented from Field::ObjectBase.

Definition at line 20 of file ObjectTownBridge.hh.

Member Data Documentation

◆ m_angVel

f32 Field::ObjectTownBridge::m_angVel
private

Speed of the bridge's movement.

Definition at line 36 of file ObjectTownBridge.hh.

◆ m_flatColMgr

ObjColMgr* Field::ObjectTownBridge::m_flatColMgr
private

Definition at line 44 of file ObjectTownBridge.hh.

◆ m_fullAnimFrames

u32 Field::ObjectTownBridge::m_fullAnimFrames
private

The full duration of a bridge raise/lower loop.

Definition at line 40 of file ObjectTownBridge.hh.

◆ m_loweredFrames

u32 Field::ObjectTownBridge::m_loweredFrames
private

of frames the bridge remains lowered.

Definition at line 39 of file ObjectTownBridge.hh.

◆ m_midColMgr

ObjColMgr* Field::ObjectTownBridge::m_midColMgr
private

Definition at line 43 of file ObjectTownBridge.hh.

◆ m_pivotFrames

u32 Field::ObjectTownBridge::m_pivotFrames
private

of frames the bridge pivots up or down.

Definition at line 37 of file ObjectTownBridge.hh.

◆ m_raisedColMgr

ObjColMgr* Field::ObjectTownBridge::m_raisedColMgr
private

Definition at line 42 of file ObjectTownBridge.hh.

◆ m_raisedFrames

u32 Field::ObjectTownBridge::m_raisedFrames
private

of frames the bridge remains raised.

Definition at line 38 of file ObjectTownBridge.hh.

◆ m_rotateUpwards

bool Field::ObjectTownBridge::m_rotateUpwards
private

Normally 1, otherwise the bridge will open downwards.

Definition at line 35 of file ObjectTownBridge.hh.

◆ m_state

State Field::ObjectTownBridge::m_state
private

Definition at line 41 of file ObjectTownBridge.hh.