Three-by-three matrix with multiplication, vector transform, inverse, and solve helpers. More...
#include <mxvk/include/mxvk/mxvk_math.h>
Public Member Functions | |
| float | Determinate () const |
| Compute the matrix determinant. | |
| float | Determinate () const |
| Compute the matrix determinant. | |
| bool | Inverse (Mat3D &out) const |
| Compute the inverse matrix. | |
| bool | Inverse (Mat3D &out) const |
| Compute the inverse matrix. | |
| void | LoadIdentity () |
| Set this matrix to the identity matrix. | |
| void | LoadIdentity () |
| Set this matrix to the identity matrix. | |
| Mat3D ()=default | |
| Construct a zero-initialized matrix. | |
| Mat3D ()=default | |
| Construct a zero-initialized matrix. | |
| Mat3D (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) | |
| Construct from explicit row-major elements. | |
| Mat3D (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) | |
| Construct from explicit row-major elements. | |
| vec3D | MulVec (const vec3D &in) const |
| Transform a 3D vector by this matrix. | |
| vec3D | MulVec (const vec3D &in) const |
| Transform a 3D vector by this matrix. | |
| void | MulVec (const vec3D &in, vec3D &out) const |
Transform a 3D vector and write the result to out. | |
| void | MulVec (const vec3D &in, vec3D &out) const |
Transform a 3D vector and write the result to out. | |
| Mat3D | operator* (const Mat3D &m) const |
| Multiply two 3x3 matrices. | |
| Mat3D | operator* (const Mat3D &m) const |
| Multiply two 3x3 matrices. | |
| void | Set (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) |
| Set all matrix elements in row-major order. | |
| void | Set (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) |
| Set all matrix elements in row-major order. | |
| bool | Solve3x3 (const Mat3D &a, Mat1x3D &out, const Mat1x3D &b) const |
| Solve a 3x3 linear system. | |
Static Public Member Functions | |
| static bool | Solve3x3 (const Mat3D &a, Mat1x3D &out, const Mat1x3D &b) |
| Solve a 3x3 linear system. | |
Public Attributes | |
| float | mat [3][3] {} |
| Matrix elements indexed as row, column. | |
Three-by-three matrix with multiplication, vector transform, inverse, and solve helpers.
Definition at line 707 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 716 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 763 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
|
inlinenodiscard |
Compute the matrix determinant.
Definition at line 794 of file mxvk_math_eigen.hpp.
|
inline |
Compute the inverse matrix.
| out | Receives the inverse on success. |
Definition at line 773 of file mxvk_math.h.
|
inline |
Compute the inverse matrix.
| out | Receives the inverse on success. |
Definition at line 803 of file mxvk_math_eigen.hpp.
|
inline |
Set this matrix to the identity matrix.
Definition at line 734 of file mxvk_math.h.
|
inline |
Set this matrix to the identity matrix.
Definition at line 773 of file mxvk_math_eigen.hpp.
Transform a 3D vector by this matrix.
Definition at line 783 of file mxvk_math_eigen.hpp.
Transform a 3D vector and write the result to out.
Definition at line 759 of file mxvk_math.h.
Transform a 3D vector and write the result to out.
Definition at line 789 of file mxvk_math_eigen.hpp.
Multiply two 3x3 matrices.
Definition at line 739 of file mxvk_math.h.
Multiply two 3x3 matrices.
Definition at line 778 of file mxvk_math_eigen.hpp.
|
inline |
|
inline |
Set all matrix elements in row-major order.
Definition at line 768 of file mxvk_math_eigen.hpp.
Solve a 3x3 linear system.
| a | Coefficient matrix. |
| out | Receives the solution vector. |
| b | Right-hand-side vector. |
Definition at line 819 of file mxvk_math_eigen.hpp.
Solve a 3x3 linear system.
| a | Coefficient matrix. |
| out | Receives the solution vector. |
| b | Right-hand-side vector. |
Definition at line 798 of file mxvk_math.h.
| float mxvk::Mat3D::mat {} |