![]() |
SH4ZAM! 0.1.0
Fast math library for the Sega Dreamcast's SH4 CPU
|


Public Member Functions | |
| mat4x4 (const mat4x4 &other) noexcept | |
| mat4x4 (const shz_mat4x4_t &other) noexcept | |
| mat4x4 & | operator= (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_scale (float x, float y, float z) 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 (quat q) noexcept |
| void | init_diagonal (float x, float y, float z, float w) noexcept |
| void | init_upper_triangular (float col1, vec2 col2, vec3 col3, vec4 col4) noexcept |
| void | init_lower_triangular (vec4 col1, vec3 col2, vec2 col3, float col4) noexcept |
| void | init_symmetric_skew (float x, float y, float z) noexcept |
| void | init_outer_product (vec4 v1, vec4 v2) noexcept |
| void | init_permutation_wxyz () noexcept |
| void | init_permutation_yzwx () noexcept |
| void | init_screen (float width, float height) noexcept |
| void | init_lookat (vec3 eye, vec3 center, 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_scale (float x, float y, float z) noexcept |
| void | set_rotation (quat rot) noexcept |
| void | set_diagonal (float x, float y, float z, float w) 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_translation (float x, float y, float z) 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 (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 | scale (float x, float y, float z) 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 |
Transforming | |
Routines for transforming vectors and points by a matrix. | |
| vec2 | transform (vec2 in) const noexcept |
| vec3 | transform (vec3 in) const noexcept |
| vec4 | transform (vec4 in) const noexcept |
| vec2 | transform_point (vec2 pt) const noexcept |
| vec3 | transform_point (vec3 pt) const noexcept |
| vec2 | transform_transpose (vec2 in) const noexcept |
| vec3 | transform_transpose (vec3 in) const noexcept |
| vec4 | transform_transpose (vec4 in) const noexcept |
| vec2 | transform_point_transpose (vec2 pt) const noexcept |
| vec3 | transform_point_transpose (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 | ||
| } | ||
| }; | ||
Definition at line 27 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 33 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 37 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 79 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 89 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 93 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 97 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 101 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 105 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 109 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 113 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 117 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 121 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 125 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 129 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 133 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 137 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 141 of file shz_matrix.hpp.
|
inlinenoexcept |
C++ wrapper for shz_mat4x4_init_rotation().
Definition at line 146 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 150 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 154 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 158 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 162 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 166 of file shz_matrix.hpp.
Definition at line 170 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 174 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 178 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 182 of file shz_matrix.hpp.
Definition at line 186 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 190 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 194 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 198 of file shz_matrix.hpp.
|
inlinenoexcept |
C++ wrapper for shz_mat4x4_row().
Definition at line 210 of file shz_matrix.hpp.
|
inlinenoexcept |
C++ wrapper for shz_mat4x4_col().
Definition at line 215 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 219 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 230 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 234 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 238 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 242 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 246 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 250 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 254 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 258 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 269 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 273 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 277 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 281 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 285 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 289 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 293 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 297 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 301 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 305 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 309 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 313 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 317 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 321 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 325 of file shz_matrix.hpp.
Definition at line 329 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 333 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 337 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 341 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 345 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 349 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 353 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 357 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 361 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 372 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 376 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 380 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 384 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 388 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 392 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 396 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 400 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 404 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 408 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 419 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 423 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 427 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 431 of file shz_matrix.hpp.
Definition at line 442 of file shz_matrix.hpp.
Definition at line 446 of file shz_matrix.hpp.
Definition at line 450 of file shz_matrix.hpp.
Definition at line 454 of file shz_matrix.hpp.
Definition at line 458 of file shz_matrix.hpp.
Definition at line 462 of file shz_matrix.hpp.
Definition at line 466 of file shz_matrix.hpp.
Definition at line 470 of file shz_matrix.hpp.
Definition at line 474 of file shz_matrix.hpp.
Definition at line 478 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 489 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 493 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 501 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 505 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 509 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 513 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 517 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 521 of file shz_matrix.hpp.
Overloaded equality operator, for comparing vectors.
Definition at line 75 of file shz_matrix.hpp.
|
friend |
Definition at line 497 of file shz_matrix.hpp.
|
staticconstexpr |
Number of rows.
Definition at line 28 of file shz_matrix.hpp.
|
staticconstexpr |
Number of columns.
Definition at line 29 of file shz_matrix.hpp.