A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
RailManager.hh
1#pragma once
2
3#include "game/field/RailInterpolator.hh"
4
5#include <vector>
6
7namespace Field {
8
9// TODO: Inherit EGG::Disposer
11public:
13 const Rail *rail(size_t idx) const {
14 ASSERT(idx < m_rails.size());
15 return m_rails[idx];
16 }
18
19 static RailManager *CreateInstance();
20 static void DestroyInstance();
21
22 static RailManager *Instance() {
23 return s_instance;
24 }
25
26private:
29
30 void createPaths();
31
32 std::vector<Rail *> m_rails;
33 std::span<RailInterpolator *> m_interpolators;
34 u16 m_totalRails;
35 u16 m_interpolatorTotal;
36 u16 m_extraInterplatorCount;
37 u16 m_pointCount;
38 u16 m_cameraPointCount;
39 u16 m_cameraCount;
40
41 static RailManager *s_instance;
42};
43
44} // namespace Field
Pertains to collision.