metaforce/Runtime/Collision/CCollisionInfo.cpp

29 lines
773 B
C++
Raw Permalink Normal View History

#include "Runtime/Collision/CCollisionInfo.hpp"
#include <utility>
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
CCollisionInfo CCollisionInfo::GetSwapped() const {
CCollisionInfo ret;
ret.x0_point = x0_point;
ret.xc_extentX = xc_extentX;
ret.x30_valid = x30_valid;
ret.x31_hasExtents = x31_hasExtents;
ret.x38_materialLeft = x40_materialRight;
ret.x40_materialRight = x38_materialLeft;
ret.x48_normalLeft = x54_normalRight;
ret.x54_normalRight = x48_normalLeft;
return ret;
}
2018-12-08 05:30:43 +00:00
void CCollisionInfo::Swap() {
x48_normalLeft = -x48_normalLeft;
x54_normalRight = -x54_normalRight;
std::swap(x38_materialLeft, x40_materialRight);
}
2018-12-08 05:30:43 +00:00
zeus::CVector3f CCollisionInfo::GetExtreme() const { return x0_point + xc_extentX + x18_extentY + x24_extentZ; }
2021-04-10 08:42:06 +00:00
} // namespace metaforce