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 706 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 715 of file mxvk_math.h.
|
default |
Construct a zero-initialized matrix.
|
inline |
Construct from explicit row-major elements.
Definition at line 729 of file mxvk_math_eigen.hpp.
|
inline |
Build an XYZ Euler rotation matrix from angles in degrees.
Definition at line 859 of file mxvk_math.h.
|
inline |
Build an XYZ Euler rotation matrix from angles in degrees.
Definition at line 809 of file mxvk_math_eigen.hpp.
|
inline |
Compute the inverse matrix using Gauss-Jordan elimination.
| out | Receives the inverse on success. |
Definition at line 811 of file mxvk_math.h.
|
inline |
Compute the inverse matrix.
| out | Receives the inverse on success. |
Definition at line 798 of file mxvk_math_eigen.hpp.
|
inline |
Set this matrix to the identity matrix.
Definition at line 738 of file mxvk_math.h.
|
inline |
Set this matrix to the identity matrix.
Definition at line 735 of file mxvk_math_eigen.hpp.
Transform a 3D point by this matrix using W = 1.
Definition at line 798 of file mxvk_math.h.
Transform a 3D point by this matrix using W = 1.
Definition at line 785 of file mxvk_math_eigen.hpp.
Transform a 3D point and write the result to out.
Definition at line 804 of file mxvk_math.h.
Transform a 3D point and write the result to out.
Definition at line 791 of file mxvk_math_eigen.hpp.
Transform a homogeneous 4D vector by this matrix.
Definition at line 771 of file mxvk_math.h.
Transform a homogeneous 4D vector by this matrix.
Definition at line 750 of file mxvk_math_eigen.hpp.
Transform a homogeneous 4D vector and write the result to out.
Definition at line 781 of file mxvk_math.h.
Transform a homogeneous 4D vector and write the result to out.
Definition at line 756 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 788 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 767 of file mxvk_math_eigen.hpp.
Multiply two 4x4 matrices.
Definition at line 752 of file mxvk_math.h.
Multiply two 4x4 matrices.
Definition at line 741 of file mxvk_math_eigen.hpp.
Multiply this matrix by another matrix in place.
Definition at line 765 of file mxvk_math.h.
Multiply this matrix by another matrix in place.
Definition at line 744 of file mxvk_math_eigen.hpp.
Add two matrices component-wise.
Definition at line 741 of file mxvk_math.h.
Add two matrices component-wise.
Definition at line 738 of file mxvk_math_eigen.hpp.
|
inline |
Set all matrix elements in row-major order.
Definition at line 718 of file mxvk_math.h.
|
inline |
Set all matrix elements in row-major order.
Definition at line 732 of file mxvk_math_eigen.hpp.
| float mxvk::Mat4D::mat {} |
Matrix elements indexed as row, column.
Definition at line 709 of file mxvk_math.h.