SH4ZAM! 0.8.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, const vec4 &vector) noexcept
 
static void write_col (unsigned int index, const 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 (const 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 (const 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_translation (const vec3 &v) noexcept
 
static void init_scale (float x, float y, float z) noexcept
 
static void init_scale (const vec3 &v) 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_rotation (float angle, const vec3 &axis) noexcept
 
static void init_rotation_dir (float angle, const vec3 &dir) noexcept
 
static void init_diagonal (float x, float y, float z, float w) noexcept
 
static void init_diagonal (const vec4 &v) noexcept
 
static void init_upper_triangular (float col1, const vec2 &col2, const vec3 &col3, const vec4 &col4) noexcept
 
static void init_lower_triangular (const vec4 &col1, const vec3 &col2, const vec2 &col3, float col4) noexcept
 
static void init_symmetric_skew (float x, float y, float z) noexcept
 
static void init_outer_product (const vec4 &a, const vec4 &b) noexcept
 
static void init_screen (float width, float height) noexcept
 
static void init_lookat (const vec3 &eye, const vec3 &center, const vec3 &up) noexcept
 
static void init_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
static void init_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
static void init_perspective (float fov, float aspect, float znear) noexcept
 
static void init_rotation_quat (const quat &q) noexcept
 
static void init_permutation_wxyz () noexcept
 
static void init_permutation_yzwx () noexcept
 
static void init_permutation_wzyx () 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_translation (const vec3 &v) noexcept
 
static void apply_scale (float x, float y, float z) noexcept
 
static void apply_scale (const vec3 &v) 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 (float angle, const vec3 &axis) noexcept
 
static void apply_rotation_quat (const quat &q) noexcept
 
static void apply_lookat (const vec3 &eye, const vec3 &center, const vec3 &up) noexcept
 
static void apply_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
static void apply_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
static void apply_perspective (float fov, float aspect, float znear) 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_permutation_wzyx () 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 translate (vec3 v) noexcept
 
static void scale (float x, float y, float z) noexcept
 
static void scale (vec3 v) 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
 
static void rotate (float radians, const vec3 &axis) noexcept
 
Reverse GL Transformations

Pre-multiplication variants of OpenGL-style 4x4 matrix transforms.

static void translate_reverse (float x, float y, float z) noexcept
 
static void translate_reverse (const shz::vec3 &pos) noexcept
 
static void scale_reverse (float x, float y, float z) noexcept
 
static void scale_reverse (const shz::vec3 &size) 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 apply_store (shz_mat4x4_t *out, const shz_mat4x4_t &in) noexcept
 
static void apply_store (float out[16], const float in[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 (const vec4 &in) noexcept
 
static vec3 transform (const vec3 &in) noexcept
 
static vec2 transform (const vec2 &in) noexcept
 
static vec3 transform_point (const vec3 &pt) noexcept
 
static vec2 transform_point (const vec2 &pt) noexcept
 
Setters

Sets the values of related XMTRX components.

static void set_translation (float x, float y, float z) noexcept
 
static void set_translation (const vec3 &v) noexcept
 
static void set_scale (float x, float y, float z) noexcept
 
static void set_scale (const shz::vec3 &size) noexcept
 
Getters

Gets the values of related XMTRX components.

static vec3 get_translation () noexcept
 
static vec3 get_scale () 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_diagonal (const vec4 &v) noexcept
 
static void add_symmetric_skew (float x, float y, float z) noexcept
 
static void add_symmetric_skew (const vec3 &v) noexcept
 
static void transpose () noexcept
 
static void negate () noexcept
 
static void abs () noexcept
 
static quat to_quat () noexcept
 
static float determinant () noexcept
 
static void invert () noexcept
 
static void blend (const shz_mat4x4_t &joint_matrix, float weight) 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 34 of file shz_xmtrx.hpp.

Member Typedef Documentation

◆ reg_t

Non-POSIX style reg_t alias.

Definition at line 57 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 37 of file shz_xmtrx.hpp.

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

Member Function Documentation

◆ read()

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

C++ wrapper around shz_xmtrx_read().

Definition at line 65 of file shz_xmtrx.hpp.

65 {
66 return shz_xmtrx_read(static_cast<shz_xmtrx_reg>(xf));
67 }
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:68

◆ write()

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

C++ wrapper around shz_xmtrx_write().

Definition at line 70 of file shz_xmtrx.hpp.

70 {
71 shz_xmtrx_write(static_cast<shz_xmtrx_reg>(xf), value);
72 }
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 75 of file shz_xmtrx.hpp.

75 {
76 return shz_xmtrx_read_row(index);
77 }
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 80 of file shz_xmtrx.hpp.

80 {
81 return shz_xmtrx_read_col(index);
82 }
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,
const vec4 & vector )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_write_row().

Definition at line 85 of file shz_xmtrx.hpp.

85 {
86 shz_xmtrx_write_row(index, vector);
87 }
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,
const vec4 & vector )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_write_col().

Definition at line 90 of file shz_xmtrx.hpp.

90 {
91 shz_xmtrx_write_col(index, vector);
92 }
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 95 of file shz_xmtrx.hpp.

95 {
96 shz_xmtrx_swap_rows(index1, index2);
97 }
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 100 of file shz_xmtrx.hpp.

100 {
101 shz_xmtrx_swap_cols(index1, index2);
102 }
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 112 of file shz_xmtrx.hpp.

112 {
113 shz_xmtrx_load_4x4(&mat4);
114 }
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 117 of file shz_xmtrx.hpp.

117 {
119 }
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 ( const std::array< float, 16 > & array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_unaligned_4x4().

Definition at line 122 of file shz_xmtrx.hpp.

122 {
123 load(array.data());
124 }
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 127 of file shz_xmtrx.hpp.

127 {
129 }
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 132 of file shz_xmtrx.hpp.

132 {
134 }
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 ( const std::array< float, 16 > & array)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_load_transpose_unaligned_4x4().

Definition at line 137 of file shz_xmtrx.hpp.

137 {
138 load_transpose(array.data());
139 }
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 142 of file shz_xmtrx.hpp.

142 {
144 }
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 147 of file shz_xmtrx.hpp.

150 {
151 shz_xmtrx_load_cols_4x4(&c1, &c2, &c3, &c4);
152 }
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 155 of file shz_xmtrx.hpp.

158 {
159 shz_xmtrx_load_rows_4x4(&r1, &r2, &r3, &r4);
160 }
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 163 of file shz_xmtrx.hpp.

163 {
164 shz_xmtrx_load_3x4(&mat);
165 }
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 175 of file shz_xmtrx.hpp.

175 {
177 }
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 180 of file shz_xmtrx.hpp.

180 {
182 }
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 185 of file shz_xmtrx.hpp.

185 {
186 shz_xmtrx_store_unaligned_4x4(array->data());
187 }

◆ 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 190 of file shz_xmtrx.hpp.

190 {
192 }
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 195 of file shz_xmtrx.hpp.

195 {
197 }
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 200 of file shz_xmtrx.hpp.

200 {
201 store_transpose(array->data());
202 }
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 205 of file shz_xmtrx.hpp.

205 {
207 }
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 217 of file shz_xmtrx.hpp.

217 {
219 }
void shz_xmtrx_init_identity(void) SHZ_NOEXCEPT
Initializes XMTRX to the 4x4 identity matrix.

◆ init_identity_safe()

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

C++ wrapper around shz_xmtrx_init_identity_safe().

Definition at line 223 of file shz_xmtrx.hpp.

223 {
225 }

◆ init_zero()

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

C++ wrapper around shz_xmtrx_init_zero().

Definition at line 228 of file shz_xmtrx.hpp.

228 {
230 }
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 233 of file shz_xmtrx.hpp.

233 {
235 }
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 238 of file shz_xmtrx.hpp.

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

◆ init_translation() [1/2]

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

C++ wrapper around shz_xmtrx_init_translation().

Definition at line 243 of file shz_xmtrx.hpp.

243 {
245 }
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_translation() [2/2]

static void shz::xmtrx::init_translation ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_translation().

Definition at line 248 of file shz_xmtrx.hpp.

248 {
249 init_translation(v.x, v.y, v.z);
250 }
static void init_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_translation().

◆ init_scale() [1/2]

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

C++ wrapper around shz_xmtrx_init_scale().

Definition at line 253 of file shz_xmtrx.hpp.

253 {
254 shz_xmtrx_init_scale(x, y, z);
255 }
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_scale() [2/2]

static void shz::xmtrx::init_scale ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_scale().

Definition at line 258 of file shz_xmtrx.hpp.

258 {
259 init_scale(v.x, v.y, v.z);
260 }
static void init_scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_scale().

◆ init_rotation_x()

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

C++ wrapper around shz_xmtrx_init_rotation_x().

Definition at line 263 of file shz_xmtrx.hpp.

263 {
265 }
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 268 of file shz_xmtrx.hpp.

268 {
270 }
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 273 of file shz_xmtrx.hpp.

273 {
275 }
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 278 of file shz_xmtrx.hpp.

278 {
280 }
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 283 of file shz_xmtrx.hpp.

283 {
285 }
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 288 of file shz_xmtrx.hpp.

288 {
290 }
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 293 of file shz_xmtrx.hpp.

293 {
295 }
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() [1/2]

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 298 of file shz_xmtrx.hpp.

298 {
299 shz_xmtrx_init_rotation(angle, x, y, z);
300 }
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 vector with the given components...

◆ init_rotation() [2/2]

static void shz::xmtrx::init_rotation ( float angle,
const vec3 & axis )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation().

Definition at line 303 of file shz_xmtrx.hpp.

303 {
304 init_rotation(angle, axis.x, axis.y, axis.z);
305 }
static void init_rotation(float angle, float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_init_rotation().

◆ init_rotation_dir()

static void shz::xmtrx::init_rotation_dir ( float angle,
const vec3 & dir )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_rotation_axis_angle().

Definition at line 308 of file shz_xmtrx.hpp.

308 {
309 shz_xmtrx_init_rotation_dir(angle, dir.x, dir.y, dir.z);
310 }
void shz_xmtrx_init_rotation_dir(float angle, float x, float y, float z) SHZ_NOEXCEPT
Initializes XMTRX to contain a 3D rotation matrix of angle radians about the given axis.

◆ init_diagonal() [1/2]

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 313 of file shz_xmtrx.hpp.

313 {
314 shz_xmtrx_init_diagonal(x, y, z, w);
315 }
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_diagonal() [2/2]

static void shz::xmtrx::init_diagonal ( const vec4 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_diagonal().

Definition at line 318 of file shz_xmtrx.hpp.

318 {
319 init_diagonal(v.x, v.y, v.z, v.w);
320 }
static void init_diagonal(float x, float y, float z, float w) noexcept
C++ wrapper around shz_xmtrx_init_diagonal().

◆ init_upper_triangular()

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

C++ wrapper around shz_xmtrx_init_upper_triangular().

Definition at line 323 of file shz_xmtrx.hpp.

323 {
324 shz_xmtrx_init_upper_triangular(col1, col2, col3, col4);
325 }
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 ( const vec4 & col1,
const vec3 & col2,
const vec2 & col3,
float col4 )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_lower_diagonal().

Definition at line 328 of file shz_xmtrx.hpp.

328 {
329 shz_xmtrx_init_lower_triangular(col1, col2, col3, col4);
330 }
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 333 of file shz_xmtrx.hpp.

333 {
335 }
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 ( const vec4 & a,
const vec4 & b )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_outer_product().

Definition at line 338 of file shz_xmtrx.hpp.

338 {
340 }
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 343 of file shz_xmtrx.hpp.

343 {
344 shz_xmtrx_init_screen(width, height);
345 }
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 ( const vec3 & eye,
const vec3 & center,
const vec3 & up )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_lookat().

Definition at line 348 of file shz_xmtrx.hpp.

348 {
349 shz_xmtrx_init_lookat(eye, center, up);
350 }
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 znear,
float zfar )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_ortho().

Definition at line 353 of file shz_xmtrx.hpp.

353 {
354 shz_xmtrx_init_ortho(left, right, bottom, top, znear, zfar);
355 }
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().

◆ init_frustum()

static void shz::xmtrx::init_frustum ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_init_frustum().

Definition at line 358 of file shz_xmtrx.hpp.

358 {
359 shz_xmtrx_init_frustum(left, right, bottom, top, znear, zfar);
360 }
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().

◆ init_perspective()

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

C++ wrapper around shz_xmtrx_init_perspective().

Definition at line 363 of file shz_xmtrx.hpp.

363 {
364 shz_xmtrx_init_perspective(fov, aspect, znear);
365 }
void shz_xmtrx_init_perspective(float fov, float aspect, float znear) SHZ_NOEXCEPT
Initializes XMTRX to a perspective projection matrix.

◆ init_rotation_quat()

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

C++ wrapper around shz_xmtrx_init_rotation_quat().

Definition at line 368 of file shz_xmtrx.hpp.

368 {
370 }
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 373 of file shz_xmtrx.hpp.

373 {
375 }
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 378 of file shz_xmtrx.hpp.

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

◆ init_permutation_wzyx()

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

C++ wrapper around shz_xmtrx_init_permutation_wzyx().

Definition at line 383 of file shz_xmtrx.hpp.

383 {
385 }
void shz_xmtrx_init_permutation_wzyx(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 395 of file shz_xmtrx.hpp.

395 {
396 shz_xmtrx_apply_4x4(&mat4);
397 }
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 400 of file shz_xmtrx.hpp.

400 {
402 }
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 405 of file shz_xmtrx.hpp.

405 {
406 shz_xmtrx_apply_unaligned_4x4(array.data());
407 }

◆ 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 410 of file shz_xmtrx.hpp.

410 {
412 }
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 415 of file shz_xmtrx.hpp.

415 {
417 }
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 420 of file shz_xmtrx.hpp.

420 {
422 }

◆ 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 425 of file shz_xmtrx.hpp.

425 {
427 }
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 430 of file shz_xmtrx.hpp.

430 {
432 }
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 435 of file shz_xmtrx.hpp.

435 {
437 }

◆ 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 440 of file shz_xmtrx.hpp.

440 {
442 }
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 445 of file shz_xmtrx.hpp.

445 {
447 }
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 450 of file shz_xmtrx.hpp.

450 {
452 }

◆ apply() [4/4]

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

C++ wrapper around shz_xmtrx_apply_3x4().

Definition at line 455 of file shz_xmtrx.hpp.

455 {
457 }
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() [1/2]

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

C++ wrapper around shz_xmtrx_apply_translation().

Definition at line 460 of file shz_xmtrx.hpp.

460 {
462 }
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_translation() [2/2]

static void shz::xmtrx::apply_translation ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_translation().

Definition at line 465 of file shz_xmtrx.hpp.

465 {
466 apply_translation(v.x, v.y, v.z);
467 }
static void apply_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_apply_translation().

◆ apply_scale() [1/2]

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

C++ wrapper around shz_xmtrx_apply_scale().

Definition at line 470 of file shz_xmtrx.hpp.

470 {
471 shz_xmtrx_apply_scale(x, y, z);
472 }
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_scale() [2/2]

static void shz::xmtrx::apply_scale ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_scale().

Definition at line 475 of file shz_xmtrx.hpp.

475 {
476 apply_scale(v.x, v.y, v.z);
477 }
static void apply_scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_apply_scale().

◆ apply_rotation_x()

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

C++ wrapper around shz_xmtrx_apply_rotation_x().

Definition at line 480 of file shz_xmtrx.hpp.

480 {
482 }
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 485 of file shz_xmtrx.hpp.

485 {
487 }
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 490 of file shz_xmtrx.hpp.

490 {
492 }
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 495 of file shz_xmtrx.hpp.

495 {
497 }
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 500 of file shz_xmtrx.hpp.

500 {
502 }
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 505 of file shz_xmtrx.hpp.

505 {
507 }
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 510 of file shz_xmtrx.hpp.

510 {
512 }
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() [1/2]

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

Definition at line 515 of file shz_xmtrx.hpp.

515 {
516 shz_xmtrx_apply_rotation(angle, x, y, z);
517 }
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() [2/2]

static void shz::xmtrx::apply_rotation ( float angle,
const vec3 & axis )
inlinestaticnoexcept

Definition at line 520 of file shz_xmtrx.hpp.

520 {
521 apply_rotation(angle, axis.x, axis.y, axis.z);
522 }

◆ apply_rotation_quat()

static void shz::xmtrx::apply_rotation_quat ( const quat & q)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_rotation_quat().

Definition at line 525 of file shz_xmtrx.hpp.

525 {
527 }
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 ( const vec3 & eye,
const vec3 & center,
const vec3 & up )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_lookat().

Definition at line 530 of file shz_xmtrx.hpp.

530 {
531 shz_xmtrx_apply_lookat(eye, center, up);
532 }
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 znear,
float zfar )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_ortho().

Definition at line 535 of file shz_xmtrx.hpp.

535 {
536 shz_xmtrx_apply_ortho(left, right, bottom, top, znear, zfar);
537 }
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().

◆ apply_frustum()

static void shz::xmtrx::apply_frustum ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_frustum().

Definition at line 540 of file shz_xmtrx.hpp.

540 {
541 shz_xmtrx_apply_frustum(left, right, bottom, top, znear, zfar);
542 }
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().

◆ apply_perspective()

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

C++ wrapper around shz_xmtrx_apply_perspective().

Definition at line 545 of file shz_xmtrx.hpp.

545 {
546 shz_xmtrx_apply_perspective(fov, aspect, znear);
547 }
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.

◆ 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 550 of file shz_xmtrx.hpp.

550 {
552 }
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 555 of file shz_xmtrx.hpp.

555 {
556 shz_xmtrx_apply_screen(width, height);
557 }
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 560 of file shz_xmtrx.hpp.

560 {
562 }
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 565 of file shz_xmtrx.hpp.

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

◆ apply_permutation_wzyx()

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

C++ wrapper around shz_xmtrx_apply_permutation_wzyx().

Definition at line 570 of file shz_xmtrx.hpp.

570 {
572 }
void shz_xmtrx_apply_permutation_wzyx(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 575 of file shz_xmtrx.hpp.

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

◆ translate() [1/2]

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

C++ wrapper around shz_xmtrx_translate().

Definition at line 587 of file shz_xmtrx.hpp.

587 {
588 shz_xmtrx_translate(x, y, z);
589 }
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()...

◆ translate() [2/2]

static void shz::xmtrx::translate ( vec3 v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_translate().

Definition at line 592 of file shz_xmtrx.hpp.

592 {
593 translate(v.x, v.y, v.z);
594 }
static void translate(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_translate().

◆ scale() [1/2]

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

C++ wrapper around shz_xmtrx_scale().

Definition at line 597 of file shz_xmtrx.hpp.

597 {
598 shz_xmtrx_scale(x, y, z);
599 }
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...

◆ scale() [2/2]

static void shz::xmtrx::scale ( vec3 v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_scale().

Definition at line 602 of file shz_xmtrx.hpp.

602 {
603 scale(v.x, v.y, v.z);
604 }
static void scale(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_scale().

◆ rotate_x()

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

C++ wrapper around shz_xmtrx_rotate_x().

Definition at line 607 of file shz_xmtrx.hpp.

607 {
608 shz_xmtrx_rotate_x(radians);
609 }
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 612 of file shz_xmtrx.hpp.

612 {
613 shz_xmtrx_rotate_y(radians);
614 }
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 617 of file shz_xmtrx.hpp.

617 {
618 shz_xmtrx_rotate_z(radians);
619 }
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 622 of file shz_xmtrx.hpp.

622 {
623 shz_xmtrx_rotate_xyz(x, y, z);
624 }
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 627 of file shz_xmtrx.hpp.

627 {
628 shz_xmtrx_rotate_zyx(z, y, x);
629 }
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 632 of file shz_xmtrx.hpp.

632 {
633 shz_xmtrx_rotate_zxy(z, x, y);
634 }
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 637 of file shz_xmtrx.hpp.

637 {
638 shz_xmtrx_rotate_yxz(y, x, z);
639 }
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() [1/2]

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

C++ wrapper around shz_xmtrx_rotate().

Definition at line 642 of file shz_xmtrx.hpp.

642 {
643 shz_xmtrx_rotate(radians, x, y, z);
644 }
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...

◆ rotate() [2/2]

static void shz::xmtrx::rotate ( float radians,
const vec3 & axis )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_rotate().

Definition at line 647 of file shz_xmtrx.hpp.

647 {
648 rotate(radians, axis.x, axis.y, axis.z);
649 }
static void rotate(float radians, float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_rotate().

◆ translate_reverse() [1/2]

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

Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given components.

Definition at line 656 of file shz_xmtrx.hpp.

656 {
658 }
void shz_xmtrx_translate_reverse(float x, float y, float z) SHZ_NOEXCEPT
Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given components.

◆ translate_reverse() [2/2]

static void shz::xmtrx::translate_reverse ( const shz::vec3 & pos)
inlinestaticnoexcept

Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given translation vector.

Definition at line 661 of file shz_xmtrx.hpp.

661 {
662 translate_reverse(pos.x, pos.y, pos.z);
663 }
static void translate_reverse(float x, float y, float z) noexcept
Pre-multiplies and accumulates XMTRX onto the 3D translation matrix with the given components.
float y
Y coordinate.
Definition shz_vector.h:64
float x
X coordinate.
Definition shz_vector.h:63
float z
Z coordinate.
Definition shz_vector.h:68

◆ scale_reverse() [1/2]

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

Pre-multiplies and accumulatse XMTRX onto the 3D scaling matrix with the given components.

Definition at line 666 of file shz_xmtrx.hpp.

666 {
668 }
void shz_xmtrx_scale_reverse(float x, float y, float z) SHZ_NOEXCEPT
Pre-multiplies and accumulates XMTRX onto the 3D scaling matrix with the given components.

◆ scale_reverse() [2/2]

static void shz::xmtrx::scale_reverse ( const shz::vec3 & size)
inlinestaticnoexcept

Pre-multiplies and accumulatse XMTRX onto the 3D scaling matrix with the given size vector.

Definition at line 671 of file shz_xmtrx.hpp.

671 {
672 scale_reverse(size.x, size.y, size.z);
673 }
static void scale_reverse(float x, float y, float z) noexcept
Pre-multiplies and accumulatse XMTRX onto the 3D scaling matrix with the given components.

◆ 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 683 of file shz_xmtrx.hpp.

683 {
684 shz_xmtrx_load_apply_4x4(&mat1, &mat2);
685 }
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 688 of file shz_xmtrx.hpp.

688 {
689 shz_xmtrx_load_apply_unaligned_4x4(matrix1, matrix2);
690 }
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.

◆ apply_store() [1/2]

static void shz::xmtrx::apply_store ( shz_mat4x4_t * out,
const shz_mat4x4_t & in )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_store_4x4().

Definition at line 693 of file shz_xmtrx.hpp.

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

◆ apply_store() [2/2]

static void shz::xmtrx::apply_store ( float out[16],
const float in[16] )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_apply_store_unaligned_4x4().

Definition at line 698 of file shz_xmtrx.hpp.

698 {
700 }
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,...

◆ 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 703 of file shz_xmtrx.hpp.

703 {
704 shz_xmtrx_load_apply_store_4x4(dst, &mat1, &mat2);
705 }
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 708 of file shz_xmtrx.hpp.

708 {
709 shz_xmtrx_load_apply_store_unaligned_4x4(out, matrix1, matrix2);
710 }
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 713 of file shz_xmtrx.hpp.

713 {
714 shz_xmtrx_load_apply_store_3x4(dst, &mat1, &mat2);
715 }
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 718 of file shz_xmtrx.hpp.

718 {
719 shz_xmtrx_load_apply_store_3x3(dst, &mat1, &mat2);
720 }
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 ( const vec4 & in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec4().

Definition at line 730 of file shz_xmtrx.hpp.

730 {
731 return shz_xmtrx_transform_vec4(in);
732 }
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 ( const vec3 & in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec3().

Definition at line 735 of file shz_xmtrx.hpp.

735 {
736 return shz_xmtrx_transform_vec3(in);
737 }
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 ( const vec2 & in)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_vec2().

Definition at line 740 of file shz_xmtrx.hpp.

740 {
741 return shz_xmtrx_transform_vec2(in);
742 }
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 ( const vec3 & pt)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_point3().

Definition at line 745 of file shz_xmtrx.hpp.

745 {
747 }
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 ( const vec2 & pt)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_transform_point2().

Definition at line 750 of file shz_xmtrx.hpp.

750 {
752 }
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() [1/2]

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

C++ wrapper around shz_xmtrx_set_translation().

Definition at line 762 of file shz_xmtrx.hpp.

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

◆ set_translation() [2/2]

static void shz::xmtrx::set_translation ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_set_translation().

Definition at line 767 of file shz_xmtrx.hpp.

767 {
768 set_translation(v.x, v.y, v.z);
769 }
static void set_translation(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_set_translation().

◆ set_scale() [1/2]

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

Sets only the inner 3x3 submatrix to be a 3D scale matrix with the given components.

Definition at line 772 of file shz_xmtrx.hpp.

772 {
773 shz_xmtrx_set_scale(x, y, z);
774 }
void shz_xmtrx_set_scale(float x, float y, float z) SHZ_NOEXCEPT
Sets only the inner 3x3 submatrix of XMTRX to be a scaling matrix.

◆ set_scale() [2/2]

static void shz::xmtrx::set_scale ( const shz::vec3 & size)
inlinestaticnoexcept

Sets only the inner 3x3 submatrix to be a 3D scale matrix with the given scale vector.

Definition at line 777 of file shz_xmtrx.hpp.

777 {
778 set_scale(size.x, size.y, size.z);
779 }
static void set_scale(float x, float y, float z) noexcept
Sets only the inner 3x3 submatrix to be a 3D scale matrix with the given components.

◆ get_translation()

static vec3 shz::xmtrx::get_translation ( )
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_set_translation().

Definition at line 789 of file shz_xmtrx.hpp.

789 {
791 }
shz_vec3_t shz_xmtrx_get_translation(void) SHZ_NOEXCEPT
Returns the translational components from the last column of XMTRX, as a 3D vector.

◆ get_scale()

static vec3 shz::xmtrx::get_scale ( )
inlinestaticnoexcept

Returns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.

Warning
This routine assumes XMTRX is a standard TRS-style transform matrix, without shearing or reflection.

Definition at line 798 of file shz_xmtrx.hpp.

798 {
799 return shz_xmtrx_get_scale();
800 }
shz_vec3_t shz_xmtrx_get_scale(void) SHZ_NOEXCEPT
Returns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.

◆ add()

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

C++ wrapper around shz_xmtrx_add_4x4().

Definition at line 810 of file shz_xmtrx.hpp.

810 {
811 shz_xmtrx_add_4x4(&mat);
812 }
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 815 of file shz_xmtrx.hpp.

815 {
816 shz_xmtrx_sub_4x4(&mat);
817 }
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() [1/2]

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 820 of file shz_xmtrx.hpp.

820 {
821 shz_xmtrx_add_diagonal(x, y, z, w);
822 }
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_diagonal() [2/2]

static void shz::xmtrx::add_diagonal ( const vec4 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_add_diagonal().

Definition at line 825 of file shz_xmtrx.hpp.

825 {
826 add_diagonal(v.x, v.y, v.z, v.w);
827 }
static void add_diagonal(float x, float y, float z, float w) noexcept
C++ wrapper around shz_xmtrx_add_diagonal().

◆ add_symmetric_skew() [1/2]

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 830 of file shz_xmtrx.hpp.

830 {
832 }
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.

◆ add_symmetric_skew() [2/2]

static void shz::xmtrx::add_symmetric_skew ( const vec3 & v)
inlinestaticnoexcept

C++ wrapper around shz_xmtrx_add_symmetric_skew().

Definition at line 835 of file shz_xmtrx.hpp.

835 {
836 add_symmetric_skew(v.x, v.y, v.z);
837 }
static void add_symmetric_skew(float x, float y, float z) noexcept
C++ wrapper around shz_xmtrx_add_symmetric_skew().

◆ transpose()

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

C++ wrapper around shz_xmtrx_transpose().

Definition at line 840 of file shz_xmtrx.hpp.

840 {
842 }
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 845 of file shz_xmtrx.hpp.

845 {
847 }
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 850 of file shz_xmtrx.hpp.

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

◆ to_quat()

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

C++ wrapper around shz_xmtrx_to_quat().

Definition at line 855 of file shz_xmtrx.hpp.

855 {
856 return shz_xmtrx_to_quat();
857 }
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 860 of file shz_xmtrx.hpp.

860 {
861 return shz_xmtrx_determinant();
862 }
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 865 of file shz_xmtrx.hpp.

865 {
867 }
void shz_xmtrx_invert(void) SHZ_NOEXCEPT
Inverts XMTRX in-place.

◆ blend()

static void shz::xmtrx::blend ( const shz_mat4x4_t & joint_matrix,
float weight )
inlinestaticnoexcept

Adds and accumulates a scaled 4x4 matrix onto XMTRX.

Each component of joint_matrix will be multiplied by weight, with the result being added to the existing value of that component of XMTRX.

This is useful for accumulating weighted joint matrices onto an initially zeroed-out XMTRX. This allows for in-place construction of a skin matrix, which can then be directly used to transform the vertices of a mesh against for animation.

See also
shz_xmtrx_init_zero()

Definition at line 880 of file shz_xmtrx.hpp.

880 {
881 shz_xmtrx_blend(&joint_matrix, weight);
882 }
void shz_xmtrx_blend(const shz_mat4x4_t *joint_matrix, float weight) SHZ_NOEXCEPT
Adds and accumulates a scaled 4x4 matrix onto XMTRX.

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