![]() |
SH4ZAM! 0.8.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_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_dir (float angle, float x, float y, float z) noexcept |
| void | init_rotation_dir (float angle, const vec3 &dir) 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 ¢er, 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 |
| vec3 | get_scale () 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 |
Reverse GL Transformations | |
Pre-multiplication variants of OpenGL-style 4x4 matrix transforms. | |
| void | translate_reverse (float x, float y, float z) noexcept |
| void | translate_reverse (const shz::vec3 &pos) noexcept |
| void | scale_reverse (float x, float y, float z) noexcept |
| void | scale_reverse (const shz::vec3 &size) 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 | blend (const shz_mat4x4_t &joint_matrix, float weight) 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 94 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 98 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 102 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 106 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 110 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 114 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 118 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 122 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 126 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 130 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 134 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 138 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 142 of file shz_matrix.hpp.
|
inlinenoexcept |
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.
|
inlinenoexcept |
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.
|
inlinenoexcept |
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.
Definition at line 198 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 202 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 206 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 210 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 214 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 218 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 222 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 226 of file shz_matrix.hpp.
|
inlinenoexcept |
C++ wrapper for shz_mat4x4_row().
Definition at line 238 of file shz_matrix.hpp.
|
inlinenoexcept |
C++ wrapper for shz_mat4x4_col().
Definition at line 243 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 247 of file shz_matrix.hpp.
|
inlinenoexcept |
Returns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.
Definition at line 256 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 267 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 271 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 275 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 279 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 283 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 287 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 291 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 295 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 299 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 303 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 307 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 318 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 322 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 326 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 330 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 334 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 338 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 342 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 346 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 350 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 354 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 358 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 362 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 366 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 370 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 374 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 378 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 382 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 386 of file shz_matrix.hpp.
Definition at line 390 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 394 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 398 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 402 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 406 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 410 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 414 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 418 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 422 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 433 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 437 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 441 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 445 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 449 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 453 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 457 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 461 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 465 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 469 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 473 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 477 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 481 of file shz_matrix.hpp.
|
inlinenoexcept |
Pre-multiplies and accumulates the given matrix onto the 3D translation matrix with the given components.
Definition at line 496 of file shz_matrix.hpp.
|
inlinenoexcept |
Pre-multiplies and accumulates the given matrix onto the 3D translation matrix with the given position vector.
Definition at line 504 of file shz_matrix.hpp.
|
inlinenoexcept |
Pre-multiplies and accumulates the given matrix onto the 3D scaling matrix with the given components.
Definition at line 512 of file shz_matrix.hpp.
|
inlinenoexcept |
Pre-multiplies and accumulates the given matrix onto the 3D scaling matrix with the given size vector.
Definition at line 520 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 531 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 535 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 539 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 543 of file shz_matrix.hpp.
Definition at line 554 of file shz_matrix.hpp.
Definition at line 558 of file shz_matrix.hpp.
Definition at line 562 of file shz_matrix.hpp.
Definition at line 566 of file shz_matrix.hpp.
Definition at line 570 of file shz_matrix.hpp.
Definition at line 574 of file shz_matrix.hpp.
Definition at line 578 of file shz_matrix.hpp.
Definition at line 582 of file shz_matrix.hpp.
Definition at line 586 of file shz_matrix.hpp.
Definition at line 590 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 601 of file shz_matrix.hpp.
|
inlinestaticnoexcept |
Definition at line 605 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 613 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 617 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 621 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 625 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 629 of file shz_matrix.hpp.
|
inlinenoexcept |
Definition at line 633 of file shz_matrix.hpp.
|
inlinenoexcept |
Adds and accumulates a scaled 4x4 matrix into the given matrix.
Each component of joint_matrix will be multiplied by weight, with the result being added to the existing value of that component in dst.
This is useful for accumulating weighted joint matrices onto an initially zeroed-out matrix.
Definition at line 649 of file shz_matrix.hpp.
Overloaded equality operator, for comparing vectors.
Definition at line 75 of file shz_matrix.hpp.
|
friend |
Definition at line 609 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.