A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectCollisionSphere.hh
1#pragma once
2
3#include "game/field/ObjectCollisionBase.hh"
4
5namespace Field {
6
8public:
9 ObjectCollisionSphere(f32 radius, const EGG::Vector3f &center);
10 ~ObjectCollisionSphere() override;
11
12 void transform(const EGG::Matrix34f &mat, const EGG::Vector3f &scale,
13 const EGG::Vector3f &speed) override;
14 const EGG::Vector3f &getSupport(const EGG::Vector3f &v) const override;
15
17 f32 getBoundingRadius() const override {
18 return m_scaledRadius;
19 }
20
21private:
22 f32 m_radius;
23 EGG::Vector3f m_pos;
24 f32 m_scaledRadius;
25 EGG::Vector3f m_scaledPos;
26 EGG::Vector3f m_worldPos;
27 EGG::Vector3f m_center;
28};
29
30} // namespace Field
A 3 x 4 matrix.
Definition Matrix.hh:8
The base class that all objects' collision inherits from.
Pertains to collision.
A 3D float vector.
Definition Vector.hh:83