MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xSphereHitsBound

Function xSphereHitsBound

src/SB/Core/x/xCollide.cpp:2359–2371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2357 return false;
2358}
2359
2360U8 xOBBHitsOBB(const xBox& a, const xMat4x3& amat, const xBox& b, const xMat4x3& bmat)
2361{
2362 xVec3 offset = bmat.pos - amat.pos;
2363
2364 xVec3 aoffset = {};
2365 aoffset.x = amat.right.dot(offset);
2366 aoffset.y = amat.up.dot(offset);
2367 aoffset.z = amat.at.dot(offset);
2368
2369 xMat3x3 xmat;
2370 xmat.right.x = amat.right.dot(bmat.right);
2371 xmat.right.y = amat.right.dot(bmat.up);
2372 xmat.right.z = amat.right.dot(bmat.at);
2373 xmat.up.x = amat.up.dot(bmat.right);
2374 xmat.up.y = amat.up.dot(bmat.up);

Callers

nothing calls this directly

Calls 3

xSphereHitsOBBFunction · 0.85
xSphereHitsSphereFunction · 0.70
xSphereHitsBoxFunction · 0.70

Tested by

no test coverage detected