A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectDokan.hh
1#pragma once
2
3#include "game/field/obj/ObjectCollidable.hh"
4
5#include "game/kart/Reaction.hh"
6
7namespace Kinoko::Field {
8
9class ObjectDokan final : public ObjectCollidable {
10public:
11 ObjectDokan(const System::MapdataGeoObj &params);
12 ~ObjectDokan() override;
13
14 void init() override;
15 void calc() override;
16
18 [[nodiscard]] LoadFlags loadFlags() const override {
20 }
21
22 void calcCollisionTransform() override;
23
24 Kart::Reaction onCollision(Kart::KartObject *kartObj, Kart::Reaction reactionOnKart,
25 Kart::Reaction reactionOnObj, EGG::Vector3f &hitDepth) override;
26
27private:
28 void calcFloor();
29
30 bool m_b0;
31 EGG::Vector3f m_velocity;
32};
33
34} // namespace Kinoko::Field
EGG::TBitFlag< u8, eLoadFlags > LoadFlags
A bitfield of eLoadFlags that represents the update requirements of the object.
Definition ObjectBase.hh:36
@ Calc
The state of the object should be recalculated every frame.
Definition ObjectBase.hh:30
LoadFlags loadFlags() const override
Returns a bitmask indicating which lifecycle hooks should be called for the object.
The highest level abstraction for a kart.
Definition KartObject.hh:11
Pertains to collision.
Reaction
Represents the different reactions that can occur when a kart collides with an object.
Definition Reaction.hh:8
A 3D float vector.
Definition Vector.hh:107