1#pragma once
2
3#include <math/seadVector.h>
4
5namespace al {
6class Rail;
7
8class RailRider {
9public:
10 RailRider(const Rail* rail);
11 void moveToRailStart();
12 void move();
13 void syncPosDir();
14 void setCoord(f32 coord);
15 void moveToRailPoint(s32 point);
16 void moveToRailEnd();
17 void moveToBegin();
18 void moveToGoal();
19 void moveToNearestRail(const sead::Vector3f& position);
20 void reverse();
21 void setMoveGoingStart();
22 void setMoveGoingEnd();
23 void setSpeed(f32 speed);
24 void addSpeed(f32 speed);
25 void scaleSpeed(f32 speed);
26 bool isReachedGoal();
27 bool isReachedRailEnd();
28 bool isReachedRailStart();
29 bool isReachedEdge();
30
31private:
32 const Rail* mRail;
33 sead::Vector3f mPosition = sead::Vector3f::zero;
34 sead::Vector3f mDirection = sead::Vector3f::zero;
35 f32 mCoord = 0.0f;
36 f32 mRate = 0.0f;
37 bool mIsMoveForwards = true;
38};
39} // namespace al
40