A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartObject.hh
1#pragma once
2
3#include "game/kart/KartBody.hh"
4#include "game/kart/KartObjectProxy.hh"
5#include "game/kart/KartParam.hh"
6#include "game/kart/KartPhysics.hh"
7
8namespace Kart {
9
12public:
13 KartObject(KartParam *param);
14 virtual ~KartObject();
15 [[nodiscard]] virtual KartBody *createBody(KartPhysics *physics);
16 virtual void createTires();
17
18 void init();
19 void initImpl();
20 void prepare();
21 void prepareTiresAndSuspensions();
22
23 void createSub();
24 void createModel();
25
26 void calcSub();
27 void calc();
28
29 [[nodiscard]] const KartAccessor *accessor() const;
30
31 [[nodiscard]] static KartObject *Create(Character character, Vehicle vehicle, u8 playerIdx);
32
33protected:
34 KartAccessor m_pointers;
35};
36
38class KartObjectBike : public KartObject {
39public:
41 ~KartObjectBike() override;
42 [[nodiscard]] KartBody *createBody(KartPhysics *physics) override;
43 void createTires() override;
44};
45
46} // namespace Kart
The highest level abstraction for a bike.
Definition KartObject.hh:38
Base class for most kart-related objects.
The highest level abstraction for a kart.
Definition KartObject.hh:11
void prepare()
Sets the initial position and rotation of the kart based off the current track.
Houses stats regarding a given character/vehicle combo.
Definition KartParam.hh:51
Manages the lifecycle of KartDynamics, handles moving floors and trick rotation.
Pertains to kart-related functionality.
Shared between classes who inherit KartObjectProxy so they can access one another.