2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 08:27:42 +00:00

CCollisionSurface: Return std::array by reference from GetVerts()

Same behavior, facilitates better static analysis for out-of-bounds
accesses, and also even allows size querying if necessary.
This commit is contained in:
Lioncash
2020-04-06 06:02:49 -04:00
parent ecf3cfdb49
commit c97fedd989
5 changed files with 16 additions and 12 deletions

View File

@@ -20,9 +20,9 @@ bool RaySphereIntersection_Double(const zeus::CSphere&, const zeus::CVector3f&,
bool RaySphereIntersection(const zeus::CSphere& sphere, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
float mag, float& T, zeus::CVector3f& point);
bool RayTriangleIntersection_Double(const zeus::CVector3f& point, const zeus::CVector3f& dir,
const zeus::CVector3f* verts, double& d);
bool RayTriangleIntersection(const zeus::CVector3f& point, const zeus::CVector3f& dir, const zeus::CVector3f* verts,
float& d);
const std::array<zeus::CVector3f, 3>& verts, double& d);
bool RayTriangleIntersection(const zeus::CVector3f& point, const zeus::CVector3f& dir,
const std::array<zeus::CVector3f, 3>& verts, float& d);
void FilterOutBackfaces(const zeus::CVector3f& vec, const CCollisionInfoList& in, CCollisionInfoList& out);
void FilterByClosestNormal(const zeus::CVector3f& norm, const CCollisionInfoList& in, CCollisionInfoList& out);
bool AABoxAABoxIntersection(const zeus::CAABox& aabb0, const CMaterialList& list0, const zeus::CAABox& aabb1,