2
3
4
5
6
7
8
9
10
11
12
13
14
28
29
30
31
32
33
60
61
62
65 SHZ_FORCE_INLINE
static float read(
reg xf)
noexcept {
70 SHZ_FORCE_INLINE
static void write(
reg xf,
float value)
noexcept {
75 SHZ_FORCE_INLINE
static vec4 read_row(
unsigned int index)
noexcept {
80 SHZ_FORCE_INLINE
static vec4 read_col(
unsigned int index)
noexcept {
85 SHZ_FORCE_INLINE
static void write_row(
unsigned int index,
const vec4& vector)
noexcept {
86 shz_xmtrx_write_row(index, vector);
90 SHZ_FORCE_INLINE
static void write_col(
unsigned int index,
const vec4& vector)
noexcept {
91 shz_xmtrx_write_col(index, vector);
95 SHZ_FORCE_INLINE
static void swap_rows(
unsigned int index1,
unsigned int index2)
noexcept {
100 SHZ_FORCE_INLINE
static void swap_cols(
unsigned int index1,
unsigned int index2)
noexcept {
107
108
109
112 SHZ_FORCE_INLINE
static void load(
const shz_mat4x4_t& mat4)
noexcept {
117 SHZ_FORCE_INLINE
static void load(
const float cArray[16])
noexcept {
122 SHZ_FORCE_INLINE
static void load(
const std::array<
float, 16>& array)
noexcept {
137 SHZ_FORCE_INLINE
static void load_transpose(
const std::array<
float, 16>& array)
noexcept {
142 SHZ_FORCE_INLINE
static void load_wxyz(
const shz_mat4x4_t& mat4)
noexcept {
147 SHZ_FORCE_INLINE
static void load_cols(
const shz_vec4_t& c1,
148 const shz_vec4_t& c2,
149 const shz_vec4_t& c3,
150 const shz_vec4_t& c4)
noexcept {
155 SHZ_FORCE_INLINE
static void load_rows(
const shz_vec4_t& r1,
156 const shz_vec4_t& r2,
157 const shz_vec4_t& r3,
158 const shz_vec4_t& r4)
noexcept {
163 SHZ_FORCE_INLINE
static void load(
const shz_mat3x4_t& mat)
noexcept {
170
171
172
175 SHZ_FORCE_INLINE
static void store(shz_mat4x4_t* mat)
noexcept {
180 SHZ_FORCE_INLINE
static void store(
float cArray[16])
noexcept {
185 SHZ_FORCE_INLINE
static void store(std::array<
float, 16>* array)
noexcept {
205 SHZ_FORCE_INLINE
static void store(shz_mat3x4_t* mat)
noexcept {
212
213
214
237 SHZ_FORCE_INLINE
static void init_fill(
float value)
noexcept {
248 init_translation(v.x, v.y, v.z);
252 SHZ_FORCE_INLINE
static void init_scale(
float x,
float y,
float z)
noexcept {
258 init_scale(v.x, v.y, v.z);
297 SHZ_FORCE_INLINE
static void init_rotation(
float angle,
float x,
float y,
float z)
noexcept {
303 init_rotation(angle, axis.x, axis.y, axis.z);
307 SHZ_FORCE_INLINE
static void init_diagonal(
float x,
float y,
float z,
float w)
noexcept {
313 init_diagonal(v.x, v.y, v.z, v.w);
318 shz_xmtrx_init_upper_triangular(col1, col2, col3, col4);
323 shz_xmtrx_init_lower_triangular(col1, col2, col3, col4);
333 shz_xmtrx_init_outer_product(a, b);
337 SHZ_FORCE_INLINE
static void init_screen(
float width,
float height)
noexcept {
343 shz_xmtrx_init_lookat(eye, center, up);
347 SHZ_FORCE_INLINE
static void init_ortho(
float left,
float right,
float bottom,
float top,
float znear,
float zfar)
noexcept {
352 SHZ_FORCE_INLINE
static void init_frustum(
float left,
float right,
float bottom,
float top,
float znear,
float zfar)
noexcept {
357 SHZ_FORCE_INLINE
static void init_perspective(
float fov,
float aspect,
float znear)
noexcept {
384
385
386
389 SHZ_FORCE_INLINE
static void apply(
const shz_mat4x4_t& mat4)
noexcept {
394 SHZ_FORCE_INLINE
static void apply(
const float cArray[16])
noexcept {
399 SHZ_FORCE_INLINE
static void apply(
const std::array<
float, 16>& array)
noexcept {
414 SHZ_FORCE_INLINE
static void apply_transpose(
const std::array<
float, 16>& array)
noexcept {
419 SHZ_FORCE_INLINE
static void apply_reverse(
const shz_mat4x4_t& mat4)
noexcept {
424 SHZ_FORCE_INLINE
static void apply_reverse(
const float cArray[16])
noexcept {
429 SHZ_FORCE_INLINE
static void apply_reverse(
const std::array<
float, 16>& array)
noexcept {
449 SHZ_FORCE_INLINE
static void apply(
const shz_mat3x4_t& mat)
noexcept {
460 apply_translation(v.x, v.y, v.z);
464 SHZ_FORCE_INLINE
static void apply_scale(
float x,
float y,
float z)
noexcept {
470 apply_scale(v.x, v.y, v.z);
509 SHZ_FORCE_INLINE
static void apply_rotation(
float angle,
float x,
float y,
float z)
noexcept {
514 SHZ_FORCE_INLINE
static void apply_rotation(
float angle,
const vec3& axis)
noexcept {
515 apply_rotation(angle, axis.x, axis.y, axis.z);
525 shz_xmtrx_apply_lookat(eye, center, up);
529 SHZ_FORCE_INLINE
static void apply_ortho(
float left,
float right,
float bottom,
float top,
float znear,
float zfar)
noexcept {
534 SHZ_FORCE_INLINE
static void apply_frustum(
float left,
float right,
float bottom,
float top,
float znear,
float zfar)
noexcept {
549 SHZ_FORCE_INLINE
static void apply_screen(
float width,
float height)
noexcept {
576
577
578
581 SHZ_FORCE_INLINE
static void translate(
float x,
float y,
float z)
noexcept {
587 translate(v.x, v.y, v.z);
591 SHZ_FORCE_INLINE
static void scale(
float x,
float y,
float z)
noexcept {
597 scale(v.x, v.y, v.z);
601 SHZ_FORCE_INLINE
static void rotate_x(
float radians)
noexcept {
606 SHZ_FORCE_INLINE
static void rotate_y(
float radians)
noexcept {
611 SHZ_FORCE_INLINE
static void rotate_z(
float radians)
noexcept {
616 SHZ_FORCE_INLINE
static void rotate_xyz(
float x,
float y,
float z)
noexcept {
621 SHZ_FORCE_INLINE
static void rotate_zyx(
float z,
float y,
float x)
noexcept {
626 SHZ_FORCE_INLINE
static void rotate_zxy(
float z,
float x,
float y)
noexcept {
631 SHZ_FORCE_INLINE
static void rotate_yxz(
float y,
float x,
float z)
noexcept {
636 SHZ_FORCE_INLINE
static void rotate(
float radians,
float x,
float y,
float z)
noexcept {
641 SHZ_FORCE_INLINE
static void rotate(
float radians,
const vec3& axis)
noexcept {
642 rotate(radians, axis.x, axis.y, axis.z);
648
649
650
653 SHZ_FORCE_INLINE
static void load_apply(
const shz_mat4x4_t& mat1,
const shz_mat4x4_t& mat2)
noexcept {
658 SHZ_FORCE_INLINE
static void load_apply(
const float matrix1[16],
const float matrix2[16])
noexcept {
663 SHZ_FORCE_INLINE
static void apply_store(shz_mat4x4_t* out,
const shz_mat4x4_t& in)
noexcept {
668 SHZ_FORCE_INLINE
static void apply_store(
float out[16],
const float in[16])
noexcept {
673 SHZ_FORCE_INLINE
static void load_apply_store(shz_mat4x4_t* dst,
const shz_mat4x4_t& mat1,
const shz_mat4x4_t& mat2)
noexcept {
678 SHZ_FORCE_INLINE
static void load_apply_store(
float out[16],
const float matrix1[16],
const float matrix2[16])
noexcept {
683 SHZ_FORCE_INLINE
static void load_apply_store(shz_mat3x4_t* dst,
const shz_mat3x4_t& mat1,
const shz_mat3x4_t& mat2)
noexcept {
688 SHZ_FORCE_INLINE
static void load_apply_store(shz_mat3x3_t* dst,
const shz_mat3x3_t& mat1,
const shz_mat3x3_t& mat2)
noexcept {
695
696
697
701 return shz_xmtrx_transform_vec4(in);
706 return shz_xmtrx_transform_vec3(in);
711 return shz_xmtrx_transform_vec2(in);
716 return shz_xmtrx_transform_point3(pt);
721 return shz_xmtrx_transform_point2(pt);
727
728
729
738 set_translation(v.x, v.y, v.z);
744
745
746
756
757
758
761 SHZ_FORCE_INLINE
static void add(
const shz_mat4x4_t& mat)
noexcept {
766 SHZ_FORCE_INLINE
static void sub(
const shz_mat4x4_t& mat)
noexcept {
771 SHZ_FORCE_INLINE
static void add_diagonal(
float x,
float y,
float z,
float w)
noexcept {
777 add_diagonal(v.x, v.y, v.z, v.w);
787 add_symmetric_skew(v.x, v.y, v.z);
796 SHZ_FORCE_INLINE
static void negate()
noexcept {
801 SHZ_FORCE_INLINE
static void abs()
noexcept {
816 SHZ_FORCE_INLINE
static void invert()
noexcept {
Namespace enclosing the SH4ZAM C++ API.
void shz_xmtrx_rotate_z(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Z axis.
float shz_xmtrx_determinant(void) SHZ_NOEXCEPT
Returns the determinant of XMTRX.
void shz_xmtrx_load_transpose_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Loads XMTRX with the transpose of the given 4x4 matrix.
void shz_xmtrx_load_apply_store_4x4(shz_mat4x4_t *out, const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) SHZ_NOEXCEPT
Loads XMTRX with the 4x4 result of applying matrix2 onto matrix1, storing the result.
void shz_xmtrx_init_ortho(float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Initializes XMTRX to an orthographic projection matrix, equivalent to glOrtho().
void shz_xmtrx_init_identity(void) SHZ_NOEXCEPT
Quickly initializes XMTRX to be a 4D identity matrix.
shz_quat_t shz_xmtrx_to_quat(void) SHZ_NOEXCEPT
Constructs a quaternion from the 3D rotation matrix within XMTRX.
void shz_xmtrx_apply_rotation_zxy(float zAngle, float xAngle, float yAngle) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D Z-X-Y rotation matrix, with the corresponding angles given i...
void shz_xmtrx_rotate_xyz(float xRadians, float yRadians, float zRadians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by 3D rotation matrices about the X then Y then Z axes.
void shz_xmtrx_load_apply_store_3x4(shz_mat3x4_t *out, const shz_mat3x4_t *matrix1, const shz_mat3x4_t *matrix2) SHZ_NOEXCEPT
Loads XMTRX with the 3x4 result of applying matrix2 onto matrix1, storing the result.
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) SHZ_NOEXCEPT
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D row vectors.
void shz_xmtrx_init_fill(float value) SHZ_NOEXCEPT
Initializes XMTRX to contain the given value for each element.
void shz_xmtrx_apply_rotation_zyx(float zAngle, float yAngle, float xAngle) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D Z-Y-X rotation matrix, with the corresponding angles given i...
void shz_xmtrx_rotate_y(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Y axis.
void shz_xmtrx_load_transpose_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Loads XMTRX with the transpose of the 4x4 matrix created from the given unaligned array of 16 floats.
void shz_xmtrx_apply_rotation_y(float y) SHZ_NOEXCEPT
Transforms the values of the inner 3x3 matrix by a rotation matrix of y radians about the Y axis.
void shz_xmtrx_init_translation(float x, float y, float z) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D translation matrix to the given coordinates.
void shz_xmtrx_rotate_zxy(float zRadians, float xRadians, float yRadians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then X then Y axes.
void shz_xmtrx_apply_store_unaligned_4x4(float out[16], const float in[16]) SHZ_NOEXCEPT
Multiplies XMTRX by the unaligned matrix, in, storing the result within the unaligned matrix,...
void shz_xmtrx_apply_permutation_wzyx(void) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_rotate_x(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the X axis.
void shz_xmtrx_init_rotation(float angle, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT
Initializes XMTRX to a 3D rotation matrix of angle radians about the given axis.
void shz_xmtrx_apply_reverse_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.
float shz_xmtrx_read(shz_xmtrx_reg_t xf) SHZ_NOEXCEPT
Returns the floating-point value held within the given XMTRX register.
void shz_xmtrx_load_wxyz_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Loads the given 4x4 matrix as XMTRX, with the 4th column for translation being loaded as the first co...
void shz_xmtrx_apply_screen(float width, float height) SHZ_NOEXCEPT
Multiplies and accumulates the viewport matrix created with the given components.
void shz_xmtrx_store_4x4(shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Stores the current values held within XMTRX into the given 4x4 matrix.
void shz_xmtrx_load_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Loads the given 4x4 matrix as XMTRX.
void shz_xmtrx_apply_transpose_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Multiplies and accumulates the transpose of the given 16-entry float array as a 4x4 matrix onto XMTRX...
void shz_xmtrx_set_translation(float x, float y, float z) SHZ_NOEXCEPT
Sets only the translational components of XMTRX to the given values.
@ SHZ_XMTRX_XF8
FP register xf8.
@ SHZ_XMTRX_XF9
FP register xf9.
@ SHZ_XMTRX_XF12
FP register xf12.
@ SHZ_XMTRX_XF11
FP register xf11.
@ SHZ_XMTRX_XF14
FP register xf14.
@ SHZ_XMTRX_XF3
FP register xf3.
@ SHZ_XMTRX_XF6
FP register xf6.
@ SHZ_XMTRX_XF4
FP register xf4.
@ SHZ_XMTRX_XF13
FP register xf13.
@ SHZ_XMTRX_XF10
FP register xf10.
@ SHZ_XMTRX_XF2
FP register xf2.
@ SHZ_XMTRX_XF0
FP register xf0.
@ SHZ_XMTRX_XF5
FP register xf5.
@ SHZ_XMTRX_XF7
FP register xf7.
@ SHZ_XMTRX_XF15
FP register xf15.
@ SHZ_XMTRX_XF1
FP register xf1.
void shz_xmtrx_add_4x4(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Adds each element within mat to each element within XMTRX, storing the result in XMTRX.
void shz_xmtrx_init_permutation_wxyz(void) SHZ_NOEXCEPT
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_invert(void) SHZ_NOEXCEPT
Inverts XMTRX in-place.
void shz_xmtrx_load_apply_4x4(const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) SHZ_NOEXCEPT
Loads XMTRX with the result of applying matrix2 onto matrix1.
void shz_xmtrx_translate(float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D translation matrix with the given components (glTranslatef()...
shz_vec4_t shz_xmtrx_read_row(unsigned int index) SHZ_NOEXCEPT
Returns the values at the the given row index, as a 4D vector.
void shz_xmtrx_rotate_zyx(float zRadians, float yRadians, float xRadians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then Y then X axes.
void shz_xmtrx_apply_permutation_yzwx(void) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_init_rotation_z(float z) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D rotation matrix by z radians about the Z axis.
void shz_xmtrx_rotate_yxz(float yRadians, float xRadians, float zRadians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by 3D rotation matrices about the Y then X then Z axes.
void shz_xmtrx_apply_ortho(float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Applies a 2D orthographic projection matrix onto XMTRX, equivalent to glOrtho().
void shz_xmtrx_apply_3x4(const shz_mat3x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates the given 3x4 matrix onto XMTRX, not modifying other elements.
void shz_xmtrx_apply_translation(float x, float y, float z) SHZ_NOEXCEPT
Adds the values of the given 3 components to the 3D translation components of XMTRX.
void shz_xmtrx_apply_rotation(float angle, float x, float y, float z) SHZ_NOEXCEPT
Transforms the values of the inner 3x3 matrix by a rotation matrix of angle radians about the axis wi...
void shz_xmtrx_abs(void) SHZ_NOEXCEPT
Takes the absolute value of each element held within XMTRX.
void shz_xmtrx_apply_permutation_wxyz(void) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_apply_frustum(float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Applies a frustum projection matrix onto XMTRX, equivalent to glFrustum().
void shz_xmtrx_init_frustum(float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Initializes XMTRX to a frustum projection matrix, equivalent to glFrustum().
void shz_xmtrx_apply_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Multiplies and accumulates the given 16-entry float array as a 4x4 matrix onto XMTRX.
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) SHZ_NOEXCEPT
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D column vectors.
void shz_xmtrx_store_transpose_4x4(shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Stores the transpose of the current values held within XMTRX into the given 4x4 matrix.
void shz_xmtrx_apply_self(void) SHZ_NOEXCEPT
Multiplies and accumulatse the XMTRX matrix by itself, squaring it.
void shz_xmtrx_load_apply_unaligned_4x4(const float matrix1[16], const float matrix2[16]) SHZ_NOEXCEPT
Loads XMTRX with the result of applying unaligned matrix2 onto matrix1.
void shz_xmtrx_transpose(void) SHZ_NOEXCEPT
Transposes the elements within XMTRX, in-place.
void shz_xmtrx_apply_rotation_z(float z) SHZ_NOEXCEPT
Transforms the values of the inner 3x3 matrix by a rotation matrix of z radians about the Z axis.
void shz_xmtrx_load_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Loads the given array of unaligned 16 float values as the 4x4 XMTRX matrix.
void shz_xmtrx_init_permutation_wzyx(void) SHZ_NOEXCEPT
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_scale(float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D scaling matrix with the given components (glScalef() equival...
void shz_xmtrx_init_symmetric_skew(float x, float y, float z) SHZ_NOEXCEPT
Initializes XMTRX to be the 3D symmetric skew matrix formed from the given vector components.
void shz_xmtrx_load_3x4(const shz_mat3x4_t *matrix) SHZ_NOEXCEPT
Loads the given 3x4 matrix into XMTRX, initializing its remaining elements to identity.
void shz_xmtrx_apply_rotation_quat(shz_quat_t quat) SHZ_NOEXCEPT
Transforms the values of the inner 3x3 matrix by the rotation matrix represented by the given quatern...
void shz_xmtrx_store_unaligned_4x4(float matrix[16]) SHZ_NOEXCEPT
Stores the current values held within XMTRX into the given unaligned 16-float array.
void shz_xmtrx_init_rotation_quat(shz_quat_t q) SHZ_NOEXCEPT
Initializes XMTRX to a 3D rotation matrix with its orientation given by a quaternion.
void shz_xmtrx_apply_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates the given 4x4 matrix onto XMTRX.
void shz_xmtrx_apply_rotation_yxz(float yAngle, float xAngle, float zAngle) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D Y-X-Z rotation matrix, with the corresponding angles given i...
void shz_xmtrx_init_rotation_x(float x) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D rotation matrix by x radians about the X axis.
void shz_xmtrx_apply_perspective(float fov, float aspect, float znear) SHZ_NOEXCEPT
Multiplies and accumulates the perspective matrix constructed from the given values onto XMTRX.
void shz_xmtrx_init_scale(float x, float y, float z) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D scale matrix with the given dimensions.
void shz_xmtrx_store_3x4(shz_mat3x4_t *matrix) SHZ_NOEXCEPT
Stores the top-left 3x4 values currently held within XMTRX into the given matrix.
void shz_xmtrx_init_diagonal(float x, float y, float z, float w) SHZ_NOEXCEPT
Initializes XMTRX to be a diagonal matrix with the given diagonal values.
void shz_xmtrx_write(shz_xmtrx_reg_t xf, float value) SHZ_NOEXCEPT
Sets the floating-point value held within the given XMTRX register to value.
void shz_xmtrx_init_identity_safe(void) SHZ_NOEXCEPT
Safely initializes XMTRX to be a 4D identity matrix.
void shz_xmtrx_load_apply_store_3x3(shz_mat3x3_t *out, const shz_mat3x3_t *matrix1, const shz_mat3x3_t *matrix2) SHZ_NOEXCEPT
Loads XMTRX with the 3x3 result of applying matrix2 onto matrix1, storing the result.
void shz_xmtrx_init_screen(float width, float height) SHZ_NOEXCEPT
Initializes XMTRX to the viewport matrix with the given dimensions.
void shz_xmtrx_sub_4x4(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Subtracts each element within mat from each element within XMTRX, storing the result in XMTRX.
void shz_xmtrx_swap_rows(unsigned int index1, unsigned int index2) SHZ_NOEXCEPT
Swaps the values of the rows with the given indices.
void shz_xmtrx_add_symmetric_skew(float x, float y, float z) SHZ_NOEXCEPT
Adds the values of a 3D symmetric skew matrix constructed from the given components to XMTRX.
void shz_xmtrx_store_transpose_unaligned_4x4(float matrix[16]) SHZ_NOEXCEPT
Stores the transpose of the the current values held within XMTRX into the given 16-element float arra...
void shz_xmtrx_apply_reverse_transpose_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX onto the transpose of the given float array as a 4x4 matrix,...
void shz_xmtrx_apply_rotation_x(float x) SHZ_NOEXCEPT
Transforms the values of the inner 3x3 matrix by a rotation matrix of x radians about the X axis.
void shz_xmtrx_apply_scale(float x, float y, float z) SHZ_NOEXCEPT
Multiplies the values of the inner 3x3 matrix by the given 3D scaling terms.
void shz_xmtrx_load_apply_store_unaligned_4x4(float out[16], const float matrix1[16], const float matrix2[16]) SHZ_NOEXCEPT
Loads XMTRX with the result of applying unaligned matrix2 onto unaligned matrix1, storing the result.
void shz_xmtrx_init_rotation_xyz(float xAngle, float yAngle, float zAngle) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D X-Y-Z rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_add_diagonal(float x, float y, float z, float w) SHZ_NOEXCEPT
Adds the values of a 4D diagonal matrix constructed from the given components to XMTRX.
void shz_xmtrx_init_rotation_zyx(float zAngle, float yAngle, float xAngle) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D Z-Y-X rotation matrix, with the corresponding angles given in radians.
shz_vec4_t shz_xmtrx_read_col(unsigned int index) SHZ_NOEXCEPT
Returns the values at the given column index, as a 4D vector.
void shz_xmtrx_apply_rotation_xyz(float xAngle, float yAngle, float zAngle) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D X-Y-Z rotation matrix, with the corresponding angles given i...
void shz_xmtrx_init_rotation_yxz(float yAngle, float xAngle, float zAngle) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D Y-X-Z rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_init_zero(void) SHZ_NOEXCEPT
Initializes XMTRX to contain the value of 0.0f for each element.
void shz_xmtrx_apply_transpose_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates the transpose of the given 4x4 matrix onto XMTRX.
void shz_xmtrx_negate(void) SHZ_NOEXCEPT
Negates each element held within XMTRX.
void shz_xmtrx_init_rotation_zxy(float zAngle, float xAngle, float yAngle) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D Z-X-Y rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_init_permutation_yzwx(void) SHZ_NOEXCEPT
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_apply_store_4x4(shz_mat4x4_t *out, const shz_mat4x4_t *in) SHZ_NOEXCEPT
Multiplies XMTRX by the matrix, in, storing the result within the matrix, out.
shz_vec3_t shz_xmtrx_get_translation(void) SHZ_NOEXCEPT
Returns the translational components from the last column of XMTRX, as a 3D vector.
void shz_xmtrx_apply_reverse_unaligned_4x4(const float matrix[16]) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX onto the given float array as a 4x4 matrix, storing the result as XM...
void shz_xmtrx_swap_cols(unsigned int index1, unsigned int index2) SHZ_NOEXCEPT
Swaps the values of the columns with the given indices.
void shz_xmtrx_apply_reverse_transpose_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX onto the transpose of matrix, storing the result as XMTRX.
void shz_xmtrx_apply_symmetric_skew(float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates the 3D symmetric skew matrix with the given components onto XMTRX.
void shz_xmtrx_init_one(void) SHZ_NOEXCEPT
Initializes XMTRX to contain the value of 1.0f for each element.
void shz_xmtrx_init_rotation_y(float y) SHZ_NOEXCEPT
Initializes XMTRX to be a 3D rotation matrix by y radians about the Y axis.
void shz_xmtrx_init_perspective(float fov, float aspect, float znear) SHZ_NOEXCEPT
Initializes XMTRX to a perspective projection matrix.
void shz_xmtrx_rotate(float radians, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by the 3D rotation matrix formed by the given axis and angle (glRota...
C++ structure representing a quaternion.
Static structure around the 4x4 XMTRX FP register back-bank.
static vec4 read_row(unsigned int index) noexcept
C++ wrapper around shz_xmtrx_read_row().
static void apply_screen(float width, float height) noexcept
C++ wrapper around shz_xmtrx_apply_screen().
static void init_lookat(const vec3 &eye, const vec3 ¢er, const vec3 &up) noexcept
C++ wrapper around shz_xmtrx_init_lookat().
static void init_symmetric_skew(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_symmetric_skew().
static void init_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_translation().
static void rotate_x(float radians) noexcept
C++ wrapper around shz_xmtrx_rotate_x().
static void load_transpose(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_load_transpose_unaligned_4x4().
static void load_apply_store(shz_mat3x4_t *dst, const shz_mat3x4_t &mat1, const shz_mat3x4_t &mat2) noexcept
C++ wrapper around shz_xmtrx_load_apply_store_3x4().
static void apply_transpose(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_apply_transpose_4x4().
static void load_apply(const float matrix1[16], const float matrix2[16]) noexcept
C++ wrapper around shz_xmtrx_load_apply_unaligned_4x4().
static float read(reg xf) noexcept
C++ wrapper around shz_xmtrx_read().
static void init_zero() noexcept
C++ wrapper around shz_xmtrx_init_zero().
static vec3 get_translation() noexcept
C++ wrapper around shz_xmtrx_set_translation().
static void invert() noexcept
C++ wrapper around shz_xmtrx_invert().
static void load(const shz_mat3x4_t &mat) noexcept
C++ wrapper around shz_xmtrx_load_3x4().
static void init_rotation(float angle, float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation().
static void load_rows(const shz_vec4_t &r1, const shz_vec4_t &r2, const shz_vec4_t &r3, const shz_vec4_t &r4) noexcept
C++ wrapper around shz_xmtrx_load_rows_4x4().
static void apply(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_apply_unaligned_4x4().
static void load_apply_store(float out[16], const float matrix1[16], const float matrix2[16]) noexcept
C++ wrapper around shz_xmtrx_load_apply_store_unaligned_4x4().
static void write_col(unsigned int index, const vec4 &vector) noexcept
C++ wrapper around shz_xmtrx_write_col().
static void write(reg xf, float value) noexcept
C++ wrapper around shz_xmtrx_write().
static void init_rotation_zyx(float z, float y, float x) noexcept
C++ wrapper around shz_xmtrx_init_rotation_zyx().
static void store_transpose(float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_store_transpose_unaligned_4x4().
static vec2 transform_point(const vec2 &pt) noexcept
C++ wrapper around shz_xmtrx_transform_point2().
static void rotate(float radians, const vec3 &axis) noexcept
C++ wrapper around shz_xmtrx_rotate().
static void init_outer_product(const vec4 &a, const vec4 &b) noexcept
C++ wrapper around shz_xmtrx_init_outer_product().
reg
FP back-bank registers comprising XMTRX.
static void add_diagonal(const vec4 &v) noexcept
C++ wrapper around shz_xmtrx_add_diagonal().
static void store_transpose(shz_mat4x4_t *mat) noexcept
C++ wrapper around shz_xmtrx_store_transpose_4x4().
static void apply_transpose(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_apply_transpose_unaligned_4x4().
static void apply_translation(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_apply_translation().
static void translate(vec3 v) noexcept
C++ wrapper around shz_xmtrx_translate().
static void apply_store(float out[16], const float in[16]) noexcept
C++ wrapper around shz_xmtrx_apply_store_unaligned_4x4().
static void swap_cols(unsigned int index1, unsigned int index2) noexcept
C++ wrapper around shz_xmtrx_swap_cols().
static void rotate_zyx(float z, float y, float x) noexcept
C++ wrapper around shz_xmtrx_rotate_zyx().
static void add_diagonal(float x, float y, float z, float w) noexcept
C++ wrapper around shz_xmtrx_add_diagonal().
static void store(shz_mat3x4_t *mat) noexcept
C++ wrapper around shz_xmtrx_store_3x4().
static void load_transpose(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_load_transpose_unaligned_4x4().
static void store(shz_mat4x4_t *mat) noexcept
C++ wrapper around shz_xmtrx_store_4x4().
static void write_row(unsigned int index, const vec4 &vector) noexcept
C++ wrapper around shz_xmtrx_write_row().
static void init_fill(float value) noexcept
C++ wrapper around shz_xmtrx_init_fill().
static void apply_permutation_yzwx() noexcept
C++ wrapper around shz_xmtrx_apply_permutation_yzwx().
static void init_identity_safe() noexcept
C++ wrapper around shz_xmtrx_init_identity_safe().
static void init_rotation_z(float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation_z().
static void rotate_z(float radians) noexcept
C++ wrapper around shz_xmtrx_rotate_x().
static void init_screen(float width, float height) noexcept
C++ wrapper around shz_xmtrx_init_screen().
static void load(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_load_unaligned_4x4().
static void store(float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_store_unaligned_4x4().
static void init_permutation_wxyz() noexcept
C++ wrapper around shz_xmtrx_init_permutation_wxyz().
static void init_rotation_y(float y) noexcept
C++ wrapper around shz_xmtrx_init_rotation_y().
static void load_apply_store(shz_mat4x4_t *dst, const shz_mat4x4_t &mat1, const shz_mat4x4_t &mat2) noexcept
C++ wrapper around shz_xmtrx_load_apply_store_4x4().
static void set_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_set_translation().
static void apply_reverse(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_unaligned_4x4().
static void abs() noexcept
C++ wrapper around shz_xmtrx_abs().
static void store(std::array< float, 16 > *array) noexcept
C++ wrapper around shz_xmtrx_store_unaligned_4x4().
static void load(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_load_4x4().
static void init_one() noexcept
C++ wrapper around shz_xmtrx_init_one().
static void transpose() noexcept
C++ wrapper around shz_xmtrx_transpose().
static void init_translation(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_init_translation().
static void apply(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_apply_unaligned_4x4().
static void init_permutation_yzwx() noexcept
C++ wrapper around shz_xmtrx_init_permutation_yzwx().
static void init_rotation_zxy(float z, float x, float y) noexcept
C++ wrapper around shz_xmtrx_init_rotation_zxy().
static void init_rotation_xyz(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation_xyz().
static void load_wxyz(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_load_wxyz_4x4().
static void init_diagonal(float x, float y, float z, float w) noexcept
C++ wrapper around shz_xmtrx_init_diagonal().
static vec2 transform(const vec2 &in) noexcept
C++ wrapper around shz_xmtrx_transform_vec2().
static void add(const shz_mat4x4_t &mat) noexcept
C++ wrapper around shz_xmtrx_add_4x4().
void set_translation(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_set_translation().
static void rotate(float radians, float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_rotate().
static void apply_rotation_x(float x) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_x().
static void apply_rotation_zxy(float z, float x, float y) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_zxy().
static void apply(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_apply_4x4().
static void load(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_load_unaligned_4x4().
static void apply_self() noexcept
C++ wrapper around shz_xmtrx_apply_self().
static void apply_rotation_zyx(float z, float y, float x) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_zyx().
static void scale(vec3 v) noexcept
C++ wrapper around shz_xmtrx_scale().
static void rotate_zxy(float z, float x, float y) noexcept
C++ wrapper around shz_xmtrx_rotate_zxy().
static void scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_scale().
static void apply_reverse(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_4x4().
static void negate() noexcept
C++ wrapper around shz_xmtrx_negate().
static vec4 read_col(unsigned int index) noexcept
C++ wrapper around shz_xmtrx_read_col().
static void swap_rows(unsigned int index1, unsigned int index2) noexcept
C++ wrapper around shz_xmtrx_swap_rows().
static void apply_store(shz_mat4x4_t *out, const shz_mat4x4_t &in) noexcept
C++ wrapper around shz_xmtrx_apply_store_4x4().
static void store_transpose(std::array< float, 16 > *array) noexcept
C++ wrapper around shz_xmtrx_store_transpose_unaligned_4x4().
static void init_diagonal(const vec4 &v) noexcept
C++ wrapper around shz_xmtrx_init_diagonal().
static quat to_quat() noexcept
C++ wrapper around shz_xmtrx_to_quat().
static void load_apply_store(shz_mat3x3_t *dst, const shz_mat3x3_t &mat1, const shz_mat3x3_t &mat2) noexcept
C++ wrapper around shz_xmtrx_load_apply_store_3x3().
static void load_transpose(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_load_transpose_4x4().
static void init_perspective(float fov, float aspect, float znear) noexcept
C++ wrapper around shz_xmtrx_init_perspective().
static void init_rotation(float angle, const vec3 &axis) noexcept
C++ wrapper around shz_xmtrx_init_rotation().
static void apply_rotation_z(float z) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_z().
static void init_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept
C++ wrapper around shz_xmtrx_init_ortho().
static void init_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept
C++ wrapper around shz_xmtrx_init_frustum().
static void init_rotation_quat(const quat &q) noexcept
C++ wrapper around shz_xmtrx_init_rotation_quat().
static void load_cols(const shz_vec4_t &c1, const shz_vec4_t &c2, const shz_vec4_t &c3, const shz_vec4_t &c4) noexcept
C++ wrapper around shz_xmtrx_load_cols_4x4().
static void init_upper_triangular(float col1, const vec2 &col2, const vec3 &col3, const vec4 &col4) noexcept
C++ wrapper around shz_xmtrx_init_upper_triangular().
static void init_rotation_x(float x) noexcept
C++ wrapper around shz_xmtrx_init_rotation_x().
static void sub(const shz_mat4x4_t &mat) noexcept
C++ wrapper around shz_xmtrx_sub_4x4().
static void apply_reverse(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_unaligned_4x4().
static void apply_rotation_yxz(float y, float x, float z) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_yxz().
static void init_permutation_wzyx() noexcept
C++ wrapper around shz_xmtrx_init_permutation_wzyx().
static void translate(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_translate().
static void init_rotation_yxz(float y, float x, float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation_yxz().
static void init_identity() noexcept
C++ wrapper around shz_xmtrx_init_identity().
static void apply_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept
C++ wrapper around shz_xmtrx_apply_ortho().
static void apply_rotation_xyz(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation_xyz().
static vec3 transform_point(const vec3 &pt) noexcept
C++ wrapper around shz_xmtrx_transform_point3().
static void apply(const shz_mat3x4_t &mat) noexcept
C++ wrapper around shz_xmtrx_apply_3x4().
static void load_apply(const shz_mat4x4_t &mat1, const shz_mat4x4_t &mat2) noexcept
C++ wrapper around shz_xmtrx_load_apply_4x4().
static void rotate_xyz(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_rotate_xyz().
static void apply_permutation_wxyz() noexcept
C++ wrapper around shz_xmtrx_apply_permutation_wxyz().
static void apply_perspective(float fov, float aspect, float znear) noexcept
C++ wrapper around shz_xmtrx_apply_perspective().
static void apply_lookat(const vec3 &eye, const vec3 ¢er, const vec3 &up) noexcept
C++ wrapper around shz_xmtrx_apply_lookat().
static void init_lower_triangular(const vec4 &col1, const vec3 &col2, const vec2 &col3, float col4) noexcept
C++ wrapper around shz_xmtrx_init_lower_diagonal().
static void apply_permutation_wzyx() noexcept
C++ wrapper around shz_xmtrx_apply_permutation_wzyx().
static void rotate_yxz(float y, float x, float z) noexcept
C++ wrapper around shz_xmtrx_rotate_yxz().
static void apply_rotation_y(float y) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_y().
static vec4 transform(const vec4 &in) noexcept
C++ wrapper around shz_xmtrx_transform_vec4().
static void init_scale(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_init_scale().
static void apply_rotation_quat(const quat &q) noexcept
C++ wrapper around shz_xmtrx_apply_rotation_quat().
static float determinant() noexcept
C++ wrapper around shz_xmtrx_determinant().
static vec3 transform(const vec3 &in) noexcept
C++ wrapper around shz_xmtrx_transform_vec3().
static void apply_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept
C++ wrapper around shz_xmtrx_apply_frustum().
static void apply_reverse_transpose(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_transpose_unaligned_4x4().
static void apply_reverse_transpose(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_transpose_4x4().
static void init_scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_scale().
static void apply_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_apply_translation().
static void add_symmetric_skew(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_add_symmetric_skew().
static void apply_scale(const vec3 &v) noexcept
C++ wrapper around shz_xmtrx_apply_scale().
static void add_symmetric_skew(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_add_symmetric_skew().
static void apply_symmetric_skew(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_apply_symmetric_skew().
static void rotate_y(float radians) noexcept
C++ wrapper around shz_xmtrx_rotate_x().
static void apply_transpose(const float cArray[16]) noexcept
C++ wrapper around shz_xmtrx_apply_transpose_unaligned_4x4().
static void apply_scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_apply_scale().
static void apply_reverse_transpose(const std::array< float, 16 > &array) noexcept
C++ wrapper around shz_xmtrx_apply_reverse_transpose_unaligned_4x4().