2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
85} shz_xmtrx_reg_t, shz_xmtrx_reg;
88
89
90
119
120
121
134 const shz_vec4_t* c2,
135 const shz_vec4_t* c3,
136 const shz_vec4_t* c4) SHZ_NOEXCEPT;
140 const shz_vec4_t* r2,
141 const shz_vec4_t* r3,
142 const shz_vec4_t* r4) SHZ_NOEXCEPT;
157
158
159
160
161
163 const shz_vec4_t* c2,
164 const shz_vec4_t* c3) SHZ_NOEXCEPT;
167
168
169
170
171
173 const shz_vec4_t* r2,
174 const shz_vec4_t* r3) SHZ_NOEXCEPT;
177
178
179
180
181
183 const shz_vec3_t* c2,
184 const shz_vec3_t* c3,
185 const shz_vec3_t* c4) SHZ_NOEXCEPT;
199
200
201
233
234
235
241
242
243
244
245
246
247
248SHZ_DEPRECATED(
"Operation is always safe now. Use default version.")
249SHZ_INLINE
void shz_xmtrx_init_identity_safe(
void) SHZ_NOEXCEPT;
276
277
278
279
280
281
285
286
287
288
289
290
294
295
296
297
298
299
303
304
305
306
307
308
312
313
314
315
316
317
321
322
323
324
325
326
327
328
356
357
358
359
360
361
362
363
367
368
369
373
374
375
376SHZ_INLINE
void shz_xmtrx_init_ortho(
float left,
float right,
float bottom,
float top,
float znear,
float zfar) SHZ_NOEXCEPT;
379
380
381
382SHZ_INLINE
void shz_xmtrx_init_frustum(
float left,
float right,
float bottom,
float top,
float znear,
float zfar) SHZ_NOEXCEPT;
385
386
387
391
392
393
394
400
401
402
465
466
467
468
469
470
471
472
476
477
478
479
480
481
482
483
487
488
489
490
491
492
493
494
498
499
500
501
502
503
504
505
518SHZ_INLINE
void shz_xmtrx_apply_ortho(
float left,
float right,
float bottom,
float top,
float znear,
float zfar) SHZ_NOEXCEPT;
521SHZ_INLINE
void shz_xmtrx_apply_frustum(
float left,
float right,
float bottom,
float top,
float znear,
float zfar) SHZ_NOEXCEPT;
524
525
526
527
528
529
530
531
535
536
537
538
539
540
541
542
563
564
565
595SHZ_INLINE
void shz_xmtrx_rotate(
float radians,
float xAxis,
float yAxis,
float zAxis) SHZ_NOEXCEPT;
600
601
602
613
614
615
618
619
620
621
622
623
624
625
626
627
629 const shz_mat4x4_t* matrix2) SHZ_NOEXCEPT;
632
633
634
635
636
637
638
640 const float matrix2[16]) SHZ_NOEXCEPT;
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
659 const shz_mat4x4_t* in) SHZ_NOEXCEPT;
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
678 const float in[16]) SHZ_NOEXCEPT;
681
682
683
684
685
686
687
688
689
690
691
693 const shz_mat4x4_t* matrix1,
694 const shz_mat4x4_t* matrix2) SHZ_NOEXCEPT;
697
698
699
700
701
702
703
705 const float matrix1[16],
706 const float matrix2[16]) SHZ_NOEXCEPT;
709
710
711
712
713
714
715
716
717
718
720 const shz_mat3x4_t* matrix2) SHZ_NOEXCEPT;
723
724
725
726
727
728
729
730
731
732
733
734
735
736
738 const shz_mat3x4_t* matrix1,
739 const shz_mat3x4_t* matrix2) SHZ_NOEXCEPT;
742
743
744
745
746
747
748
749
750
751
752
753
754
755
757 const shz_mat3x3_t* matrix1,
758 const shz_mat3x3_t* matrix2) SHZ_NOEXCEPT;
763
764
765
785
786
787
798
799
800
806
807
808
809
815
816
817
828
829
830
848
849
850
851
852
853
857
858
859
860
861
862
863
864
865
866
867SHZ_INLINE
void shz_xmtrx_blend(
const shz_mat4x4_t* joint_matrix,
float weight) SHZ_NOEXCEPT;
871#include "inline/shz_xmtrx.inl.h"
#define SHZ_DECLARE_STRUCT(n, t)
Macro which forward declares a struct and its typedef.
#define SHZ_DECLARE_STRUCT_ALIGNED(n, t, a)
Macro which forward declares a manually aligned struct and its typedef.
void shz_xmtrx_init_diagonal(float x, float y, float z, float w) noexcept
Initializes XMTRX to be a diagonal matrix with the given diagonal values.
void shz_xmtrx_apply_rotation_z(float z) noexcept
Transforms the values of the inner 3x3 matrix by a rotation matrix of z radians about the Z axis.
void shz_xmtrx_apply_transpose_3x3(const shz_mat3x3_t *matrix) noexcept
Multiplies and accumulates the transpose of the given 3x3 matrix onto XMTRX, not modifying other elem...
void shz_xmtrx_load_transpose_3x3(const shz_mat3x3_t *matrix) noexcept
Loads the transpose of the given 3x3 matrix into XMTRX, initializing its remaining elements to identi...
void shz_xmtrx_apply_reverse_3x4(const shz_mat3x4_t *mat) noexcept
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.
void shz_xmtrx_init_upper_triangular(float col1, shz_vec2_t col2, shz_vec3_t col3, shz_vec4_t col4) noexcept
Initializes XMTRX to be an upper triangular matrix with the given column values.
shz_vec4_t shz_xmtrx_read_col(unsigned int index) noexcept
Returns the values at the given column index, as a 4D vector.
shz_quat_t shz_xmtrx_to_quat(void) noexcept
Constructs a quaternion from the 3D rotation matrix within XMTRX.
void shz_xmtrx_load_apply_store_unaligned_4x4(float out[16], const float matrix1[16], const float matrix2[16]) noexcept
Loads XMTRX with the result of applying unaligned matrix2 onto unaligned matrix1, storing the result.
void shz_xmtrx_invert(void) noexcept
Inverts XMTRX in-place.
void shz_xmtrx_init_rotation_zyx(float zAngle, float yAngle, float xAngle) noexcept
Initializes XMTRX to be a 3D Z-Y-X rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_store_3x4(shz_mat3x4_t *matrix) noexcept
Stores the top-left 3x4 values currently held within XMTRX into the given matrix.
void shz_xmtrx_store_unaligned_4x4(float matrix[16]) noexcept
Stores the current values held within XMTRX into the given unaligned 16-float array.
void shz_xmtrx_init_identity(void) noexcept
Initializes XMTRX to the 4x4 identity matrix.
void shz_xmtrx_load_apply_store_3x3(shz_mat3x3_t *out, const shz_mat3x3_t *matrix1, const shz_mat3x3_t *matrix2) noexcept
Loads XMTRX with the 3x3 result of applying matrix2 onto matrix1, storing the result.
void shz_xmtrx_apply_rotation_quat(shz_quat_t quat) noexcept
Transforms the values of the inner 3x3 matrix by the rotation matrix represented by the given quatern...
void shz_xmtrx_blend(const shz_mat4x4_t *joint_matrix, float weight) noexcept
Adds and accumulates a scaled 4x4 matrix onto XMTRX.
void shz_xmtrx_load_transpose_3x4(const shz_mat3x4_t *matrix) noexcept
Loads XMTRX with the transpose of the given 3x4 matrix, initializing the bottom row to identity.
void shz_xmtrx_load_unaligned_4x4(const float matrix[16]) noexcept
Loads the given array of unaligned 16 float values as the 4x4 XMTRX matrix.
void shz_xmtrx_set_scale(float x, float y, float z) noexcept
Sets only the inner 3x3 submatrix of XMTRX to be a scaling matrix.
void shz_xmtrx_rotate_x(float radians) noexcept
Multiplies and accumulates XMTRX by a 3D rotation matrix about the X axis.
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
Loads the 3x4 matrix formed from the given 4 3D column vectors into XMTRX.
void shz_xmtrx_set_translation(float x, float y, float z) noexcept
Sets only the translational components of XMTRX to the given values.
void shz_xmtrx_scale_reverse(float x, float y, float z) noexcept
Pre-multiplies and accumulates XMTRX onto the 3D scaling matrix with the given components.
void shz_xmtrx_store_transpose_3x3(shz_mat3x3_t *matrix) noexcept
Stores the transpose of the top-left 3x3 values currently held within XMTRX into the given matrix.
void shz_xmtrx_translate_reverse(float x, float y, float z) noexcept
Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given components.
void shz_xmtrx_swap_cols(unsigned int index1, unsigned int index2) noexcept
Swaps the values of the columns with the given indices.
void shz_xmtrx_write_col(unsigned int index, shz_vec4_t vector) noexcept
Sets the values at the given column index to the given 4D vector.
void shz_xmtrx_apply_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept
Applies a 2D orthographic projection matrix onto XMTRX, equivalent to glOrtho().
void shz_xmtrx_apply_transpose_4x4(const shz_mat4x4_t *matrix) noexcept
Multiplies and accumulates the transpose of the given 4x4 matrix onto XMTRX.
void shz_xmtrx_rotate_z(float radians) noexcept
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Z axis.
void shz_xmtrx_load_apply_store_3x4(shz_mat3x4_t *out, const shz_mat3x4_t *matrix1, const shz_mat3x4_t *matrix2) noexcept
Loads XMTRX with the 3x4 result of applying matrix2 onto matrix1, storing the result.
void shz_xmtrx_negate(void) noexcept
Negates each element held within XMTRX.
void shz_xmtrx_load_apply_4x4(const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) noexcept
Loads XMTRX with the result of applying matrix2 onto matrix1.
void shz_xmtrx_rotate_zyx(float zRadians, float yRadians, float xRadians) noexcept
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then Y then X axes.
void shz_xmtrx_load_apply_unaligned_4x4(const float matrix1[16], const float matrix2[16]) noexcept
Loads XMTRX with the result of applying unaligned matrix2 onto matrix1.
void shz_xmtrx_rotate(float radians, float xAxis, float yAxis, float zAxis) noexcept
Multiplies and accumulates XMTRX by the 3D rotation matrix formed by the given axis and angle (glRota...
void shz_xmtrx_apply_reverse_transpose_3x4(const shz_mat3x4_t *mat) noexcept
Multiplies and accumulates XMTRX onto the transpose of matrix, storing the result as XMTRX.
void shz_xmtrx_init_zero(void) noexcept
Initializes XMTRX to contain the value of 0.0f for each element.
void shz_xmtrx_init_lower_triangular(shz_vec4_t col1, shz_vec3_t col2, shz_vec2_t col3, float col4) noexcept
Initializes XMTRX to be a lower triangular matrix with the given column values.
void shz_xmtrx_init_one(void) noexcept
Initializes XMTRX to contain the value of 1.0f for each element.
void shz_xmtrx_init_fill(float value) noexcept
Initializes XMTRX to contain the given value for each element.
void shz_xmtrx_add_4x4(const shz_mat4x4_t *mat) noexcept
Adds each element within mat to each element within XMTRX, storing the result in XMTRX.
void shz_xmtrx_rotate_xyz(float xRadians, float yRadians, float zRadians) noexcept
Multiplies and accumulates XMTRX by 3D rotation matrices about the X then Y then Z axes.
void shz_xmtrx_init_rotation_z(float z) noexcept
Initializes XMTRX to be a 3D rotation matrix by z radians about the Z axis.
shz_xmtrx_reg
Registers comprising XMTRX, in the FPU back-bank.
@ 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_rotate_zxy(float zRadians, float xRadians, float yRadians) noexcept
Multiplies and accumulates XMTRX by 3D rotation matrices about the Z then X then Y axes.
void shz_xmtrx_apply_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept
Applies a frustum projection matrix onto XMTRX, equivalent to glFrustum().
void shz_xmtrx_apply_unaligned_4x4(const float matrix[16]) noexcept
Multiplies and accumulates the given 16-entry float array as a 4x4 matrix onto XMTRX.
void shz_xmtrx_load_transpose_unaligned_4x4(const float matrix[16]) noexcept
Loads XMTRX with the transpose of the 4x4 matrix created from the given unaligned array of 16 floats.
void shz_xmtrx_load_wxyz_4x4(const shz_mat4x4_t *matrix) noexcept
Loads the given 4x4 matrix as XMTRX, with the 4th column for translation being loaded as the first co...
void shz_xmtrx_apply_store_unaligned_4x4(float out[16], const float in[16]) noexcept
Multiplies XMTRX by the unaligned matrix, in, storing the result within the unaligned matrix,...
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
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D column vectors.
void shz_xmtrx_apply_symmetric_skew(float x, float y, float z) noexcept
Multiplies and accumulates the 3D symmetric skew matrix with the given components onto XMTRX.
void shz_xmtrx_init_rotation_y(float y) noexcept
Initializes XMTRX to be a 3D rotation matrix by y radians about the Y axis.
void shz_xmtrx_apply_reverse_unaligned_4x4(const float matrix[16]) noexcept
Multiplies and accumulates XMTRX onto the given float array as a 4x4 matrix, storing the result as XM...
void shz_xmtrx_load_2x2(const shz_mat2x2_t *matrix) noexcept
Loads the given 2x2 matrix into XMTRX, initializing its remaining elements to identity.
void shz_xmtrx_init_rotation_quat(shz_quat_t q) noexcept
Initializes XMTRX to a 3D rotation matrix with its orientation given by a quaternion.
shz_vec4_t shz_xmtrx_read_row(unsigned int index) noexcept
Returns the values at the the given row index, as a 4D vector.
void shz_xmtrx_init_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept
Initializes XMTRX to an orthographic projection matrix, equivalent to glOrtho().
void shz_xmtrx_rotate_y(float radians) noexcept
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Y axis.
void shz_xmtrx_apply_rotation_xyz(float xAngle, float yAngle, float zAngle) noexcept
Multiplies and accumulates XMTRX by a 3D X-Y-Z rotation matrix, with the corresponding angles given i...
void shz_xmtrx_store_transpose_3x4(shz_mat3x4_t *matrix) noexcept
Stores the transpose of the top-left 3x4 values currently held within XMTRX into the given matrix.
shz_vec3_t shz_xmtrx_get_translation(void) noexcept
Returns the translational components from the last column of XMTRX, as a 3D vector.
void shz_xmtrx_apply_permutation_wzyx(void) noexcept
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_apply_reverse_4x4(const shz_mat4x4_t *matrix) noexcept
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.
void shz_xmtrx_store_4x4(shz_mat4x4_t *matrix) noexcept
Stores the current values held within XMTRX into the given 4x4 matrix.
void shz_xmtrx_init_rotation_zxy(float zAngle, float xAngle, float yAngle) noexcept
Initializes XMTRX to be a 3D Z-X-Y rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_apply_2x2(const shz_mat2x2_t *matrix) noexcept
Multiplies and accumulates the given 2x2 matrix onto XMTRX, not modifying other elements.
void shz_xmtrx_apply_3x3(const shz_mat3x3_t *matrix) noexcept
Multiplies and accumulates the given 3x3 matrix onto XMTRX, not modifying other elements.
void shz_xmtrx_init_rotation_yxz(float yAngle, float xAngle, float zAngle) noexcept
Initializes XMTRX to be a 3D Y-X-Z rotation matrix, with the corresponding angles given in radians.
void shz_xmtrx_apply_perspective(float fov, float aspect, float znear) noexcept
Multiplies and accumulates the perspective matrix constructed from the given values onto XMTRX.
void shz_xmtrx_swap_rows(unsigned int index1, unsigned int index2) noexcept
Swaps the values of the rows with the given indices.
void shz_xmtrx_apply_rotation_yxz(float yAngle, float xAngle, float zAngle) noexcept
Multiplies and accumulates XMTRX by a 3D Y-X-Z rotation matrix, with the corresponding angles given i...
void shz_xmtrx_apply_rotation_y(float y) noexcept
Transforms the values of the inner 3x3 matrix by a rotation matrix of y radians about the Y axis.
void shz_xmtrx_init_scale(float x, float y, float z) noexcept
Initializes XMTRX to be a 3D scale matrix with the given dimensions.
void shz_xmtrx_apply_store_4x4(shz_mat4x4_t *out, const shz_mat4x4_t *in) noexcept
Multiplies XMTRX by the matrix, in, storing the result within the matrix, out.
void shz_xmtrx_apply_4x4(const shz_mat4x4_t *matrix) noexcept
Multiplies and accumulates the given 4x4 matrix onto XMTRX.
void shz_xmtrx_load_3x3(const shz_mat3x3_t *matrix) noexcept
Loads the given 3x3 matrix into XMTRX, initalizing its remaining elements to identity.
shz_vec3_t shz_xmtrx_get_scale(void) noexcept
Returns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.
void shz_xmtrx_apply_reverse_transpose_4x4(const shz_mat4x4_t *matrix) noexcept
Multiplies and accumulates XMTRX onto the transpose of matrix, storing the result as XMTRX.
shz_vec3_t shz_xmtrx_transform_vec3(shz_vec3_t vec) noexcept
Returns the 3D vector that is the result of transforming vec by XMTRX.
void shz_xmtrx_load_rows_3x4(const shz_vec4_t *r1, const shz_vec4_t *r2, const shz_vec4_t *r3) noexcept
Loads the 3x4 matrix formed from the given 3 4D row vectors into XMTRX.
void shz_xmtrx_init_rotation_xyz(float xAngle, float yAngle, float zAngle) noexcept
Initializes XMTRX to be a 3D X-Y-Z rotation matrix, with the corresponding angles given in radians.
shz_vec3_t shz_xmtrx_transform_point3(shz_vec3_t pt) noexcept
Returns the 3D point that is the result of transforming pt by XMTRX.
void shz_xmtrx_apply_rotation_zyx(float zAngle, float yAngle, float xAngle) noexcept
Multiplies and accumulates XMTRX by a 3D Z-Y-X rotation matrix, with the corresponding angles given i...
void shz_xmtrx_init_symmetric_skew(float x, float y, float z) noexcept
Initializes XMTRX to be the 3D symmetric skew matrix formed from the given vector components.
void shz_xmtrx_store_transpose_4x4(shz_mat4x4_t *matrix) noexcept
Stores the transpose of the current values held within XMTRX into the given 4x4 matrix.
void shz_xmtrx_apply_self(void) noexcept
Multiplies and accumulatse the XMTRX matrix by itself, squaring it.
float shz_xmtrx_determinant(void) noexcept
Returns the determinant of XMTRX.
void shz_xmtrx_apply_rotation(float angle, float x, float y, float z) noexcept
Transforms the values of the inner 3x3 matrix by a rotation matrix of angle radians about the axis wi...
shz_vec2_t shz_xmtrx_transform_point2(shz_vec2_t pt) noexcept
Returns the 2D point that is the result of transforming pt by XMTRX.
void shz_xmtrx_store_transpose_unaligned_4x4(float matrix[16]) noexcept
Stores the transpose of the the current values held within XMTRX into the given 16-element float arra...
void shz_xmtrx_apply_transpose_unaligned_4x4(const float matrix[16]) noexcept
Multiplies and accumulates the transpose of the given 16-entry float array as a 4x4 matrix onto XMTRX...
void shz_xmtrx_init_screen(float width, float height) noexcept
Initializes XMTRX to the viewport matrix with the given dimensions.
shz_vec4_t shz_xmtrx_transform_vec4(shz_vec4_t vec) noexcept
Returns the 4D vector that is the result of transforming vec by XMTRX.
void shz_xmtrx_transpose(void) noexcept
Transposes the elements within XMTRX, in-place.
shz_vec2_t shz_xmtrx_transform_vec2(shz_vec2_t vec) noexcept
Returns the 2D vector that is the result of transforming vec by XMTRX.
void shz_xmtrx_apply_3x4(const shz_mat3x4_t *matrix) noexcept
Multiplies and accumulates the given 3x4 matrix onto XMTRX, not modifying other elements.
void shz_xmtrx_init_rotation_x(float x) noexcept
Initializes XMTRX to be a 3D rotation matrix by x radians about the X axis.
void shz_xmtrx_init_permutation_yzwx(void) noexcept
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_load_4x4(const shz_mat4x4_t *matrix) noexcept
Loads the given 4x4 matrix as XMTRX.
void shz_xmtrx_scale(float x, float y, float z) noexcept
Multiplies and accumulates XMTRX by a 3D scaling matrix with the given components (glScalef() equival...
void shz_xmtrx_init_perspective(float fov, float aspect, float znear) noexcept
Initializes XMTRX to a perspective projection matrix.
void shz_xmtrx_apply_permutation_yzwx(void) noexcept
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_apply_scale(float x, float y, float z) noexcept
Multiplies the values of the inner 3x3 matrix by the given 3D scaling terms.
void shz_xmtrx_init_lookat(shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) noexcept
Initializes XMTRX to a "lookAt" view matrix, equivalent to gluLookAt().
void shz_xmtrx_load_apply_store_4x4(shz_mat4x4_t *out, const shz_mat4x4_t *matrix1, const shz_mat4x4_t *matrix2) noexcept
Loads XMTRX with the 4x4 result of applying matrix2 onto matrix1, storing the result.
void shz_xmtrx_apply_permutation_wxyz(void) noexcept
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...
void shz_xmtrx_translate(float x, float y, float z) noexcept
Multiplies and accumulates XMTRX by a 3D translation matrix with the given components (glTranslatef()...
void shz_xmtrx_apply_rotation_zxy(float zAngle, float xAngle, float yAngle) noexcept
Multiplies and accumulates XMTRX by a 3D Z-X-Y rotation matrix, with the corresponding angles given i...
float shz_xmtrx_read(shz_xmtrx_reg_t xf) noexcept
Returns the floating-point value held within the given XMTRX register.
void shz_xmtrx_load_transpose_4x4(const shz_mat4x4_t *matrix) noexcept
Loads XMTRX with the transpose of the given 4x4 matrix.
void shz_xmtrx_init_translation(float x, float y, float z) noexcept
Initializes XMTRX to be a 3D translation matrix to the given coordinates.
void shz_xmtrx_sub_4x4(const shz_mat4x4_t *mat) noexcept
Subtracts each element within mat from each element within XMTRX, storing the result in XMTRX.
void shz_xmtrx_init_permutation_wxyz(void) noexcept
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_apply_lookat(shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) noexcept
Applies the 3D "lookAt" matrix constructed with the given vector components onto XMTRX....
void shz_xmtrx_init_outer_product(shz_vec4_t x, shz_vec4_t y) noexcept
Initializes XMTRX to the 4D matrix resulting from taking the outer product of the two 4D vectors.
void shz_xmtrx_apply_reverse_transpose_unaligned_4x4(const float matrix[16]) noexcept
Multiplies and accumulates XMTRX onto the transpose of the given float array as a 4x4 matrix,...
void shz_xmtrx_load_3x4(const shz_mat3x4_t *matrix) noexcept
Loads the given 3x4 matrix into XMTRX, initializing its remaining elements to identity.
void shz_xmtrx_init_permutation_wzyx(void) noexcept
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...
void shz_xmtrx_load_cols_4x3(const shz_vec4_t *c1, const shz_vec4_t *c2, const shz_vec4_t *c3) noexcept
Loads the 3x4 matrix formed from the given 3 4D column vectors into XMTRX.
void shz_xmtrx_store_3x3(shz_mat3x3_t *matrix) noexcept
Stores the top-left 3x3 values currently held within XMTRX into the given matrix.
void shz_xmtrx_apply_screen(float width, float height) noexcept
Multiplies and accumulates the viewport matrix created with the given components.
void shz_xmtrx_load_apply_3x4(const shz_mat3x4_t *matrix1, const shz_mat3x4_t *matrix2) noexcept
Loads XMTRX with the result of applying matrix2 onto matrix1.
void shz_xmtrx_apply_translation(float x, float y, float z) noexcept
Adds the values of the given 3 components to the 3D translation components of XMTRX.
void shz_xmtrx_rotate_yxz(float yRadians, float xRadians, float zRadians) noexcept
Multiplies and accumulates XMTRX by 3D rotation matrices about the Y then X then Z axes.
void shz_xmtrx_abs(void) noexcept
Takes the absolute value of each element held within XMTRX.
void shz_xmtrx_store_2x2(shz_mat2x2_t *matrix) noexcept
Stores the top-left 2x2 values currently held within XMTRX into the given matrix.
void shz_xmtrx_apply_rotation_x(float x) noexcept
Transforms the values of the inner 3x3 matrix by a rotation matrix of x radians about the X axis.
void shz_xmtrx_write_row(unsigned int index, shz_vec4_t vector) noexcept
Sets the values at the given row index to the given 4D vector.
void shz_xmtrx_init_rotation(float angle, float xAxis, float yAxis, float zAxis) noexcept
Initializes XMTRX to a 3D rotation matrix of angle radians about the vector with the given components...
void shz_xmtrx_init_rotation_dir(float angle, float x, float y, float z) noexcept
Initializes XMTRX to contain a 3D rotation matrix of angle radians about the given axis.
void shz_xmtrx_write(shz_xmtrx_reg_t xf, float value) noexcept
Sets the floating-point value held within the given XMTRX register to value.
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
Sets XMTRX equal to the 4x4 matrix created from the 4 given 4D row vectors.
void shz_xmtrx_apply_transpose_3x4(const shz_mat3x4_t *matrix) noexcept
Multiplies and accumulates the transpose of the given 3x4 matrix onto XMTRX, not modifying other elem...
void shz_xmtrx_init_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept
Initializes XMTRX to a frustum projection matrix, equivalent to glFrustum().
Structure representing a 4x4 column-major matrix.