Implement Mat4x4::Swaps

This commit is contained in:
2024-02-01 17:49:05 -05:00
parent 69ca7c5c05
commit 0597b4c937
4 changed files with 106 additions and 20 deletions

View File

@@ -300,5 +300,29 @@ namespace LinearAlgebra {
return elems[row][col];
}
Vector3 Matrix3x3::WorldZ() const {
return GetColumn(2);
}
Vector3 Matrix3x3::WorldY() const {
return GetColumn(1);
}
Vector3 Matrix3x3::WorldX() const {
return GetColumn(0);
}
Matrix3x3 Matrix3x3::FromRS(const Quaternion &rotate, const Vector3 &scale) {
return Matrix3x3(rotate) * Matrix3x3::Scale(scale);
}
Matrix3x3 Matrix3x3::FromRS(const Matrix3x3 &rotate, const Vector3 &scale) {
return rotate * Matrix3x3::Scale(scale);
}
Matrix3x3 Matrix3x3::FromQuat(const Quaternion &orientation) {
return Matrix3x3(orientation);
}
}