2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-06-24 20:09:38 +00:00
|
|
|
|
|
|
|
#include "CCollisionPrimitive.hpp"
|
2017-03-01 03:42:06 +00:00
|
|
|
#include "zeus/CSphere.hpp"
|
2016-06-24 20:09:38 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2017-01-04 04:08:30 +00:00
|
|
|
namespace Collide
|
|
|
|
{
|
|
|
|
bool Sphere_AABox(const CInternalCollisionStructure&, CCollisionInfoList&);
|
|
|
|
bool Sphere_AABox_Bool(const CInternalCollisionStructure&);
|
|
|
|
bool Sphere_Sphere(const CInternalCollisionStructure&, CCollisionInfoList&);
|
|
|
|
bool Sphere_Sphere_Bool(const CInternalCollisionStructure&);
|
|
|
|
}
|
2016-06-24 20:09:38 +00:00
|
|
|
class CCollidableSphere : public CCollisionPrimitive
|
|
|
|
{
|
|
|
|
static const Type sType;
|
|
|
|
static u32 sTableIndex;
|
|
|
|
|
2017-03-01 03:42:06 +00:00
|
|
|
zeus::CSphere x10_sphere;
|
|
|
|
|
2017-01-04 04:08:30 +00:00
|
|
|
public:
|
2017-03-01 03:42:06 +00:00
|
|
|
CCollidableSphere(const zeus::CSphere&, const CMaterialList&);
|
|
|
|
|
|
|
|
const zeus::CSphere& GetSphere() const;
|
2017-09-30 03:45:57 +00:00
|
|
|
void SetSphereCenter(const zeus::CVector3f& center);
|
2017-06-18 01:58:13 +00:00
|
|
|
zeus::CSphere Transform(const zeus::CTransform& xf) const;
|
2017-03-01 03:42:06 +00:00
|
|
|
|
2016-06-24 20:09:38 +00:00
|
|
|
virtual u32 GetTableIndex() const;
|
|
|
|
virtual zeus::CAABox CalculateAABox(const zeus::CTransform&) const;
|
|
|
|
virtual zeus::CAABox CalculateLocalAABox() const;
|
|
|
|
virtual FourCC GetPrimType() const;
|
|
|
|
virtual CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const;
|
|
|
|
|
2016-06-24 21:30:25 +00:00
|
|
|
static const Type& GetType();
|
2016-06-24 20:09:38 +00:00
|
|
|
static void SetStaticTableIndex(u32 index);
|
2017-01-04 04:08:30 +00:00
|
|
|
static bool CollideMovingAABox(const CInternalCollisionStructure&, const zeus::CVector3f&, double&,
|
|
|
|
CCollisionInfo&);
|
|
|
|
static bool CollideMovingSphere(const CInternalCollisionStructure&, const zeus::CVector3f&, double&,
|
2017-03-01 03:42:06 +00:00
|
|
|
CCollisionInfo&);
|
2017-03-29 02:51:12 +00:00
|
|
|
static bool Sphere_AABox_Bool(const zeus::CSphere& sphere, const zeus::CAABox& aabb);
|
2016-06-24 20:09:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|