diff --git a/include/Nazara/Math/Ray.inl b/include/Nazara/Math/Ray.inl index 2bd72da58..0309d5f35 100644 --- a/include/Nazara/Math/Ray.inl +++ b/include/Nazara/Math/Ray.inl @@ -119,12 +119,12 @@ bool NzRay::Intersect(const NzOrientedBox& orientedBox, const NzMatrix4 T tMin = F(0.0); T tMax = INFINITY; - NzVector3 OBBposition_worldspace(matrix[3].x, matrix[3].y, matrix[3].z); + NzVector3 OBBposition_worldspace(matrix(3, 0), matrix(3, 1), matrix(3, 2)); NzVector3 delta = OBBposition_worldspace - origin; // Test intersection with the 2 planes perpendicular to the OBB's X axis - NzVector3 xaxis(matrix[0].x, matrix[0].y, matrix[0].z); + NzVector3 xaxis(matrix(0, 0), matrix(0, 1), matrix(0, 2)); T e = xaxis.DotProduct(delta); T f = direction.DotProduct(xaxis); @@ -160,7 +160,7 @@ bool NzRay::Intersect(const NzOrientedBox& orientedBox, const NzMatrix4 // Test intersection with the 2 planes perpendicular to the OBB's Y axis // Exactly the same thing than above. - NzVector3 yaxis(matrix[1].x, matrix[1].y, matrix[1].z); + NzVector3 yaxis(matrix(1, 0), matrix(1, 1), matrix(1, 2)); e = yaxis.DotProduct(delta); f = direction.DotProduct(yaxis); @@ -188,7 +188,7 @@ bool NzRay::Intersect(const NzOrientedBox& orientedBox, const NzMatrix4 // Test intersection with the 2 planes perpendicular to the OBB's Z axis // Exactly the same thing than above. - NzVector3 zaxis(matrix[2].x, matrix[2].y, matrix[2].z); + NzVector3 zaxis(matrix(2, 0), matrix(2, 1), matrix(2, 2)); e = zaxis.DotProduct(delta); f = direction.DotProduct(zaxis); @@ -383,7 +383,7 @@ NzString NzRay::ToString() const template NzRay NzRay::Lerp(const NzRay& from, const NzRay& to, T interpolation) { - return NzRay(from.origin.Lerp(to.origin, interpolation), from.direction.Lerp(to.direction, interpolation)); + return NzRay(from.origin.Lerp(to.origin, interpolation), from.direction.Lerp(to.direction, interpolation)); } template