Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
KartBody.hh
1
#pragma once
2
3
#include "game/kart/KartObjectProxy.hh"
4
#include "game/kart/KartPhysics.hh"
5
6
namespace
Kinoko::Kart
{
7
9
class
KartBody :
protected
KartObjectProxy {
10
public
:
11
KartBody(
KartPhysics
*physics);
12
virtual
~KartBody() {}
13
14
[[nodiscard]]
virtual
EGG::Matrix34f
wheelMatrix
(u16);
15
16
void
reset();
17
void
calcSinkDepth();
18
void
trySetTargetSinkDepth(f32 val);
19
void
calcTargetSinkDepth();
20
23
void
setAngle(f32 val) {
24
m_anAngle
= val;
25
}
27
29
[[nodiscard]]
KartPhysics
*physics()
const
{
30
return
m_physics;
31
}
32
33
[[nodiscard]] f32 sinkDepth()
const
{
34
return
m_sinkDepth
;
35
}
37
38
protected
:
39
KartPhysics
*m_physics;
40
f32
m_anAngle
;
41
f32
m_sinkDepth
;
42
f32 m_targetSinkDepth;
43
};
44
45
class
KartBodyKart :
public
KartBody {
46
public
:
47
KartBodyKart(
KartPhysics
*physics);
48
~KartBodyKart()
override
;
49
};
50
51
class
KartBodyBike :
public
KartBody {
52
public
:
53
KartBodyBike(
KartPhysics
*physics);
54
~KartBodyBike()
override
;
55
56
[[nodiscard]]
EGG::Matrix34f
wheelMatrix
(u16 wheelIdx)
override
;
57
};
58
59
class
KartBodyQuacker :
public
KartBodyBike {
60
public
:
61
KartBodyQuacker(
KartPhysics
*physics);
62
~KartBodyQuacker()
override
;
63
64
[[nodiscard]]
EGG::Matrix34f
wheelMatrix
(u16 wheelIdx)
override
;
65
};
66
67
}
// namespace Kinoko::Kart
Kinoko::EGG::Matrix34f
A 3 x 4 matrix.
Definition
Matrix.hh:10
Kinoko::Kart::KartBodyBike::wheelMatrix
EGG::Matrix34f wheelMatrix(u16 wheelIdx) override
Computes a matrix to represent the rotation of a wheel.
Definition
KartBody.cc:66
Kinoko::Kart::KartBodyQuacker::wheelMatrix
EGG::Matrix34f wheelMatrix(u16 wheelIdx) override
Computes a matrix to represent the rotation of a wheel.
Definition
KartBody.cc:93
Kinoko::Kart::KartBody::m_sinkDepth
f32 m_sinkDepth
Vehicle offset applied downward into collision.
Definition
KartBody.hh:41
Kinoko::Kart::KartBody::wheelMatrix
virtual EGG::Matrix34f wheelMatrix(u16)
Computes a matrix to represent wheel rotation. For Karts, this is wheel-agnostic.
Definition
KartBody.cc:16
Kinoko::Kart::KartBody::m_anAngle
f32 m_anAngle
Definition
KartBody.hh:40
Kinoko::Kart::KartPhysics
Manages the lifecycle of KartDynamics, handles moving floors and trick rotation.
Definition
KartPhysics.hh:13
Kinoko::Kart
Pertains to kart-related functionality.
Definition
BoxColManager.hh:14
game
kart
KartBody.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0