Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
JugemMove.hh
1
#pragma once
2
3
#include "game/kart/KartObject.hh"
4
5
namespace
Kinoko::Field
{
6
8
class
JugemMove {
9
public
:
10
JugemMove(
const
Kart::KartObject
*kartObj);
11
~JugemMove();
12
13
void
init();
14
void
calc();
15
17
void
setPos(
const
EGG::Vector3f
&pos,
bool
transPos) {
18
m_pos = pos;
19
20
if
(transPos) {
21
m_transPos = pos;
22
}
23
}
24
25
void
setForwardFromKartObjPosDelta(
bool
set124);
26
void
setForwardFromKartObjMainRot(
bool
set124);
27
29
void
setAnchorPos(
const
EGG::Vector3f
&v) {
30
m_anchorPos = v;
31
}
32
33
void
setRiseVel(
const
EGG::Vector3f
&v) {
34
m_riseVel
= v;
35
}
36
37
void
setAwayOrDescending(
bool
isSet) {
38
m_isAwayOrDescending = isSet;
39
}
40
41
void
setDescending(
bool
isSet) {
42
m_isDescending = isSet;
43
}
44
45
void
setRising(
bool
isSet) {
46
m_isRising = isSet;
47
}
48
49
const
EGG::Vector3f
&transPos()
const
{
50
return
m_transPos;
51
}
52
53
const
EGG::Matrix34f
&transform()
const
{
54
return
m_transform;
55
}
56
57
private
:
58
EGG::Matrix34f
calcOrthonormalBasis();
59
EGG::Vector3f
calcOscillation(
const
EGG::Matrix34f
&mat);
60
[[nodiscard]]
EGG::Matrix34f
FUN_807202BC();
61
62
[[nodiscard]]
static
EGG::Vector3f
Interpolate(f32 t,
const
EGG::Vector3f
&v0,
63
const
EGG::Vector3f
&v1) {
64
return
v0 + (v1 - v0) * t;
65
}
66
67
const
Kart::KartObject
*m_kartObj;
68
EGG::Vector3f
m_pos;
69
EGG::Vector3f
m_transPos;
70
EGG::Vector3f
m_anchorPos;
71
EGG::Matrix34f
m_28;
72
EGG::Matrix34f
m_58;
73
EGG::Matrix34f
m_88;
74
EGG::Matrix34f
m_transform;
75
f32
m_phaseX
;
76
f32
m_phaseY
;
77
EGG::Vector3f
m_lastKartObjPos;
78
EGG::Vector3f
m_velDir;
79
EGG::Vector3f
m_riseVel
;
80
EGG::Vector3f
m_dir;
81
EGG::Vector3f
m_currForward
;
82
EGG::Vector3f
m_targetForward
;
83
f32 m_forwardInterpRate;
84
bool
m_isAwayOrDescending;
85
f32 m_velDirInterpRate;
86
bool
m_isDescending;
87
bool
m_isRising;
88
};
89
90
}
// namespace Kinoko::Field
Kinoko::EGG::Matrix34f
A 3 x 4 matrix.
Definition
Matrix.hh:10
Kinoko::Field::JugemMove::m_phaseY
f32 m_phaseY
Up/down oscillation phase.
Definition
JugemMove.hh:76
Kinoko::Field::JugemMove::m_riseVel
EGG::Vector3f m_riseVel
Velocity of Lakitu once he leaves by rising upwards.
Definition
JugemMove.hh:79
Kinoko::Field::JugemMove::m_phaseX
f32 m_phaseX
Left/right oscillation phase.
Definition
JugemMove.hh:75
Kinoko::Field::JugemMove::m_targetForward
EGG::Vector3f m_targetForward
The direction that Lakitu wants to move to.
Definition
JugemMove.hh:82
Kinoko::Field::JugemMove::m_currForward
EGG::Vector3f m_currForward
The current direction that Lakitu is at.
Definition
JugemMove.hh:81
Kinoko::Kart::KartObject
The highest level abstraction for a kart.
Definition
KartObject.hh:11
Kinoko::Field
Pertains to collision.
Definition
BoxColManager.cc:8
Kinoko::EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:107
game
field
jugem
JugemMove.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0