SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
BezierRail.hpp
1#pragma once
2
3#include "Game/Util.hpp"
4#include "JSystem/JGeometry/TVec.hpp"
5
6class RailPart;
7
8namespace {
9 void calcRailDirection(TVec3f *, const RailPart *, f32);
10};
11
13public:
14 inline BezierRailPart() { }
15
16 void set(const TVec3f &, const TVec3f &, const TVec3f &, const TVec3f &);
17 void calcPos(TVec3f *, f32) const;
18 void calcVelocity(TVec3f *, f32) const;
19
20 f32 getLength(f32, f32, int);
21 f32 getParam(f32) const;
22
23 f32 getNearestParam(const TVec3f &, f32) const;
24
25 TVec3f _0;
26 TVec3f _C;
27 TVec3f _18;
28 TVec3f _24;
29 f32 mLength; // _30
30};
31
33public:
34
35 BezierRail(const JMapInfoIter &, const JMapInfo *);
36
37 f32 normalizePos(f32, int) const;
38 f32 getPartLength(int) const;
39 void calcPos(TVec3f *, f32) const;
40 void calcDirection(TVec3f *, f32) const;
41 void calcPosDir(TVec3f *, TVec3f *, f32) const;
42 f32 getNearestRailPosCoord(const TVec3f &) const;
43 f32 getRailPosCoord(int) const;
44 void calcCurrentRailCtrlPointIter(JMapInfoIter *, f32, bool) const;
45 void calcRailCtrlPointIter(JMapInfoIter *, int) const;
46 void getIncludedSection(const RailPart **, f32 *, f32, int) const;
47 int getCurrentCtrlPointIndex(f32, bool) const;
48
49 f32 getTotalLength() const;
50
51
52
53 bool mIsClosed; // _0
54 u8 _1;
55 u8 _2;
56 u8 _3;
57 u32 mPointNum; // _4
58 u32 _8;
59 RailPart* mRailParts; // _C
60 f32* _10;
61 JMapInfoIter* mIter; // _14
62 JMapInfo* _18;
63};