Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectCollisionConvexHull.hh
1
#pragma once
2
3
#include "game/field/ObjectCollisionBase.hh"
4
5
namespace
Field
{
6
8
class
ObjectCollisionConvexHull
:
public
ObjectCollisionBase
{
9
public
:
10
ObjectCollisionConvexHull
(
const
std::span<const EGG::Vector3f> &points);
11
~ObjectCollisionConvexHull
()
override
;
12
13
void
transform(
const
EGG::Matrix34f
&mat,
const
EGG::Vector3f
&scale,
14
const
EGG::Vector3f
&speed)
override
;
15
const
EGG::Vector3f
&getSupport(
const
EGG::Vector3f
&v)
const override
;
16
18
f32 getBoundingRadius()
const override
{
19
return
m_worldRadius;
20
}
21
23
virtual
void
setBoundingRadius(f32 val) {
24
m_worldRadius = val;
25
}
26
27
protected
:
28
ObjectCollisionConvexHull
(
size_t
count);
29
30
private
:
31
std::span<EGG::Vector3f> m_points;
32
std::span<EGG::Vector3f> m_worldPoints;
33
f32 m_worldRadius;
34
};
35
36
}
// 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::ObjectCollisionConvexHull
Smallest convex shape that encloses a given set of points.
Definition
ObjectCollisionConvexHull.hh:8
Field::ObjectCollisionConvexHull::ObjectCollisionConvexHull
ObjectCollisionConvexHull(const std::span< const EGG::Vector3f > &points)
Creates a convex hull with the provided points.
Definition
ObjectCollisionConvexHull.cc:10
Field
Pertains to collision.
Definition
BoxColManager.cc:8
EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:83
game
field
ObjectCollisionConvexHull.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0