A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Kinoko::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 Kinoko::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::Matrix34f & getUpdatedMatrix (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 Kinoko::Field::ObjectKCL
 ObjectKCL (const System::MapdataGeoObj &params)
void createCollision () override
void calcCollisionTransform () override
const EGG::Vector3f & getPosition () 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 Kinoko::Field::ObjectDrivable
 ObjectDrivable (const System::MapdataGeoObj &params)
void load () override
virtual void loadAABB (f32 radius)
Public Member Functions inherited from Kinoko::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 BoxColUnit * getUnit () const
const RailInterpolator * railInterpolator () const
void setPos (const EGG::Vector3f &pos)
void addPos (const EGG::Vector3f &v)
void subPos (const EGG::Vector3f &v)
void setScale (const EGG::Vector3f &scale)
void setScale (f32 scale)
void setRot (const EGG::Vector3f &rot)
void setRotNoFlag (const EGG::Vector3f &rot)
void addRot (const EGG::Vector3f &v)
void subRot (const EGG::Vector3f &v)
void setTransform (const EGG::Matrix34f &mat)
const EGG::Vector3f & pos () const
const EGG::Vector3f & scale () const
const EGG::Vector3f & rot () const
const EGG::Matrix34f & transform () 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 Kinoko::Field::ObjectBase
enum class  eFlags {
  Position = 0 ,
  Rotation = 1 ,
  Matrix = 2 ,
  Scale = 3
}
typedef EGG::TBitFlag< u16, eFlags > Flags
Protected Member Functions inherited from Kinoko::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)
Static Protected Member Functions inherited from Kinoko::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 Kinoko::Field::ObjectKCL
ObjColMgr * m_objColMgr
EGG::Vector3f m_kclMidpoint
f32 m_bboxHalfSideLength
s32 m_lastMtxUpdateFrame
s32 m_lastScaleUpdateFrame
Protected Attributes inherited from Kinoko::Field::ObjectBase
Render::DrawMdl * m_drawMdl
Abstract::g3d::ResFile * m_resFile
ObjectId m_id
RailInterpolator * m_railInterpolator
BoxColUnit * m_boxColUnit
const System::MapdataGeoObj * m_mapObj

Member Typedef Documentation

◆ CheckPointFunc

template<typename T>
using Kinoko::Field::ObjectEscalator::CheckPointFunc
private
Initial value:
bool(ObjColMgr::*)(const EGG::Vector3f &pos,
const EGG::Vector3f &prevPos, KCLTypeMask mask, T *info, KCLTypeMask *maskOut)
Manager for an object's KCL interactions.
Definition ObjColMgr.hh:9
A 3D float vector.
Definition Vector.hh:107

Definition at line 99 of file ObjectEscalator.hh.

◆ CheckSphereFunc

template<typename T>
using Kinoko::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 Kinoko::Field::ObjectEscalator::ShouldCheckFunc = bool (ObjectEscalator::*)() const
private

Definition at line 95 of file ObjectEscalator.hh.

Constructor & Destructor Documentation

◆ ObjectEscalator()

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

Definition at line 13 of file ObjectEscalator.cc.

◆ ~ObjectEscalator()

Kinoko::Field::ObjectEscalator::~ObjectEscalator ( )
overridedefault0x80803D00

Member Function Documentation

◆ calc()

void Kinoko::Field::ObjectEscalator::calc ( )
overridevirtual0x808008FC

Reimplemented from Kinoko::Field::ObjectBase.

Definition at line 45 of file ObjectEscalator.cc.

◆ calcSpeed()

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

Definition at line 368 of file ObjectEscalator.cc.

◆ calcStepFactor()

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

Definition at line 293 of file ObjectEscalator.cc.

◆ checkCollision()

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

Reimplemented from Kinoko::Field::ObjectKCL.

Definition at line 190 of file ObjectEscalator.cc.

◆ checkCollisionCached()

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

Reimplemented from Kinoko::Field::ObjectKCL.

Definition at line 224 of file ObjectEscalator.cc.

◆ checkPointCachedFull()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 135 of file ObjectEscalator.cc.

◆ checkPointCachedFullPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 142 of file ObjectEscalator.cc.

◆ checkPointCachedPartial()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 119 of file ObjectEscalator.cc.

◆ checkPointCachedPartialPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 127 of file ObjectEscalator.cc.

◆ checkPointFull()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 68 of file ObjectEscalator.cc.

◆ checkPointFullPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 75 of file ObjectEscalator.cc.

◆ checkPointImpl()

template<typename T>
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool Kinoko::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 259 of file ObjectEscalator.cc.

◆ checkPointPartial()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 54 of file ObjectEscalator.cc.

◆ checkPointPartialPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 61 of file ObjectEscalator.cc.

◆ checkSphereCachedFull()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 167 of file ObjectEscalator.cc.

◆ checkSphereCachedFullPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 176 of file ObjectEscalator.cc.

◆ checkSphereCachedPartial()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 149 of file ObjectEscalator.cc.

◆ checkSphereCachedPartialPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 158 of file ObjectEscalator.cc.

◆ checkSphereFull()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 98 of file ObjectEscalator.cc.

◆ checkSphereFullPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 106 of file ObjectEscalator.cc.

◆ checkSphereImpl()

template<typename T>
requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
bool Kinoko::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 275 of file ObjectEscalator.cc.

◆ checkSpherePartial()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 82 of file ObjectEscalator.cc.

◆ checkSpherePartialPush()

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

Implements Kinoko::Field::ObjectDrivable.

Definition at line 90 of file ObjectEscalator.cc.

◆ colRadiusAdditionalLength()

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

Reimplemented from Kinoko::Field::ObjectKCL.

Definition at line 83 of file ObjectEscalator.hh.

◆ getUpdatedMatrix()

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

Reimplemented from Kinoko::Field::ObjectKCL.

Definition at line 183 of file ObjectEscalator.cc.

◆ id()

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

Reimplemented from Kinoko::Field::ObjectBase.

Definition at line 25 of file ObjectEscalator.hh.

◆ loadFlags()

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

Reimplemented from Kinoko::Field::ObjectBase.

Definition at line 30 of file ObjectEscalator.hh.

◆ narrScLocal()

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

Reimplemented from Kinoko::Field::ObjectDrivable.

Definition at line 113 of file ObjectEscalator.cc.

Member Data Documentation

◆ m_checkColYPosMax

const f32 Kinoko::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 Kinoko::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> Kinoko::Field::ObjectEscalator::m_fullSpeedFrames
private

When escalator reaches max speed.

Definition at line 136 of file ObjectEscalator.hh.

◆ m_initialPos

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

Definition at line 123 of file ObjectEscalator.hh.

◆ m_initialRot

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

Definition at line 124 of file ObjectEscalator.hh.

◆ m_midDuration

const f32 Kinoko::Field::ObjectEscalator::m_midDuration
private

Definition at line 137 of file ObjectEscalator.hh.

◆ m_speed

const std::array<f32, 3> Kinoko::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> Kinoko::Field::ObjectEscalator::m_startFrames
private

When the escalator starts accelerating.

Definition at line 135 of file ObjectEscalator.hh.

◆ m_stepDims

EGG::Vector3f Kinoko::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 Kinoko::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> Kinoko::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> Kinoko::Field::ObjectEscalator::m_stopFrames
private

When the escalator starts slowing down.

Definition at line 134 of file ObjectEscalator.hh.

◆ m_workMatrix

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

Definition at line 127 of file ObjectEscalator.hh.

◆ MAX_HEIGHT_OFFSET

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

Definition at line 147 of file ObjectEscalator.hh.

◆ MIN_HEIGHT_OFFSET

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

Definition at line 148 of file ObjectEscalator.hh.

◆ REVERSE_FRAMES_F32

f32 Kinoko::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 Kinoko::Field::ObjectEscalator::STANDSTILL_FRAMES = 50.0f
staticconstexprprivate

Definition at line 145 of file ObjectEscalator.hh.

◆ STEP_HEIGHT

f32 Kinoko::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.