mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
Common: add convenience function to convert a Quaternion to a Matrix44
This commit is contained in:
parent
4740c2a882
commit
544692f96a
@ -269,6 +269,11 @@ Matrix44 Matrix44::FromMatrix33(const Matrix33& m33)
|
|||||||
return mtx;
|
return mtx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Matrix44 Matrix44::FromQuaternion(const Quaternion& q)
|
||||||
|
{
|
||||||
|
return FromMatrix33(Matrix33::FromQuaternion(q));
|
||||||
|
}
|
||||||
|
|
||||||
Matrix44 Matrix44::FromArray(const std::array<float, 16>& arr)
|
Matrix44 Matrix44::FromArray(const std::array<float, 16>& arr)
|
||||||
{
|
{
|
||||||
Matrix44 mtx;
|
Matrix44 mtx;
|
||||||
|
@ -402,6 +402,7 @@ class Matrix44
|
|||||||
public:
|
public:
|
||||||
static Matrix44 Identity();
|
static Matrix44 Identity();
|
||||||
static Matrix44 FromMatrix33(const Matrix33& m33);
|
static Matrix44 FromMatrix33(const Matrix33& m33);
|
||||||
|
static Matrix44 FromQuaternion(const Quaternion& q);
|
||||||
static Matrix44 FromArray(const std::array<float, 16>& arr);
|
static Matrix44 FromArray(const std::array<float, 16>& arr);
|
||||||
|
|
||||||
static Matrix44 Translate(const Vec3& vec);
|
static Matrix44 Translate(const Vec3& vec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user