![]() |
SH4ZAM! 0.9.1
Fast math library for the Sega Dreamcast's SH4 CPU
|


Go to the source code of this file.
Enumerations | |
| enum | shz_xmtrx_reg { SHZ_XMTRX_XF0 , SHZ_XMTRX_XF1 , SHZ_XMTRX_XF2 , SHZ_XMTRX_XF3 , SHZ_XMTRX_XF4 , SHZ_XMTRX_XF5 , SHZ_XMTRX_XF6 , SHZ_XMTRX_XF7 , SHZ_XMTRX_XF8 , SHZ_XMTRX_XF9 , SHZ_XMTRX_XF10 , SHZ_XMTRX_XF11 , SHZ_XMTRX_XF12 , SHZ_XMTRX_XF13 , SHZ_XMTRX_XF14 , SHZ_XMTRX_XF15 } |
Functions | |
Accessors | |
Setting and retrieving individual XMTRX register values. | |
| float | shz_xmtrx_read (shz_xmtrx_reg_t xf) noexcept |
| void | shz_xmtrx_write (shz_xmtrx_reg_t xf, float value) noexcept |
| shz_vec4_t | shz_xmtrx_read_row (unsigned int index) noexcept |
| shz_vec4_t | shz_xmtrx_read_col (unsigned int index) noexcept |
| void | shz_xmtrx_write_row (unsigned int index, shz_vec4_t vector) noexcept |
| void | shz_xmtrx_write_col (unsigned int index, shz_vec4_t vector) noexcept |
| void | shz_xmtrx_swap_rows (unsigned int index1, unsigned int index2) noexcept |
| void | shz_xmtrx_swap_cols (unsigned int index1, unsigned int index2) noexcept |
Loading | |
Routines for loading XMTRX contents from memory. | |
| void | shz_xmtrx_load_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_load_wxyz_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_load_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_load_cols_4x4 (const shz_vec4_t *c1, const shz_vec4_t *c2, const shz_vec4_t *c3, const shz_vec4_t *c4) noexcept |
| void | shz_xmtrx_load_rows_4x4 (const shz_vec4_t *r1, const shz_vec4_t *r2, const shz_vec4_t *r3, const shz_vec4_t *r4) noexcept |
| void | shz_xmtrx_load_transpose_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_load_transpose_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_load_3x4 (const shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_load_transpose_3x4 (const shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_load_cols_4x3 (const shz_vec4_t *c1, const shz_vec4_t *c2, const shz_vec4_t *c3) noexcept |
| void | shz_xmtrx_load_rows_3x4 (const shz_vec4_t *r1, const shz_vec4_t *r2, const shz_vec4_t *r3) noexcept |
| void | shz_xmtrx_load_cols_3x4 (const shz_vec3_t *c1, const shz_vec3_t *c2, const shz_vec3_t *c3, const shz_vec3_t *c4) noexcept |
| void | shz_xmtrx_load_3x3 (const shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_load_transpose_3x3 (const shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_load_2x2 (const shz_mat2x2_t *matrix) noexcept |
Storing | |
Routines for saving XMTRX contents to memory. | |
| void | shz_xmtrx_store_4x4 (shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_store_unaligned_4x4 (float matrix[16]) noexcept |
| void | shz_xmtrx_store_transpose_4x4 (shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_store_transpose_unaligned_4x4 (float matrix[16]) noexcept |
| void | shz_xmtrx_store_3x4 (shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_store_transpose_3x4 (shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_store_3x3 (shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_store_transpose_3x3 (shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_store_2x2 (shz_mat2x2_t *matrix) noexcept |
Initialization | |
Routines used to initialize the entirety of XMTRX. | |
| void | shz_xmtrx_init_identity (void) noexcept |
| void | shz_xmtrx_init_identity_safe (void) noexcept |
| void | shz_xmtrx_init_zero (void) noexcept |
| void | shz_xmtrx_init_one (void) noexcept |
| void | shz_xmtrx_init_fill (float value) noexcept |
| void | shz_xmtrx_init_translation (float x, float y, float z) noexcept |
| void | shz_xmtrx_init_scale (float x, float y, float z) noexcept |
| void | shz_xmtrx_init_rotation_x (float x) noexcept |
| void | shz_xmtrx_init_rotation_y (float y) noexcept |
| void | shz_xmtrx_init_rotation_z (float z) noexcept |
| void | shz_xmtrx_init_rotation_xyz (float xAngle, float yAngle, float zAngle) noexcept |
| void | shz_xmtrx_init_rotation_zyx (float zAngle, float yAngle, float xAngle) noexcept |
| void | shz_xmtrx_init_rotation_zxy (float zAngle, float xAngle, float yAngle) noexcept |
| void | shz_xmtrx_init_rotation_yxz (float yAngle, float xAngle, float zAngle) noexcept |
| void | shz_xmtrx_init_rotation (float angle, float xAxis, float yAxis, float zAxis) noexcept |
| void | shz_xmtrx_init_rotation_dir (float angle, float x, float y, float z) noexcept |
| void | shz_xmtrx_init_diagonal (float x, float y, float z, float w) noexcept |
| void | shz_xmtrx_init_upper_triangular (float col1, shz_vec2_t col2, shz_vec3_t col3, shz_vec4_t col4) noexcept |
| void | shz_xmtrx_init_lower_triangular (shz_vec4_t col1, shz_vec3_t col2, shz_vec2_t col3, float col4) noexcept |
| void | shz_xmtrx_init_symmetric_skew (float x, float y, float z) noexcept |
| void | shz_xmtrx_init_outer_product (shz_vec4_t x, shz_vec4_t y) noexcept |
| void | shz_xmtrx_init_permutation_wxyz (void) noexcept |
| void | shz_xmtrx_init_permutation_yzwx (void) noexcept |
| void | shz_xmtrx_init_permutation_wzyx (void) noexcept |
| void | shz_xmtrx_init_screen (float width, float height) noexcept |
| void | shz_xmtrx_init_lookat (shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) noexcept |
| void | shz_xmtrx_init_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept |
| void | shz_xmtrx_init_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept |
| void | shz_xmtrx_init_perspective (float fov, float aspect, float znear) noexcept |
| void | shz_xmtrx_init_rotation_quat (shz_quat_t q) noexcept |
Apply Operation | |
Updates only relevant values of XMTRX based on the given transform. | |
| void | shz_xmtrx_apply_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_apply_transpose_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_transpose_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_apply_reverse_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_reverse_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_apply_reverse_transpose_4x4 (const shz_mat4x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_reverse_transpose_unaligned_4x4 (const float matrix[16]) noexcept |
| void | shz_xmtrx_apply_3x4 (const shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_transpose_3x4 (const shz_mat3x4_t *matrix) noexcept |
| void | shz_xmtrx_apply_reverse_3x4 (const shz_mat3x4_t *mat) noexcept |
| void | shz_xmtrx_apply_reverse_transpose_3x4 (const shz_mat3x4_t *mat) noexcept |
| void | shz_xmtrx_apply_3x3 (const shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_apply_transpose_3x3 (const shz_mat3x3_t *matrix) noexcept |
| void | shz_xmtrx_apply_2x2 (const shz_mat2x2_t *matrix) noexcept |
| void | shz_xmtrx_apply_translation (float x, float y, float z) noexcept |
| void | shz_xmtrx_apply_scale (float x, float y, float z) noexcept |
| void | shz_xmtrx_apply_rotation_x (float x) noexcept |
| void | shz_xmtrx_apply_rotation_y (float y) noexcept |
| void | shz_xmtrx_apply_rotation_z (float z) noexcept |
| void | shz_xmtrx_apply_rotation_xyz (float xAngle, float yAngle, float zAngle) noexcept |
| void | shz_xmtrx_apply_rotation_zyx (float zAngle, float yAngle, float xAngle) noexcept |
| void | shz_xmtrx_apply_rotation_zxy (float zAngle, float xAngle, float yAngle) noexcept |
| void | shz_xmtrx_apply_rotation_yxz (float yAngle, float xAngle, float zAngle) noexcept |
| void | shz_xmtrx_apply_rotation (float angle, float x, float y, float z) noexcept |
| void | shz_xmtrx_apply_rotation_quat (shz_quat_t quat) noexcept |
| void | shz_xmtrx_apply_lookat (shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) noexcept |
| void | shz_xmtrx_apply_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept |
| void | shz_xmtrx_apply_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept |
| void | shz_xmtrx_apply_perspective (float fov, float aspect, float znear) noexcept |
| void | shz_xmtrx_apply_screen (float width, float height) noexcept |
| void | shz_xmtrx_apply_symmetric_skew (float x, float y, float z) noexcept |
| void | shz_xmtrx_apply_permutation_wxyz (void) noexcept |
| void | shz_xmtrx_apply_permutation_yzwx (void) noexcept |
| void | shz_xmtrx_apply_permutation_wzyx (void) noexcept |
| void | shz_xmtrx_apply_self (void) noexcept |
GL Transformations | |
OpenGL-style 4x4 matrix transforms. | |
| void | shz_xmtrx_translate (float x, float y, float z) noexcept |
| void | shz_xmtrx_scale (float x, float y, float z) noexcept |
| void | shz_xmtrx_rotate_x (float radians) noexcept |
| void | shz_xmtrx_rotate_y (float radians) noexcept |
| void | shz_xmtrx_rotate_z (float radians) noexcept |
| void | shz_xmtrx_rotate_xyz (float xRadians, float yRadians, float zRadians) noexcept |
| void | shz_xmtrx_rotate_zyx (float zRadians, float yRadians, float xRadians) noexcept |
| void | shz_xmtrx_rotate_zxy (float zRadians, float xRadians, float yRadians) noexcept |
| void | shz_xmtrx_rotate_yxz (float yRadians, float xRadians, float zRadians) noexcept |
| void | shz_xmtrx_rotate (float radians, float xAxis, float yAxis, float zAxis) noexcept |
Reverse GL Transformations | |
Pre-multiplication variants of OpenGL-style 4x4 matrix transforms. | |
| void | shz_xmtrx_translate_reverse (float x, float y, float z) noexcept |
| void | shz_xmtrx_scale_reverse (float x, float y, float z) noexcept |
Compound Operations | |
Multiple operations combined into one pipelined transaction. | |
| void | shz_xmtrx_load_apply_4x4 (const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) noexcept |
| void | shz_xmtrx_load_apply_unaligned_4x4 (const float matrix1[16], const float matrix2[16]) noexcept |
| void | shz_xmtrx_apply_store_4x4 (shz_mat4x4_t *out, const shz_mat4x4_t *in) noexcept |
| void | shz_xmtrx_apply_store_unaligned_4x4 (float out[16], const float in[16]) noexcept |
| void | shz_xmtrx_load_apply_store_4x4 (shz_mat4x4_t *out, const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) noexcept |
| void | shz_xmtrx_load_apply_store_unaligned_4x4 (float out[16], const float matrix1[16], const float matrix2[16]) noexcept |
| void | shz_xmtrx_load_apply_3x4 (const shz_mat3x4_t *matrix1, const shz_mat3x4_t *matrix2) noexcept |
| void | shz_xmtrx_load_apply_store_3x4 (shz_mat3x4_t *out, const shz_mat3x4_t *matrix1, const shz_mat3x4_t *matrix2) noexcept |
| void | shz_xmtrx_load_apply_store_3x3 (shz_mat3x3_t *out, const shz_mat3x3_t *matrix1, const shz_mat3x3_t *matrix2) noexcept |
Transformations | |
Transforming vectors and points against XMTRX. | |
| shz_vec4_t | shz_xmtrx_transform_vec4 (shz_vec4_t vec) noexcept |
| shz_vec3_t | shz_xmtrx_transform_vec3 (shz_vec3_t vec) noexcept |
| shz_vec2_t | shz_xmtrx_transform_vec2 (shz_vec2_t vec) noexcept |
| shz_vec2_t | shz_xmtrx_transform_point2 (shz_vec2_t pt) noexcept |
| shz_vec3_t | shz_xmtrx_transform_point3 (shz_vec3_t pt) noexcept |
Setters | |
Sets the values of related XMTRX components. | |
| void | shz_xmtrx_set_translation (float x, float y, float z) noexcept |
| void | shz_xmtrx_set_scale (float x, float y, float z) noexcept |
Getters | |
Gets the values of related XMTRX components. | |
| shz_vec3_t | shz_xmtrx_get_translation (void) noexcept |
| shz_vec3_t | shz_xmtrx_get_scale (void) noexcept |
Component-Wise Matrix Operations | |
Operations applying each component of a matrix onto XMTRX. | |
| void | shz_xmtrx_add_4x4 (const shz_mat4x4_t *mat) noexcept |
| void | shz_xmtrx_sub_4x4 (const shz_mat4x4_t *mat) noexcept |
Miscellaneous | |
Random operations and conversions on XMTRX. | |
| void | shz_xmtrx_transpose (void) noexcept |
| void | shz_xmtrx_negate (void) noexcept |
| void | shz_xmtrx_abs (void) noexcept |
| shz_quat_t | shz_xmtrx_to_quat (void) noexcept |
| float | shz_xmtrx_determinant (void) noexcept |
| void | shz_xmtrx_invert (void) noexcept |
| void | shz_xmtrx_blend (const shz_mat4x4_t *joint_matrix, float weight) noexcept |
Active Matrix API.
This file provides an API built around manipulating and performing calculations using the SH4's "current" 4x4 matrix, which is held within a secondary back-bank of 16 single-precision floating-point registers.
Definition in file shz_xmtrx.h.
| enum shz_xmtrx_reg |
Registers comprising XMTRX, in the FPU back-bank.
Definition at line 68 of file shz_xmtrx.h.
|
noexcept |
Returns the floating-point value held within the given XMTRX register.
|
noexcept |
Sets the floating-point value held within the given XMTRX register to value.
|
noexcept |
Returns the values at the the given row index, as a 4D vector.
|
noexcept |
Returns the values at the given column index, as a 4D vector.
|
noexcept |
Sets the values at the given row index to the given 4D vector.
|
noexcept |
Sets the values at the given column index to the given 4D vector.
|
noexcept |
Swaps the values of the rows with the given indices.
|
noexcept |
Swaps the values of the columns with the given indices.
|
noexcept |
Loads the given 4x4 matrix as XMTRX.
|
noexcept |
Loads the given 4x4 matrix as XMTRX, with the 4th column for translation being loaded as the first column.
|
noexcept |
Loads the given array of unaligned 16 float values as the 4x4 XMTRX matrix.
|
noexcept |
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D column vectors.
|
noexcept |
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D row vectors.
|
noexcept |
Loads XMTRX with the transpose of the given 4x4 matrix.
|
noexcept |
Loads XMTRX with the transpose of the 4x4 matrix created from the given unaligned array of 16 floats.
|
noexcept |
Loads the given 3x4 matrix into XMTRX, initializing its remaining elements to identity.
|
noexcept |
Loads XMTRX with the transpose of the given 3x4 matrix, initializing the bottom row to identity.
|
noexcept |
Loads the 3x4 matrix formed from the given 3 4D column vectors into XMTRX.
All remaining elements are initialized to identity matrix values.
|
noexcept |
Loads the 3x4 matrix formed from the given 3 4D row vectors into XMTRX.
All remaining elements are initialized to identity matrix values.
|
noexcept |
Loads the 3x4 matrix formed from the given 4 3D column vectors into XMTRX.
All remaining elements are initialized to identity matrix values.
|
noexcept |
Loads the given 3x3 matrix into XMTRX, initalizing its remaining elements to identity.
|
noexcept |
Loads the transpose of the given 3x3 matrix into XMTRX, initializing its remaining elements to identity.
|
noexcept |
Loads the given 2x2 matrix into XMTRX, initializing its remaining elements to identity.
|
noexcept |
Stores the current values held within XMTRX into the given 4x4 matrix.
|
noexcept |
Stores the current values held within XMTRX into the given unaligned 16-float array.
|
noexcept |
Stores the transpose of the current values held within XMTRX into the given 4x4 matrix.
|
noexcept |
Stores the transpose of the the current values held within XMTRX into the given 16-element float array.
|
noexcept |
Stores the top-left 3x4 values currently held within XMTRX into the given matrix.
|
noexcept |
Stores the transpose of the top-left 3x4 values currently held within XMTRX into the given matrix.
|
noexcept |
Stores the top-left 3x3 values currently held within XMTRX into the given matrix.
|
noexcept |
Stores the transpose of the top-left 3x3 values currently held within XMTRX into the given matrix.
|
noexcept |
Stores the top-left 2x2 values currently held within XMTRX into the given matrix.
|
noexcept |
Initializes XMTRX to the 4x4 identity matrix.
|
noexcept |
Safely initializes XMTRX to be a 4D identity matrix.
|
noexcept |
Initializes XMTRX to contain the value of 0.0f for each element.
|
noexcept |
Initializes XMTRX to contain the value of 1.0f for each element.
|
noexcept |
Initializes XMTRX to contain the given value for each element.
|
noexcept |
Initializes XMTRX to be a 3D translation matrix to the given coordinates.
|
noexcept |
Initializes XMTRX to be a 3D scale matrix with the given dimensions.
|
noexcept |
Initializes XMTRX to be a 3D rotation matrix by x radians about the X axis.
|
noexcept |
Initializes XMTRX to be a 3D rotation matrix by y radians about the Y axis.
|
noexcept |
Initializes XMTRX to be a 3D rotation matrix by z radians about the Z axis.
|
noexcept |
Initializes XMTRX to be a 3D X-Y-Z rotation matrix, with the corresponding angles given in radians.
|
noexcept |
Initializes XMTRX to be a 3D Z-Y-X rotation matrix, with the corresponding angles given in radians.
|
noexcept |
Initializes XMTRX to be a 3D Z-X-Y rotation matrix, with the corresponding angles given in radians.
|
noexcept |
Initializes XMTRX to be a 3D Y-X-Z rotation matrix, with the corresponding angles given in radians.
|
noexcept |
Initializes XMTRX to a 3D rotation matrix of angle radians about the vector with the given components.
|
noexcept |
Initializes XMTRX to contain a 3D rotation matrix of angle radians about the given axis.
This is a faster version of shz_xmtrx_init_rotation() or glRotatef() which requires being passed a unit vector for the rotation axis.
|
noexcept |
Initializes XMTRX to be a diagonal matrix with the given diagonal values.
|
noexcept |
Initializes XMTRX to be an upper triangular matrix with the given column values.
|
noexcept |
Initializes XMTRX to be a lower triangular matrix with the given column values.
|
noexcept |
Initializes XMTRX to be the 3D symmetric skew matrix formed from the given vector components.
|
noexcept |
Initializes XMTRX to the 4D matrix resulting from taking the outer product of the two 4D vectors.
|
noexcept |
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be in WXYZ order.
|
noexcept |
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be in YZWX order.
|
noexcept |
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be in WZYX order.
|
noexcept |
Initializes XMTRX to the viewport matrix with the given dimensions.
| fr[n + 0] | fr[n + 4] | fr[n + 8] | fr[n + 12] |
|---|---|---|---|
| w*0.5f | 0.0f | 0.0f | w*0.5f |
| 0.0f | -h*0.5f | 0.0f | h*0.5f |
| 0.0f | 0.0f | 1.0f | 0.0f |
| 0.0f | 0.0f | 0.0f | 1.0f |
|
noexcept |
Initializes XMTRX to a "lookAt" view matrix, equivalent to gluLookAt().
|
noexcept |
Initializes XMTRX to an orthographic projection matrix, equivalent to glOrtho().
|
noexcept |
Initializes XMTRX to a frustum projection matrix, equivalent to glFrustum().
|
noexcept |
Initializes XMTRX to a perspective projection matrix.
|
noexcept |
Initializes XMTRX to a 3D rotation matrix with its orientation given by a quaternion.
|
noexcept |
Multiplies and accumulates the given 4x4 matrix onto XMTRX.
|
noexcept |
Multiplies and accumulates the given 16-entry float array as a 4x4 matrix onto XMTRX.
|
noexcept |
Multiplies and accumulates the transpose of the given 4x4 matrix onto XMTRX.
|
noexcept |
Multiplies and accumulates the transpose of the given 16-entry float array as a 4x4 matrix onto XMTRX.
|
noexcept |
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates XMTRX onto the given float array as a 4x4 matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates XMTRX onto the transpose of matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates XMTRX onto the transpose of the given float array as a 4x4 matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates the given 3x4 matrix onto XMTRX, not modifying other elements.
|
noexcept |
Multiplies and accumulates the transpose of the given 3x4 matrix onto XMTRX, not modifying other elements.
|
noexcept |
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates XMTRX onto the transpose of matrix, storing the result as XMTRX.
|
noexcept |
Multiplies and accumulates the given 3x3 matrix onto XMTRX, not modifying other elements.
|
noexcept |
Multiplies and accumulates the transpose of the given 3x3 matrix onto XMTRX, not modifying other elements.
|
noexcept |
Multiplies and accumulates the given 2x2 matrix onto XMTRX, not modifying other elements.
|
noexcept |
Adds the values of the given 3 components to the 3D translation components of XMTRX.
|
noexcept |
Multiplies the values of the inner 3x3 matrix by the given 3D scaling terms.
|
noexcept |
Transforms the values of the inner 3x3 matrix by a rotation matrix of x radians about the X axis.
|
noexcept |
Transforms the values of the inner 3x3 matrix by a rotation matrix of y radians about the Y axis.
|
noexcept |
Transforms the values of the inner 3x3 matrix by a rotation matrix of z radians about the Z axis.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D X-Y-Z rotation matrix, with the corresponding angles given in radians.
The transform is applied to the inner 3x3 values within XMTRX, preserving the translational components.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D Z-Y-X rotation matrix, with the corresponding angles given in radians.
The transform is applied to the inner 3x3 values within XMTRX, preserving the translational components.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D Z-X-Y rotation matrix, with the corresponding angles given in radians.
The transform is applied to the inner 3x3 values within XMTRX, preserving the translational components.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D Y-X-Z rotation matrix, with the corresponding angles given in radians.
The transform is applied to the inner 3x3 values within XMTRX, preserving the translational components.
|
noexcept |
Transforms the values of the inner 3x3 matrix by a rotation matrix of angle radians about the axis with the given components.
|
noexcept |
Transforms the values of the inner 3x3 matrix by the rotation matrix represented by the given quaternion.
|
noexcept |
Applies the 3D "lookAt" matrix constructed with the given vector components onto XMTRX. Equivalent to gluLookAt().
|
noexcept |
Applies a 2D orthographic projection matrix onto XMTRX, equivalent to glOrtho().
|
noexcept |
Applies a frustum projection matrix onto XMTRX, equivalent to glFrustum().
|
noexcept |
Multiplies and accumulates the perspective matrix constructed from the given values onto XMTRX.
| fr[n + 0] | fr[n + 4] | fr[n + 8] | fr[n + 12] |
|---|---|---|---|
| cot(f)/a | 0.0f | 0.0f | 0.0f |
| 0.0f | cot(f) | 0.0f | 0.0f |
| 0.0f | 0.0f | 0.0f | nz |
| 0.0f | 0.0f | -1.0f | 0.0f |
|
noexcept |
Multiplies and accumulates the viewport matrix created with the given components.
| fr[n + 0] | fr[n + 4] | fr[n + 8] | fr[n + 12] |
|---|---|---|---|
| w*0.5f | 0.0f | 0.0f | w*0.5f |
| 0.0f | -h*0.5f | 0.0f | h*0.5f |
| 0.0f | 0.0f | 1.0f | 0.0f |
| 0.0f | 0.0f | 0.0f | 1.0f |
|
noexcept |
Multiplies and accumulates the 3D symmetric skew matrix with the given components onto XMTRX.
|
noexcept |
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors to be in WXYZ order.
|
noexcept |
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors to be in YZWX order.
|
noexcept |
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors to be in WZYX order.
|
noexcept |
Multiplies and accumulatse the XMTRX matrix by itself, squaring it.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D translation matrix with the given components (glTranslatef() equivalent).
|
noexcept |
Multiplies and accumulates XMTRX by a 3D scaling matrix with the given components (glScalef() equivalent).
|
noexcept |
Multiplies and accumulates XMTRX by a 3D rotation matrix about the X axis.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Y axis.
|
noexcept |
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Z axis.
|
noexcept |
Multiplies and accumulates XMTRX by 3D rotation matrices about the X then Y then Z axes.
|
noexcept |
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then Y then X axes.
|
noexcept |
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then X then Y axes.
|
noexcept |
Multiplies and accumulates XMTRX by 3D rotation matrices about the Y then X then Z axes.
|
noexcept |
Multiplies and accumulates XMTRX by the 3D rotation matrix formed by the given axis and angle (glRotatef equivalent).
|
noexcept |
Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given components.
|
noexcept |
Pre-multiplies and accumulates XMTRX onto the 3D scaling matrix with the given components.
|
noexcept |
Loads XMTRX with the result of applying matrix2 onto matrix1.
This operation is equivalent to: shz_xmtrx_load_4x4(matrix1); shz_xmtrx_apply_4x4(matrix2);
However, it has been optimized and pipelined for performing the load and multiply in parallel.
|
noexcept |
Loads XMTRX with the result of applying unaligned matrix2 onto matrix1.
This routine is equivalent to shz_xmtrx_load_apply_4x4(), except that the two operand matrices do not require 8-byte alignment and can simply be 16-element single-precision float arrays.
|
noexcept |
Multiplies XMTRX by the matrix, in, storing the result within the matrix, out.
This routine is roughly equivalent to: shz_xmtrx_apply_4x4(in); shz_xmtrx_store_4x4(out);
However, it has been optimized and pipelined for performing the multiply and store in parallel.
|
noexcept |
Multiplies XMTRX by the unaligned matrix, in, storing the result within the unaligned matrix, out.
This routine is roughly equivalent to: shz_xmtrx_apply_unaligned_4x4(in); shz_xmtrx_store_unaligned_4x4(out);
However, it has been optimized and pipelined for performing the multiply and store in parallel.
|
noexcept |
Loads XMTRX with the 4x4 result of applying matrix2 onto matrix1, storing the result.
This operation is equivalent to: shz_xmtrx_load_4x4(matrix1); shz_xmtrx_apply_4x4(matrix2); shz_xmtrx_store_4x4(out);
However, it has been optimized and pipelined for performing the loads, multiplies, and stores in parallel.
|
noexcept |
Loads XMTRX with the result of applying unaligned matrix2 onto unaligned matrix1, storing the result.
This routine is equivalent to shz_xmtrx_load_apply_store_4x4(), except that the three operand matrices do not require 8-byte alignment and can simply be 16-element single-precision float arrays.
|
noexcept |
Loads XMTRX with the result of applying matrix2 onto matrix1.
This operation is equivalent to: shz_xmtrx_load_3x4(matrix1); shz_xmtrx_apply_3x4(matrix2);
However, it has been optimized and pipelined for performing the load and multiply in parallel.
|
noexcept |
Loads XMTRX with the 3x4 result of applying matrix2 onto matrix1, storing the result.
This operation is equivalent to: shz_xmtrx_load_3x4(matrix1); shz_xmtrx_apply_3x4(matrix2); shz_xmtrx_store_3x4(out);
However, it has been optimized and pipelined for performing the loads, multiplies, and stores in parallel.
|
noexcept |
Loads XMTRX with the 3x3 result of applying matrix2 onto matrix1, storing the result.
This operation is equivalent to: shz_xmtrx_load_3x3(matrix1); shz_xmtrx_apply_3x3(matrix2); shz_xmtrx_store_3x3(out);
However, it has been optimized and pipelined for performing the loads, multiplies, and stores in parallel.
|
noexcept |
Returns the 4D vector that is the result of transforming vec by XMTRX.
|
noexcept |
Returns the 3D vector that is the result of transforming vec by XMTRX.
|
noexcept |
Returns the 2D vector that is the result of transforming vec by XMTRX.
|
noexcept |
Returns the 2D point that is the result of transforming pt by XMTRX.
|
noexcept |
Returns the 3D point that is the result of transforming pt by XMTRX.
|
noexcept |
Sets only the translational components of XMTRX to the given values.
|
noexcept |
Sets only the inner 3x3 submatrix of XMTRX to be a scaling matrix.
|
noexcept |
Returns the translational components from the last column of XMTRX, as a 3D vector.
|
noexcept |
Returns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.
|
noexcept |
Adds each element within mat to each element within XMTRX, storing the result in XMTRX.
|
noexcept |
Subtracts each element within mat from each element within XMTRX, storing the result in XMTRX.
|
noexcept |
Transposes the elements within XMTRX, in-place.
|
noexcept |
Negates each element held within XMTRX.
|
noexcept |
Takes the absolute value of each element held within XMTRX.
|
noexcept |
Constructs a quaternion from the 3D rotation matrix within XMTRX.
|
noexcept |
Returns the determinant of XMTRX.
|
noexcept |
Inverts XMTRX in-place.
Stores XMTRX to memory, computes the inverse via shz_mat4x4_inverse(), and reloads the result.
|
noexcept |
Adds and accumulates a scaled 4x4 matrix onto XMTRX.
Each component of joint_matrix will be multiplied by weight, with the result being added to the existing value of that component of XMTRX.
This is useful for accumulating weighted joint matrices onto an initially zeroed-out XMTRX. This allows for in-place construction of a skin matrix, which can then be directly used to transform the vertices of a mesh against for animation.