2022-10-13 22:47:30 +00:00
|
|
|
#ifndef _COLLISIONUTIL
|
|
|
|
#define _COLLISIONUTIL
|
|
|
|
|
2022-12-31 22:07:51 +00:00
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
2022-10-13 22:47:30 +00:00
|
|
|
class CCollisionInfoList;
|
2022-10-21 00:26:38 +00:00
|
|
|
class CVector3f;
|
2022-10-13 22:47:30 +00:00
|
|
|
|
2022-12-31 22:07:51 +00:00
|
|
|
/* 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),
|
|
|
|
};
|
|
|
|
*/
|
2022-10-13 22:47:30 +00:00
|
|
|
namespace CollisionUtil {
|
|
|
|
|
|
|
|
void AddAverageToFront(const CCollisionInfoList& in, CCollisionInfoList& out);
|
2022-10-21 00:26:38 +00:00
|
|
|
bool TriBoxOverlap(const CVector3f& boxcenter, const CVector3f& boxhalfsize,
|
|
|
|
const CVector3f& trivert0, const CVector3f& trivert1, const CVector3f& trivert2);
|
2022-10-13 22:47:30 +00:00
|
|
|
|
|
|
|
} // namespace CollisionUtil
|
|
|
|
|
|
|
|
#endif // _COLLISIONUTIL
|