adding tests for transforming Aabb with Matrix3x4 and fixing bug in implementation

This commit is contained in:
greerdv
2021-04-14 18:25:38 +01:00
parent 2fb2813b48
commit 217009de2b
2 changed files with 62 additions and 1 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ namespace AZ
void Aabb::ApplyMatrix3x4(const Matrix3x4& matrix3x4)
{
const AZ::Vector3 extents = GetExtents();
const AZ::Vector3 center = GetCenter();
const AZ::Vector3 center = matrix3x4 * GetCenter();
AZ::Vector3 newHalfExtents(
0.5f * matrix3x4.GetRowAsVector3(0).GetAbs().Dot(extents),
0.5f * matrix3x4.GetRowAsVector3(1).GetAbs().Dot(extents),