SH4ZAM! 0.1.0
Fast math library for the Sega Dreamcast's SH4 CPU
Loading...
Searching...
No Matches
shz::xmtrx Struct Reference

#include <shz_xmtrx.hpp>

Public Types

enum  reg {
  XF0 , XF1 , XF2 , XF3 ,
  XF4 , XF5 , XF6 , XF7 ,
  XF8 , XF9 , XF10 , XF11 ,
  XF12 , XF13 , XF14 , XF15
}
 
using reg_t
 

Static Public Member Functions

Accessors

Setting and retrieving individual XMTRX register values.

static float read (reg xf) noexcept
 
static void write (reg xf, float value) noexcept
 
static vec4 read_row (unsigned int index) noexcept
 
static vec4 read_col (unsigned int index) noexcept
 
static void write_row (unsigned int index, vec4 vector) noexcept
 
static void write_col (unsigned int index, vec4 vector) noexcept
 
static void swap_rows (unsigned int index1, unsigned int index2) noexcept
 
static void swap_cols (unsigned int index1, unsigned int index2) noexcept
 
Loading

Routines for loading XMTRX contents from memory.

static void load (const shz_mat4x4_t &mat4) noexcept
 
static void load (const float cArray[16]) noexcept
 
static void load (std::array< float, 16 > array) noexcept
 
static void load_transpose (const shz_mat4x4_t &mat4) noexcept
 
static void load_transpose (const float cArray[16]) noexcept
 
static void load_transpose (std::array< float, 16 > array) noexcept
 
static void load_wxyz (const shz_mat4x4_t &mat4) noexcept
 
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
 
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
 
static void load (const shz_mat3x4_t &mat) noexcept
 
Storing

Routines for saving XMTRX contents to memory.

static void store (shz_mat4x4_t *mat) noexcept
 
static void store (float cArray[16]) noexcept
 
static void store (std::array< float, 16 > *array) noexcept
 
static void store_transpose (shz_mat4x4_t *mat) noexcept
 
static void store_transpose (float cArray[16]) noexcept
 
static void store_transpose (std::array< float, 16 > *array) noexcept
 
static void store (shz_mat3x4_t *mat) noexcept
 
Initialization

Routines used to initialize the entirety of XMTRX.

static void init_identity () noexcept
 
static void init_identity_safe () noexcept
 
static void init_zero () noexcept
 
static void init_one () noexcept
 
static void init_fill (float value) noexcept
 
static void init_translation (float x, float y, float z) noexcept
 
static void init_scale (float x, float y, float z) noexcept
 
static void init_rotation_x (float x) noexcept
 
static void init_rotation_y (float y) noexcept
 
static void init_rotation_z (float z) noexcept
 
static void init_rotation_xyz (float x, float y, float z) noexcept
 
static void init_rotation_zyx (float z, float y, float x) noexcept
 
static void init_rotation_zxy (float z, float x, float y) noexcept
 
static void init_rotation_yxz (float y, float x, float z) noexcept
 
static void init_rotation (float angle, float x, float y, float z) noexcept
 
static void init_diagonal (float x, float y, float z, float w) noexcept
 
static void init_upper_triangular (float col1, vec2 col2, vec3 col3, vec4 col4) noexcept
 
static void init_lower_triangular (vec4 col1, vec3 col2, vec2 col3, float col4) noexcept
 
static void init_symmetric_skew (float x, float y, float z) noexcept
 
static void init_outer_product (shz_vec4_t a, shz_vec4_t b) noexcept
 
static void init_screen (float width, float height) noexcept
 
static void init_lookat (vec3 eye, vec3 center, vec3 up) noexcept
 
static void init_ortho (float left, float right, float bottom, float top, float near, float far) noexcept
 
static void init_frustum (float left, float right, float bottom, float top, float near, float far) noexcept
 
static void init_perspective (float fov, float aspect, float near_z) noexcept
 
static void init_rotation_quat (quat q) noexcept
 
static void init_permutation_wxyz () noexcept
 
static void init_permutation_yzwx () noexcept
 
Apply Operation

Updates only relevant values of XMTRX based on the given transform.

static void apply (const shz_mat4x4_t &mat4) noexcept
 
static void apply (const float cArray[16]) noexcept
 
static void apply (const std::array< float, 16 > array) noexcept
 
static void apply_transpose (const shz_mat4x4_t &mat4) noexcept
 
static void apply_transpose (const float cArray[16]) noexcept
 
static void apply_transpose (const std::array< float, 16 > array) noexcept
 
static void apply_reverse (const shz_mat4x4_t &mat4) noexcept
 
static void apply_reverse (const float cArray[16]) noexcept
 
static void apply_reverse (const std::array< float, 16 > array) noexcept
 
static void apply_reverse_transpose (const shz_mat4x4_t &mat4) noexcept
 
static void apply_reverse_transpose (const float cArray[16]) noexcept
 
static void apply_reverse_transpose (const std::array< float, 16 > array) noexcept
 
static void apply (const shz_mat3x4_t &mat) noexcept
 
static void apply_translation (float x, float y, float z) noexcept
 
static void apply_scale (float x, float y, float z) noexcept
 
static void apply_rotation_x (float x) noexcept
 
static void apply_rotation_y (float y) noexcept
 
static void apply_rotation_z (float z) noexcept
 
static void apply_rotation_xyz (float x, float y, float z) noexcept
 
static void apply_rotation_zyx (float z, float y, float x) noexcept
 
static void apply_rotation_zxy (float z, float x, float y) noexcept
 
static void apply_rotation_yxz (float y, float x, float z) noexcept
 
static void apply_rotation (float angle, float x, float y, float z) noexcept
 
static void apply_rotation_quat (shz_quat_t quat) noexcept
 
static void apply_lookat (vec3 eye, vec3 center, vec3 up) noexcept
 
static void apply_ortho (float left, float right, float bottom, float top, float near, float far) noexcept
 
static void apply_frustum (float left, float right, float bottom, float top, float near, float far) noexcept
 
static void apply_perspective (float fov, float aspect, float near_z) noexcept
 
static void apply_symmetric_skew (float x, float y, float z) noexcept
 
static void apply_screen (float width, float height) noexcept
 
static void apply_permutation_wxyz () noexcept
 
static void apply_permutation_yzwx () noexcept
 
static void apply_self () noexcept
 
OpenGL Operations

OpenGL-style matrix transformation operations.

static void translate (float x, float y, float z) noexcept
 
static void scale (float x, float y, float z) noexcept
 
static void rotate_x (float radians) noexcept
 
static void rotate_y (float radians) noexcept
 
static void rotate_z (float radians) noexcept
 
static void rotate_xyz (float x, float y, float z) noexcept
 
static void rotate_zyx (float z, float y, float x) noexcept
 
static void rotate_zxy (float z, float x, float y) noexcept
 
static void rotate_yxz (float y, float x, float z) noexcept
 
static void rotate (float radians, float x, float y, float z) noexcept
 
Compound Operations

Multiple operations combined into one pipelined transaction.

static void load_apply (const shz_mat4x4_t &mat1, const shz_mat4x4_t &mat2) noexcept
 
static void load_apply (const float matrix1[16], const float matrix2[16]) noexcept
 
static void load_apply_store (shz_mat4x4_t *dst, const shz_mat4x4_t &mat1, const shz_mat4x4_t &mat2) noexcept
 
static void load_apply_store (float out[16], const float matrix1[16], const float matrix2[16]) noexcept
 
static void load_apply_store (shz_mat3x4_t *dst, const shz_mat3x4_t &mat1, const shz_mat3x4_t &mat2) noexcept
 
static void load_apply_store (shz_mat3x3_t *dst, const shz_mat3x3_t &mat1, const shz_mat3x3_t &mat2) noexcept
 
Transformations

Transforming vectors and points against XMTRX.

static vec4 transform (shz_vec4_t in) noexcept
 
static vec3 transform (shz_vec3_t in) noexcept
 
static vec2 transform (shz_vec2_t in) noexcept
 
static vec3 transform_point (shz_vec3_t pt) noexcept
 
static vec2 transform_point (shz_vec2_t pt) noexcept
 
Setters

Sets the values of related XMTRX components.

static void set_translation (float x, float y, float z) noexcept
 
Miscellaneous

Random operations and conversions on XMTRX.

static void add (const shz_mat4x4_t &mat) noexcept
 
static void sub (const shz_mat4x4_t &mat) noexcept
 
static void add_diagonal (float x, float y, float z, float w) noexcept
 
static void add_symmetric_skew (float x, float y, float z) noexcept
 
static void transpose () noexcept
 
static void negate () noexcept
 
static void abs () noexcept
 
static void init_fft_weights (float radians) noexcept
 
static quat to_quat () noexcept
 
static float determinant () noexcept
 
static void invert () noexcept
 

Detailed Description

Static structure around the 4x4 XMTRX FP register back-bank.

This structure provides the C++ bindings to the XMTRX API as a series of static member functions wrapping the C API.

See also
xmtrx

Definition at line 36 of file shz_xmtrx.hpp.

Member Typedef Documentation

◆ reg_t

Non-POSIX style reg_t alias.

Definition at line 59 of file shz_xmtrx.hpp.

Member Enumeration Documentation

◆ reg

FP back-bank registers comprising XMTRX.

Enumerator
XF0 

FP register XF0.

XF1 

FP register XF1.

XF2 

FP register XF2.

XF3 

FP register XF3.

XF4 

FP register XF4.

XF5 

FP register XF5.

XF6 

FP register XF6.

XF7 

FP register XF7.

XF8 

FP register XF8.

XF9 

FP register XF9.

XF10 

FP register XF10.

XF11 

FP register XF11.

XF12 

FP register XF12.

XF13 

FP register XF13.

XF14 

FP register XF14.

XF15 

FP register XF15.

Definition at line 39 of file shz_xmtrx.hpp.

39 {
40 XF0 = SHZ_XMTRX_XF0, //!< FP register XF0
41 XF1 = SHZ_XMTRX_XF1, //!< FP register XF1
42 XF2 = SHZ_XMTRX_XF2, //!< FP register XF2
43 XF3 = SHZ_XMTRX_XF3, //!< FP register XF3
44 XF4 = SHZ_XMTRX_XF4, //!< FP register XF4
45 XF5 = SHZ_XMTRX_XF5, //!< FP register XF5
46 XF6 = SHZ_XMTRX_XF6, //!< FP register XF6
47 XF7 = SHZ_XMTRX_XF7, //!< FP register XF7
48 XF8 = SHZ_XMTRX_XF8, //!< FP register XF8
49 XF9 = SHZ_XMTRX_XF9, //!< FP register XF9
50 XF10 = SHZ_XMTRX_XF10, //!< FP register XF10
51 XF11 = SHZ_XMTRX_XF11, //!< FP register XF11
52 XF12 = SHZ_XMTRX_XF12, //!< FP register XF12
53 XF13 = SHZ_XMTRX_XF13, //!< FP register XF13
54 XF14 = SHZ_XMTRX_XF14, //!< FP register XF14
55 XF15 = SHZ_XMTRX_XF15 //!< FP register XF15
56 };
@ SHZ_XMTRX_XF8
FP register xf8.
Definition shz_xmtrx.h:73
@ SHZ_XMTRX_XF9
FP register xf9.
Definition shz_xmtrx.h:74
@ SHZ_XMTRX_XF12
FP register xf12.
Definition shz_xmtrx.h:77
@ SHZ_XMTRX_XF11
FP register xf11.
Definition shz_xmtrx.h:76
@ SHZ_XMTRX_XF14
FP register xf14.
Definition shz_xmtrx.h:79
@ SHZ_XMTRX_XF3
FP register xf3.
Definition shz_xmtrx.h:68
@ SHZ_XMTRX_XF6
FP register xf6.
Definition shz_xmtrx.h:71
@ SHZ_XMTRX_XF4
FP register xf4.
Definition shz_xmtrx.h:69
@ SHZ_XMTRX_XF13
FP register xf13.
Definition shz_xmtrx.h:78
@ SHZ_XMTRX_XF10
FP register xf10.
Definition shz_xmtrx.h:75
@ SHZ_XMTRX_XF2
FP register xf2.
Definition shz_xmtrx.h:67
@ SHZ_XMTRX_XF0
FP register xf0.
Definition shz_xmtrx.h:65
@ SHZ_XMTRX_XF5
FP register xf5.
Definition shz_xmtrx.h:70
@ SHZ_XMTRX_XF7
FP register xf7.
Definition shz_xmtrx.h:72
@ SHZ_XMTRX_XF15
FP register xf15.
Definition shz_xmtrx.h:80
@ SHZ_XMTRX_XF1
FP register xf1.
Definition shz_xmtrx.h:66
@ XF9
FP register XF9.
Definition shz_xmtrx.hpp:49
@ XF11
FP register XF11.
Definition shz_xmtrx.hpp:51
@ XF10
FP register XF10.
Definition shz_xmtrx.hpp:50
@ XF4
FP register XF4.
Definition shz_xmtrx.hpp:44
@ XF15
FP register XF15.
Definition shz_xmtrx.hpp:55
@ XF7
FP register XF7.
Definition shz_xmtrx.hpp:47
@ XF13
FP register XF13.
Definition shz_xmtrx.hpp:53
@ XF0
FP register XF0.
Definition shz_xmtrx.hpp:40
@ XF8
FP register XF8.
Definition shz_xmtrx.hpp:48
@ XF1
FP register XF1.
Definition shz_xmtrx.hpp:41
@ XF12
FP register XF12.
Definition shz_xmtrx.hpp:52
@ XF6
FP register XF6.
Definition shz_xmtrx.hpp:46
@ XF3
FP register XF3.
Definition shz_xmtrx.hpp:43
@ XF14
FP register XF14.
Definition shz_xmtrx.hpp:54
@ XF5
FP register XF5.
Definition shz_xmtrx.hpp:45
@ XF2
FP register XF2.
Definition shz_xmtrx.hpp:42

Member Function Documentation

◆ read()

static float shz::xmtrx::read ( reg xf)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_read().

Definition at line 67 of file shz_xmtrx.hpp.

67 {
68 return shz_xmtrx_read(static_cast<shz_xmtrx_reg>(xf));
69 }
float shz_xmtrx_read(shz_xmtrx_reg_t xf) SHZ_NOEXCEPT
Returns the floating-point value held within the given XMTRX register.
shz_xmtrx_reg
Registers comprising XMTRX, in the FPU back-bank.
Definition shz_xmtrx.h:64

◆ write()

static void shz::xmtrx::write ( reg xf,
float value )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_write().

Definition at line 72 of file shz_xmtrx.hpp.

72 {
73 shz_xmtrx_write(static_cast<shz_xmtrx_reg>(xf), value);
74 }
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.

◆ read_row()

static vec4 shz::xmtrx::read_row ( unsigned int index)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_read_row().

Definition at line 77 of file shz_xmtrx.hpp.

77 {
78 return shz_xmtrx_read_row(index);
79 }
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.

◆ read_col()

static vec4 shz::xmtrx::read_col ( unsigned int index)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_read_col().

Definition at line 82 of file shz_xmtrx.hpp.

82 {
83 return shz_xmtrx_read_col(index);
84 }
shz_vec4_t shz_xmtrx_read_col(unsigned int index) SHZ_NOEXCEPT
Returns the values at the given column index, as a 4D vector.

◆ write_row()

static void shz::xmtrx::write_row ( unsigned int index,
vec4 vector )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_write_row().

Definition at line 87 of file shz_xmtrx.hpp.

87 {
88 shz_xmtrx_write_row(index, vector);
89 }
void shz_xmtrx_write_row(unsigned int index, shz_vec4_t vector) SHZ_NOEXCEPT
Sets the values at the given row index to the given 4D vector.

◆ write_col()

static void shz::xmtrx::write_col ( unsigned int index,
vec4 vector )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_write_col().

Definition at line 92 of file shz_xmtrx.hpp.

92 {
93 shz_xmtrx_write_col(index, vector);
94 }
void shz_xmtrx_write_col(unsigned int index, shz_vec4_t vector) SHZ_NOEXCEPT
Sets the values at the given column index to the given 4D vector.

◆ swap_rows()

static void shz::xmtrx::swap_rows ( unsigned int index1,
unsigned int index2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_swap_rows().

Definition at line 97 of file shz_xmtrx.hpp.

97 {
98 shz_xmtrx_swap_rows(index1, index2);
99 }
void shz_xmtrx_swap_rows(unsigned int index1, unsigned int index2) SHZ_NOEXCEPT
Swaps the values of the rows with the given indices.

◆ swap_cols()

static void shz::xmtrx::swap_cols ( unsigned int index1,
unsigned int index2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_swap_cols().

Definition at line 102 of file shz_xmtrx.hpp.

102 {
103 shz_xmtrx_swap_cols(index1, index2);
104 }
void shz_xmtrx_swap_cols(unsigned int index1, unsigned int index2) SHZ_NOEXCEPT
Swaps the values of the columns with the given indices.

◆ load() [1/4]

static void shz::xmtrx::load ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_4x4().

Definition at line 114 of file shz_xmtrx.hpp.

114 {
115 shz_xmtrx_load_4x4(&mat4);
116 }
void shz_xmtrx_load_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Loads the given 4x4 matrix as XMTRX.

◆ load() [2/4]

static void shz::xmtrx::load ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_unaligned_4x4().

Definition at line 119 of file shz_xmtrx.hpp.

119 {
121 }
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.

◆ load() [3/4]

static void shz::xmtrx::load ( std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_unaligned_4x4().

Definition at line 124 of file shz_xmtrx.hpp.

124 {
125 load(array.data());
126 }
static void load(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_load_4x4().

◆ load_transpose() [1/3]

static void shz::xmtrx::load_transpose ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_transpose_4x4().

Definition at line 129 of file shz_xmtrx.hpp.

129 {
131 }
void shz_xmtrx_load_transpose_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Loads XMTRX with the transpose of the given 4x4 matrix.

◆ load_transpose() [2/3]

static void shz::xmtrx::load_transpose ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_transpose_unaligned_4x4().

Definition at line 134 of file shz_xmtrx.hpp.

134 {
136 }
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.

◆ load_transpose() [3/3]

static void shz::xmtrx::load_transpose ( std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_transpose_unaligned_4x4().

Definition at line 139 of file shz_xmtrx.hpp.

139 {
140 load_transpose(array.data());
141 }
static void load_transpose(const shz_mat4x4_t &mat4) noexcept
C++ wrapper around shz_xmtrx_load_transpose_4x4().

◆ load_wxyz()

static void shz::xmtrx::load_wxyz ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_wxyz_4x4().

Definition at line 144 of file shz_xmtrx.hpp.

144 {
146 }
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...

◆ load_cols()

static void shz::xmtrx::load_cols ( const shz_vec4_t & c1,
const shz_vec4_t & c2,
const shz_vec4_t & c3,
const shz_vec4_t & c4 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_cols_4x4().

Definition at line 149 of file shz_xmtrx.hpp.

152 {
153 shz_xmtrx_load_cols_4x4(&c1, &c2, &c3, &c4);
154 }
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.

◆ load_rows()

static void shz::xmtrx::load_rows ( const shz_vec4_t & r1,
const shz_vec4_t & r2,
const shz_vec4_t & r3,
const shz_vec4_t & r4 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_rows_4x4().

Definition at line 157 of file shz_xmtrx.hpp.

160 {
161 shz_xmtrx_load_rows_4x4(&r1, &r2, &r3, &r4);
162 }
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.

◆ load() [4/4]

static void shz::xmtrx::load ( const shz_mat3x4_t & mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_3x4().

Definition at line 165 of file shz_xmtrx.hpp.

165 {
166 shz_xmtrx_load_3x4(&mat);
167 }
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.

◆ store() [1/4]

static void shz::xmtrx::store ( shz_mat4x4_t * mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_4x4().

Definition at line 177 of file shz_xmtrx.hpp.

177 {
179 }
void shz_xmtrx_store_4x4(shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Stores the current values held within XMTRX into the given 4x4 matrix.

◆ store() [2/4]

static void shz::xmtrx::store ( float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_unaligned_4x4().

Definition at line 182 of file shz_xmtrx.hpp.

182 {
184 }
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.

◆ store() [3/4]

static void shz::xmtrx::store ( std::array< float, 16 > * array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_unaligned_4x4().

Definition at line 187 of file shz_xmtrx.hpp.

187 {
188 shz_xmtrx_store_unaligned_4x4(array->data());
189 }

◆ store_transpose() [1/3]

static void shz::xmtrx::store_transpose ( shz_mat4x4_t * mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_transpose_4x4().

Definition at line 192 of file shz_xmtrx.hpp.

192 {
194 }
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.

◆ store_transpose() [2/3]

static void shz::xmtrx::store_transpose ( float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_transpose_unaligned_4x4().

Definition at line 197 of file shz_xmtrx.hpp.

197 {
199 }
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...

◆ store_transpose() [3/3]

static void shz::xmtrx::store_transpose ( std::array< float, 16 > * array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_transpose_unaligned_4x4().

Definition at line 202 of file shz_xmtrx.hpp.

202 {
203 store_transpose(array->data());
204 }
static void store_transpose(shz_mat4x4_t *mat) noexcept
C++ wrapper around shz_xmtrx_store_transpose_4x4().

◆ store() [4/4]

static void shz::xmtrx::store ( shz_mat3x4_t * mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_store_3x4().

Definition at line 207 of file shz_xmtrx.hpp.

207 {
209 }
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.

◆ init_identity()

static void shz::xmtrx::init_identity ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_identity().

Definition at line 219 of file shz_xmtrx.hpp.

219 {
221 }
void shz_xmtrx_init_identity(void) SHZ_NOEXCEPT
Quickly initializes XMTRX to be a 4D identity matrix.

◆ init_identity_safe()

static void shz::xmtrx::init_identity_safe ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_identity_safe().

Definition at line 224 of file shz_xmtrx.hpp.

224 {
226 }
void shz_xmtrx_init_identity_safe(void) SHZ_NOEXCEPT
Safely initializes XMTRX to be a 4D identity matrix.

◆ init_zero()

static void shz::xmtrx::init_zero ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_zero().

Definition at line 229 of file shz_xmtrx.hpp.

229 {
231 }
void shz_xmtrx_init_zero(void) SHZ_NOEXCEPT
Initializes XMTRX to contain the value of 0.0f for each element.

◆ init_one()

static void shz::xmtrx::init_one ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_one().

Definition at line 234 of file shz_xmtrx.hpp.

234 {
236 }
void shz_xmtrx_init_one(void) SHZ_NOEXCEPT
Initializes XMTRX to contain the value of 1.0f for each element.

◆ init_fill()

static void shz::xmtrx::init_fill ( float value)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_fill().

Definition at line 239 of file shz_xmtrx.hpp.

239 {
240 shz_xmtrx_init_fill(value);
241 }
void shz_xmtrx_init_fill(float value) SHZ_NOEXCEPT
Initializes XMTRX to contain the given value for each element.

◆ init_translation()

static void shz::xmtrx::init_translation ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_translation().

Definition at line 244 of file shz_xmtrx.hpp.

244 {
246 }
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.

◆ init_scale()

static void shz::xmtrx::init_scale ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_scale().

Definition at line 249 of file shz_xmtrx.hpp.

249 {
250 shz_xmtrx_init_scale(x, y, z);
251 }
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.

◆ init_rotation_x()

static void shz::xmtrx::init_rotation_x ( float x)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_x().

Definition at line 254 of file shz_xmtrx.hpp.

254 {
256 }
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.

◆ init_rotation_y()

static void shz::xmtrx::init_rotation_y ( float y)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_y().

Definition at line 259 of file shz_xmtrx.hpp.

259 {
261 }
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.

◆ init_rotation_z()

static void shz::xmtrx::init_rotation_z ( float z)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_z().

Definition at line 264 of file shz_xmtrx.hpp.

264 {
266 }
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.

◆ init_rotation_xyz()

static void shz::xmtrx::init_rotation_xyz ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_xyz().

Definition at line 269 of file shz_xmtrx.hpp.

269 {
271 }
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.

◆ init_rotation_zyx()

static void shz::xmtrx::init_rotation_zyx ( float z,
float y,
float x )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_zyx().

Definition at line 274 of file shz_xmtrx.hpp.

274 {
276 }
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.

◆ init_rotation_zxy()

static void shz::xmtrx::init_rotation_zxy ( float z,
float x,
float y )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_zxy().

Definition at line 279 of file shz_xmtrx.hpp.

279 {
281 }
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.

◆ init_rotation_yxz()

static void shz::xmtrx::init_rotation_yxz ( float y,
float x,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_yxz().

Definition at line 284 of file shz_xmtrx.hpp.

284 {
286 }
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.

◆ init_rotation()

static void shz::xmtrx::init_rotation ( float angle,
float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation().

Definition at line 289 of file shz_xmtrx.hpp.

289 {
290 shz_xmtrx_init_rotation(angle, x, y, z);
291 }
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.

◆ init_diagonal()

static void shz::xmtrx::init_diagonal ( float x,
float y,
float z,
float w )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_diagonal().

Definition at line 294 of file shz_xmtrx.hpp.

294 {
295 shz_xmtrx_init_diagonal(x, y, z, w);
296 }
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.

◆ init_upper_triangular()

static void shz::xmtrx::init_upper_triangular ( float col1,
vec2 col2,
vec3 col3,
vec4 col4 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_upper_triangular().

Definition at line 299 of file shz_xmtrx.hpp.

299 {
300 shz_xmtrx_init_upper_triangular(col1, col2, col3, col4);
301 }
void shz_xmtrx_init_upper_triangular(float col1, shz_vec2_t col2, shz_vec3_t col3, shz_vec4_t col4) SHZ_NOEXCEPT
Initializes XMTRX to be an upper triangular matrix with the given column values.

◆ init_lower_triangular()

static void shz::xmtrx::init_lower_triangular ( vec4 col1,
vec3 col2,
vec2 col3,
float col4 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_lower_diagonal().

Definition at line 304 of file shz_xmtrx.hpp.

304 {
305 shz_xmtrx_init_lower_triangular(col1, col2, col3, col4);
306 }
void shz_xmtrx_init_lower_triangular(shz_vec4_t col1, shz_vec3_t col2, shz_vec2_t col3, float col4) SHZ_NOEXCEPT
Initializes XMTRX to be a lower triangular matrix with the given column values.

◆ init_symmetric_skew()

static void shz::xmtrx::init_symmetric_skew ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_symmetric_skew().

Definition at line 309 of file shz_xmtrx.hpp.

309 {
311 }
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.

◆ init_outer_product()

static void shz::xmtrx::init_outer_product ( shz_vec4_t a,
shz_vec4_t b )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_outer_product().

Definition at line 314 of file shz_xmtrx.hpp.

314 {
316 }
void shz_xmtrx_init_outer_product(shz_vec4_t x, shz_vec4_t y) SHZ_NOEXCEPT
Initializes XMTRX to the 4D matrix resulting from taking the outer product of the two 4D vectors.

◆ init_screen()

static void shz::xmtrx::init_screen ( float width,
float height )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_screen().

Definition at line 319 of file shz_xmtrx.hpp.

319 {
320 shz_xmtrx_init_screen(width, height);
321 }
void shz_xmtrx_init_screen(float width, float height) SHZ_NOEXCEPT
Initializes XMTRX to the viewport matrix with the given dimensions.

◆ init_lookat()

static void shz::xmtrx::init_lookat ( vec3 eye,
vec3 center,
vec3 up )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_lookat().

Definition at line 324 of file shz_xmtrx.hpp.

324 {
325 shz_xmtrx_init_lookat(eye, center, up);
326 }
void shz_xmtrx_init_lookat(shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) SHZ_NOEXCEPT
Initializes XMTRX to a "lookAt" view matrix, equivalent to gluLookAt().

◆ init_ortho()

static void shz::xmtrx::init_ortho ( float left,
float right,
float bottom,
float top,
float near,
float far )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_ortho().

Definition at line 329 of file shz_xmtrx.hpp.

329 {
330 shz_xmtrx_init_ortho(left, right, bottom, top, near, far);
331 }
void shz_xmtrx_init_ortho(float left, float right, float bottom, float top, float near, float far) SHZ_NOEXCEPT
Initializes XMTRX to an orthographic projection matrix, equivalent to glOrtho().

◆ init_frustum()

static void shz::xmtrx::init_frustum ( float left,
float right,
float bottom,
float top,
float near,
float far )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_frustum().

Definition at line 334 of file shz_xmtrx.hpp.

334 {
335 shz_xmtrx_init_frustum(left, right, bottom, top, near, far);
336 }
void shz_xmtrx_init_frustum(float left, float right, float bottom, float top, float near, float far) SHZ_NOEXCEPT
Initializes XMTRX to a frustum projection matrix, equivalent to glFrustum().

◆ init_perspective()

static void shz::xmtrx::init_perspective ( float fov,
float aspect,
float near_z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_perspective().

Definition at line 339 of file shz_xmtrx.hpp.

339 {
340 shz_xmtrx_init_perspective(fov, aspect, near_z);
341 }
void shz_xmtrx_init_perspective(float fov, float aspect, float near_z) SHZ_NOEXCEPT
Initializes XMTRX to a perspective projection matrix.

◆ init_rotation_quat()

static void shz::xmtrx::init_rotation_quat ( quat q)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_quat().

Definition at line 344 of file shz_xmtrx.hpp.

344 {
346 }
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.

◆ init_permutation_wxyz()

static void shz::xmtrx::init_permutation_wxyz ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_permutation_wxyz().

Definition at line 349 of file shz_xmtrx.hpp.

349 {
351 }
void shz_xmtrx_init_permutation_wxyz(void) SHZ_NOEXCEPT
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...

◆ init_permutation_yzwx()

static void shz::xmtrx::init_permutation_yzwx ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_permutation_yzwx().

Definition at line 354 of file shz_xmtrx.hpp.

354 {
356 }
void shz_xmtrx_init_permutation_yzwx(void) SHZ_NOEXCEPT
Initializes XMTRX to a permutation matrix, which reorders the components of transformed vectors to be...

◆ apply() [1/4]

static void shz::xmtrx::apply ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_4x4().

Definition at line 366 of file shz_xmtrx.hpp.

366 {
367 shz_xmtrx_apply_4x4(&mat4);
368 }
void shz_xmtrx_apply_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates the given 4x4 matrix onto XMTRX.

◆ apply() [2/4]

static void shz::xmtrx::apply ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_unaligned_4x4().

Definition at line 371 of file shz_xmtrx.hpp.

371 {
373 }
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.

◆ apply() [3/4]

static void shz::xmtrx::apply ( const std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_unaligned_4x4().

Definition at line 376 of file shz_xmtrx.hpp.

376 {
377 shz_xmtrx_apply_unaligned_4x4(array.data());
378 }

◆ apply_transpose() [1/3]

static void shz::xmtrx::apply_transpose ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_transpose_4x4().

Definition at line 381 of file shz_xmtrx.hpp.

381 {
383 }
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.

◆ apply_transpose() [2/3]

static void shz::xmtrx::apply_transpose ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_transpose_unaligned_4x4().

Definition at line 386 of file shz_xmtrx.hpp.

386 {
388 }
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...

◆ apply_transpose() [3/3]

static void shz::xmtrx::apply_transpose ( const std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_transpose_unaligned_4x4().

Definition at line 391 of file shz_xmtrx.hpp.

391 {
393 }

◆ apply_reverse() [1/3]

static void shz::xmtrx::apply_reverse ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_4x4().

Definition at line 396 of file shz_xmtrx.hpp.

396 {
398 }
void shz_xmtrx_apply_reverse_4x4(const shz_mat4x4_t *matrix) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX onto matrix, storing the result as XMTRX.

◆ apply_reverse() [2/3]

static void shz::xmtrx::apply_reverse ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_unaligned_4x4().

Definition at line 401 of file shz_xmtrx.hpp.

401 {
403 }
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...

◆ apply_reverse() [3/3]

static void shz::xmtrx::apply_reverse ( const std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_unaligned_4x4().

Definition at line 406 of file shz_xmtrx.hpp.

406 {
408 }

◆ apply_reverse_transpose() [1/3]

static void shz::xmtrx::apply_reverse_transpose ( const shz_mat4x4_t & mat4)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_transpose_4x4().

Definition at line 411 of file shz_xmtrx.hpp.

411 {
413 }
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.

◆ apply_reverse_transpose() [2/3]

static void shz::xmtrx::apply_reverse_transpose ( const float cArray[16])
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_transpose_unaligned_4x4().

Definition at line 416 of file shz_xmtrx.hpp.

416 {
418 }
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,...

◆ apply_reverse_transpose() [3/3]

static void shz::xmtrx::apply_reverse_transpose ( const std::array< float, 16 > array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_reverse_transpose_unaligned_4x4().

Definition at line 421 of file shz_xmtrx.hpp.

421 {
423 }

◆ apply() [4/4]

static void shz::xmtrx::apply ( const shz_mat3x4_t & mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_3x4().

Definition at line 426 of file shz_xmtrx.hpp.

426 {
428 }
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.

◆ apply_translation()

static void shz::xmtrx::apply_translation ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_translation().

Definition at line 431 of file shz_xmtrx.hpp.

431 {
433 }
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.

◆ apply_scale()

static void shz::xmtrx::apply_scale ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_scale().

Definition at line 436 of file shz_xmtrx.hpp.

436 {
437 shz_xmtrx_apply_scale(x, y, z);
438 }
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.

◆ apply_rotation_x()

static void shz::xmtrx::apply_rotation_x ( float x)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_x().

Definition at line 441 of file shz_xmtrx.hpp.

441 {
443 }
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.

◆ apply_rotation_y()

static void shz::xmtrx::apply_rotation_y ( float y)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_y().

Definition at line 446 of file shz_xmtrx.hpp.

446 {
448 }
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.

◆ apply_rotation_z()

static void shz::xmtrx::apply_rotation_z ( float z)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_z().

Definition at line 451 of file shz_xmtrx.hpp.

451 {
453 }
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.

◆ apply_rotation_xyz()

static void shz::xmtrx::apply_rotation_xyz ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_xyz().

Definition at line 456 of file shz_xmtrx.hpp.

456 {
458 }
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...

◆ apply_rotation_zyx()

static void shz::xmtrx::apply_rotation_zyx ( float z,
float y,
float x )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_zyx().

Definition at line 461 of file shz_xmtrx.hpp.

461 {
463 }
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...

◆ apply_rotation_zxy()

static void shz::xmtrx::apply_rotation_zxy ( float z,
float x,
float y )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_zxy().

Definition at line 466 of file shz_xmtrx.hpp.

466 {
468 }
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...

◆ apply_rotation_yxz()

static void shz::xmtrx::apply_rotation_yxz ( float y,
float x,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_yxz().

Definition at line 471 of file shz_xmtrx.hpp.

471 {
473 }
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...

◆ apply_rotation()

static void shz::xmtrx::apply_rotation ( float angle,
float x,
float y,
float z )
inlinestaticnoexcept

Definition at line 476 of file shz_xmtrx.hpp.

476 {
477 shz_xmtrx_apply_rotation(angle, x, y, z);
478 }
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...

◆ apply_rotation_quat()

static void shz::xmtrx::apply_rotation_quat ( shz_quat_t quat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_quat().

Definition at line 481 of file shz_xmtrx.hpp.

481 {
483 }
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...

◆ apply_lookat()

static void shz::xmtrx::apply_lookat ( vec3 eye,
vec3 center,
vec3 up )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_lookat().

Definition at line 486 of file shz_xmtrx.hpp.

486 {
487 shz_xmtrx_apply_lookat(eye, center, up);
488 }
void shz_xmtrx_apply_lookat(shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) SHZ_NOEXCEPT
Applies the 3D "lookAt" matrix constructed with the given vector components onto XMTRX....

◆ apply_ortho()

static void shz::xmtrx::apply_ortho ( float left,
float right,
float bottom,
float top,
float near,
float far )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_ortho().

Definition at line 491 of file shz_xmtrx.hpp.

491 {
492 shz_xmtrx_apply_ortho(left, right, bottom, top, near, far);
493 }
void shz_xmtrx_apply_ortho(float left, float right, float bottom, float top, float near, float far) SHZ_NOEXCEPT
Applies a 2D orthographic projection matrix onto XMTRX, equivalent to glOrtho().

◆ apply_frustum()

static void shz::xmtrx::apply_frustum ( float left,
float right,
float bottom,
float top,
float near,
float far )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_frustum().

Definition at line 496 of file shz_xmtrx.hpp.

496 {
497 shz_xmtrx_apply_frustum(left, right, bottom, top, near, far);
498 }
void shz_xmtrx_apply_frustum(float left, float right, float bottom, float top, float near, float far) SHZ_NOEXCEPT
Applies a frustum projection matrix onto XMTRX, equivalent to glFrustum().

◆ apply_perspective()

static void shz::xmtrx::apply_perspective ( float fov,
float aspect,
float near_z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_perspective().

Definition at line 501 of file shz_xmtrx.hpp.

501 {
502 shz_xmtrx_apply_perspective(fov, aspect, near_z);
503 }
void shz_xmtrx_apply_perspective(float fov, float aspect, float near_z) SHZ_NOEXCEPT
Multiplies and accumulates the perspective matrix constructed from the given values onto XMTRX.

◆ apply_symmetric_skew()

static void shz::xmtrx::apply_symmetric_skew ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_symmetric_skew().

Definition at line 506 of file shz_xmtrx.hpp.

506 {
508 }
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.

◆ apply_screen()

static void shz::xmtrx::apply_screen ( float width,
float height )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_screen().

Definition at line 511 of file shz_xmtrx.hpp.

511 {
512 shz_xmtrx_apply_screen(width, height);
513 }
void shz_xmtrx_apply_screen(float width, float height) SHZ_NOEXCEPT
Multiplies and accumulates the viewport matrix created with the given components.

◆ apply_permutation_wxyz()

static void shz::xmtrx::apply_permutation_wxyz ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_permutation_wxyz().

Definition at line 516 of file shz_xmtrx.hpp.

516 {
518 }
void shz_xmtrx_apply_permutation_wxyz(void) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...

◆ apply_permutation_yzwx()

static void shz::xmtrx::apply_permutation_yzwx ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_permutation_yzwx().

Definition at line 521 of file shz_xmtrx.hpp.

521 {
523 }
void shz_xmtrx_apply_permutation_yzwx(void) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...

◆ apply_self()

static void shz::xmtrx::apply_self ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_self().

Definition at line 526 of file shz_xmtrx.hpp.

526 {
528 }
void shz_xmtrx_apply_self(void) SHZ_NOEXCEPT
Multiplies and accumulatse the XMTRX matrix by itself, squaring it.

◆ translate()

static void shz::xmtrx::translate ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_translate().

Definition at line 538 of file shz_xmtrx.hpp.

538 {
539 shz_xmtrx_translate(x, y, z);
540 }
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()...

◆ scale()

static void shz::xmtrx::scale ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_scale().

Definition at line 543 of file shz_xmtrx.hpp.

543 {
544 shz_xmtrx_scale(x, y, z);
545 }
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...

◆ rotate_x()

static void shz::xmtrx::rotate_x ( float radians)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_x().

Definition at line 548 of file shz_xmtrx.hpp.

548 {
549 shz_xmtrx_rotate_x(radians);
550 }
void shz_xmtrx_rotate_x(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the X axis.

◆ rotate_y()

static void shz::xmtrx::rotate_y ( float radians)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_x().

Definition at line 553 of file shz_xmtrx.hpp.

553 {
554 shz_xmtrx_rotate_y(radians);
555 }
void shz_xmtrx_rotate_y(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Y axis.

◆ rotate_z()

static void shz::xmtrx::rotate_z ( float radians)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_x().

Definition at line 558 of file shz_xmtrx.hpp.

558 {
559 shz_xmtrx_rotate_z(radians);
560 }
void shz_xmtrx_rotate_z(float radians) SHZ_NOEXCEPT
Multiplies and accumulates XMTRX by a 3D rotation matrix about the Z axis.

◆ rotate_xyz()

static void shz::xmtrx::rotate_xyz ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_xyz().

Definition at line 563 of file shz_xmtrx.hpp.

563 {
564 shz_xmtrx_rotate_xyz(x, y, z);
565 }
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.

◆ rotate_zyx()

static void shz::xmtrx::rotate_zyx ( float z,
float y,
float x )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_zyx().

Definition at line 568 of file shz_xmtrx.hpp.

568 {
569 shz_xmtrx_rotate_zyx(z, y, x);
570 }
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.

◆ rotate_zxy()

static void shz::xmtrx::rotate_zxy ( float z,
float x,
float y )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_zxy().

Definition at line 573 of file shz_xmtrx.hpp.

573 {
574 shz_xmtrx_rotate_zxy(z, x, y);
575 }
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.

◆ rotate_yxz()

static void shz::xmtrx::rotate_yxz ( float y,
float x,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate_yxz().

Definition at line 578 of file shz_xmtrx.hpp.

578 {
579 shz_xmtrx_rotate_yxz(y, x, z);
580 }
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.

◆ rotate()

static void shz::xmtrx::rotate ( float radians,
float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate().

Definition at line 583 of file shz_xmtrx.hpp.

583 {
584 shz_xmtrx_rotate(radians, x, y, z);
585 }
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...

◆ load_apply() [1/2]

static void shz::xmtrx::load_apply ( const shz_mat4x4_t & mat1,
const shz_mat4x4_t & mat2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_4x4().

Definition at line 595 of file shz_xmtrx.hpp.

595 {
596 shz_xmtrx_load_apply_4x4(&mat1, &mat2);
597 }
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.

◆ load_apply() [2/2]

static void shz::xmtrx::load_apply ( const float matrix1[16],
const float matrix2[16] )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_unaligned_4x4().

Definition at line 600 of file shz_xmtrx.hpp.

600 {
601 shz_xmtrx_load_apply_unaligned_4x4(matrix1, matrix2);
602 }
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.

◆ load_apply_store() [1/4]

static void shz::xmtrx::load_apply_store ( shz_mat4x4_t * dst,
const shz_mat4x4_t & mat1,
const shz_mat4x4_t & mat2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_store_4x4().

Definition at line 605 of file shz_xmtrx.hpp.

605 {
606 shz_xmtrx_load_apply_store_4x4(dst, &mat1, &mat2);
607 }
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.

◆ load_apply_store() [2/4]

static void shz::xmtrx::load_apply_store ( float out[16],
const float matrix1[16],
const float matrix2[16] )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_store_unaligned_4x4().

Definition at line 610 of file shz_xmtrx.hpp.

610 {
611 shz_xmtrx_load_apply_store_unaligned_4x4(out, matrix1, matrix2);
612 }
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.

◆ load_apply_store() [3/4]

static void shz::xmtrx::load_apply_store ( shz_mat3x4_t * dst,
const shz_mat3x4_t & mat1,
const shz_mat3x4_t & mat2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_store_3x4().

Definition at line 615 of file shz_xmtrx.hpp.

615 {
616 shz_xmtrx_load_apply_store_3x4(dst, &mat1, &mat2);
617 }
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.

◆ load_apply_store() [4/4]

static void shz::xmtrx::load_apply_store ( shz_mat3x3_t * dst,
const shz_mat3x3_t & mat1,
const shz_mat3x3_t & mat2 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_apply_store_3x3().

Definition at line 620 of file shz_xmtrx.hpp.

620 {
621 shz_xmtrx_load_apply_store_3x3(dst, &mat1, &mat2);
622 }
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.

◆ transform() [1/3]

static vec4 shz::xmtrx::transform ( shz_vec4_t in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec4().

Definition at line 632 of file shz_xmtrx.hpp.

632 {
633 return shz_xmtrx_transform_vec4(in);
634 }
shz_vec4_t shz_xmtrx_transform_vec4(shz_vec4_t vec) SHZ_NOEXCEPT
Returns the 4D vector that is the result of transforming vec by XMTRX.

◆ transform() [2/3]

static vec3 shz::xmtrx::transform ( shz_vec3_t in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec3().

Definition at line 637 of file shz_xmtrx.hpp.

637 {
638 return shz_xmtrx_transform_vec3(in);
639 }
shz_vec3_t shz_xmtrx_transform_vec3(shz_vec3_t vec) SHZ_NOEXCEPT
Returns the 3D vector that is the result of transforming vec by XMTRX.

◆ transform() [3/3]

static vec2 shz::xmtrx::transform ( shz_vec2_t in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec2().

Definition at line 642 of file shz_xmtrx.hpp.

642 {
643 return shz_xmtrx_transform_vec2(in);
644 }
shz_vec2_t shz_xmtrx_transform_vec2(shz_vec2_t vec) SHZ_NOEXCEPT
Returns the 2D vector that is the result of transforming vec by XMTRX.

◆ transform_point() [1/2]

static vec3 shz::xmtrx::transform_point ( shz_vec3_t pt)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_point3().

Definition at line 647 of file shz_xmtrx.hpp.

647 {
649 }
shz_vec3_t shz_xmtrx_transform_point3(shz_vec3_t pt) SHZ_NOEXCEPT
Returns the 3D point that is the result of transforming pt by XMTRX.

◆ transform_point() [2/2]

static vec2 shz::xmtrx::transform_point ( shz_vec2_t pt)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_point2().

Definition at line 652 of file shz_xmtrx.hpp.

652 {
654 }
shz_vec2_t shz_xmtrx_transform_point2(shz_vec2_t pt) SHZ_NOEXCEPT
Returns the 2D point that is the result of transforming pt by XMTRX.

◆ set_translation()

static void shz::xmtrx::set_translation ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_set_translation().

Definition at line 664 of file shz_xmtrx.hpp.

664 {
666 }
void shz_xmtrx_set_translation(float x, float y, float z) SHZ_NOEXCEPT
Sets only the translational components of XMTRX to the given values.

◆ add()

static void shz::xmtrx::add ( const shz_mat4x4_t & mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_add_4x4().

Definition at line 676 of file shz_xmtrx.hpp.

676 {
677 shz_xmtrx_add_4x4(&mat);
678 }
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.

◆ sub()

static void shz::xmtrx::sub ( const shz_mat4x4_t & mat)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_sub_4x4().

Definition at line 681 of file shz_xmtrx.hpp.

681 {
682 shz_xmtrx_sub_4x4(&mat);
683 }
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.

◆ add_diagonal()

static void shz::xmtrx::add_diagonal ( float x,
float y,
float z,
float w )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_add_diagonal().

Definition at line 686 of file shz_xmtrx.hpp.

686 {
687 shz_xmtrx_add_diagonal(x, y, z, w);
688 }
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.

◆ add_symmetric_skew()

static void shz::xmtrx::add_symmetric_skew ( float x,
float y,
float z )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_add_symmetric_skew().

Definition at line 691 of file shz_xmtrx.hpp.

691 {
693 }
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.

◆ transpose()

static void shz::xmtrx::transpose ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transpose().

Definition at line 696 of file shz_xmtrx.hpp.

696 {
698 }
void shz_xmtrx_transpose(void) SHZ_NOEXCEPT
Transposes the elements within XMTRX, in-place.

◆ negate()

static void shz::xmtrx::negate ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_negate().

Definition at line 701 of file shz_xmtrx.hpp.

701 {
703 }
void shz_xmtrx_negate(void) SHZ_NOEXCEPT
Negates each element held within XMTRX.

◆ abs()

static void shz::xmtrx::abs ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_abs().

Definition at line 706 of file shz_xmtrx.hpp.

706 {
708 }
void shz_xmtrx_abs(void) SHZ_NOEXCEPT
Takes the absolute value of each element held within XMTRX.

◆ init_fft_weights()

static void shz::xmtrx::init_fft_weights ( float radians)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_fft_weights().

Definition at line 711 of file shz_xmtrx.hpp.

711 {
713 }
void shz_xmtrx_init_fft_weights(float radians) SHZ_NOEXCEPT
Initializes XMTRX to the sin/cos weights used to multiply two samples within an FFT.

◆ to_quat()

static quat shz::xmtrx::to_quat ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_to_quat().

Definition at line 716 of file shz_xmtrx.hpp.

716 {
717 return shz_xmtrx_to_quat();
718 }
shz_quat_t shz_xmtrx_to_quat(void) SHZ_NOEXCEPT
Constructs a quaternion from the 3D rotation matrix within XMTRX.

◆ determinant()

static float shz::xmtrx::determinant ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_determinant().

Definition at line 721 of file shz_xmtrx.hpp.

721 {
722 return shz_xmtrx_determinant();
723 }
float shz_xmtrx_determinant(void) SHZ_NOEXCEPT
Returns the determinant of XMTRX.

◆ invert()

static void shz::xmtrx::invert ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_invert().

Definition at line 726 of file shz_xmtrx.hpp.

726 {
728 }
void shz_xmtrx_invert(void) SHZ_NOEXCEPT
Inverts XMTRX in-place.

The documentation for this struct was generated from the following file: