Four-by-four homogeneous transform matrix. More...
#include <mxvk/include/mxvk/mxvk_math.h>
Public Member Functions | |
| void | BuildXYZ (float theta_x, float theta_y, float theta_z) |
| Build an XYZ Euler rotation matrix from angles in degrees. | |
| void | BuildXYZ (float theta_x, float theta_y, float theta_z) |
| Build an XYZ Euler rotation matrix from angles in degrees. | |
| bool | Inverse (Mat4D &out) const |
| Compute the inverse matrix using Gauss-Jordan elimination. | |
| bool | Inverse (Mat4D &out) const |
| Compute the inverse matrix. | |
| void | LoadIdentity () |
| Set this matrix to the identity matrix. | |
| void | LoadIdentity () |
| Set this matrix to the identity matrix. | |
| Mat4D ()=default | |
| Construct a zero-initialized matrix. | |
| Mat4D ()=default | |
| Construct a zero-initialized matrix. | |
| Mat4D (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) | |
| Construct from explicit row-major elements. | |
| Mat4D (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) | |
| Construct from explicit row-major elements. | |
| vec3D | MulVec (const vec3D &in) const |
| Transform a 3D point by this matrix using W = 1. | |
| vec3D | MulVec (const vec3D &in) const |
| Transform a 3D point by this matrix using W = 1. | |
| void | MulVec (const vec3D &in, vec3D &out) const |
Transform a 3D point and write the result to out. | |
| void | MulVec (const vec3D &in, vec3D &out) const |
Transform a 3D point and write the result to out. | |
| vec4D | MulVec (const vec4D &in) const |
| Transform a homogeneous 4D vector by this matrix. | |
| vec4D | MulVec (const vec4D &in) const |
| Transform a homogeneous 4D vector by this matrix. | |
| void | MulVec (const vec4D &in, vec4D &out) const |
Transform a homogeneous 4D vector and write the result to out. | |
| void | MulVec (const vec4D &in, vec4D &out) const |
Transform a homogeneous 4D vector and write the result to out. | |
| void | MulVec (std::span< const vec4D > input, std::span< vec4D > output) const |
| Transform a batch of homogeneous 4D vectors. | |
| void | MulVec (std::span< const vec4D > input, std::span< vec4D > output) const |
| Transform a batch of homogeneous 4D vectors. | |
| Mat4D | operator* (const Mat4D &m) const |
| Multiply two 4x4 matrices. | |
| Mat4D | operator* (const Mat4D &m) const |
| Multiply two 4x4 matrices. | |
| Mat4D & | operator*= (const Mat4D &m) |
| Multiply this matrix by another matrix in place. | |
| Mat4D & | operator*= (const Mat4D &m) |
| Multiply this matrix by another matrix in place. | |
| Mat4D | operator+ (const Mat4D &m) const |
| Add two matrices component-wise. | |
| Mat4D | operator+ (const Mat4D &m) const |
| Add two matrices component-wise. | |
| void | Set (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) |
| Set all matrix elements in row-major order. | |
| void | Set (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) |
| Set all matrix elements in row-major order. | |
Public Attributes | |
| float | mat [4][4] {} |
| Matrix elements indexed as row, column. | |
Four-by-four homogeneous transform matrix.
Definition at line 812 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 821 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 858 of file mxvk_math_eigen.hpp.
|
inline |
Build an XYZ Euler rotation matrix from angles in degrees.
Definition at line 973 of file mxvk_math.h.
|
inline |
Build an XYZ Euler rotation matrix from angles in degrees.
Definition at line 952 of file mxvk_math_eigen.hpp.
|
inline |
Compute the inverse matrix using Gauss-Jordan elimination.
| out | Receives the inverse on success. |
Definition at line 925 of file mxvk_math.h.
|
inline |
Compute the inverse matrix.
| out | Receives the inverse on success. |
Definition at line 941 of file mxvk_math_eigen.hpp.
|
inline |
Set this matrix to the identity matrix.
Definition at line 846 of file mxvk_math.h.
|
inline |
Set this matrix to the identity matrix.
Definition at line 868 of file mxvk_math_eigen.hpp.
Transform a 3D point by this matrix using W = 1.
Definition at line 910 of file mxvk_math.h.
Transform a 3D point by this matrix using W = 1.
Definition at line 926 of file mxvk_math_eigen.hpp.
Transform a 3D point and write the result to out.
Definition at line 916 of file mxvk_math.h.
Transform a 3D point and write the result to out.
Definition at line 932 of file mxvk_math_eigen.hpp.
Transform a homogeneous 4D vector by this matrix.
Definition at line 881 of file mxvk_math.h.
Transform a homogeneous 4D vector by this matrix.
Definition at line 889 of file mxvk_math_eigen.hpp.
Transform a homogeneous 4D vector and write the result to out.
Definition at line 891 of file mxvk_math.h.
Transform a homogeneous 4D vector and write the result to out.
Definition at line 895 of file mxvk_math_eigen.hpp.
Transform a batch of homogeneous 4D vectors.
| input | Source vectors. |
| output | Destination vectors, with the same size as input. |
Definition at line 900 of file mxvk_math.h.
Transform a batch of homogeneous 4D vectors.
| input | Source vectors. |
| output | Destination vectors, with the same size as input. |
Processing the vectors as a 4xN matrix lets Eigen use packetized SIMD across the complete batch instead of evaluating one small expression per vertex.
Definition at line 908 of file mxvk_math_eigen.hpp.
Multiply two 4x4 matrices.
Definition at line 862 of file mxvk_math.h.
Multiply two 4x4 matrices.
Definition at line 878 of file mxvk_math_eigen.hpp.
Multiply this matrix by another matrix in place.
Definition at line 875 of file mxvk_math.h.
Multiply this matrix by another matrix in place.
Definition at line 883 of file mxvk_math_eigen.hpp.
Add two matrices component-wise.
Definition at line 851 of file mxvk_math.h.
Add two matrices component-wise.
Definition at line 873 of file mxvk_math_eigen.hpp.
|
inline |
Set all matrix elements in row-major order.
Definition at line 826 of file mxvk_math.h.
|
inline |
Set all matrix elements in row-major order.
Definition at line 863 of file mxvk_math_eigen.hpp.
| float mxvk::Mat4D::mat {} |