sphere box test

This commit is contained in:
Jorijn van der Graaf 2026-03-07 20:12:33 +01:00
commit 786ffb1ba1

View file

@ -195,7 +195,7 @@ namespace Crafter {
export template<typename T>
constexpr bool IntersectionTestSphereOrientatedBox(Vector<T, 3, 0> spherePos, T sphereRadius, Vector<T, 3, 0> boxSize, MatrixRowMajor<T, 4, 3, 1> boxMat) {
Vector<T, 3, 0> d = spherePos - Vector<T, 3, 0>(boxMat.m[0][4], boxMat.m[1][4], boxMat.m[2][4]);
Vector<T, 3, 0> d = spherePos - Vector<T, 3, 0>(boxMat.m[0][3], boxMat.m[1][3], boxMat.m[2][3]);
T distSq = 0.0f;