A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectCollisionKart.hh
1#pragma once
2
3#include "game/field/ObjectCollisionConvexHull.hh"
4
5namespace Kinoko {
6
7namespace Kart {
8
9class KartObject;
10
11} // namespace Kart
12
13namespace Field {
14
17public:
20
21 void init(u32 idx);
22
23 size_t checkCollision(const EGG::Matrix34f &mat, const EGG::Vector3f &v);
24
25 [[nodiscard]] static EGG::Vector3f GetHitDirection(u16 objKartHit);
26 [[nodiscard]] static constexpr std::span<const EGG::Vector3f> GetVehicleVertices(
27 Vehicle vehicle);
28 [[nodiscard]] static const EGG::Vector3f &translation(size_t idx);
29
30private:
32 Kart::KartObject *m_kartObject;
33 u32 m_playerIdx;
34};
35
36} // namespace Field
37
38} // namespace Kinoko
A 3 x 4 matrix.
Definition Matrix.hh:10
Smallest convex shape that encloses a given set of points.
Relates a KartObject with its convex hull representation.
static constexpr std::span< const EGG::Vector3f > GetVehicleVertices(Vehicle vehicle)
Helper function to map between a vehicle and its set of convex hull vertices.
The highest level abstraction for a kart.
Definition KartObject.hh:11
A 3D float vector.
Definition Vector.hh:107