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

Description

Definition at line 130 of file RailInterpolator.hh.

Inheritance diagram for Kinoko::Field::RailLinearInterpolator:

Public Member Functions

 RailLinearInterpolator (f32 speed, u32 idx)
void init (f32 t, u32 idx) override
Status calc () override
void setCurrVel (f32 speed) override
f32 getCurrVel () override
void evalCubicBezierOnPath (f32 t, EGG::Vector3f &currDir, EGG::Vector3f &curTangentDir) override
void getPathLocation (f32 t, s16 &idx, f32 &len) override
f32 getCurrSegmentLength () const override
Public Member Functions inherited from Kinoko::Field::RailInterpolator
 RailInterpolator (f32 speed, u32 idx)
void setPerPointVelocities (bool isSet)
void setT (f32 t)
void reverseDirection ()
const EGG::Vector3ffloorNrm (size_t idx) const
f32 railLength () const
const System::MapdataPointInfo::PointcurPoint () const
const System::MapdataPointInfo::PointnextPoint () const
s16 railIdx () const
u16 pointCount () const
f32 speed () const
const EGG::Vector3fcurPos () const
const EGG::Vector3fcurTangentDir () const
f32 currVel () const
f32 segmentT () const
bool isMovementDirectionForward () const
s16 curPointIdx () const
s16 nextPointIdx () const

Private Member Functions

void calcNextSegment ()
EGG::Vector3f lerp (f32 t, u32 currIdx, u32 nextIdx) const

Private Attributes

EGG::Vector3f m_currentDirection
std::span< const RailLineTransitionm_transitions

Additional Inherited Members

Public Types inherited from Kinoko::Field::RailInterpolator
enum class  Status {
  InProgress = 0 ,
  SegmentEnd = 1 ,
  ChangingDirection = 2
}
Protected Member Functions inherited from Kinoko::Field::RailInterpolator
void updateVel ()
void calcVelocities ()
bool shouldChangeDirection () const
void calcDirectionChange ()
void calcNextIndices ()
Protected Attributes inherited from Kinoko::Field::RailInterpolator
s16 m_railIdx
u16 m_pointCount
std::span< const System::MapdataPointInfo::Pointm_points
bool m_isOscillating
f32 m_speed
bool m_usePerPointVelocities
EGG::Vector3f m_curPos
EGG::Vector3f m_curTangentDir
f32 m_currVel
f32 m_prevPointVel
f32 m_nextPointVel
f32 m_currSegmentVel
f32 m_segmentT
bool m_movementDirectionForward
s16 m_currPointIdx
s16 m_nextPointIdx
bool m_4a

Constructor & Destructor Documentation

◆ RailLinearInterpolator()

Kinoko::Field::RailLinearInterpolator::RailLinearInterpolator ( f32 speed,
u32 idx )
0x806EFDC4

Definition at line 103 of file RailInterpolator.cc.

◆ ~RailLinearInterpolator()

Kinoko::Field::RailLinearInterpolator::~RailLinearInterpolator ( )
overridedefault0x806F094C

Member Function Documentation

◆ calc()

RailInterpolator::Status Kinoko::Field::RailLinearInterpolator::calc ( )
overridevirtual0x806F0050

Implements Kinoko::Field::RailInterpolator.

Definition at line 133 of file RailInterpolator.cc.

◆ calcNextSegment()

void Kinoko::Field::RailLinearInterpolator::calcNextSegment ( )
private0x806F0610

Definition at line 226 of file RailInterpolator.cc.

◆ evalCubicBezierOnPath()

void Kinoko::Field::RailLinearInterpolator::evalCubicBezierOnPath ( f32 t,
EGG::Vector3f & currDir,
EGG::Vector3f & curTangentDir )
overridevirtual0x806F02EC

Implements Kinoko::Field::RailInterpolator.

Definition at line 176 of file RailInterpolator.cc.

◆ getCurrSegmentLength()

f32 Kinoko::Field::RailLinearInterpolator::getCurrSegmentLength ( ) const
inlinenodiscardoverridevirtual0x806F050C

Implements Kinoko::Field::RailInterpolator.

Definition at line 149 of file RailInterpolator.hh.

◆ getCurrVel()

f32 Kinoko::Field::RailLinearInterpolator::getCurrVel ( )
inlinenodiscardoverridevirtual0x806F0944

Implements Kinoko::Field::RailInterpolator.

Definition at line 140 of file RailInterpolator.hh.

◆ getPathLocation()

void Kinoko::Field::RailLinearInterpolator::getPathLocation ( f32 t,
s16 & idx,
f32 & len )
overridevirtual0x806F041C

Implements Kinoko::Field::RailInterpolator.

Definition at line 193 of file RailInterpolator.cc.

◆ init()

void Kinoko::Field::RailLinearInterpolator::init ( f32 t,
u32 idx )
overridevirtual0x806EFEAC

Implements Kinoko::Field::RailInterpolator.

Definition at line 112 of file RailInterpolator.cc.

◆ lerp()

EGG::Vector3f Kinoko::Field::RailLinearInterpolator::lerp ( f32 t,
u32 currIdx,
u32 nextIdx ) const
private0x806F0540

Definition at line 250 of file RailInterpolator.cc.

◆ setCurrVel()

void Kinoko::Field::RailLinearInterpolator::setCurrVel ( f32 speed)
overridevirtual0x806EFFF4

Implements Kinoko::Field::RailInterpolator.

Definition at line 170 of file RailInterpolator.cc.

Member Data Documentation

◆ m_currentDirection

EGG::Vector3f Kinoko::Field::RailLinearInterpolator::m_currentDirection
private

Definition at line 158 of file RailInterpolator.hh.

◆ m_transitions

std::span<const RailLineTransition> Kinoko::Field::RailLinearInterpolator::m_transitions
private

Definition at line 159 of file RailInterpolator.hh.