A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartTire.hh
1#pragma once
2
3#include "game/kart/KartSuspensionPhysics.hh"
4
5namespace Kart {
6
9class KartTire {
10public:
11 KartTire(KartSuspensionPhysics::TireType tireType, u16 bspWheelIdx);
12 virtual ~KartTire();
13
14 virtual void createPhysics(u16 tireIdx);
15
16 void init(u16 tireIdx);
17 void initBsp();
18
20 [[nodiscard]] WheelPhysics *wheelPhysics() {
21 return m_wheelPhysics;
22 }
24
25protected:
27 u16 m_bspWheelIdx;
28 WheelPhysics *m_wheelPhysics;
29};
30
32class KartTireFront : public KartTire {
33public:
36
37 void createPhysics(u16 tireIdx) override;
38};
39
42public:
45
46 void createPhysics(u16 tireIdx) override;
47};
48
50class KartTireRearBike : public KartTire {
51public:
54
55 void createPhysics(u16 tireIdx) override;
56};
57
58} // namespace Kart
TireType
Every other kart tire is a mirror of the first. Bikes do not leverage this.
A holder for a bike's front tire's physics data.
Definition KartTire.hh:41
A holder for a kart's front tire's physics data.
Definition KartTire.hh:32
A holder for a bike's rear tire's physics data.
Definition KartTire.hh:50
A holder for a wheel's physics data.
Definition KartTire.hh:9
Manages wheel physics and collision checks.
Pertains to kart-related functionality.