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

@@ -428,4 +428,16 @@ namespace LinearAlgebra {
m.SetRow(3, 0,0,0,1);
return m;
}
Vector4 Matrix4x4::GetRow(int index) const {
return { At(index, 0), At(index, 1), At(index, 2), At(index, 3)};
}
Vector4 Matrix4x4::GetColumn(int index) const {
return { At(0, index), At(1, index), At(2, index), At(3, index)};
}
Vector3 Matrix4x4::GetRow3(int index) const {
return Vector3{ At(index, 0), At(index, 1), At(index, 2)};
}
}