A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
CollisionInfo.hh
Go to the documentation of this file.
1#pragma once
2
4
6#include <egg/math/Matrix.hh>
7
8namespace Kinoko::Field {
9
21
22 void reset();
23 void updateBBox(const EGG::Vector3f &offset);
24 void transformInfo(const CollisionInfoPartial &rhs, const EGG::Matrix34f &mtx);
25};
26
50
51} // namespace Kinoko::Field
A 3 x 4 matrix.
Definition Matrix.hh:10
Pertains to collision.
float f32
Definition Memory.hh:21
A representation of a bounding cuboid.
Definition BoundBox.hh:37
A 3D float vector.
Definition Vector.hh:108
Stores partial information pertaining to a collision.
void updateBBox(const EGG::Vector3f &offset)
Expands the bounding box to include the provided position vector.
void transformInfo(const CollisionInfoPartial &rhs, const EGG::Matrix34f &mtx)
Maps the provided collision info from local to world space based on the provided transformation matri...
EGG::Vector3f tangentOff
The net "push out" vector.
EGG::BoundBox3f bbox
Bounding box of "push out" vectors.
void reset()
Initializes the bounding box to zero.
Stores information pertaining to a collision.
void updateBBox(const EGG::Vector3f &offset)
Expands the bounding box to include the provided position vector.
EGG::Vector3f roadVelocity
Velocity induced by moving object collisions.
f32 wallDist
Distance from the colliding wall tri.
void updateFloor(f32 dist, const EGG::Vector3f &fnrm)
Updates the floor collision info if the provided distance is closer than the currently tracked floor ...
EGG::Vector3f wallNrm
Colliding wall face's normal vector.
EGG::Vector3f tangentOff
The net "push out" vector.
void updateWall(f32 dist, const EGG::Vector3f &fnrm)
Updates the wall collision info if the provided distance is closer than the currently tracked wall co...
EGG::Vector3f floorNrm
Colliding floor's up vector.
EGG::BoundBox3f bbox
Bounding box of "push out" vectors.
f32 perpendicularity
Measures how much two colliding wall normals diverge.
f32 movingFloorDist
Distance from the colliding moving floor tri.
void update(f32 dist, const EGG::Vector3f &offset, const EGG::Vector3f &fnrm, KCLTypeMask mask)
Updates members to reflect a new collision.
f32 floorDist
Distance from the colliding floor tri.
void reset()
Sets all members to their default values.
void transformInfo(const CollisionInfo &rhs, const EGG::Matrix34f &mtx, const EGG::Vector3f &v)
Maps the provided collision info from local to world space based on the provided transformation matri...