2016-06-26 01:11:09 +00:00
|
|
|
#include "CCollisionInfo.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2017-06-18 01:58:13 +00:00
|
|
|
CCollisionInfo CCollisionInfo::GetSwapped() const
|
|
|
|
{
|
|
|
|
CCollisionInfo ret;
|
|
|
|
ret.x0_point = x0_point;
|
2017-12-18 02:54:50 +00:00
|
|
|
ret.xc_extentX = xc_extentX;
|
2017-06-18 01:58:13 +00:00
|
|
|
ret.x30_valid = x30_valid;
|
2017-12-18 02:54:50 +00:00
|
|
|
ret.x31_hasExtents = x31_hasExtents;
|
2017-06-18 01:58:13 +00:00
|
|
|
ret.x38_materialLeft = x40_materialRight;
|
|
|
|
ret.x40_materialRight = x38_materialLeft;
|
|
|
|
ret.x48_normalLeft = x54_normalRight;
|
|
|
|
ret.x54_normalRight = x48_normalLeft;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CCollisionInfo::Swap()
|
|
|
|
{
|
|
|
|
x48_normalLeft = -x48_normalLeft;
|
|
|
|
x54_normalRight = -x54_normalRight;
|
|
|
|
std::swap(x38_materialLeft, x40_materialRight);
|
|
|
|
}
|
|
|
|
|
2017-01-04 04:08:30 +00:00
|
|
|
zeus::CVector3f CCollisionInfo::GetExtreme() const
|
|
|
|
{
|
2017-12-18 02:54:50 +00:00
|
|
|
return x0_point + xc_extentX + x18_extentY + x24_extentZ;
|
2017-01-04 04:08:30 +00:00
|
|
|
}
|
|
|
|
|
2016-06-26 01:11:09 +00:00
|
|
|
}
|