Fixed transports.
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Framework.GameMath
|
||||
// M^-1 * (point - _corner[0]) = point in unit cube's object space
|
||||
// compute the inverse of M
|
||||
Matrix4x4.Invert(M, out M);
|
||||
Vector3 osPoint = Vector3.Transform(point - Corner(0), M);
|
||||
Vector3 osPoint = Vector3.TransformNormal(point - Corner(0), M);
|
||||
|
||||
return (osPoint.X >= 0) && (osPoint.Y >= 0) && (osPoint.Z >= 0) &&
|
||||
(osPoint.X <= 1) && (osPoint.Y <= 1) && (osPoint.Z <= 1);
|
||||
|
||||
@@ -297,7 +297,7 @@ public static class MathFunctions
|
||||
rotation.M31 * box._center.GetAt(0) + rotation.M32 * box._center.GetAt(1) + rotation.M33 * box._center.GetAt(2) + translation.GetAt(2));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
box._edgeVector[i] = Vector3.Transform(box._edgeVector[i], rotation);
|
||||
box._edgeVector[i] = Vector3.TransformNormal(box._edgeVector[i], rotation);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user