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

#include <ObjectEscalator.hh>

Description

Represents an individual escalator on Coconut Mall.

Escalators have two settings which are used to determine two framecounts at which the escalator comes to a standstill and changes to the next speed setting. This does not always indicate a direction change, as can be demonstrated by the escalator right before the first fountain whose steps always move downwards. Escalators use a piecewise function to mimic the position offset induced by the individual steps. For Kinoko, creative liberty was taken to create a few const members for expressions that are commonly re-used in this piecewise function that do not need to be recomputed every frame.

Definition at line 15 of file ObjectEscalator.hh.

Inheritance diagram for Field::ObjectEscalator:

Public Member Functions

 ObjectEscalator (const System::MapdataGeoObj &params, bool reverse=false)
 
void calc () override
 
ObjectId id () const override
 
u32 loadFlags () const 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
 
const EGG::Matrix34fgetUpdatedMatrix (u32 timeOffset) override
 
f32 colRadiusAdditionalLength () 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 getScaleY (u32) 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 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 void resize (f32 radius, f32 maxSpeed)
 
virtual void unregisterCollision ()
 
virtual void disableCollision () const
 
virtual void enableCollision () const
 
virtual const BoxColUnitgetUnit () const
 
const RailInterpolatorrailInterpolator () 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 Types

using ShouldCheckFunc = bool (ObjectEscalator::*)() const
 
template<typename T >
using CheckPointFunc
 
template<typename T >
using CheckSphereFunc
 

Private Member Functions

template<typename T >
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool checkPointImpl (ShouldCheckFunc shouldCheckFunc, CheckPointFunc< T > checkFunc, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, T *info, KCLTypeMask *maskOut)
 
template<typename T >
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool checkSphereImpl (ShouldCheckFunc shouldCheckFunc, CheckSphereFunc< T > checkFunc, f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, T *info, KCLTypeMask *maskOut, u32 timeOffset)
 
f32 calcStepFactor (s32 t)
 
f32 calcSpeed (s32 t)
 

Private Attributes

EGG::Vector3f m_initialPos
 
EGG::Vector3f m_initialRot
 
f32 m_stepFactor
 Used so that the steps have a tangible height difference on the escalator.
 
EGG::Vector3f m_stepDims
 Length and height of steps but aligned with its facing direction.
 
EGG::Matrix34f m_workMatrix
 
const std::array< s32, 2 > m_stillFrames
 When escalators change direction (two times)
 
const std::array< f32, 3 > m_speed
 Velocity for each of the three directions it moves.
 
const f32 m_checkColYPosMax
 Collision checks early return if you are above this height.
 
const f32 m_checkColYPosMin
 Collision checks early return if you are below this height.
 
const std::array< f32, 2 > m_stopFrames
 When the escalator starts slowing down.
 
const std::array< f32, 2 > m_startFrames
 When the escalator starts accelerating.
 
const std::array< f32, 2 > m_fullSpeedFrames
 When escalator reaches max speed.
 
const f32 m_midDuration
 

Static Private Attributes

static constexpr f32 STEP_HEIGHT = 10.0f
 Duration of full speed in between the dir changes.
 
static constexpr f32 REVERSE_FRAMES_F32 = 240.0f
 Frames the escalator waits before speeding up.
 
static constexpr f32 STANDSTILL_FRAMES = 50.0f
 
static constexpr f32 MAX_HEIGHT_OFFSET = STEP_HEIGHT * (17.5f * STEP_HEIGHT)
 
static constexpr f32 MIN_HEIGHT_OFFSET = 0.5f * (17.5f * STEP_HEIGHT)
 

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 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)
 
- 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 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 Typedef Documentation

◆ CheckPointFunc

template<typename T >
using Field::ObjectEscalator::CheckPointFunc
private
Initial value:
bool(ObjColMgr::*)(const EGG::Vector3f &pos,
const EGG::Vector3f &prevPos, KCLTypeMask mask, T *info, KCLTypeMask *maskOut)
A 3D float vector.
Definition Vector.hh:88

Definition at line 99 of file ObjectEscalator.hh.

◆ CheckSphereFunc

template<typename T >
using Field::ObjectEscalator::CheckSphereFunc
private
Initial value:
bool(ObjColMgr::*)(f32 radius, const EGG::Vector3f &pos,
const EGG::Vector3f &prevPos, KCLTypeMask mask, T *info, KCLTypeMask *maskOut)

Definition at line 104 of file ObjectEscalator.hh.

◆ ShouldCheckFunc

using Field::ObjectEscalator::ShouldCheckFunc = bool (ObjectEscalator::*)() const
private

Definition at line 95 of file ObjectEscalator.hh.

Constructor & Destructor Documentation

◆ ObjectEscalator()

Field::ObjectEscalator::ObjectEscalator ( const System::MapdataGeoObj & params,
bool reverse = false )
0x807FFB20

Definition at line 13 of file ObjectEscalator.cc.

Member Function Documentation

◆ calc()

void Field::ObjectEscalator::calc ( )
overridevirtual0x808008FC

Reimplemented from Field::ObjectBase.

Definition at line 45 of file ObjectEscalator.cc.

◆ calcSpeed()

f32 Field::ObjectEscalator::calcSpeed ( s32 t)
nodiscardprivate0x80800FBC

Definition at line 369 of file ObjectEscalator.cc.

◆ calcStepFactor()

f32 Field::ObjectEscalator::calcStepFactor ( s32 t)
nodiscardprivate0x80800ABC

Definition at line 294 of file ObjectEscalator.cc.

◆ checkCollision()

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

Reimplemented from Field::ObjectKCL.

Definition at line 191 of file ObjectEscalator.cc.

◆ checkCollisionCached()

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

Reimplemented from Field::ObjectKCL.

Definition at line 225 of file ObjectEscalator.cc.

◆ checkPointCachedFull()

bool Field::ObjectEscalator::checkPointCachedFull ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803358

Implements Field::ObjectDrivable.

Definition at line 136 of file ObjectEscalator.cc.

◆ checkPointCachedFullPush()

bool Field::ObjectEscalator::checkPointCachedFullPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x8080344C

Implements Field::ObjectDrivable.

Definition at line 143 of file ObjectEscalator.cc.

◆ checkPointCachedPartial()

bool Field::ObjectEscalator::checkPointCachedPartial ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803170

Implements Field::ObjectDrivable.

Definition at line 120 of file ObjectEscalator.cc.

◆ checkPointCachedPartialPush()

bool Field::ObjectEscalator::checkPointCachedPartialPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803264

Implements Field::ObjectDrivable.

Definition at line 128 of file ObjectEscalator.cc.

◆ checkPointFull()

bool Field::ObjectEscalator::checkPointFull ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803AF8

Implements Field::ObjectDrivable.

Definition at line 69 of file ObjectEscalator.cc.

◆ checkPointFullPush()

bool Field::ObjectEscalator::checkPointFullPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803BEC

Implements Field::ObjectDrivable.

Definition at line 76 of file ObjectEscalator.cc.

◆ checkPointImpl()

template<typename T >
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool Field::ObjectEscalator::checkPointImpl ( ShouldCheckFunc shouldCheckFunc,
CheckPointFunc< T > checkFunc,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
T * info,
KCLTypeMask * maskOut )
nodiscardprivate

Definition at line 260 of file ObjectEscalator.cc.

◆ checkPointPartial()

bool Field::ObjectEscalator::checkPointPartial ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803910

Implements Field::ObjectDrivable.

Definition at line 55 of file ObjectEscalator.cc.

◆ checkPointPartialPush()

bool Field::ObjectEscalator::checkPointPartialPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80803A04

Implements Field::ObjectDrivable.

Definition at line 62 of file ObjectEscalator.cc.

◆ checkSphereCachedFull()

bool Field::ObjectEscalator::checkSphereCachedFull ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80803020

Implements Field::ObjectDrivable.

Definition at line 168 of file ObjectEscalator.cc.

◆ checkSphereCachedFullPush()

bool Field::ObjectEscalator::checkSphereCachedFullPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80803160

Implements Field::ObjectDrivable.

Definition at line 177 of file ObjectEscalator.cc.

◆ checkSphereCachedPartial()

bool Field::ObjectEscalator::checkSphereCachedPartial ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80802DA0

Implements Field::ObjectDrivable.

Definition at line 150 of file ObjectEscalator.cc.

◆ checkSphereCachedPartialPush()

bool Field::ObjectEscalator::checkSphereCachedPartialPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80802EE0

Implements Field::ObjectDrivable.

Definition at line 159 of file ObjectEscalator.cc.

◆ checkSphereFull()

bool Field::ObjectEscalator::checkSphereFull ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x808037C0

Implements Field::ObjectDrivable.

Definition at line 99 of file ObjectEscalator.cc.

◆ checkSphereFullPush()

bool Field::ObjectEscalator::checkSphereFullPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80803900

Implements Field::ObjectDrivable.

Definition at line 107 of file ObjectEscalator.cc.

◆ checkSphereImpl()

template<typename T >
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool Field::ObjectEscalator::checkSphereImpl ( ShouldCheckFunc shouldCheckFunc,
CheckSphereFunc< T > checkFunc,
f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
T * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardprivate

Definition at line 276 of file ObjectEscalator.cc.

◆ checkSpherePartial()

bool Field::ObjectEscalator::checkSpherePartial ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80803540

Implements Field::ObjectDrivable.

Definition at line 83 of file ObjectEscalator.cc.

◆ checkSpherePartialPush()

bool Field::ObjectEscalator::checkSpherePartialPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80803680

Implements Field::ObjectDrivable.

Definition at line 91 of file ObjectEscalator.cc.

◆ colRadiusAdditionalLength()

f32 Field::ObjectEscalator::colRadiusAdditionalLength ( ) const
inlinenodiscardoverridevirtual0x80803CE0

Reimplemented from Field::ObjectKCL.

Definition at line 83 of file ObjectEscalator.hh.

◆ getUpdatedMatrix()

const EGG::Matrix34f & Field::ObjectEscalator::getUpdatedMatrix ( u32 timeOffset)
nodiscardoverridevirtual0x80800A10

Reimplemented from Field::ObjectKCL.

Definition at line 184 of file ObjectEscalator.cc.

◆ id()

ObjectId Field::ObjectEscalator::id ( ) const
inlinenodiscardoverridevirtual0x80803CF0

Reimplemented from Field::ObjectBase.

Definition at line 25 of file ObjectEscalator.hh.

◆ loadFlags()

u32 Field::ObjectEscalator::loadFlags ( ) const
inlinenodiscardoverridevirtual0x80803CF8

Reimplemented from Field::ObjectBase.

Definition at line 30 of file ObjectEscalator.hh.

◆ narrScLocal()

void Field::ObjectEscalator::narrScLocal ( f32 radius,
const EGG::Vector3f & pos,
KCLTypeMask mask,
u32 timeOffset )
overridevirtual0x80802D98

Reimplemented from Field::ObjectDrivable.

Definition at line 114 of file ObjectEscalator.cc.

Member Data Documentation

◆ m_checkColYPosMax

const f32 Field::ObjectEscalator::m_checkColYPosMax
private

Collision checks early return if you are above this height.

Definition at line 130 of file ObjectEscalator.hh.

◆ m_checkColYPosMin

const f32 Field::ObjectEscalator::m_checkColYPosMin
private

Collision checks early return if you are below this height.

Definition at line 131 of file ObjectEscalator.hh.

◆ m_fullSpeedFrames

const std::array<f32, 2> Field::ObjectEscalator::m_fullSpeedFrames
private

When escalator reaches max speed.

Definition at line 136 of file ObjectEscalator.hh.

◆ m_initialPos

EGG::Vector3f Field::ObjectEscalator::m_initialPos
private

Definition at line 123 of file ObjectEscalator.hh.

◆ m_initialRot

EGG::Vector3f Field::ObjectEscalator::m_initialRot
private

Definition at line 124 of file ObjectEscalator.hh.

◆ m_midDuration

const f32 Field::ObjectEscalator::m_midDuration
private

Definition at line 137 of file ObjectEscalator.hh.

◆ m_speed

const std::array<f32, 3> Field::ObjectEscalator::m_speed
private

Velocity for each of the three directions it moves.

Definition at line 129 of file ObjectEscalator.hh.

◆ m_startFrames

const std::array<f32, 2> Field::ObjectEscalator::m_startFrames
private

When the escalator starts accelerating.

Definition at line 135 of file ObjectEscalator.hh.

◆ m_stepDims

EGG::Vector3f Field::ObjectEscalator::m_stepDims
private

Length and height of steps but aligned with its facing direction.

Definition at line 126 of file ObjectEscalator.hh.

◆ m_stepFactor

f32 Field::ObjectEscalator::m_stepFactor
private

Used so that the steps have a tangible height difference on the escalator.

Definition at line 125 of file ObjectEscalator.hh.

◆ m_stillFrames

const std::array<s32, 2> Field::ObjectEscalator::m_stillFrames
private

When escalators change direction (two times)

Definition at line 128 of file ObjectEscalator.hh.

◆ m_stopFrames

const std::array<f32, 2> Field::ObjectEscalator::m_stopFrames
private

When the escalator starts slowing down.

Definition at line 134 of file ObjectEscalator.hh.

◆ m_workMatrix

EGG::Matrix34f Field::ObjectEscalator::m_workMatrix
private

Definition at line 127 of file ObjectEscalator.hh.

◆ MAX_HEIGHT_OFFSET

f32 Field::ObjectEscalator::MAX_HEIGHT_OFFSET = STEP_HEIGHT * (17.5f * STEP_HEIGHT)
staticconstexprprivate

Definition at line 147 of file ObjectEscalator.hh.

◆ MIN_HEIGHT_OFFSET

f32 Field::ObjectEscalator::MIN_HEIGHT_OFFSET = 0.5f * (17.5f * STEP_HEIGHT)
staticconstexprprivate

Definition at line 148 of file ObjectEscalator.hh.

◆ REVERSE_FRAMES_F32

f32 Field::ObjectEscalator::REVERSE_FRAMES_F32 = 240.0f
staticconstexprprivate

Frames the escalator waits before speeding up.

Definition at line 142 of file ObjectEscalator.hh.

◆ STANDSTILL_FRAMES

f32 Field::ObjectEscalator::STANDSTILL_FRAMES = 50.0f
staticconstexprprivate

Definition at line 145 of file ObjectEscalator.hh.

◆ STEP_HEIGHT

f32 Field::ObjectEscalator::STEP_HEIGHT = 10.0f
staticconstexprprivate

Duration of full speed in between the dir changes.

Frames from full speed to still or vice versa

Definition at line 139 of file ObjectEscalator.hh.