Implement Mat4x4::WorldX/Y/Z/IsFinite

This commit is contained in:
2024-02-01 17:17:04 -05:00
parent 6b78a0b731
commit 35fded8ec0
2 changed files with 37 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ namespace LinearAlgebra {
*/
class Matrix4x4 {
public:
// TODO: Implement assertions to ensure matrix bounds are not violated!
enum { Rows = 4 };
enum { Cols = 4 };
@@ -80,6 +81,9 @@ namespace LinearAlgebra {
Vector4 GetRow(int index) const;
Vector4 GetColumn(int index) const;
Vector3 GetRow3(int index) const;
Vector3 GetColumn3(int index) const;
float &At(int row, int col);
float At(int x, int y) const;
@@ -154,9 +158,9 @@ namespace LinearAlgebra {
Vector2 operator * (const Vector2& rhs) const { return this->Transform(rhs);}
Vector3 operator * (const Vector3& rhs) const { return this->Transform(rhs);}
Vector4 operator * (const Vector4& rhs) const { return this->Transform(rhs);}
Vector2 operator * (const Vector2& rhs) const;
Vector3 operator * (const Vector3& rhs) const;
Vector4 operator * (const Vector4& rhs) const;
Matrix4x4 operator * (const Matrix3x3 &rhs) const;