2016-04-26 10:40:56 +00:00
|
|
|
#include "CCollidableAABox.hpp"
|
|
|
|
|
2016-06-24 20:09:38 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
const CCollisionPrimitive::Type CCollidableAABox::sType(CCollidableAABox::SetStaticTableIndex, "CCollidableAABox");
|
|
|
|
u32 CCollidableAABox::sTableIndex = -1;
|
|
|
|
|
2016-04-26 10:40:56 +00:00
|
|
|
CCollidableAABox::CCollidableAABox()
|
|
|
|
{
|
2016-06-24 20:09:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
zeus::CAABox CCollidableAABox::Transform(const zeus::CTransform& xf) const
|
|
|
|
{
|
|
|
|
return {xf.origin + x10_aabox.min, xf.origin + x10_aabox.max};
|
|
|
|
}
|
|
|
|
|
|
|
|
u32 CCollidableAABox::GetTableIndex() const
|
|
|
|
{
|
|
|
|
return sTableIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
zeus::CAABox CCollidableAABox::CalculateAABox(const zeus::CTransform& xf) const
|
|
|
|
{
|
|
|
|
return Transform(xf);
|
|
|
|
}
|
|
|
|
|
|
|
|
zeus::CAABox CCollidableAABox::CalculateLocalAABox() const
|
|
|
|
{
|
|
|
|
return x10_aabox;
|
|
|
|
}
|
2016-04-26 10:40:56 +00:00
|
|
|
|
2016-06-24 20:09:38 +00:00
|
|
|
FourCC CCollidableAABox::GetPrimType() const
|
|
|
|
{
|
|
|
|
return SBIG('AABX');
|
|
|
|
}
|
|
|
|
|
|
|
|
CRayCastResult CCollidableAABox::CastRayInternal(const CInternalRayCastStructure &) const
|
|
|
|
{
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
const CCollisionPrimitive::Type& CCollidableAABox::GetType()
|
|
|
|
{
|
|
|
|
return sType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CCollidableAABox::SetStaticTableIndex(u32 index)
|
|
|
|
{
|
|
|
|
sTableIndex = index;
|
|
|
|
}
|
2016-04-26 10:40:56 +00:00
|
|
|
}
|