18 ChangingDirection = 2,
24 virtual void init(f32 t,
u32 idx) = 0;
25 virtual Status calc() = 0;
26 virtual void setCurrVel(f32 speed) = 0;
28 virtual f32 getCurrVel() = 0;
29 virtual void evalCubicBezierOnPath(f32 t,
EGG::Vector3f &currDir,
31 virtual void getPathLocation(f32 t, s16 &idx, f32 &len) = 0;
33 void setPerPointVelocities(
bool isSet) {
34 m_usePerPointVelocities = isSet;
42 [[nodiscard]]
const EGG::Vector3f &floorNrm(
size_t idx)
const;
43 [[nodiscard]] f32 railLength()
const;
46 ASSERT(
static_cast<size_t>(m_currPointIdx) < m_points.size());
47 return m_points[m_currPointIdx];
55 return m_curTangentDir;
58 [[nodiscard]]
bool isMovementDirectionForward()
const {
59 return m_movementDirectionForward;
64 void calcVelocities();
65 [[nodiscard]]
bool shouldChangeDirection()
const;
66 void calcDirectionChange();
67 void calcNextIndices();
71 std::span<System::MapdataPointInfo::Point> m_points;
74 bool m_usePerPointVelocities;
82 bool m_movementDirectionForward;
119 void init(f32 t,
u32 idx)
override;
120 Status calc()
override;
121 void setCurrVel(f32 speed)
override;
124 [[nodiscard]] f32 getCurrVel()
override {
130 void getPathLocation(f32 t, s16 &idx, f32 &len)
override;
138 [[nodiscard]] f32 calcT(f32 t)
const;
139 void calcNextSegment();
141 std::span<RailSplineTransition> m_transitions;
142 u32 m_estimatorSampleCount;
144 std::span<f32> m_pathPercentages;