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

Description

Definition at line 76 of file Rail.hh.

Inheritance diagram for Field::RailLine:

Public Member Functions

 RailLine (u16 idx, System::MapdataPointInfo *info)
 
s32 getEstimatorSampleCount () const override
 
f32 getEstimatorStep () const override
 
const std::span< f32 > & getPathPercentages () const override
 In the base game we return a nullptr. To mimic this, return an empty vector.
 
- Public Member Functions inherited from Field::Rail
 Rail (u16 idx, System::MapdataPointInfo *info)
 
virtual ~Rail ()
 
void addPoint (f32 scale, const EGG::Vector3f &point)
 
void checkSphereFull ()
 
u16 pointCount () const
 
bool isOscillating () const
 
const std::span< System::MapdataPointInfo::Point > & points () const
 
const EGG::Vector3fpointPos (u16 idx) const
 
const EGG::Vector3ffloorNrm (u16 idx) const
 

Private Member Functions

f32 getPathLength () const override
 
const std::span< RailLineTransition > & getLinearTransitions () const override
 
const std::span< RailSplineTransition > & getSplineTransitions () const override
 In the base game we return a nullptr. To mimic this, return an empty vector.
 
void onPointsChanged () override
 
void onPointAdded () override
 

Private Attributes

u16 m_dirCount
 
std::span< RailLineTransitionm_transitions
 
f32 m_pathLength
 

Additional Inherited Members

- Protected Member Functions inherited from Field::Rail
- Protected Attributes inherited from Field::Rail
u16 m_pointCount
 
bool m_isOscillating
 
std::span< System::MapdataPointInfo::Pointm_points
 
f32 m_someScale
 

Constructor & Destructor Documentation

◆ RailLine()

Field::RailLine::RailLine ( u16 idx,
System::MapdataPointInfo * info )
0x806EF9B4

Definition at line 59 of file Rail.cc.

◆ ~RailLine()

Field::RailLine::~RailLine ( )
override0x806EFD6C

Definition at line 82 of file Rail.cc.

Member Function Documentation

◆ getEstimatorSampleCount()

s32 Field::RailLine::getEstimatorSampleCount ( ) const
inlinenodiscardoverridevirtual0x806F09A8

Implements Field::Rail.

Definition at line 82 of file Rail.hh.

◆ getEstimatorStep()

f32 Field::RailLine::getEstimatorStep ( ) const
inlinenodiscardoverridevirtual0x806F099C

Implements Field::Rail.

Definition at line 87 of file Rail.hh.

◆ getLinearTransitions()

const std::span< RailLineTransition > & Field::RailLine::getLinearTransitions ( ) const
inlinenodiscardoverrideprivatevirtual0x806F09B8

Implements Field::Rail.

Definition at line 105 of file Rail.hh.

◆ getPathLength()

f32 Field::RailLine::getPathLength ( ) const
inlinenodiscardoverrideprivatevirtual0x806F09C0

Implements Field::Rail.

Definition at line 100 of file Rail.hh.

◆ getPathPercentages()

const std::span< f32 > & Field::RailLine::getPathPercentages ( ) const
inlinenodiscardoverridevirtual0x806F0994

In the base game we return a nullptr. To mimic this, return an empty vector.

Implements Field::Rail.

Definition at line 93 of file Rail.hh.

◆ getSplineTransitions()

const std::span< RailSplineTransition > & Field::RailLine::getSplineTransitions ( ) const
inlinenodiscardoverrideprivatevirtual0x806F09B0

In the base game we return a nullptr. To mimic this, return an empty vector.

Implements Field::Rail.

Definition at line 111 of file Rail.hh.

◆ onPointAdded()

void Field::RailLine::onPointAdded ( )
inlineoverrideprivatevirtual

Implements Field::Rail.

Definition at line 117 of file Rail.hh.

◆ onPointsChanged()

void Field::RailLine::onPointsChanged ( )
inlineoverrideprivatevirtual

Implements Field::Rail.

Definition at line 116 of file Rail.hh.

Member Data Documentation

◆ m_dirCount

u16 Field::RailLine::m_dirCount
private

Definition at line 119 of file Rail.hh.

◆ m_pathLength

f32 Field::RailLine::m_pathLength
private

Definition at line 121 of file Rail.hh.

◆ m_transitions

std::span<RailLineTransition> Field::RailLine::m_transitions
private

Definition at line 120 of file Rail.hh.