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

Description

Definition at line 124 of file Rail.hh.

Inheritance diagram for Field::RailSpline:

Public Member Functions

 RailSpline (u16 idx, System::MapdataPointInfo *info)
 
s32 getEstimatorSampleCount () const override
 
f32 getEstimatorStep () const override
 
const std::span< f32 > & getPathPercentages () const override
 
- 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
 
void onPointsChanged () override
 
void onPointAdded () override
 
void invalidateTransitions (bool lastOnly)
 
void calcCubicBezierControlPoints (const EGG::Vector3f &p0, const EGG::Vector3f &p1, const EGG::Vector3f &p2, const EGG::Vector3f &p3, s32 count, RailSplineTransition &transition)
 
f32 estimateLength (const RailSplineTransition &transition, s32 count)
 
EGG::Vector3f calcCubicBezierP1 (const EGG::Vector3f &p0, const EGG::Vector3f &p1, const EGG::Vector3f &p2) const
 
EGG::Vector3f calcCubicBezierP2 (const EGG::Vector3f &p0, const EGG::Vector3f &p1, const EGG::Vector3f &p2) const
 
EGG::Vector3f cubicBezier (f32 t, const RailSplineTransition &transition) const
 

Private Attributes

u16 m_transitionCount
 
std::span< RailSplineTransitionm_transitions
 
u32 m_estimatorSampleCount
 
f32 m_estimatorStep
 
std::span< f32 > m_pathPercentages
 
s32 m_segmentCount
 
f32 m_pathLength
 
bool m_doNotAllocatePathPercentages
 

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

◆ RailSpline()

Field::RailSpline::RailSpline ( u16 idx,
System::MapdataPointInfo * info )
0x806ED57C

Definition at line 87 of file Rail.cc.

◆ ~RailSpline()

Field::RailSpline::~RailSpline ( )
override0x806ED828

Definition at line 109 of file Rail.cc.

Member Function Documentation

◆ calcCubicBezierControlPoints()

void Field::RailSpline::calcCubicBezierControlPoints ( const EGG::Vector3f & p0,
const EGG::Vector3f & p1,
const EGG::Vector3f & p2,
const EGG::Vector3f & p3,
s32 count,
RailSplineTransition & transition )
private0x806EE27C

Definition at line 219 of file Rail.cc.

◆ calcCubicBezierP1()

EGG::Vector3f Field::RailSpline::calcCubicBezierP1 ( const EGG::Vector3f & p0,
const EGG::Vector3f & p1,
const EGG::Vector3f & p2 ) const
nodiscardprivate0x806EE408

Definition at line 254 of file Rail.cc.

◆ calcCubicBezierP2()

EGG::Vector3f Field::RailSpline::calcCubicBezierP2 ( const EGG::Vector3f & p0,
const EGG::Vector3f & p1,
const EGG::Vector3f & p2 ) const
nodiscardprivate0x806EE4B8

Definition at line 263 of file Rail.cc.

◆ cubicBezier()

EGG::Vector3f Field::RailSpline::cubicBezier ( f32 t,
const RailSplineTransition & transition ) const
nodiscardprivate0x806EE72C

Definition at line 272 of file Rail.cc.

◆ estimateLength()

f32 Field::RailSpline::estimateLength ( const RailSplineTransition & transition,
s32 count )
nodiscardprivate0x806EE56C

Definition at line 231 of file Rail.cc.

◆ getEstimatorSampleCount()

s32 Field::RailSpline::getEstimatorSampleCount ( ) const
inlinenodiscardoverridevirtual0x806EF994

Implements Field::Rail.

Definition at line 130 of file Rail.hh.

◆ getEstimatorStep()

f32 Field::RailSpline::getEstimatorStep ( ) const
inlinenodiscardoverridevirtual0x806EF98C

Implements Field::Rail.

Definition at line 135 of file Rail.hh.

◆ getLinearTransitions()

const std::span< RailLineTransition > & Field::RailSpline::getLinearTransitions ( ) const
inlinenodiscardoverrideprivatevirtual0x806EF9A4

Implements Field::Rail.

Definition at line 151 of file Rail.hh.

◆ getPathLength()

f32 Field::RailSpline::getPathLength ( ) const
inlinenodiscardoverrideprivatevirtual0x806EF9AC

Implements Field::Rail.

Definition at line 146 of file Rail.hh.

◆ getPathPercentages()

const std::span< f32 > & Field::RailSpline::getPathPercentages ( ) const
inlinenodiscardoverridevirtual0x806EF984

Implements Field::Rail.

Definition at line 140 of file Rail.hh.

◆ getSplineTransitions()

const std::span< RailSplineTransition > & Field::RailSpline::getSplineTransitions ( ) const
inlinenodiscardoverrideprivatevirtual0x806EF99C

Implements Field::Rail.

Definition at line 157 of file Rail.hh.

◆ invalidateTransitions()

void Field::RailSpline::invalidateTransitions ( bool lastOnly)
private0x806EDA04

Definition at line 143 of file Rail.cc.

◆ onPointAdded()

void Field::RailSpline::onPointAdded ( )
overrideprivatevirtual0x806ED960

Implements Field::Rail.

Definition at line 129 of file Rail.cc.

◆ onPointsChanged()

void Field::RailSpline::onPointsChanged ( )
overrideprivatevirtual0x806ED8BC

Implements Field::Rail.

Definition at line 115 of file Rail.cc.

Member Data Documentation

◆ m_doNotAllocatePathPercentages

bool Field::RailSpline::m_doNotAllocatePathPercentages
private

Definition at line 182 of file Rail.hh.

◆ m_estimatorSampleCount

u32 Field::RailSpline::m_estimatorSampleCount
private

Definition at line 177 of file Rail.hh.

◆ m_estimatorStep

f32 Field::RailSpline::m_estimatorStep
private

Definition at line 178 of file Rail.hh.

◆ m_pathLength

f32 Field::RailSpline::m_pathLength
private

Definition at line 181 of file Rail.hh.

◆ m_pathPercentages

std::span<f32> Field::RailSpline::m_pathPercentages
private

Definition at line 179 of file Rail.hh.

◆ m_segmentCount

s32 Field::RailSpline::m_segmentCount
private

Definition at line 180 of file Rail.hh.

◆ m_transitionCount

u16 Field::RailSpline::m_transitionCount
private

Definition at line 175 of file Rail.hh.

◆ m_transitions

std::span<RailSplineTransition> Field::RailSpline::m_transitions
private

Definition at line 176 of file Rail.hh.