A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectObakeBlock.hh
1#pragma once
2
3#include "game/field/obj/ObjectBase.hh"
4
5#include <egg/math/BoundBox.hh>
6
7namespace Field {
8
10public:
11 enum class FallState {
12 Rest = 0,
13 Falling = 1,
14 FinishedFalling = 2,
15 };
16
18 ~ObjectObakeBlock() override;
19
20 void calc() override;
21
23 void load() override {}
24
26 void createCollision() override {}
27
29 void calcCollisionTransform() override {}
30
32 void setFallState(FallState state) {
33 m_fallState = state;
34 }
36
38 [[nodiscard]] FallState fallState() const {
39 return m_fallState;
40 }
41
42 [[nodiscard]] s32 fallFrame() const {
43 return m_fallFrame;
44 }
46
47private:
49 FallState m_fallState;
51 EGG::Vector3f m_fallVel;
52 EGG::Vector3f m_fallAngVel;
53 EGG::BoundBox3f m_bbox;
55};
56
57} // namespace Field
s32 m_framesFallen
How long the block has been falling for, capped at 256.
const EGG::Vector3f m_initialPos
Position is computed relative to initialPos.
s32 m_fallFrame
Frame the block starts falling, or 0 if it never falls.
Pertains to collision.
A representation of a bounding cuboid.
Definition BoundBox.hh:30
A 3D float vector.
Definition Vector.hh:87