Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Matrix4 Struct Reference

A 4x4 matrix type. More...

#include <Matrix.h>

Public Member Functions

 Matrix4 ()=default
 
constexpr Matrix4 (const Matrix4 &other)=default
 
 Matrix4 (const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
 
constexpr Matrix4 (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
 
constexpr Matrix4 (const Matrix3 &mat3)
 
void swap (Matrix4 &other)
 
constexpr Matrix4operator= (const Matrix4 &)=default
 
Float4operator[] (uint32_t row)
 
const Float4operator[] (uint32_t row) const
 
Matrix4 operator* (const Matrix4 &rhs) const
 
Matrix4 operator+ (const Matrix4 &rhs) const
 
Matrix4 operator- (const Matrix4 &rhs) const
 
bool operator== (const Matrix4 &rhs) const
 
bool operator!= (const Matrix4 &rhs) const
 
Matrix4 operator* (float rhs) const
 
 operator bs::Matrix4 () const
 
Matrix4 Transpose () const
 
Float3 GetColumn (uint32_t col) const
 
Float4 GetColumn4D (uint32_t col) const
 
void SetColumn (uint32_t idx, const Float4 &column)
 
void SetRow (uint32_t idx, const Float4 &column)
 
Matrix3 get3x3 () const
 
DLLEXPORT Matrix4 Adjoint () const
 
DLLEXPORT float Determinant () const
 
DLLEXPORT float Determinant3x3 () const
 
DLLEXPORT Matrix4 Inverse () const
 
DLLEXPORT void SetTRS (const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
 
DLLEXPORT void SetInverseTRS (const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
 
DLLEXPORT void Decomposition (Float3 &position, Quaternion &rotation, Float3 &scale) const
 
Float3 GetTranslation () const
 
bool IsAffine () const
 
DLLEXPORT Matrix4 InverseAffine () const
 
Matrix4 ConcatenateAffine (const Matrix4 &other) const
 
Float3 MultiplyAffine (const Float3 &v) const
 
Float4 MultiplyAffine (const Float4 &v) const
 
Float3 MultiplyDirection (const Float3 &v) const
 
Float3 Multiply (const Float3 &v) const
 
Float4 Multiply (const Float4 &v) const
 
DLLEXPORT void MakeView (const Float3 &position, const Quaternion &orientation)
 
DLLEXPORT void MakeProjectionOrtho (float left, float right, float top, float bottom, float near, float far)
 
 VALUE_TYPE (Matrix4)
 

Static Public Member Functions

static DLLEXPORT Matrix4 ProjectionPerspective (const Degree &horzFOV, float aspect, float near, float far, bool positiveZ=false)
 
static DLLEXPORT Matrix4 ProjectionOrthographic (float left, float right, float top, float bottom, float near, float far)
 
static DLLEXPORT Matrix4 View (const Float3 &position, const Quaternion &orientation)
 
static DLLEXPORT Matrix4 FromTRS (const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
 
static DLLEXPORT Matrix4 FromInverseTRS (const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
 

Public Attributes

float m [4][4]
 

Static Public Attributes

static DLLEXPORT const Matrix4 IDENTITY
 
static DLLEXPORT const Matrix4 ZERO
 

Detailed Description

A 4x4 matrix type.

Definition at line 379 of file Matrix.h.

Constructor & Destructor Documentation

◆ Matrix4() [1/5]

Leviathan::Matrix4::Matrix4 ( )
inlinedefault

◆ Matrix4() [2/5]

constexpr Leviathan::Matrix4::Matrix4 ( const Matrix4 other)
inlinedefault

◆ Matrix4() [3/5]

Leviathan::Matrix4::Matrix4 ( const Float3 translation,
const Quaternion rotation,
const Float3 scale 
)
inline

Definition at line 384 of file Matrix.h.

385  {
386  SetTRS(translation, rotation, scale);
387  }
DLLEXPORT void SetTRS(const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
Definition: Matrix.cpp:997

◆ Matrix4() [4/5]

constexpr Leviathan::Matrix4::Matrix4 ( float  m00,
float  m01,
float  m02,
float  m03,
float  m10,
float  m11,
float  m12,
float  m13,
float  m20,
float  m21,
float  m22,
float  m23,
float  m30,
float  m31,
float  m32,
float  m33 
)
inline

Definition at line 389 of file Matrix.h.

391  :
392  m{{m00, m01, m02, m03}, {m10, m11, m12, m13}, {m20, m21, m22, m23},
393  {m30, m31, m32, m33}}
394  {}
float m[4][4]
Definition: Matrix.h:871

◆ Matrix4() [5/5]

constexpr Leviathan::Matrix4::Matrix4 ( const Matrix3 mat3)
inlineexplicit

Creates a 4x4 transformation matrix with a zero translation part from a rotation/scaling 3x3 matrix.

Definition at line 398 of file Matrix.h.

398  :
399  m{{mat3.m[0][0], mat3.m[0][1], mat3.m[0][2], 0.0f},
400  {mat3.m[1][0], mat3.m[1][1], mat3.m[1][2], 0.0f},
401  {mat3.m[2][0], mat3.m[2][1], mat3.m[2][2], 0.0f}, {0.0f, 0.0f, 0.0f, 1.0f}}
402  {}
float m[4][4]
Definition: Matrix.h:871

Member Function Documentation

◆ Adjoint()

DLLEXPORT Matrix4 Matrix4::Adjoint ( ) const

Calculates the adjoint of the matrix.

Definition at line 863 of file Matrix.cpp.

864 {
865  return Matrix4(MINOR(*this, 1, 2, 3, 1, 2, 3), -MINOR(*this, 0, 2, 3, 1, 2, 3),
866  MINOR(*this, 0, 1, 3, 1, 2, 3), -MINOR(*this, 0, 1, 2, 1, 2, 3),
867 
868  -MINOR(*this, 1, 2, 3, 0, 2, 3), MINOR(*this, 0, 2, 3, 0, 2, 3),
869  -MINOR(*this, 0, 1, 3, 0, 2, 3), MINOR(*this, 0, 1, 2, 0, 2, 3),
870 
871  MINOR(*this, 1, 2, 3, 0, 1, 3), -MINOR(*this, 0, 2, 3, 0, 1, 3),
872  MINOR(*this, 0, 1, 3, 0, 1, 3), -MINOR(*this, 0, 1, 2, 0, 1, 3),
873 
874  -MINOR(*this, 1, 2, 3, 0, 1, 2), MINOR(*this, 0, 2, 3, 0, 1, 2),
875  -MINOR(*this, 0, 1, 3, 0, 1, 2), MINOR(*this, 0, 1, 2, 0, 1, 2));
876 }
static float MINOR(const Matrix4 &m, const uint32_t r0, const uint32_t r1, const uint32_t r2, const uint32_t c0, const uint32_t c1, const uint32_t c2)
Definition: Matrix.cpp:855

◆ ConcatenateAffine()

Matrix4 Leviathan::Matrix4::ConcatenateAffine ( const Matrix4 other) const
inline

Concatenate two affine matrices.

Note
Both matrices must be affine.

Definition at line 705 of file Matrix.h.

706  {
707  return Matrix4(
708  m[0][0] * other.m[0][0] + m[0][1] * other.m[1][0] + m[0][2] * other.m[2][0],
709  m[0][0] * other.m[0][1] + m[0][1] * other.m[1][1] + m[0][2] * other.m[2][1],
710  m[0][0] * other.m[0][2] + m[0][1] * other.m[1][2] + m[0][2] * other.m[2][2],
711  m[0][0] * other.m[0][3] + m[0][1] * other.m[1][3] + m[0][2] * other.m[2][3] +
712  m[0][3],
713 
714  m[1][0] * other.m[0][0] + m[1][1] * other.m[1][0] + m[1][2] * other.m[2][0],
715  m[1][0] * other.m[0][1] + m[1][1] * other.m[1][1] + m[1][2] * other.m[2][1],
716  m[1][0] * other.m[0][2] + m[1][1] * other.m[1][2] + m[1][2] * other.m[2][2],
717  m[1][0] * other.m[0][3] + m[1][1] * other.m[1][3] + m[1][2] * other.m[2][3] +
718  m[1][3],
719 
720  m[2][0] * other.m[0][0] + m[2][1] * other.m[1][0] + m[2][2] * other.m[2][0],
721  m[2][0] * other.m[0][1] + m[2][1] * other.m[1][1] + m[2][2] * other.m[2][1],
722  m[2][0] * other.m[0][2] + m[2][1] * other.m[1][2] + m[2][2] * other.m[2][2],
723  m[2][0] * other.m[0][3] + m[2][1] * other.m[1][3] + m[2][2] * other.m[2][3] +
724  m[2][3],
725 
726  0, 0, 0, 1);
727  }
float m[4][4]
Definition: Matrix.h:871

◆ Decomposition()

DLLEXPORT void Matrix4::Decomposition ( Float3 position,
Quaternion rotation,
Float3 scale 
) const

Decompose a Matrix4 to translation, rotation and scale.

Note
This method is unable to decompose all types of matrices, in particular these are the limitations:
  • Only translation, rotation and scale transforms are supported
  • Plain TRS matrices (that aren't composed with other matrices) can always be decomposed
  • Composed TRS matrices can be decomposed ONLY if the scaling factor is uniform

Definition at line 1061 of file Matrix.cpp.

1063 {
1064  Matrix3 m3x3 = get3x3();
1065 
1066  Matrix3 matQ;
1067  Float3 vecU;
1068  m3x3.QDUDecomposition(matQ, scale, vecU);
1069 
1070  rotation = Quaternion(matQ);
1071  position = Float3(m[0][3], m[1][3], m[2][3]);
1072 }
float m[4][4]
Definition: Matrix.h:871
A 3x3 rotation and scale matrix.
Definition: Matrix.h:28
DLLEXPORT void QDUDecomposition(Matrix3 &matQ, Float3 &vecD, Float3 &vecU) const
Definition: Matrix.cpp:445
A Quaternion type to make quaternion specific operations easier to access.
Definition: Quaternion.h:14
Matrix3 get3x3() const
Definition: Matrix.h:619

◆ Determinant()

DLLEXPORT float Matrix4::Determinant ( ) const

Calculates the determinant of the matrix.

Definition at line 878 of file Matrix.cpp.

879 {
880  return m[0][0] * MINOR(*this, 1, 2, 3, 1, 2, 3) -
881  m[0][1] * MINOR(*this, 1, 2, 3, 0, 2, 3) +
882  m[0][2] * MINOR(*this, 1, 2, 3, 0, 1, 3) - m[0][3] * MINOR(*this, 1, 2, 3, 0, 1, 2);
883 }
float m[4][4]
Definition: Matrix.h:871
static float MINOR(const Matrix4 &m, const uint32_t r0, const uint32_t r1, const uint32_t r2, const uint32_t c0, const uint32_t c1, const uint32_t c2)
Definition: Matrix.cpp:855

◆ Determinant3x3()

DLLEXPORT float Matrix4::Determinant3x3 ( ) const

Calculates the determinant of the 3x3 sub-matrix.

Definition at line 885 of file Matrix.cpp.

886 {
887  float cofactor00 = m[1][1] * m[2][2] - m[1][2] * m[2][1];
888  float cofactor10 = m[1][2] * m[2][0] - m[1][0] * m[2][2];
889  float cofactor20 = m[1][0] * m[2][1] - m[1][1] * m[2][0];
890 
891  float det = m[0][0] * cofactor00 + m[0][1] * cofactor10 + m[0][2] * cofactor20;
892 
893  return det;
894 }
float m[4][4]
Definition: Matrix.h:871

◆ FromInverseTRS()

DLLEXPORT Matrix4 Matrix4::FromInverseTRS ( const Float3 translation,
const Quaternion rotation,
const Float3 scale 
)
static

Creates a matrix from inverse translation, rotation and scale.

Note
This is cheaper than setTRS() and then performing inverse().

Definition at line 1224 of file Matrix.cpp.

1226 {
1227  Matrix4 mat;
1228  mat.SetInverseTRS(translation, rotation, scale);
1229 
1230  return mat;
1231 }
DLLEXPORT void SetInverseTRS(const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
Definition: Matrix.cpp:1023
A 4x4 matrix type.
Definition: Matrix.h:379

◆ FromTRS()

DLLEXPORT Matrix4 Matrix4::FromTRS ( const Float3 translation,
const Quaternion rotation,
const Float3 scale 
)
static

Creates a matrix from translation, rotation and scale.

Note
The transformation are applied in scale->rotation->translation order.

Definition at line 1215 of file Matrix.cpp.

1217 {
1218  Matrix4 mat;
1219  mat.SetTRS(translation, rotation, scale);
1220 
1221  return mat;
1222 }
DLLEXPORT void SetTRS(const Float3 &translation, const Quaternion &rotation, const Float3 &scale)
Definition: Matrix.cpp:997
A 4x4 matrix type.
Definition: Matrix.h:379

◆ get3x3()

Matrix3 Leviathan::Matrix4::get3x3 ( ) const
inline

Returns the rotation/scaling part of the matrix as a 3x3 matrix.

Definition at line 619 of file Matrix.h.

620  {
621  Matrix3 m3x3;
622  m3x3.m[0][0] = m[0][0];
623  m3x3.m[0][1] = m[0][1];
624  m3x3.m[0][2] = m[0][2];
625  m3x3.m[1][0] = m[1][0];
626  m3x3.m[1][1] = m[1][1];
627  m3x3.m[1][2] = m[1][2];
628  m3x3.m[2][0] = m[2][0];
629  m3x3.m[2][1] = m[2][1];
630  m3x3.m[2][2] = m[2][2];
631 
632  return m3x3;
633  }
float m[4][4]
Definition: Matrix.h:871

◆ GetColumn()

Float3 Leviathan::Matrix4::GetColumn ( uint32_t  col) const
inline

Returns the specified column of the matrix, ignoring the last row.

Definition at line 585 of file Matrix.h.

586  {
587  assert(col < 4);
588 
589  return Float3(m[0][col], m[1][col], m[2][col]);
590  }
float m[4][4]
Definition: Matrix.h:871

◆ GetColumn4D()

Float4 Leviathan::Matrix4::GetColumn4D ( uint32_t  col) const
inline

Returns the specified column of the matrix.

Definition at line 593 of file Matrix.h.

594  {
595  assert(col < 4);
596 
597  return Float4(m[0][col], m[1][col], m[2][col], m[3][col]);
598  }
float m[4][4]
Definition: Matrix.h:871

◆ GetTranslation()

Float3 Leviathan::Matrix4::GetTranslation ( ) const
inline

Extracts the translation (position) part of the matrix.

Definition at line 677 of file Matrix.h.

678  {
679  return Float3(m[0][3], m[1][3], m[2][3]);
680  }
float m[4][4]
Definition: Matrix.h:871

◆ Inverse()

DLLEXPORT Matrix4 Matrix4::Inverse ( ) const

Calculates the inverse of the matrix.

Definition at line 896 of file Matrix.cpp.

897 {
898  float m00 = m[0][0], m01 = m[0][1], m02 = m[0][2], m03 = m[0][3];
899  float m10 = m[1][0], m11 = m[1][1], m12 = m[1][2], m13 = m[1][3];
900  float m20 = m[2][0], m21 = m[2][1], m22 = m[2][2], m23 = m[2][3];
901  float m30 = m[3][0], m31 = m[3][1], m32 = m[3][2], m33 = m[3][3];
902 
903  float v0 = m20 * m31 - m21 * m30;
904  float v1 = m20 * m32 - m22 * m30;
905  float v2 = m20 * m33 - m23 * m30;
906  float v3 = m21 * m32 - m22 * m31;
907  float v4 = m21 * m33 - m23 * m31;
908  float v5 = m22 * m33 - m23 * m32;
909 
910  float t00 = +(v5 * m11 - v4 * m12 + v3 * m13);
911  float t10 = -(v5 * m10 - v2 * m12 + v1 * m13);
912  float t20 = +(v4 * m10 - v2 * m11 + v0 * m13);
913  float t30 = -(v3 * m10 - v1 * m11 + v0 * m12);
914 
915  float invDet = 1 / (t00 * m00 + t10 * m01 + t20 * m02 + t30 * m03);
916 
917  float d00 = t00 * invDet;
918  float d10 = t10 * invDet;
919  float d20 = t20 * invDet;
920  float d30 = t30 * invDet;
921 
922  float d01 = -(v5 * m01 - v4 * m02 + v3 * m03) * invDet;
923  float d11 = +(v5 * m00 - v2 * m02 + v1 * m03) * invDet;
924  float d21 = -(v4 * m00 - v2 * m01 + v0 * m03) * invDet;
925  float d31 = +(v3 * m00 - v1 * m01 + v0 * m02) * invDet;
926 
927  v0 = m10 * m31 - m11 * m30;
928  v1 = m10 * m32 - m12 * m30;
929  v2 = m10 * m33 - m13 * m30;
930  v3 = m11 * m32 - m12 * m31;
931  v4 = m11 * m33 - m13 * m31;
932  v5 = m12 * m33 - m13 * m32;
933 
934  float d02 = +(v5 * m01 - v4 * m02 + v3 * m03) * invDet;
935  float d12 = -(v5 * m00 - v2 * m02 + v1 * m03) * invDet;
936  float d22 = +(v4 * m00 - v2 * m01 + v0 * m03) * invDet;
937  float d32 = -(v3 * m00 - v1 * m01 + v0 * m02) * invDet;
938 
939  v0 = m21 * m10 - m20 * m11;
940  v1 = m22 * m10 - m20 * m12;
941  v2 = m23 * m10 - m20 * m13;
942  v3 = m22 * m11 - m21 * m12;
943  v4 = m23 * m11 - m21 * m13;
944  v5 = m23 * m12 - m22 * m13;
945 
946  float d03 = -(v5 * m01 - v4 * m02 + v3 * m03) * invDet;
947  float d13 = +(v5 * m00 - v2 * m02 + v1 * m03) * invDet;
948  float d23 = -(v4 * m00 - v2 * m01 + v0 * m03) * invDet;
949  float d33 = +(v3 * m00 - v1 * m01 + v0 * m02) * invDet;
950 
951  return Matrix4(
952  d00, d01, d02, d03, d10, d11, d12, d13, d20, d21, d22, d23, d30, d31, d32, d33);
953 }
float m[4][4]
Definition: Matrix.h:871

◆ InverseAffine()

DLLEXPORT Matrix4 Matrix4::InverseAffine ( ) const

Returns the inverse of the affine matrix.

Note
Matrix must be affine.

Definition at line 955 of file Matrix.cpp.

956 {
957  float m10 = m[1][0], m11 = m[1][1], m12 = m[1][2];
958  float m20 = m[2][0], m21 = m[2][1], m22 = m[2][2];
959 
960  float t00 = m22 * m11 - m21 * m12;
961  float t10 = m20 * m12 - m22 * m10;
962  float t20 = m21 * m10 - m20 * m11;
963 
964  float m00 = m[0][0], m01 = m[0][1], m02 = m[0][2];
965 
966  float invDet = 1 / (m00 * t00 + m01 * t10 + m02 * t20);
967 
968  t00 *= invDet;
969  t10 *= invDet;
970  t20 *= invDet;
971 
972  m00 *= invDet;
973  m01 *= invDet;
974  m02 *= invDet;
975 
976  float r00 = t00;
977  float r01 = m02 * m21 - m01 * m22;
978  float r02 = m01 * m12 - m02 * m11;
979 
980  float r10 = t10;
981  float r11 = m00 * m22 - m02 * m20;
982  float r12 = m02 * m10 - m00 * m12;
983 
984  float r20 = t20;
985  float r21 = m01 * m20 - m00 * m21;
986  float r22 = m00 * m11 - m01 * m10;
987 
988  float m03 = m[0][3], m13 = m[1][3], m23 = m[2][3];
989 
990  float r03 = -(r00 * m03 + r01 * m13 + r02 * m23);
991  float r13 = -(r10 * m03 + r11 * m13 + r12 * m23);
992  float r23 = -(r20 * m03 + r21 * m13 + r22 * m23);
993 
994  return Matrix4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, 0, 0, 0, 1);
995 }
float m[4][4]
Definition: Matrix.h:871

◆ IsAffine()

bool Leviathan::Matrix4::IsAffine ( ) const
inline

Check whether or not the matrix is affine matrix.

Note
An affine matrix is a 4x4 matrix with row 3 equal to (0, 0, 0, 1), meaning no projective coefficients.

Definition at line 688 of file Matrix.h.

689  {
690  return m[3][0] == 0 && m[3][1] == 0 && m[3][2] == 0 && m[3][3] == 1;
691  }
float m[4][4]
Definition: Matrix.h:871

◆ MakeProjectionOrtho()

DLLEXPORT void Matrix4::MakeProjectionOrtho ( float  left,
float  right,
float  top,
float  bottom,
float  near,
float  far 
)

Creates an ortographic projection matrix that scales the part of the view bounded by left, right, top and bottom into [-1, 1] range. If far is non-zero the matrix will also transform the depth into [-1, 1] range, otherwise it will leave it as-is.

Definition at line 1100 of file Matrix.cpp.

1102 {
1103  // Create a matrix that transforms coordinate to normalized device coordinate in range:
1104  // Left -1 - Right 1
1105  // Bottom -1 - Top 1
1106  // Near -1 - Far 1
1107 
1108  float deltaX = right - left;
1109  float deltaY = bottom - top;
1110  float deltaZ = far - near;
1111 
1112  m[0][0] = 2.0F / deltaX;
1113  m[0][1] = 0.0f;
1114  m[0][2] = 0.0f;
1115  m[0][3] = -(right + left) / deltaX;
1116 
1117  m[1][0] = 0.0f;
1118  m[1][1] = -2.0F / deltaY;
1119  m[1][2] = 0.0f;
1120  m[1][3] = (top + bottom) / deltaY;
1121 
1122  m[2][0] = 0.0f;
1123  m[2][1] = 0.0f;
1124 
1125  if(far == 0.0f) {
1126  m[2][2] = 1.0f;
1127  m[2][3] = 0.0f;
1128  } else {
1129  m[2][2] = -2.0F / deltaZ;
1130  m[2][3] = -(far + near) / deltaZ;
1131  }
1132 
1133  m[3][0] = 0.0f;
1134  m[3][1] = 0.0f;
1135  m[3][2] = 0.0f;
1136  m[3][3] = 1.0f;
1137 }
float m[4][4]
Definition: Matrix.h:871

◆ MakeView()

DLLEXPORT void Matrix4::MakeView ( const Float3 position,
const Quaternion orientation 
)

Creates a view matrix and applies optional reflection.

Definition at line 1074 of file Matrix.cpp.

1075 {
1076  // View matrix is:
1077  //
1078  // [ Lx Uy Dz Tx ]
1079  // [ Lx Uy Dz Ty ]
1080  // [ Lx Uy Dz Tz ]
1081  // [ 0 0 0 1 ]
1082  //
1083  // Where T = -(Transposed(Rot) * Pos)
1084 
1085  // This is most efficiently done using 3x3 Matrices
1086  Matrix3 rot;
1087  orientation.ToRotationMatrix(rot);
1088 
1089  // Make the translation relative to new axes
1090  Matrix3 rotT = rot.Transpose();
1091  Float3 trans = (-rotT).Multiply(position);
1092 
1093  // Make final matrix
1094  *this = Matrix4(rotT);
1095  m[0][3] = trans.X;
1096  m[1][3] = trans.Y;
1097  m[2][3] = trans.Z;
1098 }
float m[4][4]
Definition: Matrix.h:871
DLLEXPORT Matrix3 Transpose() const
Definition: Matrix.cpp:35
A 3x3 rotation and scale matrix.
Definition: Matrix.h:28
Float3 Multiply(const Float3 &v) const
Definition: Matrix.h:791
DLLEXPORT void ToRotationMatrix(Matrix3 &matrix) const
Definition: Quaternion.cpp:105

◆ Multiply() [1/2]

Float3 Leviathan::Matrix4::Multiply ( const Float3 v) const
inline

Transform a 3D point by this matrix.

Note
w component of the vector is assumed to be 1. After transformation all components are projected back so that w remains 1.
If your matrix doesn't contain projection components use multiplyAffine() method as it is faster.

Definition at line 791 of file Matrix.h.

792  {
793  Float3 r;
794 
795  float fInvW = 1.0f / (m[3][0] * v.X + m[3][1] * v.Y + m[3][2] * v.Z + m[3][3]);
796 
797  r.X = (m[0][0] * v.X + m[0][1] * v.Y + m[0][2] * v.Z + m[0][3]) * fInvW;
798  r.Y = (m[1][0] * v.X + m[1][1] * v.Y + m[1][2] * v.Z + m[1][3]) * fInvW;
799  r.Z = (m[2][0] * v.X + m[2][1] * v.Y + m[2][2] * v.Z + m[2][3]) * fInvW;
800 
801  return r;
802  }
float m[4][4]
Definition: Matrix.h:871

◆ Multiply() [2/2]

Float4 Leviathan::Matrix4::Multiply ( const Float4 v) const
inline

Transform a 4D vector by this matrix.

Note
If your matrix doesn't contain projection components use multiplyAffine() method as it is faster.

Definition at line 810 of file Matrix.h.

811  {
812  return Float4(m[0][0] * v.X + m[0][1] * v.Y + m[0][2] * v.Z + m[0][3] * v.W,
813  m[1][0] * v.X + m[1][1] * v.Y + m[1][2] * v.Z + m[1][3] * v.W,
814  m[2][0] * v.X + m[2][1] * v.Y + m[2][2] * v.Z + m[2][3] * v.W,
815  m[3][0] * v.X + m[3][1] * v.Y + m[3][2] * v.Z + m[3][3] * v.W);
816  }
float m[4][4]
Definition: Matrix.h:871

◆ MultiplyAffine() [1/2]

Float3 Leviathan::Matrix4::MultiplyAffine ( const Float3 v) const
inline

Transform a plane by this matrix.

Note
Matrix must be affine.Transform a 3D point by this matrix.
Matrix must be affine, if it is not use multiply() method.

Definition at line 754 of file Matrix.h.

755  {
756  return Float3(m[0][0] * v.X + m[0][1] * v.Y + m[0][2] * v.Z + m[0][3],
757  m[1][0] * v.X + m[1][1] * v.Y + m[1][2] * v.Z + m[1][3],
758  m[2][0] * v.X + m[2][1] * v.Y + m[2][2] * v.Z + m[2][3]);
759  }
float m[4][4]
Definition: Matrix.h:871

◆ MultiplyAffine() [2/2]

Float4 Leviathan::Matrix4::MultiplyAffine ( const Float4 v) const
inline

Transform a 4D vector by this matrix.

Note
Matrix must be affine, if it is not use multiply() method.

Definition at line 766 of file Matrix.h.

767  {
768  return Float4(m[0][0] * v.X + m[0][1] * v.Y + m[0][2] * v.Z + m[0][3] * v.W,
769  m[1][0] * v.X + m[1][1] * v.Y + m[1][2] * v.Z + m[1][3] * v.W,
770  m[2][0] * v.X + m[2][1] * v.Y + m[2][2] * v.Z + m[2][3] * v.W, v.W);
771  }
float m[4][4]
Definition: Matrix.h:871

◆ MultiplyDirection()

Float3 Leviathan::Matrix4::MultiplyDirection ( const Float3 v) const
inline

Transform a 3D direction by this matrix.

Definition at line 774 of file Matrix.h.

775  {
776  return Float3(m[0][0] * v.X + m[0][1] * v.Y + m[0][2] * v.Z,
777  m[1][0] * v.X + m[1][1] * v.Y + m[1][2] * v.Z,
778  m[2][0] * v.X + m[2][1] * v.Y + m[2][2] * v.Z);
779  }
float m[4][4]
Definition: Matrix.h:871

◆ operator bs::Matrix4()

Leviathan::Matrix4::operator bs::Matrix4 ( ) const
inline

Definition at line 566 of file Matrix.h.

567  {
568  bs::Matrix4 result;
569 
570  result.setColumn(0, GetColumn4D(0));
571  result.setColumn(1, GetColumn4D(1));
572  result.setColumn(2, GetColumn4D(2));
573  result.setColumn(3, GetColumn4D(3));
574  return result;
575  }
Float4 GetColumn4D(uint32_t col) const
Definition: Matrix.h:593

◆ operator!=()

bool Leviathan::Matrix4::operator!= ( const Matrix4 rhs) const
inline

Definition at line 553 of file Matrix.h.

554  {
555  return !operator==(rhs);
556  }
bool operator==(const Matrix4 &rhs) const
Definition: Matrix.h:539

◆ operator*() [1/2]

Matrix4 Leviathan::Matrix4::operator* ( const Matrix4 rhs) const
inline

Definition at line 443 of file Matrix.h.

444  {
445  Matrix4 r;
446 
447  r.m[0][0] = m[0][0] * rhs.m[0][0] + m[0][1] * rhs.m[1][0] + m[0][2] * rhs.m[2][0] +
448  m[0][3] * rhs.m[3][0];
449  r.m[0][1] = m[0][0] * rhs.m[0][1] + m[0][1] * rhs.m[1][1] + m[0][2] * rhs.m[2][1] +
450  m[0][3] * rhs.m[3][1];
451  r.m[0][2] = m[0][0] * rhs.m[0][2] + m[0][1] * rhs.m[1][2] + m[0][2] * rhs.m[2][2] +
452  m[0][3] * rhs.m[3][2];
453  r.m[0][3] = m[0][0] * rhs.m[0][3] + m[0][1] * rhs.m[1][3] + m[0][2] * rhs.m[2][3] +
454  m[0][3] * rhs.m[3][3];
455 
456  r.m[1][0] = m[1][0] * rhs.m[0][0] + m[1][1] * rhs.m[1][0] + m[1][2] * rhs.m[2][0] +
457  m[1][3] * rhs.m[3][0];
458  r.m[1][1] = m[1][0] * rhs.m[0][1] + m[1][1] * rhs.m[1][1] + m[1][2] * rhs.m[2][1] +
459  m[1][3] * rhs.m[3][1];
460  r.m[1][2] = m[1][0] * rhs.m[0][2] + m[1][1] * rhs.m[1][2] + m[1][2] * rhs.m[2][2] +
461  m[1][3] * rhs.m[3][2];
462  r.m[1][3] = m[1][0] * rhs.m[0][3] + m[1][1] * rhs.m[1][3] + m[1][2] * rhs.m[2][3] +
463  m[1][3] * rhs.m[3][3];
464 
465  r.m[2][0] = m[2][0] * rhs.m[0][0] + m[2][1] * rhs.m[1][0] + m[2][2] * rhs.m[2][0] +
466  m[2][3] * rhs.m[3][0];
467  r.m[2][1] = m[2][0] * rhs.m[0][1] + m[2][1] * rhs.m[1][1] + m[2][2] * rhs.m[2][1] +
468  m[2][3] * rhs.m[3][1];
469  r.m[2][2] = m[2][0] * rhs.m[0][2] + m[2][1] * rhs.m[1][2] + m[2][2] * rhs.m[2][2] +
470  m[2][3] * rhs.m[3][2];
471  r.m[2][3] = m[2][0] * rhs.m[0][3] + m[2][1] * rhs.m[1][3] + m[2][2] * rhs.m[2][3] +
472  m[2][3] * rhs.m[3][3];
473 
474  r.m[3][0] = m[3][0] * rhs.m[0][0] + m[3][1] * rhs.m[1][0] + m[3][2] * rhs.m[2][0] +
475  m[3][3] * rhs.m[3][0];
476  r.m[3][1] = m[3][0] * rhs.m[0][1] + m[3][1] * rhs.m[1][1] + m[3][2] * rhs.m[2][1] +
477  m[3][3] * rhs.m[3][1];
478  r.m[3][2] = m[3][0] * rhs.m[0][2] + m[3][1] * rhs.m[1][2] + m[3][2] * rhs.m[2][2] +
479  m[3][3] * rhs.m[3][2];
480  r.m[3][3] = m[3][0] * rhs.m[0][3] + m[3][1] * rhs.m[1][3] + m[3][2] * rhs.m[2][3] +
481  m[3][3] * rhs.m[3][3];
482 
483  return r;
484  }
float m[4][4]
Definition: Matrix.h:871

◆ operator*() [2/2]

Matrix4 Leviathan::Matrix4::operator* ( float  rhs) const
inline

Definition at line 558 of file Matrix.h.

559  {
560  return Matrix4(rhs * m[0][0], rhs * m[0][1], rhs * m[0][2], rhs * m[0][3],
561  rhs * m[1][0], rhs * m[1][1], rhs * m[1][2], rhs * m[1][3], rhs * m[2][0],
562  rhs * m[2][1], rhs * m[2][2], rhs * m[2][3], rhs * m[3][0], rhs * m[3][1],
563  rhs * m[3][2], rhs * m[3][3]);
564  }
float m[4][4]
Definition: Matrix.h:871

◆ operator+()

Matrix4 Leviathan::Matrix4::operator+ ( const Matrix4 rhs) const
inline

Definition at line 486 of file Matrix.h.

487  {
488  Matrix4 r;
489 
490  r.m[0][0] = m[0][0] + rhs.m[0][0];
491  r.m[0][1] = m[0][1] + rhs.m[0][1];
492  r.m[0][2] = m[0][2] + rhs.m[0][2];
493  r.m[0][3] = m[0][3] + rhs.m[0][3];
494 
495  r.m[1][0] = m[1][0] + rhs.m[1][0];
496  r.m[1][1] = m[1][1] + rhs.m[1][1];
497  r.m[1][2] = m[1][2] + rhs.m[1][2];
498  r.m[1][3] = m[1][3] + rhs.m[1][3];
499 
500  r.m[2][0] = m[2][0] + rhs.m[2][0];
501  r.m[2][1] = m[2][1] + rhs.m[2][1];
502  r.m[2][2] = m[2][2] + rhs.m[2][2];
503  r.m[2][3] = m[2][3] + rhs.m[2][3];
504 
505  r.m[3][0] = m[3][0] + rhs.m[3][0];
506  r.m[3][1] = m[3][1] + rhs.m[3][1];
507  r.m[3][2] = m[3][2] + rhs.m[3][2];
508  r.m[3][3] = m[3][3] + rhs.m[3][3];
509 
510  return r;
511  }
float m[4][4]
Definition: Matrix.h:871

◆ operator-()

Matrix4 Leviathan::Matrix4::operator- ( const Matrix4 rhs) const
inline

Definition at line 513 of file Matrix.h.

514  {
515  Matrix4 r;
516  r.m[0][0] = m[0][0] - rhs.m[0][0];
517  r.m[0][1] = m[0][1] - rhs.m[0][1];
518  r.m[0][2] = m[0][2] - rhs.m[0][2];
519  r.m[0][3] = m[0][3] - rhs.m[0][3];
520 
521  r.m[1][0] = m[1][0] - rhs.m[1][0];
522  r.m[1][1] = m[1][1] - rhs.m[1][1];
523  r.m[1][2] = m[1][2] - rhs.m[1][2];
524  r.m[1][3] = m[1][3] - rhs.m[1][3];
525 
526  r.m[2][0] = m[2][0] - rhs.m[2][0];
527  r.m[2][1] = m[2][1] - rhs.m[2][1];
528  r.m[2][2] = m[2][2] - rhs.m[2][2];
529  r.m[2][3] = m[2][3] - rhs.m[2][3];
530 
531  r.m[3][0] = m[3][0] - rhs.m[3][0];
532  r.m[3][1] = m[3][1] - rhs.m[3][1];
533  r.m[3][2] = m[3][2] - rhs.m[3][2];
534  r.m[3][3] = m[3][3] - rhs.m[3][3];
535 
536  return r;
537  }
float m[4][4]
Definition: Matrix.h:871

◆ operator=()

constexpr Matrix4& Leviathan::Matrix4::operator= ( const Matrix4 )
default

◆ operator==()

bool Leviathan::Matrix4::operator== ( const Matrix4 rhs) const
inline

Definition at line 539 of file Matrix.h.

540  {
541  if(m[0][0] != rhs.m[0][0] || m[0][1] != rhs.m[0][1] || m[0][2] != rhs.m[0][2] ||
542  m[0][3] != rhs.m[0][3] || m[1][0] != rhs.m[1][0] || m[1][1] != rhs.m[1][1] ||
543  m[1][2] != rhs.m[1][2] || m[1][3] != rhs.m[1][3] || m[2][0] != rhs.m[2][0] ||
544  m[2][1] != rhs.m[2][1] || m[2][2] != rhs.m[2][2] || m[2][3] != rhs.m[2][3] ||
545  m[3][0] != rhs.m[3][0] || m[3][1] != rhs.m[3][1] || m[3][2] != rhs.m[3][2] ||
546  m[3][3] != rhs.m[3][3]) {
547  return false;
548  }
549 
550  return true;
551  }
float m[4][4]
Definition: Matrix.h:871

◆ operator[]() [1/2]

Float4& Leviathan::Matrix4::operator[] ( uint32_t  row)
inline

Returns a row of the matrix.

Definition at line 428 of file Matrix.h.

429  {
430  assert(row < 4);
431 
432  return *reinterpret_cast<Float4*>(m[row]);
433  }
float m[4][4]
Definition: Matrix.h:871

◆ operator[]() [2/2]

const Float4& Leviathan::Matrix4::operator[] ( uint32_t  row) const
inline

Returns a row of the matrix.

Definition at line 436 of file Matrix.h.

437  {
438  assert(row < 4);
439 
440  return *reinterpret_cast<const Float4*>(m[row]);
441  }
float m[4][4]
Definition: Matrix.h:871

◆ ProjectionOrthographic()

DLLEXPORT Matrix4 Matrix4::ProjectionOrthographic ( float  left,
float  right,
float  top,
float  bottom,
float  near,
float  far 
)
static

Definition at line 1198 of file Matrix.cpp.

1200 {
1201  Matrix4 output;
1202  output.MakeProjectionOrtho(left, right, top, bottom, near, far);
1203 
1204  return output;
1205 }
DLLEXPORT void MakeProjectionOrtho(float left, float right, float top, float bottom, float near, float far)
Definition: Matrix.cpp:1100
A 4x4 matrix type.
Definition: Matrix.h:379

◆ ProjectionPerspective()

DLLEXPORT Matrix4 Matrix4::ProjectionPerspective ( const Degree horzFOV,
float  aspect,
float  near,
float  far,
bool  positiveZ = false 
)
static

Creates a 4x4 perspective projection matrix.

Parameters
[in]horzFOVHorizontal field of view.
[in]aspectAspect ratio. Determines the vertical field of view.
[in]nearDistance to the near plane.
[in]farDistance to the far plane.
[in]positiveZIf true the matrix will project geometry as if its looking along the positive Z axis. Otherwise it projects along the negative Z axis (default).

Definition at line 1139 of file Matrix.cpp.

1141 {
1142  // Note: Duplicate code in Camera, bring it all here eventually
1143  static constexpr float INFINITE_FAR_PLANE_ADJUST = 0.00001f;
1144 
1145  Radian thetaX(horzFOV.ValueInRadians() * 0.5f);
1146  float tanThetaX = std::tan(thetaX.ValueInRadians());
1147  float tanThetaY = tanThetaX / aspect;
1148 
1149  float half_w = tanThetaX * near;
1150  float half_h = tanThetaY * near;
1151 
1152  float left = -half_w;
1153  float right = half_w;
1154  float bottom = -half_h;
1155  float top = half_h;
1156 
1157  float inv_w = 1 / (right - left);
1158  float inv_h = 1 / (top - bottom);
1159  float inv_d = 1 / (far - near);
1160 
1161  float A = 2 * near * inv_w;
1162  float B = 2 * near * inv_h;
1163  float C = (right + left) * inv_w;
1164  float D = (top + bottom) * inv_h;
1165  float q, qn;
1166  float sign = positiveZ ? 1.0f : -1.0f;
1167 
1168  if(far == 0) {
1169  // Infinite far plane
1170  q = INFINITE_FAR_PLANE_ADJUST - 1;
1171  qn = near * (INFINITE_FAR_PLANE_ADJUST - 2);
1172  } else {
1173  q = sign * (far + near) * inv_d;
1174  qn = -2.0f * (far * near) * inv_d;
1175  }
1176 
1177  Matrix4 mat;
1178  mat[0][0] = A;
1179  mat[0][1] = 0.0f;
1180  mat[0][2] = C;
1181  mat[0][3] = 0.0f;
1182  mat[1][0] = 0.0f;
1183  mat[1][1] = B;
1184  mat[1][2] = D;
1185  mat[1][3] = 0.0f;
1186  mat[2][0] = 0.0f;
1187  mat[2][1] = 0.0f;
1188  mat[2][2] = q;
1189  mat[2][3] = qn;
1190  mat[3][0] = 0.0f;
1191  mat[3][1] = 0.0f;
1192  mat[3][2] = sign;
1193  mat[3][3] = 0.0f;
1194 
1195  return mat;
1196 }
Represents an angle in radians.
Definition: Types.h:129
constexpr float ValueInRadians() const noexcept
Definition: Types.h:189
A 4x4 matrix type.
Definition: Matrix.h:379

◆ SetColumn()

void Leviathan::Matrix4::SetColumn ( uint32_t  idx,
const Float4 column 
)
inline

Assigns the vector to a column of the matrix.

Definition at line 601 of file Matrix.h.

602  {
603  m[0][idx] = column.X;
604  m[1][idx] = column.Y;
605  m[2][idx] = column.Z;
606  m[3][idx] = column.W;
607  }
float m[4][4]
Definition: Matrix.h:871

◆ SetInverseTRS()

DLLEXPORT void Matrix4::SetInverseTRS ( const Float3 translation,
const Quaternion rotation,
const Float3 scale 
)

Creates a matrix from inverse translation, rotation and scale.

Note
This is cheaper than setTRS() and then performing inverse().

Definition at line 1023 of file Matrix.cpp.

1025 {
1026  // Invert the parameters
1027  Float3 invTranslate = -translation;
1028  Float3 invScale(1 / scale.X, 1 / scale.Y, 1 / scale.Z);
1029  Quaternion invRot = rotation.Inverse();
1030 
1031  // Because we're inverting, order is translation, rotation, scale
1032  // So make translation relative to scale & rotation
1033  invTranslate = invRot * invTranslate;
1034  invTranslate *= invScale;
1035 
1036  // Next, make a 3x3 rotation matrix
1037  Matrix3 rot3x3;
1038  invRot.ToRotationMatrix(rot3x3);
1039 
1040  // Set up final matrix with scale, rotation and translation
1041  m[0][0] = invScale.X * rot3x3[0][0];
1042  m[0][1] = invScale.X * rot3x3[0][1];
1043  m[0][2] = invScale.X * rot3x3[0][2];
1044  m[0][3] = invTranslate.X;
1045  m[1][0] = invScale.Y * rot3x3[1][0];
1046  m[1][1] = invScale.Y * rot3x3[1][1];
1047  m[1][2] = invScale.Y * rot3x3[1][2];
1048  m[1][3] = invTranslate.Y;
1049  m[2][0] = invScale.Z * rot3x3[2][0];
1050  m[2][1] = invScale.Z * rot3x3[2][1];
1051  m[2][2] = invScale.Z * rot3x3[2][2];
1052  m[2][3] = invTranslate.Z;
1053 
1054  // No projection term
1055  m[3][0] = 0;
1056  m[3][1] = 0;
1057  m[3][2] = 0;
1058  m[3][3] = 1;
1059 }
float m[4][4]
Definition: Matrix.h:871
A 3x3 rotation and scale matrix.
Definition: Matrix.h:28
Quaternion Inverse() const noexcept
Inverts a quaternion.
Definition: Quaternion.h:207
DLLEXPORT void ToRotationMatrix(Matrix3 &matrix) const
Definition: Quaternion.cpp:105
A Quaternion type to make quaternion specific operations easier to access.
Definition: Quaternion.h:14

◆ SetRow()

void Leviathan::Matrix4::SetRow ( uint32_t  idx,
const Float4 column 
)
inline

Assigns the vector to a row of the matrix.

Definition at line 610 of file Matrix.h.

611  {
612  m[idx][0] = column.X;
613  m[idx][1] = column.Y;
614  m[idx][2] = column.Z;
615  m[idx][3] = column.W;
616  }
float m[4][4]
Definition: Matrix.h:871

◆ SetTRS()

DLLEXPORT void Matrix4::SetTRS ( const Float3 translation,
const Quaternion rotation,
const Float3 scale 
)

Creates a matrix from translation, rotation and scale.

Note
The transformation are applied in scale->rotation->translation order.

Definition at line 997 of file Matrix.cpp.

999 {
1000  Matrix3 rot3x3;
1001  rotation.ToRotationMatrix(rot3x3);
1002 
1003  m[0][0] = scale.X * rot3x3[0][0];
1004  m[0][1] = scale.Y * rot3x3[0][1];
1005  m[0][2] = scale.Z * rot3x3[0][2];
1006  m[0][3] = translation.X;
1007  m[1][0] = scale.X * rot3x3[1][0];
1008  m[1][1] = scale.Y * rot3x3[1][1];
1009  m[1][2] = scale.Z * rot3x3[1][2];
1010  m[1][3] = translation.Y;
1011  m[2][0] = scale.X * rot3x3[2][0];
1012  m[2][1] = scale.Y * rot3x3[2][1];
1013  m[2][2] = scale.Z * rot3x3[2][2];
1014  m[2][3] = translation.Z;
1015 
1016  // No projection term
1017  m[3][0] = 0;
1018  m[3][1] = 0;
1019  m[3][2] = 0;
1020  m[3][3] = 1;
1021 }
float m[4][4]
Definition: Matrix.h:871
A 3x3 rotation and scale matrix.
Definition: Matrix.h:28
DLLEXPORT void ToRotationMatrix(Matrix3 &matrix) const
Definition: Quaternion.cpp:105

◆ swap()

void Leviathan::Matrix4::swap ( Matrix4 other)
inline

Swaps the contents of this matrix with another.

Definition at line 405 of file Matrix.h.

406  {
407  std::swap(m[0][0], other.m[0][0]);
408  std::swap(m[0][1], other.m[0][1]);
409  std::swap(m[0][2], other.m[0][2]);
410  std::swap(m[0][3], other.m[0][3]);
411  std::swap(m[1][0], other.m[1][0]);
412  std::swap(m[1][1], other.m[1][1]);
413  std::swap(m[1][2], other.m[1][2]);
414  std::swap(m[1][3], other.m[1][3]);
415  std::swap(m[2][0], other.m[2][0]);
416  std::swap(m[2][1], other.m[2][1]);
417  std::swap(m[2][2], other.m[2][2]);
418  std::swap(m[2][3], other.m[2][3]);
419  std::swap(m[3][0], other.m[3][0]);
420  std::swap(m[3][1], other.m[3][1]);
421  std::swap(m[3][2], other.m[3][2]);
422  std::swap(m[3][3], other.m[3][3]);
423  }
float m[4][4]
Definition: Matrix.h:871
void swap(Value &a, Value &b)
Definition: json.h:1359

◆ Transpose()

Matrix4 Leviathan::Matrix4::Transpose ( ) const
inline

Returns a transpose of the matrix (switched columns and rows).

Definition at line 578 of file Matrix.h.

579  {
580  return Matrix4(m[0][0], m[1][0], m[2][0], m[3][0], m[0][1], m[1][1], m[2][1], m[3][1],
581  m[0][2], m[1][2], m[2][2], m[3][2], m[0][3], m[1][3], m[2][3], m[3][3]);
582  }
float m[4][4]
Definition: Matrix.h:871

◆ VALUE_TYPE()

Leviathan::Matrix4::VALUE_TYPE ( Matrix4  )

◆ View()

DLLEXPORT Matrix4 Matrix4::View ( const Float3 position,
const Quaternion orientation 
)
static

Creates a view matrix.

Definition at line 1207 of file Matrix.cpp.

1208 {
1209  Matrix4 mat;
1210  mat.MakeView(position, orientation);
1211 
1212  return mat;
1213 }
DLLEXPORT void MakeView(const Float3 &position, const Quaternion &orientation)
Definition: Matrix.cpp:1074
A 4x4 matrix type.
Definition: Matrix.h:379

Member Data Documentation

◆ IDENTITY

DLLEXPORT const Matrix4 Matrix4::IDENTITY
static
Initial value:
= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}

Definition at line 873 of file Matrix.h.

◆ m

float Leviathan::Matrix4::m[4][4]

Definition at line 871 of file Matrix.h.

◆ ZERO

DLLEXPORT const Matrix4 Matrix4::ZERO
static
Initial value:
= {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}

Definition at line 874 of file Matrix.h.


The documentation for this struct was generated from the following files: