mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-16 16:57:00 +00:00
@@ -1,9 +1,22 @@
|
||||
#ifndef _COLLISIONUTIL
|
||||
#define _COLLISIONUTIL
|
||||
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
|
||||
class CCollisionInfoList;
|
||||
class CVector3f;
|
||||
|
||||
/* TODO: Figure out a better place for this, borks CBallFilter here, but is needed for CCollidableAABox/Sphere
|
||||
(Best solution would be to find a Tardis and go back and slap the dev responsible for this)
|
||||
static const CVector3f normalTable[6] = {
|
||||
CVector3f(-1.f, 0.f, 0.f),
|
||||
CVector3f(1.f, 0.f, 0.f),
|
||||
CVector3f(0.f, -1.f, 0.f),
|
||||
CVector3f(0.f, 1.f, 0.f),
|
||||
CVector3f(0.f, 0.f, -1.f),
|
||||
CVector3f(0.f, 0.f, 1.f),
|
||||
};
|
||||
*/
|
||||
namespace CollisionUtil {
|
||||
|
||||
void AddAverageToFront(const CCollisionInfoList& in, CCollisionInfoList& out);
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
|
||||
class CSphere {
|
||||
public:
|
||||
CSphere(const CVector3f& pos, float radius) : x0_pos(pos), xc_radius(radius) {}
|
||||
CSphere(const CVector3f& pos, float radius) : x0_center(pos), xc_radius(radius) {}
|
||||
|
||||
CVector3f GetCenter() const { return x0_center; }
|
||||
float GetRadius() const { return xc_radius; }
|
||||
CUnitVector3f GetSurfaceNormal(const CVector3f& v) const;
|
||||
|
||||
private:
|
||||
CVector3f x0_pos;
|
||||
CVector3f x0_center;
|
||||
float xc_radius;
|
||||
};
|
||||
CHECK_SIZEOF(CSphere, 0x10)
|
||||
|
||||
Reference in New Issue
Block a user