shz_mat4x4_t
typedef SHZ_ALIGNAS(8) struct shz_mat4x4 { union { //!< Inner convenience union. float elem[16]; //!< Access the matrix as a 1D array of 16 single-precision floats. float elem2D[4][4]; //!< Access the matrix as a 2D array of 4x4 single-precision floats. shz_vec4_t col[4]; //!< Access the matrix as an array of 4 1x4 column vectors. struct { //!< Named column vectors. shz_vec4_t left; //!< Access the first column of the matrix as a 1x4 vector. shz_vec4_t up; //!< Access the second column of the matrix as a 1x4 vector. shz_vec4_t forward; //!< Access the third column of the matrix as a 1x4 vector. shz_vec4_t pos; //!< Access the last column of the matrix as a 1x4 vector. }; };} shz_mat4x4_t;Structure representing a 4x4 column-major matrix.
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
elem | float[16] | < Inner convenience union. |
elem2D | float[4][4] | Access the matrix as a 2D array of 4x4 single-precision floats. |
col | shz_vec4_t[4] | Access the matrix as an array of 4 1x4 column vectors. |
left | shz_vec4_t | < Named column vectors. |
up | shz_vec4_t | Access the second column of the matrix as a 1x4 vector. |
forward | shz_vec4_t | Access the third column of the matrix as a 1x4 vector. |
pos | shz_vec4_t | Access the last column of the matrix as a 1x4 vector. |
Warnings
Section titled “Warnings”- This structure MUST be aligned on 8-byte boundaries!
Availability
Section titled “Availability”- C++ equivalent:
shz::mat4x4 - Back-ends: n/a (not a function)
- Defined in:
sh4zam/shz_matrix.h:65 - Module: Matrix, section "Types"