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

#include <ObjectFlamePoleFoot.hh>

Description

Represents the geysers on Bowser's Castle.

Definition at line 12 of file ObjectFlamePoleFoot.hh.

Inheritance diagram for Field::ObjectFlamePoleFoot:

Public Member Functions

 ObjectFlamePoleFoot (const System::MapdataGeoObj &params)
 
void init () override
 
void calc () override
 
u32 loadFlags () const override
 
f32 getCollisionRadius () const override
 
const EGG::Matrix34fgetUpdatedMatrix (u32) override
 
f32 getScaleY (u32 timeOffset) const override
 
bool checkCollision (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkCollisionCached (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
- Public Member Functions inherited from Field::ObjectKCL
 ObjectKCL (const System::MapdataGeoObj &params)
 
void createCollision () override
 
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 f32 colRadiusAdditionalLength () const
 
virtual bool shouldCheckColNoPush () const
 
virtual bool shouldCheckColPush () const
 
- 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 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 void resize (f32 radius, f32 maxSpeed)
 
virtual void unregisterCollision ()
 
virtual void disableCollision () const
 
virtual void enableCollision () const
 
virtual const BoxColUnitgetUnit () const
 
const RailInterpolatorrailInterpolator () const
 
virtual ObjectId id () const
 
const EGG::Vector3fpos () const
 
void setPos (const EGG::Vector3f &pos)
 
void setScale (const EGG::Vector3f &scale)
 
void setTransform (const EGG::Matrix34f &mat)
 
const EGG::Vector3fscale () const
 

Private Member Functions

void enterExpanding ()
 
void enterEruptingUp ()
 
void enterEruptingStay ()
 
void enterEruptingDown ()
 
void enterDormant ()
 
void enterState5 ()
 
void calcExpanding ()
 
void calcEruptingUp ()
 
void calcEruptingStay ()
 
void calcEruptingDown ()
 
void calcDormant ()
 
void calcState5 ()
 
void calcStates ()
 

Private Attributes

EGG::Matrix34f m_workMatrix
 
ObjectFlamePolem_pole
 
u32 m_extraCycleFrames
 Used to increase the animation cycle beyond the typical 540 frames.
 
u32 m_initDelay
 
f32 m_poleScale
 
s32 m_eruptUpDuration
 
s32 m_eruptDownDuration
 
std::array< s32, 6 > m_stateStart
 
f32 m_eruptDownVel
 
f32 m_initScaledHeight
 
s32 m_cycleFrame
 
f32 m_heightOffset
 Cyclical offset that adjusts the pole's height.
 
f32 m_scaledHeight
 
f32 m_scaleDelta
 Change in scale per frame at end of cycle.
 
f32 m_eruptAccel
 
f32 m_initEruptVel
 

Static Private Attributes

static u32 FLAMEPOLE_COUNT = 0
 
static constexpr std::array< StateManagerEntry, 6 > STATE_ENTRIES
 
static constexpr u32 CYCLE_FRAMES = 540
 

Additional Inherited Members

- Public Types inherited from Field::ObjectBase
enum class  eFlags {
  Position = 0 ,
  Rotation = 1 ,
  Matrix = 2 ,
  Scale = 3
}
 
typedef EGG::TBitFlag< u16, eFlags > Flags
 
- Protected Member Functions inherited from Field::ObjectBase
void calcTransform ()
 
void calcRotLock ()
 
void linkAnims (const std::span< const char * > &names, const std::span< Render::AnmType > types)
 
void setMatrixTangentTo (const EGG::Vector3f &up, const EGG::Vector3f &tangent)
 
void setMatrixFromOrthonormalBasisAndPos (const EGG::Vector3f &v)
 
- Protected Member Functions inherited from Field::StateManager
 StateManager (void *obj, const std::span< const StateManagerEntry > &entries)
 
void calc ()
 
- Static Protected Member Functions inherited from Field::ObjectBase
static f32 CheckPointAgainstLineSegment (const EGG::Vector3f &point, const EGG::Vector3f &a, const EGG::Vector3f &b)
 Calculates on what side of line segment ab point lies.
 
static EGG::Vector3f RotateXZByYaw (f32 angle, const EGG::Vector3f &v)
 Rotates a vector around the Y-axis and returns the XZ-plane portion of the vector.
 
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::Matrix34f RailOrthonormalBasis (const RailInterpolator &railInterpolator)
 
static EGG::Vector3f AdjustVecForward (f32 sidewaysScalar, f32 forwardScalar, f32 minSpeed, const EGG::Vector3f &src, EGG::Vector3f forward)
 
static f32 CalcParabolicDisplacement (f32 initVel, f32 accel, u32 frame)
 Solves the standard kinematic equation \(y(t) = v_0\, t - \frac{1}{2} a t^{2}\).
 
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_scale
 
EGG::Vector3f m_rot
 
bool m_rotLock
 
EGG::Matrix34f m_transform
 
const System::MapdataGeoObjm_mapObj
 
- Protected Attributes inherited from Field::StateManager
u16 m_currentStateId
 
s32 m_nextStateId
 
u32 m_currentFrame
 
std::span< u16m_entryIds
 
std::span< const StateManagerEntrym_entries
 
void * m_obj
 

Constructor & Destructor Documentation

◆ ObjectFlamePoleFoot()

Field::ObjectFlamePoleFoot::ObjectFlamePoleFoot ( const System::MapdataGeoObj & params)
0x8067E6F4

Definition at line 12 of file ObjectFlamePoleFoot.cc.

◆ ~ObjectFlamePoleFoot()

Field::ObjectFlamePoleFoot::~ObjectFlamePoleFoot ( )
override0x8067EBE0

Definition at line 29 of file ObjectFlamePoleFoot.cc.

Member Function Documentation

◆ calc()

void Field::ObjectFlamePoleFoot::calc ( )
overridevirtual0x8067EF70

Reimplemented from Field::ObjectBase.

Definition at line 61 of file ObjectFlamePoleFoot.cc.

◆ calcDormant()

void Field::ObjectFlamePoleFoot::calcDormant ( )
inlineprivate0x8067F6AC

Definition at line 85 of file ObjectFlamePoleFoot.hh.

◆ calcEruptingDown()

void Field::ObjectFlamePoleFoot::calcEruptingDown ( )
inlineprivate0x8067F604

Definition at line 79 of file ObjectFlamePoleFoot.hh.

◆ calcEruptingStay()

void Field::ObjectFlamePoleFoot::calcEruptingStay ( )
private0x8067F544

Definition at line 211 of file ObjectFlamePoleFoot.cc.

◆ calcEruptingUp()

void Field::ObjectFlamePoleFoot::calcEruptingUp ( )
private0x8067F484

Definition at line 204 of file ObjectFlamePoleFoot.cc.

◆ calcExpanding()

void Field::ObjectFlamePoleFoot::calcExpanding ( )
inlineprivate0x8067F2F0

Definition at line 73 of file ObjectFlamePoleFoot.hh.

◆ calcState5()

void Field::ObjectFlamePoleFoot::calcState5 ( )
inlineprivate0x8067F6B4

Definition at line 88 of file ObjectFlamePoleFoot.hh.

◆ calcStates()

void Field::ObjectFlamePoleFoot::calcStates ( )
private0x8067F6B8

Definition at line 81 of file ObjectFlamePoleFoot.cc.

◆ checkCollision()

bool Field::ObjectFlamePoleFoot::checkCollision ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x8067FE88

Reimplemented from Field::ObjectKCL.

Definition at line 141 of file ObjectFlamePoleFoot.cc.

◆ checkCollisionCached()

bool Field::ObjectFlamePoleFoot::checkCollisionCached ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680218

Reimplemented from Field::ObjectKCL.

Definition at line 160 of file ObjectFlamePoleFoot.cc.

◆ enterDormant()

void Field::ObjectFlamePoleFoot::enterDormant ( )
inlineprivate0x8067F650

Definition at line 64 of file ObjectFlamePoleFoot.hh.

◆ enterEruptingDown()

void Field::ObjectFlamePoleFoot::enterEruptingDown ( )
inlineprivate0x8067F5EC

Definition at line 59 of file ObjectFlamePoleFoot.hh.

◆ enterEruptingStay()

void Field::ObjectFlamePoleFoot::enterEruptingStay ( )
inlineprivate0x8067F538

Definition at line 54 of file ObjectFlamePoleFoot.hh.

◆ enterEruptingUp()

void Field::ObjectFlamePoleFoot::enterEruptingUp ( )
private0x8067F2F4

Definition at line 179 of file ObjectFlamePoleFoot.cc.

◆ enterExpanding()

void Field::ObjectFlamePoleFoot::enterExpanding ( )
inlineprivate0x8067F2DC

Definition at line 47 of file ObjectFlamePoleFoot.hh.

◆ enterState5()

void Field::ObjectFlamePoleFoot::enterState5 ( )
inlineprivate0x8067F6B0

Definition at line 70 of file ObjectFlamePoleFoot.hh.

◆ getCollisionRadius()

f32 Field::ObjectFlamePoleFoot::getCollisionRadius ( ) const
inlinenodiscardoverridevirtual0x806814C4

Reimplemented from Field::ObjectDrivable.

Definition at line 26 of file ObjectFlamePoleFoot.hh.

◆ getScaleY()

f32 Field::ObjectFlamePoleFoot::getScaleY ( u32 timeOffset) const
nodiscardoverridevirtual

Reimplemented from Field::ObjectKCL.

Definition at line 100 of file ObjectFlamePoleFoot.cc.

◆ getUpdatedMatrix()

const EGG::Matrix34f & Field::ObjectFlamePoleFoot::getUpdatedMatrix ( u32 )
inlinenodiscardoverridevirtual0x8067FBB8

Reimplemented from Field::ObjectKCL.

Definition at line 31 of file ObjectFlamePoleFoot.hh.

◆ init()

void Field::ObjectFlamePoleFoot::init ( )
overridevirtual0x8067EC94

Reimplemented from Field::ObjectBase.

Definition at line 34 of file ObjectFlamePoleFoot.cc.

◆ loadFlags()

u32 Field::ObjectFlamePoleFoot::loadFlags ( ) const
inlinenodiscardoverridevirtual0x80681590

Reimplemented from Field::ObjectBase.

Definition at line 21 of file ObjectFlamePoleFoot.hh.

Member Data Documentation

◆ CYCLE_FRAMES

u32 Field::ObjectFlamePoleFoot::CYCLE_FRAMES = 540
staticconstexprprivate

Definition at line 126 of file ObjectFlamePoleFoot.hh.

◆ FLAMEPOLE_COUNT

u32 Field::ObjectFlamePoleFoot::FLAMEPOLE_COUNT = 0
staticprivate

Definition at line 109 of file ObjectFlamePoleFoot.hh.

◆ m_cycleFrame

s32 Field::ObjectFlamePoleFoot::m_cycleFrame
private

Definition at line 102 of file ObjectFlamePoleFoot.hh.

◆ m_eruptAccel

f32 Field::ObjectFlamePoleFoot::m_eruptAccel
private

Definition at line 106 of file ObjectFlamePoleFoot.hh.

◆ m_eruptDownDuration

s32 Field::ObjectFlamePoleFoot::m_eruptDownDuration
private

Definition at line 98 of file ObjectFlamePoleFoot.hh.

◆ m_eruptDownVel

f32 Field::ObjectFlamePoleFoot::m_eruptDownVel
private

Definition at line 100 of file ObjectFlamePoleFoot.hh.

◆ m_eruptUpDuration

s32 Field::ObjectFlamePoleFoot::m_eruptUpDuration
private

Definition at line 97 of file ObjectFlamePoleFoot.hh.

◆ m_extraCycleFrames

u32 Field::ObjectFlamePoleFoot::m_extraCycleFrames
private

Used to increase the animation cycle beyond the typical 540 frames.

Definition at line 94 of file ObjectFlamePoleFoot.hh.

◆ m_heightOffset

f32 Field::ObjectFlamePoleFoot::m_heightOffset
private

Cyclical offset that adjusts the pole's height.

Definition at line 103 of file ObjectFlamePoleFoot.hh.

◆ m_initDelay

u32 Field::ObjectFlamePoleFoot::m_initDelay
private

Definition at line 95 of file ObjectFlamePoleFoot.hh.

◆ m_initEruptVel

f32 Field::ObjectFlamePoleFoot::m_initEruptVel
private

Definition at line 107 of file ObjectFlamePoleFoot.hh.

◆ m_initScaledHeight

f32 Field::ObjectFlamePoleFoot::m_initScaledHeight
private

Definition at line 101 of file ObjectFlamePoleFoot.hh.

◆ m_pole

ObjectFlamePole* Field::ObjectFlamePoleFoot::m_pole
private

Definition at line 93 of file ObjectFlamePoleFoot.hh.

◆ m_poleScale

f32 Field::ObjectFlamePoleFoot::m_poleScale
private

Definition at line 96 of file ObjectFlamePoleFoot.hh.

◆ m_scaleDelta

f32 Field::ObjectFlamePoleFoot::m_scaleDelta
private

Change in scale per frame at end of cycle.

Definition at line 105 of file ObjectFlamePoleFoot.hh.

◆ m_scaledHeight

f32 Field::ObjectFlamePoleFoot::m_scaledHeight
private

Definition at line 104 of file ObjectFlamePoleFoot.hh.

◆ m_stateStart

std::array<s32, 6> Field::ObjectFlamePoleFoot::m_stateStart
private

Definition at line 99 of file ObjectFlamePoleFoot.hh.

◆ m_workMatrix

EGG::Matrix34f Field::ObjectFlamePoleFoot::m_workMatrix
private

Definition at line 92 of file ObjectFlamePoleFoot.hh.

◆ STATE_ENTRIES

std::array<StateManagerEntry, 6> Field::ObjectFlamePoleFoot::STATE_ENTRIES
staticconstexprprivate
Initial value:
= {{
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterExpanding,
&ObjectFlamePoleFoot::calcExpanding>(0)},
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterEruptingUp,
&ObjectFlamePoleFoot::calcEruptingUp>(1)},
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterEruptingStay,
&ObjectFlamePoleFoot::calcEruptingStay>(2)},
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterEruptingDown,
&ObjectFlamePoleFoot::calcEruptingDown>(3)},
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterDormant,
&ObjectFlamePoleFoot::calcDormant>(4)},
{StateEntry<ObjectFlamePoleFoot, &ObjectFlamePoleFoot::enterState5,
&ObjectFlamePoleFoot::calcState5>(5)},
}}
Represents the geysers on Bowser's Castle.

Definition at line 111 of file ObjectFlamePoleFoot.hh.