Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectCollisionCylinder.hh
1
#pragma once
2
3
#include "game/field/ObjectCollisionBase.hh"
4
5
namespace
Field
{
6
7
class
ObjectCollisionCylinder
:
public
ObjectCollisionBase
{
8
public
:
9
ObjectCollisionCylinder
(f32 radius, f32 height,
const
EGG::Vector3f
¢er);
10
~ObjectCollisionCylinder
()
override
;
11
12
void
transform(
const
EGG::Matrix34f
&mat,
const
EGG::Vector3f
&scale,
13
const
EGG::Vector3f
&speed)
override
;
14
16
const
EGG::Vector3f
&getSupport(
const
EGG::Vector3f
&v)
const override
{
17
return
m_top.
dot
(v) > m_bottom.
dot
(v) ? m_top : m_bottom;
18
}
19
21
f32 getBoundingRadius()
const override
{
22
return
m_worldRadius;
23
}
24
25
private
:
26
f32 m_radius;
27
f32 m_height;
28
EGG::Vector3f
m_pos;
29
30
f32 m_worldRadius;
31
f32 m_worldHeight;
32
EGG::Vector3f
m_worldPos;
33
34
EGG::Vector3f
m_center;
35
EGG::Vector3f
m_top;
36
EGG::Vector3f
m_bottom;
37
};
38
39
}
// namespace Field
EGG::Matrix34f
A 3 x 4 matrix.
Definition
Matrix.hh:8
Field::ObjectCollisionBase
The base class that all objects' collision inherits from.
Definition
ObjectCollisionBase.hh:24
Field::ObjectCollisionCylinder
Definition
ObjectCollisionCylinder.hh:7
Field
Pertains to collision.
Definition
BoxColManager.cc:8
EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:83
EGG::Vector3f::dot
f32 dot(const Vector3f &rhs) const
The dot product between two vectors.
Definition
Vector.hh:182
game
field
ObjectCollisionCylinder.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0