metaforce/Runtime/Collision/CCollidableAABox.hpp

39 lines
1.4 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-26 10:40:56 +00:00
#include "Runtime/GCNTypes.hpp"
#include "Runtime/Collision/CCollisionPrimitive.hpp"
#include <zeus/CAABox.hpp>
2016-04-26 10:40:56 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
namespace Collide {
bool AABox_AABox(const CInternalCollisionStructure&, CCollisionInfoList&);
bool AABox_AABox_Bool(const CInternalCollisionStructure&);
2018-12-08 05:30:43 +00:00
} // namespace Collide
2018-12-08 05:30:43 +00:00
class CCollidableAABox : public CCollisionPrimitive {
static u32 sTableIndex;
2016-06-24 20:09:38 +00:00
2018-12-08 05:30:43 +00:00
zeus::CAABox x10_aabox;
2016-04-26 10:40:56 +00:00
public:
2018-12-08 05:30:43 +00:00
CCollidableAABox();
CCollidableAABox(const zeus::CAABox&, const CMaterialList&);
zeus::CAABox Transform(const zeus::CTransform&) const;
u32 GetTableIndex() const override;
zeus::CAABox CalculateAABox(const zeus::CTransform&) const override;
zeus::CAABox CalculateLocalAABox() const override;
FourCC GetPrimType() const override;
CRayCastResult CastRayInternal(const CInternalRayCastStructure&) const override;
2018-12-31 08:37:52 +00:00
const zeus::CAABox& GetBox() const { return x10_aabox; }
zeus::CAABox& Box() { return x10_aabox; }
2019-08-11 15:14:52 +00:00
void SetBox(const zeus::CAABox& box) { x10_aabox = box; }
2018-12-08 05:30:43 +00:00
static const CCollisionPrimitive::Type& GetType();
static void SetStaticTableIndex(u32 index);
static bool CollideMovingAABox(const CInternalCollisionStructure&, const zeus::CVector3f&, double&, CCollisionInfo&);
static bool CollideMovingSphere(const CInternalCollisionStructure&, const zeus::CVector3f&, double&, CCollisionInfo&);
2016-04-26 10:40:56 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde