Add more utilities for using Matrix3x3

This commit is contained in:
Wojciech Figat
2022-04-04 17:09:47 +02:00
parent 52bb5803b3
commit 3ded5326a2
8 changed files with 95 additions and 72 deletions

View File

@@ -113,6 +113,12 @@ public:
Platform::MemoryCopy(Raw, values, sizeof(float) * 9);
}
/// <summary>
/// Initializes a new instance of the <see cref="Matrix3x3"/> struct.
/// </summary>
/// <param name="matrix">The 4 by 4 matrix to initialize from with rotation and scale (translation is skipped).</param>
explicit Matrix3x3(const Matrix& matrix);
public:
String ToString() const;
@@ -255,6 +261,11 @@ public:
Transpose(*this, *this);
}
/// <summary>
/// Removes any scaling from the matrix by performing the normalization (each row magnitude is 1).
/// </summary>
void NormalizeScale();
public:
/// <summary>