2016-04-17 22:38:05 +00:00
|
|
|
#ifndef __URDE_CGAMECOLLISION_HPP__
|
|
|
|
#define __URDE_CGAMECOLLISION_HPP__
|
2017-01-04 04:08:30 +00:00
|
|
|
#include "zeus/CVector3f.hpp"
|
2017-03-30 22:36:18 +00:00
|
|
|
#include "zeus/CPlane.hpp"
|
2017-03-24 05:30:16 +00:00
|
|
|
#include "rstl.hpp"
|
|
|
|
#include "RetroTypes.hpp"
|
2017-03-30 22:36:18 +00:00
|
|
|
#include "CRayCastResult.hpp"
|
2016-04-17 22:38:05 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CInternalCollisionStructure
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2017-01-04 04:08:30 +00:00
|
|
|
class CActor;
|
|
|
|
class CCollisionInfo;
|
|
|
|
class CCollisionInfoList;
|
|
|
|
class CMaterialList;
|
|
|
|
class CStateManager;
|
2017-03-26 05:53:04 +00:00
|
|
|
class CPhysicsActor;
|
2017-03-30 22:36:18 +00:00
|
|
|
class CMaterialFilter;
|
2017-04-10 06:57:00 +00:00
|
|
|
class CGameArea;
|
2017-03-24 05:30:16 +00:00
|
|
|
|
2016-04-17 22:38:05 +00:00
|
|
|
class CGameCollision
|
|
|
|
{
|
|
|
|
public:
|
2017-01-04 04:08:30 +00:00
|
|
|
static bool NullMovingCollider(const CInternalCollisionStructure&, const zeus::CVector3f&, double&, CCollisionInfo&)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool NullBooleanCollider(const CInternalCollisionStructure&) { return false; }
|
|
|
|
static bool NullCollisionCollider(const CInternalCollisionStructure&, CCollisionInfoList&) { return false; }
|
2016-04-17 22:38:05 +00:00
|
|
|
static void InitCollision();
|
2017-03-26 05:53:04 +00:00
|
|
|
static void Move(CStateManager& mgr, CPhysicsActor& actor, float dt, const rstl::reserved_vector<TUniqueId, 1024>*);
|
2016-04-17 22:38:05 +00:00
|
|
|
|
2017-01-04 04:08:30 +00:00
|
|
|
static bool CanBlock(const CMaterialList&, const zeus::CVector3f&);
|
|
|
|
static bool IsFloor(const CMaterialList&, const zeus::CVector3f&);
|
|
|
|
void SendMaterialMessage(CStateManager&, const CMaterialList&, CActor&);
|
2017-03-30 22:36:18 +00:00
|
|
|
static CRayCastResult RayStaticIntersection(const CStateManager& mgr, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter);
|
2017-04-15 05:49:01 +00:00
|
|
|
static bool RayStaticIntersectionBool(const CStateManager& mgr, const zeus::CVector3f& start,
|
|
|
|
const zeus::CVector3f& dir, float length,
|
|
|
|
const CMaterialFilter& filter);
|
2017-03-30 22:36:18 +00:00
|
|
|
static CRayCastResult RayDynamicIntersection(const CStateManager& mgr, TUniqueId& idOut, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter,
|
|
|
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList);
|
2017-04-15 05:49:01 +00:00
|
|
|
static bool RayDynamicIntersectionBool(const CStateManager& mgr,
|
|
|
|
const zeus::CVector3f& pos, const zeus::CVector3f& dir,
|
|
|
|
const CMaterialFilter& filter,
|
|
|
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList,
|
|
|
|
const CActor* damagee, float length);
|
2017-03-30 22:36:18 +00:00
|
|
|
static CRayCastResult RayWorldIntersection(const CStateManager& mgr, TUniqueId& idOut, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter,
|
|
|
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList);
|
2017-04-15 05:49:01 +00:00
|
|
|
static bool RayStaticIntersectionArea(const CGameArea& area, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter);
|
2017-01-04 04:08:30 +00:00
|
|
|
};
|
2016-04-17 22:38:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGAMECOLLISION_HPP__
|