SH4ZAM! 0.7.0
Fast math library for the Sega Dreamcast's SH4 CPU
Loading...
Searching...
No Matches
shz::mat4x4 Struct Reference
Inheritance diagram for shz::mat4x4:
Collaboration diagram for shz::mat4x4:

Public Member Functions

 mat4x4 (const mat4x4 &other) noexcept
 
 mat4x4 (const shz_mat4x4_t &other) noexcept
 
mat4x4operator= (const shz_mat4x4_t &other) noexcept
 
Initialization

Routines for fully initializing a matrix.

void init_identity () noexcept
 
void init_identity_safe () noexcept
 
void init_zero () noexcept
 
void init_one () noexcept
 
void init_fill (float value) noexcept
 
void init_translation (float x, float y, float z) noexcept
 
void init_translation (const vec3 &v) noexcept
 
void init_scale (float x, float y, float z) noexcept
 
void init_scale (const vec3 &v) noexcept
 
void init_rotation_x (float angle) noexcept
 
void init_rotation_y (float angle) noexcept
 
void init_rotation_z (float angle) noexcept
 
void init_rotation_xyz (float xAngle, float yAngle, float zAngle) noexcept
 
void init_rotation_zyx (float zAngle, float yAngle, float xAngle) noexcept
 
void init_rotation_zxy (float zAngle, float xAngle, float yAngle) noexcept
 
void init_rotation_yxz (float yAngle, float xAngle, float zAngle) noexcept
 
void init_rotation (float angle, float x, float y, float z) noexcept
 
void init_rotation (float angle, const vec3 &axis) noexcept
 
void init_rotation (const quat &q) noexcept
 
void init_diagonal (float x, float y, float z, float w) noexcept
 
void init_diagonal (const vec4 &v) noexcept
 
void init_upper_triangular (float col1, const vec2 &col2, const vec3 &col3, const vec4 &col4) noexcept
 
void init_lower_triangular (const vec4 &col1, const vec3 &col2, const vec2 &col3, float col4) noexcept
 
void init_symmetric_skew (float x, float y, float z) noexcept
 
void init_symmetric_skew (const vec3 &v) noexcept
 
void init_outer_product (const vec4 &v1, const vec4 &v2) noexcept
 
void init_permutation_wxyz () noexcept
 
void init_permutation_yzwx () noexcept
 
void init_screen (float width, float height) noexcept
 
void init_lookat (const vec3 &eye, const vec3 &center, const vec3 &up) noexcept
 
void init_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
void init_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
void init_perspective (float fov, float aspect, float znear) noexcept
 
Getting

Routines for getting specific values within a matrix

vec4 row (size_t index) const noexcept
 
vec4 col (size_t index) const noexcept
 
vec3 get_translation () const noexcept
 
Setting

Routines for setting specific values within a matrix

void set_row (size_t index, vec4 values) noexcept
 
void set_col (size_t index, vec4 values) noexcept
 
void swap_rows (size_t row1, size_t row2) noexcept
 
void swap_cols (size_t col1, size_t col2) noexcept
 
void set_translation (float x, float y, float z) noexcept
 
void set_translation (const vec3 &v) noexcept
 
void set_scale (float x, float y, float z) noexcept
 
void set_scale (const vec3 &v) noexcept
 
void set_rotation (const quat &rot) noexcept
 
void set_diagonal (float x, float y, float z, float w) noexcept
 
void set_diagonal (const vec4 &v) noexcept
 
Applying

Routines for multiplying and accumulating onto the given matrix.

void apply (const shz_mat4x4_t &mat) noexcept
 
void apply (const float mat[16]) noexcept
 
void apply_transpose (const shz_mat4x4_t &mat) noexcept
 
void apply_transpose (const float mat[16]) noexcept
 
void apply_scale (float x, float y, float z) noexcept
 
void apply_scale (const vec3 &v) noexcept
 
void apply_translation (float x, float y, float z) noexcept
 
void apply_translation (const vec3 &v) noexcept
 
void apply_rotation_x (float angle) noexcept
 
void apply_rotation_y (float angle) noexcept
 
void apply_rotation_z (float angle) noexcept
 
void apply_rotation_xyz (float xAngle, float yAngle, float zAngle) noexcept
 
void apply_rotation_zyx (float zAngle, float yAngle, float xAngle) noexcept
 
void apply_rotation_zxy (float zAngle, float xAngle, float yAngle) noexcept
 
void apply_rotation_yxz (float yAngle, float xAngle, float zAngle) noexcept
 
void apply_rotation (float angle, float x, float y, float z) noexcept
 
void apply_rotation (float angle, vec3 axis) noexcept
 
void apply_rotation (const quat &q) noexcept
 
void apply_lookat (vec3 pos, vec3 target, vec3 up) noexcept
 
void apply_ortho (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
void apply_frustum (float left, float right, float bottom, float top, float znear, float zfar) noexcept
 
void apply_perspective (float fov, float aspect, float znear) noexcept
 
void apply_screen (float width, float height) noexcept
 
void apply_symmetric_skew (float x, float y, float z) noexcept
 
void apply_permutation_wxyz () noexcept
 
void apply_permutation_yzwx () noexcept
 
void apply_self () noexcept
 
GL Transformations

OpenGL-style 4x4 matrix transforms.

void translate (float x, float y, float z) noexcept
 
void translate (vec3 v) noexcept
 
void scale (float x, float y, float z) noexcept
 
void scale (vec3 v) noexcept
 
void rotate_x (float radians) noexcept
 
void rotate_y (float radians) noexcept
 
void rotate_z (float radians) noexcept
 
void rotate_xyz (float xRadians, float yRadians, float zRadians) noexcept
 
void rotate_zyx (float zRadians, float yRadians, float xRadians) noexcept
 
void rotate_zxy (float zRadians, float xRadians, float yRadians) noexcept
 
void rotate_yxz (float yRadians, float xRadians, float zRadians) noexcept
 
void rotate (float radians, float xAxis, float yAxis, float zAxis) noexcept
 
void rotate (float radians, vec3 axis) noexcept
 
Transforming

Routines for transforming vectors and points by a matrix.

vec2 transform (const vec2 &in) const noexcept
 
vec3 transform (const vec3 &in) const noexcept
 
vec4 transform (const vec4 &in) const noexcept
 
vec2 transform_point (const vec2 &pt) const noexcept
 
vec3 transform_point (const vec3 &pt) const noexcept
 
vec2 transform_transpose (const vec2 &in) const noexcept
 
vec3 transform_transpose (const vec3 &in) const noexcept
 
vec4 transform_transpose (const vec4 &in) const noexcept
 
vec2 transform_point_transpose (const vec2 &pt) const noexcept
 
vec3 transform_point_transpose (const vec3 &pt) const noexcept
 

Static Public Member Functions

Multiplication

Routines for multiplying two matrices and storing the result in a third.

static void mult (shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const shz_mat4x4_t &rhs) noexcept
 
static void mult (shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const float rhs[16]) noexcept
 
static void mult_transpose (shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const shz_mat4x4_t &rhs) noexcept
 
static void mult_transpose (shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const float rhs[16]) noexcept
 

Static Public Attributes

static constexpr size_t Rows
 
static constexpr size_t Cols
 

Friends

bool operator== (const mat4x4 &lhs, const mat4x4 &rhs) noexcept
 

Miscellaneous

Other matrix-related operations and routines

quat to_quat () const noexcept
 
float determinant () const noexcept
 
float trace () const noexcept
 
void inverse (mat4x4 *out) const noexcept
 
void inverse_block_triangular (mat4x4 *out) const noexcept
 
void decompose (vec3 *translation, quat *rotation, vec3 *scale) const noexcept
 
void swap (shz_mat4x4_t &matA, shz_mat4x4_t &matB) noexcept
 
static void copy (shz_mat4x4_t *lhs, const shz_mat4x4_t &rhs) noexcept
 
static void copy (shz_mat4x4_t *lhs, const float rhs[16]) noexcept
 

Additional Inherited Members

- Data Fields inherited from shz_mat4x4_t
union { 
 
   float   elem [16] 
 
   float   elem2D [4][4] 
 
   shz_vec4_t   col [4] 
 
   struct { 
 
      shz_vec4_t   left 
 
      shz_vec4_t   up 
 
      shz_vec4_t   forward 
 
      shz_vec4_t   pos 
 
   }  
 
};  
 

Detailed Description

Definition at line 27 of file shz_matrix.hpp.

Constructor & Destructor Documentation

◆ mat4x4() [1/2]

shz::mat4x4::mat4x4 ( const mat4x4 & other)
inlinenoexcept

Definition at line 33 of file shz_matrix.hpp.

33 {
34 shz_mat4x4_copy(this, &other);
35 }
void shz_mat4x4_copy(shz_mat4x4_t *dst, const shz_mat4x4_t *src) SHZ_NOEXCEPT
Copies the given src 4x4 matrix into the given dst 4x4 matrix.

◆ mat4x4() [2/2]

shz::mat4x4::mat4x4 ( const shz_mat4x4_t & other)
inlinenoexcept

Definition at line 37 of file shz_matrix.hpp.

37 {
38 shz_mat4x4_copy(this, &other);
39 }

Member Function Documentation

◆ operator=()

mat4x4 & shz::mat4x4::operator= ( const shz_mat4x4_t & other)
inlinenoexcept

Definition at line 79 of file shz_matrix.hpp.

79 {
80 shz_mat4x4_copy(this, &other);
81 return *this;
82 }

◆ init_identity()

void shz::mat4x4::init_identity ( )
inlinenoexcept

Definition at line 89 of file shz_matrix.hpp.

89 {
91 }
void shz_mat4x4_init_identity(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the given matrix to the identity matrix as fast as possible.

◆ init_identity_safe()

void shz::mat4x4::init_identity_safe ( )
inlinenoexcept

Definition at line 93 of file shz_matrix.hpp.

93 {
95 }
void shz_mat4x4_init_identity_safe(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the given matrix to the identity matrix, safely zeroing out NaN values.

◆ init_zero()

void shz::mat4x4::init_zero ( )
inlinenoexcept

Definition at line 97 of file shz_matrix.hpp.

97 {
99 }
void shz_mat4x4_init_zero(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the given matrix with all 0s for its element values.

◆ init_one()

void shz::mat4x4::init_one ( )
inlinenoexcept

Definition at line 101 of file shz_matrix.hpp.

101 {
103 }
void shz_mat4x4_init_one(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the given matrix with all 1s for its element values.

◆ init_fill()

void shz::mat4x4::init_fill ( float value)
inlinenoexcept

Definition at line 105 of file shz_matrix.hpp.

105 {
106 shz_mat4x4_init_fill(this, value);
107 }
void shz_mat4x4_init_fill(shz_mat4x4_t *mat, float value) SHZ_NOEXCEPT
Initializes the given matrix with all elements assigned to the given value.

◆ init_translation() [1/2]

void shz::mat4x4::init_translation ( float x,
float y,
float z )
inlinenoexcept

Definition at line 109 of file shz_matrix.hpp.

109 {
110 shz_mat4x4_init_translation(this, x, y, z);
111 }
void shz_mat4x4_init_translation(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Initializes the given matrix to a 3D translation matrix with the given coordinates.

◆ init_translation() [2/2]

void shz::mat4x4::init_translation ( const vec3 & v)
inlinenoexcept

Definition at line 113 of file shz_matrix.hpp.

113 {
114 init_translation(v.x, v.y, v.z);
115 }

◆ init_scale() [1/2]

void shz::mat4x4::init_scale ( float x,
float y,
float z )
inlinenoexcept

Definition at line 117 of file shz_matrix.hpp.

117 {
118 shz_mat4x4_init_scale(this, x, y, z);
119 }
void shz_mat4x4_init_scale(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Initializes the given matrix to a 3D scaling matrix with the given dimensions.

◆ init_scale() [2/2]

void shz::mat4x4::init_scale ( const vec3 & v)
inlinenoexcept

Definition at line 121 of file shz_matrix.hpp.

121 {
122 init_scale(v.x, v.y, v.z);
123 }

◆ init_rotation_x()

void shz::mat4x4::init_rotation_x ( float angle)
inlinenoexcept

Definition at line 125 of file shz_matrix.hpp.

125 {
126 shz_mat4x4_init_rotation_x(this, angle);
127 }
void shz_mat4x4_init_rotation_x(shz_mat4x4_t *mat, float xAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix by xAngle radians over the X-axis.

◆ init_rotation_y()

void shz::mat4x4::init_rotation_y ( float angle)
inlinenoexcept

Definition at line 129 of file shz_matrix.hpp.

129 {
130 shz_mat4x4_init_rotation_y(this, angle);
131 }
void shz_mat4x4_init_rotation_y(shz_mat4x4_t *mat, float yAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix by yAngle radians over the Y-axis.

◆ init_rotation_z()

void shz::mat4x4::init_rotation_z ( float angle)
inlinenoexcept

Definition at line 133 of file shz_matrix.hpp.

133 {
134 shz_mat4x4_init_rotation_z(this, angle);
135 }
void shz_mat4x4_init_rotation_z(shz_mat4x4_t *mat, float zAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix by zAngle radians over the Z-axis.

◆ init_rotation_xyz()

void shz::mat4x4::init_rotation_xyz ( float xAngle,
float yAngle,
float zAngle )
inlinenoexcept

Definition at line 137 of file shz_matrix.hpp.

137 {
138 shz_mat4x4_init_rotation_xyz(this, xAngle, yAngle, zAngle);
139 }
void shz_mat4x4_init_rotation_xyz(shz_mat4x4_t *mat, float xAngle, float yAngle, float zAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix from the intrinsic rotation created by the given...

◆ init_rotation_zyx()

void shz::mat4x4::init_rotation_zyx ( float zAngle,
float yAngle,
float xAngle )
inlinenoexcept

Definition at line 141 of file shz_matrix.hpp.

141 {
142 shz_mat4x4_init_rotation_zyx(this, zAngle, yAngle, xAngle);
143 }
void shz_mat4x4_init_rotation_zyx(shz_mat4x4_t *mat, float zAngle, float yAngle, float xAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix from the intrinsic rotation created by the given...

◆ init_rotation_zxy()

void shz::mat4x4::init_rotation_zxy ( float zAngle,
float xAngle,
float yAngle )
inlinenoexcept

Definition at line 145 of file shz_matrix.hpp.

145 {
146 shz_mat4x4_init_rotation_zxy(this, zAngle, xAngle, yAngle);
147 }
void shz_mat4x4_init_rotation_zxy(shz_mat4x4_t *mat, float zAngle, float xAngle, float yAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix from the intrinsic rotation created by the given...

◆ init_rotation_yxz()

void shz::mat4x4::init_rotation_yxz ( float yAngle,
float xAngle,
float zAngle )
inlinenoexcept

Definition at line 149 of file shz_matrix.hpp.

149 {
150 shz_mat4x4_init_rotation_yxz(this, yAngle, xAngle, zAngle);
151 }
void shz_mat4x4_init_rotation_yxz(shz_mat4x4_t *mat, float yAngle, float xAngle, float zAngle) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix from the intrinsic rotation created by the given...

◆ init_rotation() [1/3]

void shz::mat4x4::init_rotation ( float angle,
float x,
float y,
float z )
inlinenoexcept

Definition at line 153 of file shz_matrix.hpp.

153 {
154 shz_mat4x4_init_rotation(this, angle, x, y, z);
155 }
void shz_mat4x4_init_rotation(shz_mat4x4_t *mat, float radians, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix about the given axis rotated by angle radians.

◆ init_rotation() [2/3]

void shz::mat4x4::init_rotation ( float angle,
const vec3 & axis )
inlinenoexcept

Definition at line 157 of file shz_matrix.hpp.

157 {
158 init_rotation(angle, axis.x, axis.y, axis.z);
159 }

◆ init_rotation() [3/3]

void shz::mat4x4::init_rotation ( const quat & q)
inlinenoexcept

Definition at line 161 of file shz_matrix.hpp.

161 {
163 }
void shz_mat4x4_init_rotation_quat(shz_mat4x4_t *m, shz_quat_t q) SHZ_NOEXCEPT
Initializes the given matrix to a 3D rotation matrix with its orientation given by a quaternion.

◆ init_diagonal() [1/2]

void shz::mat4x4::init_diagonal ( float x,
float y,
float z,
float w )
inlinenoexcept

Definition at line 165 of file shz_matrix.hpp.

165 {
166 shz_mat4x4_init_diagonal(this, x, y, z, w);
167 }
void shz_mat4x4_init_diagonal(shz_mat4x4_t *mat, float x, float y, float z, float w) SHZ_NOEXCEPT
Initializes the given matrix to a diagonal matrix with the given 4 values.

◆ init_diagonal() [2/2]

void shz::mat4x4::init_diagonal ( const vec4 & v)
inlinenoexcept

Definition at line 169 of file shz_matrix.hpp.

169 {
170 init_diagonal(v.x, v.y, v.z, v.w);
171 }

◆ init_upper_triangular()

void shz::mat4x4::init_upper_triangular ( float col1,
const vec2 & col2,
const vec3 & col3,
const vec4 & col4 )
inlinenoexcept

Definition at line 173 of file shz_matrix.hpp.

173 {
174 shz_mat4x4_init_upper_triangular(this, col1, col2, col3, col4);
175 }
void shz_mat4x4_init_upper_triangular(shz_mat4x4_t *mat, float col1, shz_vec2_t col2, shz_vec3_t col3, shz_vec4_t col4) SHZ_NOEXCEPT
Initializes the given matrix to an upper triangular matrix whose nonzero entries have the given value...

◆ init_lower_triangular()

void shz::mat4x4::init_lower_triangular ( const vec4 & col1,
const vec3 & col2,
const vec2 & col3,
float col4 )
inlinenoexcept

Definition at line 177 of file shz_matrix.hpp.

177 {
178 shz_mat4x4_init_lower_triangular(this, col1, col2, col3, col4);
179 }
void shz_mat4x4_init_lower_triangular(shz_mat4x4_t *mat, shz_vec4_t col1, shz_vec3_t col2, shz_vec2_t col3, float col4) SHZ_NOEXCEPT
Initializes the given matrix to a lower triangular matrix whose nonzero entries have the given value.

◆ init_symmetric_skew() [1/2]

void shz::mat4x4::init_symmetric_skew ( float x,
float y,
float z )
inlinenoexcept

Definition at line 181 of file shz_matrix.hpp.

181 {
182 shz_mat4x4_init_symmetric_skew(this, x, y, z);
183 }
void shz_mat4x4_init_symmetric_skew(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Initializes the given matrix to be the symmetric skew of the given 3D vector components.

◆ init_symmetric_skew() [2/2]

void shz::mat4x4::init_symmetric_skew ( const vec3 & v)
inlinenoexcept

Definition at line 185 of file shz_matrix.hpp.

185 {
186 init_symmetric_skew(v.x, v.y, v.z);
187 }

◆ init_outer_product()

void shz::mat4x4::init_outer_product ( const vec4 & v1,
const vec4 & v2 )
inlinenoexcept

Definition at line 189 of file shz_matrix.hpp.

189 {
190 shz_mat4x4_init_outer_product(this, v1, v2);
191 }
void shz_mat4x4_init_outer_product(shz_mat4x4_t *mat, shz_vec4_t v1, shz_vec4_t v2) SHZ_NOEXCEPT
Initializes the given matrix to be the result from taking the outer product of the two given 4D vecto...

◆ init_permutation_wxyz()

void shz::mat4x4::init_permutation_wxyz ( )
inlinenoexcept

Definition at line 193 of file shz_matrix.hpp.

193 {
195 }
void shz_mat4x4_init_permutation_wxyz(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the matrix to to a permutation matrix, which reorders the components of transformed vecto...

◆ init_permutation_yzwx()

void shz::mat4x4::init_permutation_yzwx ( )
inlinenoexcept

Definition at line 197 of file shz_matrix.hpp.

197 {
199 }
void shz_mat4x4_init_permutation_yzwx(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Initializes the matrix to to a permutation matrix, which reorders the components of transformed vecto...

◆ init_screen()

void shz::mat4x4::init_screen ( float width,
float height )
inlinenoexcept

Definition at line 201 of file shz_matrix.hpp.

201 {
202 shz_mat4x4_init_screen(this, width, height);
203 }
void shz_mat4x4_init_screen(shz_mat4x4_t *mat, float width, float height) SHZ_NOEXCEPT
Initializes the given matrix to the viewport matrix with the given dimenions.

◆ init_lookat()

void shz::mat4x4::init_lookat ( const vec3 & eye,
const vec3 & center,
const vec3 & up )
inlinenoexcept

Definition at line 205 of file shz_matrix.hpp.

205 {
206 shz_mat4x4_init_lookat(this, eye, center, up);
207 }
void shz_mat4x4_init_lookat(shz_mat4x4_t *mat, shz_vec3_t eye, shz_vec3_t center, shz_vec3_t up) SHZ_NOEXCEPT
Initializes the given matrix to a "lookAt" view matrix.
shz_vec4_t up
Access the second column of the matrix as a 1x4 vector.
Definition shz_matrix.h:76

◆ init_ortho()

void shz::mat4x4::init_ortho ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinenoexcept

Definition at line 209 of file shz_matrix.hpp.

209 {
210 shz_mat4x4_init_ortho(this, left, right, bottom, top, znear, zfar);
211 }
void shz_mat4x4_init_ortho(shz_mat4x4_t *mat, float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Initializes the given matrix to an orthographic projection matrix.
shz_vec4_t left
< Named column vectors.
Definition shz_matrix.h:75

◆ init_frustum()

void shz::mat4x4::init_frustum ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinenoexcept

Definition at line 213 of file shz_matrix.hpp.

213 {
214 shz_mat4x4_init_frustum(this, left, right, bottom, top, znear, zfar);
215 }
void shz_mat4x4_init_frustum(shz_mat4x4_t *mat, float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Initializes the given matrix to a frustum projection matrix.

◆ init_perspective()

void shz::mat4x4::init_perspective ( float fov,
float aspect,
float znear )
inlinenoexcept

Definition at line 217 of file shz_matrix.hpp.

217 {
218 shz_mat4x4_init_perspective(this, fov, aspect, znear);
219 }
void shz_mat4x4_init_perspective(shz_mat4x4_t *mat, float fov, float aspect, float znear) SHZ_NOEXCEPT
Initializes the given matrix to a perspective projection matrix.

◆ row()

vec4 shz::mat4x4::row ( size_t index) const
inlinenoexcept

C++ wrapper for shz_mat4x4_row().

Definition at line 229 of file shz_matrix.hpp.

229 {
230 return shz_mat4x4_row(this, index);
231 }
shz_vec4_t shz_mat4x4_row(const shz_mat4x4_t *mat, size_t row) SHZ_NOEXCEPT
Extracts the row index as a 4D row vector from the given matrix.

◆ col()

vec4 shz::mat4x4::col ( size_t index) const
inlinenoexcept

C++ wrapper for shz_mat4x4_col().

Definition at line 234 of file shz_matrix.hpp.

234 {
235 return shz_mat4x4_col(this, index);
236 }
shz_vec4_t shz_mat4x4_col(const shz_mat4x4_t *mat, size_t col) SHZ_NOEXCEPT
Extracts the col index as a 4D column vector from the given matrix.

◆ get_translation()

vec3 shz::mat4x4::get_translation ( ) const
inlinenoexcept

Definition at line 238 of file shz_matrix.hpp.

238 {
239 return shz_mat4x4_get_translation(this);
240 }
shz_vec3_t shz_mat4x4_get_translation(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Returns the translational components from the 4th column as a 3D vector.

◆ set_row()

void shz::mat4x4::set_row ( size_t index,
vec4 values )
inlinenoexcept

Definition at line 249 of file shz_matrix.hpp.

249 {
250 shz_mat4x4_set_row(this, index, values);
251 }
void shz_mat4x4_set_row(shz_mat4x4_t *mat, size_t row, shz_vec4_t vec) SHZ_NOEXCEPT
Sets the values of mat at the given row to those of the 4D vector, vec.

◆ set_col()

void shz::mat4x4::set_col ( size_t index,
vec4 values )
inlinenoexcept

Definition at line 253 of file shz_matrix.hpp.

253 {
254 shz_mat4x4_set_col(this, index, values);
255 }
void shz_mat4x4_set_col(shz_mat4x4_t *mat, size_t col, shz_vec4_t vec) SHZ_NOEXCEPT
Sets the values of mat at the given col to those of the 4D vector, vec.

◆ swap_rows()

void shz::mat4x4::swap_rows ( size_t row1,
size_t row2 )
inlinenoexcept

Definition at line 257 of file shz_matrix.hpp.

257 {
258 shz_mat4x4_swap_rows(this, row1, row2);
259 }
void shz_mat4x4_swap_rows(shz_mat4x4_t *mat, size_t row1, size_t row2) SHZ_NOEXCEPT
Swaps the 4D row vectors located at row1 and row2 within mat.

◆ swap_cols()

void shz::mat4x4::swap_cols ( size_t col1,
size_t col2 )
inlinenoexcept

Definition at line 261 of file shz_matrix.hpp.

261 {
262 shz_mat4x4_swap_cols(this, col1, col2);
263 }
void shz_mat4x4_swap_cols(shz_mat4x4_t *mat, size_t col1, size_t col2) SHZ_NOEXCEPT
Swaps the 4D column vectors located at col1 and col2 within mat.

◆ set_translation() [1/2]

void shz::mat4x4::set_translation ( float x,
float y,
float z )
inlinenoexcept

Definition at line 265 of file shz_matrix.hpp.

265 {
266 shz_mat4x4_set_translation(this, x, y, z);
267 }
void shz_mat4x4_set_translation(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Assigns only the 3D translation-related elements of the given matrix to the given values.

◆ set_translation() [2/2]

void shz::mat4x4::set_translation ( const vec3 & v)
inlinenoexcept

Definition at line 269 of file shz_matrix.hpp.

269 {
270 set_translation(v.x, v.y, v.z);
271 }

◆ set_scale() [1/2]

void shz::mat4x4::set_scale ( float x,
float y,
float z )
inlinenoexcept

Definition at line 273 of file shz_matrix.hpp.

273 {
274 shz_mat4x4_set_scale(this, x, y, z);
275 }
void shz_mat4x4_set_scale(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Assigns only the 3D scale-related elements of the given matrix to the given values.

◆ set_scale() [2/2]

void shz::mat4x4::set_scale ( const vec3 & v)
inlinenoexcept

Definition at line 277 of file shz_matrix.hpp.

277 {
278 set_scale(v.x, v.y, v.z);
279 }

◆ set_rotation()

void shz::mat4x4::set_rotation ( const quat & rot)
inlinenoexcept

Definition at line 281 of file shz_matrix.hpp.

281 {
283 }
void shz_mat4x4_set_rotation_quat(shz_mat4x4_t *m, shz_quat_t q) SHZ_NOEXCEPT
Sets just the rotational component of the matrix to the orientation given by a quaternion,...

◆ set_diagonal() [1/2]

void shz::mat4x4::set_diagonal ( float x,
float y,
float z,
float w )
inlinenoexcept

Definition at line 285 of file shz_matrix.hpp.

285 {
286 shz_mat4x4_set_diagonal(this, x, y, z, w);
287 }
void shz_mat4x4_set_diagonal(shz_mat4x4_t *mat, float x, float y, float z, float w) SHZ_NOEXCEPT
Assigns only the 4 elements along the diagonal of the given matrix to the given values.

◆ set_diagonal() [2/2]

void shz::mat4x4::set_diagonal ( const vec4 & v)
inlinenoexcept

Definition at line 289 of file shz_matrix.hpp.

289 {
290 set_diagonal(v.x, v.y, v.z, v.w);
291 }

◆ apply() [1/2]

void shz::mat4x4::apply ( const shz_mat4x4_t & mat)
inlinenoexcept

Definition at line 300 of file shz_matrix.hpp.

300 {
301 shz_mat4x4_apply(this, &mat);
302 }
void shz_mat4x4_apply(shz_mat4x4_t *dst, const shz_mat4x4_t *src) SHZ_NOEXCEPT
Multiplies and accumulates the src 4x4 matrix onto the dst 4x4 matrix.

◆ apply() [2/2]

void shz::mat4x4::apply ( const float mat[16])
inlinenoexcept

Definition at line 304 of file shz_matrix.hpp.

304 {
306 }
void shz_mat4x4_apply_unaligned(shz_mat4x4_t *dst, const float src[16]) SHZ_NOEXCEPT
Multiplies and accumulates the unaligned src 4x4 matrix onto the dst 4x4 matrix.

◆ apply_transpose() [1/2]

void shz::mat4x4::apply_transpose ( const shz_mat4x4_t & mat)
inlinenoexcept

Definition at line 308 of file shz_matrix.hpp.

308 {
309 shz_mat4x4_apply_transpose(this, &mat);
310 }
void shz_mat4x4_apply_transpose(shz_mat4x4_t *dst, const shz_mat4x4_t *src) SHZ_NOEXCEPT
Multiplies and accumulates the transposed src 4x4 matrix onto the dst 4x4 matrix.

◆ apply_transpose() [2/2]

void shz::mat4x4::apply_transpose ( const float mat[16])
inlinenoexcept

Definition at line 312 of file shz_matrix.hpp.

312 {
314 }
void shz_mat4x4_apply_transpose_unaligned(shz_mat4x4_t *dst, const float src[16]) SHZ_NOEXCEPT
Multiplies and accumulates the transposed unaligned src 4x4 matrix onto the dst 4x4 matrix.

◆ apply_scale() [1/2]

void shz::mat4x4::apply_scale ( float x,
float y,
float z )
inlinenoexcept

Definition at line 316 of file shz_matrix.hpp.

316 {
317 shz_mat4x4_apply_scale(this, x, y, z);
318 }
void shz_mat4x4_apply_scale(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates the scale-related elements of the given matrix by the given 3D components.

◆ apply_scale() [2/2]

void shz::mat4x4::apply_scale ( const vec3 & v)
inlinenoexcept

Definition at line 320 of file shz_matrix.hpp.

320 {
321 apply_scale(v.x, v.y, v.z);
322 }

◆ apply_translation() [1/2]

void shz::mat4x4::apply_translation ( float x,
float y,
float z )
inlinenoexcept

Definition at line 324 of file shz_matrix.hpp.

324 {
325 shz_mat4x4_apply_translation(this, x, y, z);
326 }
void shz_mat4x4_apply_translation(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Adds the given 3D vector components to the translational values of the given matrix.

◆ apply_translation() [2/2]

void shz::mat4x4::apply_translation ( const vec3 & v)
inlinenoexcept

Definition at line 328 of file shz_matrix.hpp.

328 {
329 apply_translation(v.x, v.y, v.z);
330 }

◆ apply_rotation_x()

void shz::mat4x4::apply_rotation_x ( float angle)
inlinenoexcept

Definition at line 332 of file shz_matrix.hpp.

332 {
333 shz_mat4x4_apply_rotation_x(this, angle);
334 }
void shz_mat4x4_apply_rotation_x(shz_mat4x4_t *mat, float xAngle) SHZ_NOEXCEPT
Multiplies and accumulates a rotation matrix by xAngle radians about the X-axis onto the given matrix...

◆ apply_rotation_y()

void shz::mat4x4::apply_rotation_y ( float angle)
inlinenoexcept

Definition at line 336 of file shz_matrix.hpp.

336 {
337 shz_mat4x4_apply_rotation_y(this, angle);
338 }
void shz_mat4x4_apply_rotation_y(shz_mat4x4_t *mat, float yAngle) SHZ_NOEXCEPT
Multiplies and accumulates a rotation matrix by yAngle radians about the Y-axis onto the given matrix...

◆ apply_rotation_z()

void shz::mat4x4::apply_rotation_z ( float angle)
inlinenoexcept

Definition at line 340 of file shz_matrix.hpp.

340 {
341 shz_mat4x4_apply_rotation_z(this, angle);
342 }
void shz_mat4x4_apply_rotation_z(shz_mat4x4_t *mat, float zAngle) SHZ_NOEXCEPT
Multiplies and accumulates a rotation matrix by zAngle radians about the Z-axis onto the given matrix...

◆ apply_rotation_xyz()

void shz::mat4x4::apply_rotation_xyz ( float xAngle,
float yAngle,
float zAngle )
inlinenoexcept

Definition at line 344 of file shz_matrix.hpp.

344 {
345 shz_mat4x4_apply_rotation_xyz(this, xAngle, yAngle, zAngle);
346 }
void shz_mat4x4_apply_rotation_xyz(shz_mat4x4_t *mat, float xAngle, float yAngle, float zAngle) SHZ_NOEXCEPT
Rotates the given transform matrix about the X axis, then the Y axis, then the Z axis by the given an...

◆ apply_rotation_zyx()

void shz::mat4x4::apply_rotation_zyx ( float zAngle,
float yAngle,
float xAngle )
inlinenoexcept

Definition at line 348 of file shz_matrix.hpp.

348 {
349 shz_mat4x4_apply_rotation_zyx(this, zAngle, yAngle, xAngle);
350 }
void shz_mat4x4_apply_rotation_zyx(shz_mat4x4_t *mat, float zAngle, float yAngle, float xAngle) SHZ_NOEXCEPT
Rotates the given transform matrix about the Z axis, then the Y axis, then the X axis by the given an...

◆ apply_rotation_zxy()

void shz::mat4x4::apply_rotation_zxy ( float zAngle,
float xAngle,
float yAngle )
inlinenoexcept

Definition at line 352 of file shz_matrix.hpp.

352 {
353 shz_mat4x4_apply_rotation_zxy(this, zAngle, xAngle, yAngle);
354 }
void shz_mat4x4_apply_rotation_zxy(shz_mat4x4_t *mat, float zAngle, float xAngle, float yAngle) SHZ_NOEXCEPT
Rotates the given transform matrix about the Z axis, then the X axis, then the Y axis by the given an...

◆ apply_rotation_yxz()

void shz::mat4x4::apply_rotation_yxz ( float yAngle,
float xAngle,
float zAngle )
inlinenoexcept

Definition at line 356 of file shz_matrix.hpp.

356 {
357 shz_mat4x4_apply_rotation_yxz(this, yAngle, xAngle, zAngle);
358 }
void shz_mat4x4_apply_rotation_yxz(shz_mat4x4_t *mat, float yAngle, float xAngle, float zAngle) SHZ_NOEXCEPT
Rotates the given transform matrix about the Y axis, then the X axis, then the Z axis by the given an...

◆ apply_rotation() [1/3]

void shz::mat4x4::apply_rotation ( float angle,
float x,
float y,
float z )
inlinenoexcept

Definition at line 360 of file shz_matrix.hpp.

360 {
361 shz_mat4x4_apply_rotation(this, angle, x, y, z);
362 }
void shz_mat4x4_apply_rotation(shz_mat4x4_t *mat, float angle, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT
Rotates the given transform matrix about the arbitrary axis given by a 3D direction vector and angle ...

◆ apply_rotation() [2/3]

void shz::mat4x4::apply_rotation ( float angle,
vec3 axis )
inlinenoexcept

Definition at line 364 of file shz_matrix.hpp.

364 {
365 apply_rotation(angle, axis.x, axis.y, axis.z);
366 }

◆ apply_rotation() [3/3]

void shz::mat4x4::apply_rotation ( const quat & q)
inlinenoexcept

Definition at line 368 of file shz_matrix.hpp.

368 {
370 }
void shz_mat4x4_apply_rotation_quat(shz_mat4x4_t *m, shz_quat_t q) SHZ_NOEXCEPT
Multiplies and accumulates the given matrix with a rotation matrix whose orientation is given by a qu...

◆ apply_lookat()

void shz::mat4x4::apply_lookat ( vec3 pos,
vec3 target,
vec3 up )
inlinenoexcept

Definition at line 372 of file shz_matrix.hpp.

372 {
373 shz_mat4x4_apply_lookat(this, pos, target, up);
374 }
void shz_mat4x4_apply_lookat(shz_mat4x4_t *m, shz_vec3_t pos, shz_vec3_t target, shz_vec3_t up) SHZ_NOEXCEPT
Applies the 3D "lookAt" matrix constructed with the given vector components onto the given matrix.
shz_vec4_t pos
Access the last column of the matrix as a 1x4 vector.
Definition shz_matrix.h:78

◆ apply_ortho()

void shz::mat4x4::apply_ortho ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinenoexcept

Definition at line 376 of file shz_matrix.hpp.

376 {
377 shz_mat4x4_apply_ortho(this, left, right, bottom, top, znear, zfar);
378 }
void shz_mat4x4_apply_ortho(shz_mat4x4_t *m, float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Multiplies and accumulates the ortho matrix constructed from the given values onto the given matrix.

◆ apply_frustum()

void shz::mat4x4::apply_frustum ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inlinenoexcept

Definition at line 380 of file shz_matrix.hpp.

380 {
381 shz_mat4x4_apply_frustum(this, left, right, bottom, top, znear, zfar);
382 }
void shz_mat4x4_apply_frustum(shz_mat4x4_t *m, float left, float right, float bottom, float top, float znear, float zfar) SHZ_NOEXCEPT
Multiplies and accumulates the frustum matrix constructed from the given values onto the given matrix...

◆ apply_perspective()

void shz::mat4x4::apply_perspective ( float fov,
float aspect,
float znear )
inlinenoexcept

Definition at line 384 of file shz_matrix.hpp.

384 {
385 shz_mat4x4_apply_perspective(this, fov, aspect, znear);
386 }
void shz_mat4x4_apply_perspective(shz_mat4x4_t *m, float fov, float aspect, float znear) SHZ_NOEXCEPT
Multiplies and accumulates the perspective matrix constructed from the given values onto the given ma...

◆ apply_screen()

void shz::mat4x4::apply_screen ( float width,
float height )
inlinenoexcept

Definition at line 388 of file shz_matrix.hpp.

388 {
389 shz_mat4x4_apply_screen(this, width, height);
390 }
void shz_mat4x4_apply_screen(shz_mat4x4_t *m, float width, float height) SHZ_NOEXCEPT
Multiplies and accumulates the viewport matrix created with the given components ont othe given matri...

◆ apply_symmetric_skew()

void shz::mat4x4::apply_symmetric_skew ( float x,
float y,
float z )
inlinenoexcept

Definition at line 392 of file shz_matrix.hpp.

392 {
393 shz_mat4x4_apply_symmetric_skew(this, x, y, z);
394 }
void shz_mat4x4_apply_symmetric_skew(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates the given matrix with a symmetric skew matrix formed from the given 3D vec...

◆ apply_permutation_wxyz()

void shz::mat4x4::apply_permutation_wxyz ( )
inlinenoexcept

Definition at line 396 of file shz_matrix.hpp.

396 {
398 }
void shz_mat4x4_apply_permutation_wxyz(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...

◆ apply_permutation_yzwx()

void shz::mat4x4::apply_permutation_yzwx ( )
inlinenoexcept

Definition at line 400 of file shz_matrix.hpp.

400 {
402 }
void shz_mat4x4_apply_permutation_yzwx(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Multiplies and accumulates a permutation matrix, which reorders the components of transformed vectors...

◆ apply_self()

void shz::mat4x4::apply_self ( )
inlinenoexcept

Definition at line 404 of file shz_matrix.hpp.

404 {
406 }
void shz_mat4x4_apply_self(shz_mat4x4_t *mat) SHZ_NOEXCEPT
Multiplies and accumulates the given matrix onto itself.

◆ translate() [1/2]

void shz::mat4x4::translate ( float x,
float y,
float z )
inlinenoexcept

Definition at line 415 of file shz_matrix.hpp.

415 {
416 shz_mat4x4_translate(this, x, y, z);
417 }
void shz_mat4x4_translate(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates mat by a 3D translation matrix with the given components.

◆ translate() [2/2]

void shz::mat4x4::translate ( vec3 v)
inlinenoexcept

Definition at line 419 of file shz_matrix.hpp.

419 {
420 translate(v.x, v.y, v.z);
421 }

◆ scale() [1/2]

void shz::mat4x4::scale ( float x,
float y,
float z )
inlinenoexcept

Definition at line 423 of file shz_matrix.hpp.

423 {
424 shz_mat4x4_scale(this, x, y, z);
425 }
void shz_mat4x4_scale(shz_mat4x4_t *mat, float x, float y, float z) SHZ_NOEXCEPT
Multiplies and accumulates mat by a 3D scaling matrix with the given components.

◆ scale() [2/2]

void shz::mat4x4::scale ( vec3 v)
inlinenoexcept

Definition at line 427 of file shz_matrix.hpp.

427 {
428 scale(v.x, v.y, v.z);
429 }

◆ rotate_x()

void shz::mat4x4::rotate_x ( float radians)
inlinenoexcept

Definition at line 431 of file shz_matrix.hpp.

431 {
432 shz_mat4x4_rotate_x(this, radians);
433 }
void shz_mat4x4_rotate_x(shz_mat4x4_t *mat, float radians) SHZ_NOEXCEPT
Multiplies and accumulates mat by a 3D rotation matrix about the X axis.

◆ rotate_y()

void shz::mat4x4::rotate_y ( float radians)
inlinenoexcept

Definition at line 435 of file shz_matrix.hpp.

435 {
436 shz_mat4x4_rotate_y(this, radians);
437 }
void shz_mat4x4_rotate_y(shz_mat4x4_t *mat, float radians) SHZ_NOEXCEPT
Multiplies and accumulates mat by a 3D rotation matrix about the Y axis.

◆ rotate_z()

void shz::mat4x4::rotate_z ( float radians)
inlinenoexcept

Definition at line 439 of file shz_matrix.hpp.

439 {
440 shz_mat4x4_rotate_z(this, radians);
441 }
void shz_mat4x4_rotate_z(shz_mat4x4_t *mat, float radians) SHZ_NOEXCEPT
Multiplies and accumulates mat by a 3D rotation matrix about the Z axis.

◆ rotate_xyz()

void shz::mat4x4::rotate_xyz ( float xRadians,
float yRadians,
float zRadians )
inlinenoexcept

Definition at line 443 of file shz_matrix.hpp.

443 {
444 shz_mat4x4_rotate_xyz(this, xRadians, yRadians, zRadians);
445 }
void shz_mat4x4_rotate_xyz(shz_mat4x4_t *mat, float xRadians, float yRadians, float zRadians) SHZ_NOEXCEPT
Multiplies and accumulates mat by 3D rotation matrices about the X then Y then Z axes.

◆ rotate_zyx()

void shz::mat4x4::rotate_zyx ( float zRadians,
float yRadians,
float xRadians )
inlinenoexcept

Definition at line 447 of file shz_matrix.hpp.

447 {
448 shz_mat4x4_rotate_zyx(this, zRadians, yRadians, xRadians);
449 }
void shz_mat4x4_rotate_zyx(shz_mat4x4_t *mat, float zRadians, float yRadians, float xRadians) SHZ_NOEXCEPT
Multiplies and accumulates mat by 3D rotation matrices about the Z then Y then X axes.

◆ rotate_zxy()

void shz::mat4x4::rotate_zxy ( float zRadians,
float xRadians,
float yRadians )
inlinenoexcept

Definition at line 451 of file shz_matrix.hpp.

451 {
452 shz_mat4x4_rotate_zxy(this, zRadians, xRadians, yRadians);
453 }
void shz_mat4x4_rotate_zxy(shz_mat4x4_t *mat, float zRadians, float xRadians, float yRadians) SHZ_NOEXCEPT
Multiplies and accumulates mat by 3D rotation matrices about the Z then X then Y axes.

◆ rotate_yxz()

void shz::mat4x4::rotate_yxz ( float yRadians,
float xRadians,
float zRadians )
inlinenoexcept

Definition at line 455 of file shz_matrix.hpp.

455 {
456 shz_mat4x4_rotate_yxz(this, yRadians, xRadians, zRadians);
457 }
void shz_mat4x4_rotate_yxz(shz_mat4x4_t *mat, float yRadians, float xRadians, float zRadians) SHZ_NOEXCEPT
Multiplies and accumulates mat by 3D rotation matrices about the Y then X then Z axes.

◆ rotate() [1/2]

void shz::mat4x4::rotate ( float radians,
float xAxis,
float yAxis,
float zAxis )
inlinenoexcept

Definition at line 459 of file shz_matrix.hpp.

459 {
460 shz_mat4x4_rotate(this, radians, xAxis, yAxis, zAxis);
461 }
void shz_mat4x4_rotate(shz_mat4x4_t *mat, float radians, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT
Multiplies and accumulates mat by the 3D rotation matrix formed by the given axis and angle.

◆ rotate() [2/2]

void shz::mat4x4::rotate ( float radians,
vec3 axis )
inlinenoexcept

Definition at line 463 of file shz_matrix.hpp.

463 {
464 rotate(radians, axis.x, axis.y, axis.z);
465 }

◆ mult() [1/2]

static void shz::mat4x4::mult ( shz_mat4x4_t * dst,
const shz_mat4x4_t & lhs,
const shz_mat4x4_t & rhs )
inlinestaticnoexcept

Definition at line 474 of file shz_matrix.hpp.

474 {
475 shz_mat4x4_mult(dst, &lhs, &rhs);
476 }
void shz_mat4x4_mult(shz_mat4x4_t *mat, const shz_mat4x4_t *lhs, const shz_mat4x4_t *rhs) SHZ_NOEXCEPT
Multiplies two 4x4 matrices together, storing the result into a third.

◆ mult() [2/2]

static void shz::mat4x4::mult ( shz_mat4x4_t * dst,
const shz_mat4x4_t & lhs,
const float rhs[16] )
inlinestaticnoexcept

Definition at line 478 of file shz_matrix.hpp.

478 {
479 shz_mat4x4_mult_unaligned(dst, &lhs, rhs);
480 }
void shz_mat4x4_mult_unaligned(shz_mat4x4_t *mat, const shz_mat4x4_t *lhs, const float rhs[16]) SHZ_NOEXCEPT
Multiplies two 4x4 matrices together, with the right handed matrix being unaligned,...

◆ mult_transpose() [1/2]

static void shz::mat4x4::mult_transpose ( shz_mat4x4_t * dst,
const shz_mat4x4_t & lhs,
const shz_mat4x4_t & rhs )
inlinestaticnoexcept

Definition at line 482 of file shz_matrix.hpp.

482 {
483 shz_mat4x4_mult_transpose(dst, &lhs, &rhs);
484 }
void shz_mat4x4_mult_transpose(shz_mat4x4_t *mat, const shz_mat4x4_t *lhs, const shz_mat4x4_t *rhs) SHZ_NOEXCEPT
Multiplies the regular matrix, lhs, by the transpose of the matrix, rhs, storing the result into mat.

◆ mult_transpose() [2/2]

static void shz::mat4x4::mult_transpose ( shz_mat4x4_t * dst,
const shz_mat4x4_t & lhs,
const float rhs[16] )
inlinestaticnoexcept

Definition at line 486 of file shz_matrix.hpp.

486 {
488 }
void shz_mat4x4_mult_transpose_unaligned(shz_mat4x4_t *mat, const shz_mat4x4_t *lhs, const float rhs[16]) SHZ_NOEXCEPT
Multiplies the regular matrix, lhs, by the transpose of the unaligned matrix, rhs,...

◆ transform() [1/3]

vec2 shz::mat4x4::transform ( const vec2 & in) const
inlinenoexcept

Definition at line 497 of file shz_matrix.hpp.

497 {
498 return shz_mat4x4_transform_vec2(this, in);
499 }
shz_vec2_t shz_mat4x4_transform_vec2(const shz_mat4x4_t *m, shz_vec2_t v) SHZ_NOEXCEPT
Transforms a 2D vector by a 4x4 matrix.

◆ transform() [2/3]

vec3 shz::mat4x4::transform ( const vec3 & in) const
inlinenoexcept

Definition at line 501 of file shz_matrix.hpp.

501 {
502 return shz_mat4x4_transform_vec3(this, in);
503 }
shz_vec3_t shz_mat4x4_transform_vec3(const shz_mat4x4_t *m, shz_vec3_t v) SHZ_NOEXCEPT
Transforms a 3D vector by a 4x4 matrix.

◆ transform() [3/3]

vec4 shz::mat4x4::transform ( const vec4 & in) const
inlinenoexcept

Definition at line 505 of file shz_matrix.hpp.

505 {
506 return shz_mat4x4_transform_vec4(this, in);
507 }
shz_vec4_t shz_mat4x4_transform_vec4(const shz_mat4x4_t *mat, shz_vec4_t in) SHZ_NOEXCEPT
Transforms a 4D vector by a 4x4 matrix.

◆ transform_point() [1/2]

vec2 shz::mat4x4::transform_point ( const vec2 & pt) const
inlinenoexcept

Definition at line 509 of file shz_matrix.hpp.

509 {
510 return shz_mat4x4_transform_point2(this, pt);
511 }
shz_vec2_t shz_mat4x4_transform_point2(const shz_mat4x4_t *mat, shz_vec2_t pt) SHZ_NOEXCEPT
Transforms a 2D point by a 4x4 matrix.

◆ transform_point() [2/2]

vec3 shz::mat4x4::transform_point ( const vec3 & pt) const
inlinenoexcept

Definition at line 513 of file shz_matrix.hpp.

513 {
514 return shz_mat4x4_transform_point3(this, pt);
515 }
shz_vec3_t shz_mat4x4_transform_point3(const shz_mat4x4_t *mat, shz_vec3_t pt) SHZ_NOEXCEPT
Transforms a 3D point by a 4x4 matrix.

◆ transform_transpose() [1/3]

vec2 shz::mat4x4::transform_transpose ( const vec2 & in) const
inlinenoexcept

Definition at line 517 of file shz_matrix.hpp.

517 {
519 }
shz_vec2_t shz_mat4x4_transform_vec2_transpose(const shz_mat4x4_t *m, shz_vec2_t v) SHZ_NOEXCEPT
Transforms a 2D vector the the transpose of a 4x4 matrix.

◆ transform_transpose() [2/3]

vec3 shz::mat4x4::transform_transpose ( const vec3 & in) const
inlinenoexcept

Definition at line 521 of file shz_matrix.hpp.

521 {
523 }
shz_vec3_t shz_mat4x4_transform_vec3_transpose(const shz_mat4x4_t *m, shz_vec3_t v) SHZ_NOEXCEPT
Transforms a 3D vector the the transpose of a 4x4 matrix.

◆ transform_transpose() [3/3]

vec4 shz::mat4x4::transform_transpose ( const vec4 & in) const
inlinenoexcept

Definition at line 525 of file shz_matrix.hpp.

525 {
527 }
shz_vec4_t shz_mat4x4_transform_vec4_transpose(const shz_mat4x4_t *m, shz_vec4_t v) SHZ_NOEXCEPT
Transforms a 4D vector the the transpose of a 4x4 matrix.

◆ transform_point_transpose() [1/2]

vec2 shz::mat4x4::transform_point_transpose ( const vec2 & pt) const
inlinenoexcept

Definition at line 529 of file shz_matrix.hpp.

529 {
531 }
shz_vec2_t shz_mat4x4_transform_point2_transpose(const shz_mat4x4_t *mat, shz_vec2_t pt) SHZ_NOEXCEPT
Transforms a 2D point by the transpose of a 4x4 matrix.

◆ transform_point_transpose() [2/2]

vec3 shz::mat4x4::transform_point_transpose ( const vec3 & pt) const
inlinenoexcept

Definition at line 533 of file shz_matrix.hpp.

533 {
535 }
shz_vec3_t shz_mat4x4_transform_point3_transpose(const shz_mat4x4_t *mat, shz_vec3_t pt) SHZ_NOEXCEPT
Transforms a 3D point by the transpose of a 4x4 matrix.

◆ copy() [1/2]

static void shz::mat4x4::copy ( shz_mat4x4_t * lhs,
const shz_mat4x4_t & rhs )
inlinestaticnoexcept

Definition at line 544 of file shz_matrix.hpp.

544 {
545 shz_mat4x4_copy(lhs, &rhs);
546 }

◆ copy() [2/2]

static void shz::mat4x4::copy ( shz_mat4x4_t * lhs,
const float rhs[16] )
inlinestaticnoexcept

Definition at line 548 of file shz_matrix.hpp.

548 {
550 }
void shz_mat4x4_copy_unaligned(shz_mat4x4_t *dst, const float src[16]) SHZ_NOEXCEPT
Copies the given unaligned src 4x4 matrix into the given dst 4x4 matrix.

◆ to_quat()

quat shz::mat4x4::to_quat ( ) const
inlinenoexcept

Definition at line 556 of file shz_matrix.hpp.

556 {
557 return shz_mat4x4_to_quat(this);
558 }
shz_quat_t shz_mat4x4_to_quat(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Converts the given 4x4 orientation matrix into a quaternion.

◆ determinant()

float shz::mat4x4::determinant ( ) const
inlinenoexcept

Definition at line 560 of file shz_matrix.hpp.

560 {
561 return shz_mat4x4_determinant(this);
562 }
float shz_mat4x4_determinant(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Returns the determinant of the given 4x4 matrix.

◆ trace()

float shz::mat4x4::trace ( ) const
inlinenoexcept

Definition at line 564 of file shz_matrix.hpp.

564 {
565 return shz_mat4x4_trace(this);
566 }
float shz_mat4x4_trace(const shz_mat4x4_t *mat) SHZ_NOEXCEPT
Returns the trace of the given 4x4 matrix.

◆ inverse()

void shz::mat4x4::inverse ( mat4x4 * out) const
inlinenoexcept

Definition at line 568 of file shz_matrix.hpp.

568 {
569 shz_mat4x4_inverse(this, out);
570 }
void shz_mat4x4_inverse(const shz_mat4x4_t *SHZ_RESTRICT mtrx, shz_mat4x4_t *SHZ_RESTRICT out) SHZ_NOEXCEPT
Computes the inverse of a 4x4 matrix.

◆ inverse_block_triangular()

void shz::mat4x4::inverse_block_triangular ( mat4x4 * out) const
inlinenoexcept

Definition at line 572 of file shz_matrix.hpp.

572 {
574 }
void shz_mat4x4_inverse_block_triangular(const shz_mat4x4_t *mtx, shz_mat4x4_t *out) SHZ_NOEXCEPT
Computes the inverse of a 4x4 matrix in block-triangular form.

◆ decompose()

void shz::mat4x4::decompose ( vec3 * translation,
quat * rotation,
vec3 * scale ) const
inlinenoexcept

Definition at line 576 of file shz_matrix.hpp.

576 {
577 shz_mat4x4_decompose(this, translation, rotation, scale);
578 }
void shz_mat4x4_decompose(const shz_mat4x4_t *mat, shz_vec3_t *translation, shz_quat_t *rotation, shz_vec3_t *scale) SHZ_NOEXCEPT
Decomposes a 4x4 transform matrix into translation, rotation, and scale.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const mat4x4 & lhs,
const mat4x4 & rhs )
friend

Overloaded equality operator, for comparing vectors.

Definition at line 75 of file shz_matrix.hpp.

75 {
76 return shz_mat4x4_equal(&lhs, &rhs);
77 }
bool shz_mat4x4_equal(const shz_mat4x4_t *SHZ_RESTRICT mat1, const shz_mat4x4_t *mat2) SHZ_NOEXCEPT
Returns true if the two matrices are equal, based on either absolute or relative tolerance.

◆ swap

void swap ( shz_mat4x4_t & matA,
shz_mat4x4_t & matB )
friend

Definition at line 552 of file shz_matrix.hpp.

552 {
553 shz_mat4x4_swap(&matA, &matB);
554 }
void shz_mat4x4_swap(shz_mat4x4_t *matA, shz_mat4x4_t *matB) SHZ_NOEXCEPT
Swaps the contents of the two given matrices, matA and matB.

Field Documentation

◆ Rows

size_t shz::mat4x4::Rows
staticconstexpr

Number of rows.

Definition at line 28 of file shz_matrix.hpp.

◆ Cols

size_t shz::mat4x4::Cols
staticconstexpr

Number of columns.

Definition at line 29 of file shz_matrix.hpp.


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