shz::mat4x4
C++ type shz::mat4x4.
- Header:
#include <sh4zam/shz_matrix.hpp>(source) - C type:
shz_mat4x4_t(layout-compatible; the C API accepts it directly) - Bases:
shz_mat4x4_t
Static functions
Section titled “Static functions”static void copy(shz_mat4x4_t *lhs, const shz_mat4x4_t &rhs) noexceptstatic void copy(shz_mat4x4_t *lhs, const float rhs[16]) noexceptCalls: shz_mat4x4_copy(), shz_mat4x4_copy_unaligned()
static void mult(shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const shz_mat4x4_t &rhs) noexceptstatic void mult(shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const float rhs[16]) noexceptCalls: shz_mat4x4_mult(), shz_mat4x4_mult_unaligned()
mult_transpose
Section titled “mult_transpose”static void mult_transpose(shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const shz_mat4x4_t &rhs) noexceptstatic void mult_transpose(shz_mat4x4_t *dst, const shz_mat4x4_t &lhs, const float rhs[16]) noexceptCalls: shz_mat4x4_mult_transpose(), shz_mat4x4_mult_transpose_unaligned()
Members
Section titled “Members”init_identity
Section titled “init_identity”void init_identity() noexceptCalls: shz_mat4x4_init_identity()
init_identity_safe
Section titled “init_identity_safe”void init_identity_safe() noexceptCalls: shz_mat4x4_init_identity()
init_zero
Section titled “init_zero”void init_zero() noexceptCalls: shz_mat4x4_init_zero()
init_one
Section titled “init_one”void init_one() noexceptCalls: shz_mat4x4_init_one()
init_fill
Section titled “init_fill”void init_fill(float value) noexceptCalls: shz_mat4x4_init_fill()
init_translation
Section titled “init_translation”void init_translation(float x, float y, float z) noexceptvoid init_translation(const vec3 &v) noexceptCalls: shz_mat4x4_init_translation()
init_scale
Section titled “init_scale”void init_scale(float x, float y, float z) noexceptvoid init_scale(const vec3 &v) noexceptCalls: shz_mat4x4_init_scale()
init_rotation_x
Section titled “init_rotation_x”void init_rotation_x(float angle) noexceptCalls: shz_mat4x4_init_rotation_x()
init_rotation_y
Section titled “init_rotation_y”void init_rotation_y(float angle) noexceptCalls: shz_mat4x4_init_rotation_y()
init_rotation_z
Section titled “init_rotation_z”void init_rotation_z(float angle) noexceptCalls: shz_mat4x4_init_rotation_z()
init_rotation_xyz
Section titled “init_rotation_xyz”void init_rotation_xyz(float xAngle, float yAngle, float zAngle) noexceptCalls: shz_mat4x4_init_rotation_xyz()
init_rotation_zyx
Section titled “init_rotation_zyx”void init_rotation_zyx(float zAngle, float yAngle, float xAngle) noexceptCalls: shz_mat4x4_init_rotation_zyx()
init_rotation_zxy
Section titled “init_rotation_zxy”void init_rotation_zxy(float zAngle, float xAngle, float yAngle) noexceptCalls: shz_mat4x4_init_rotation_zxy()
init_rotation_yxz
Section titled “init_rotation_yxz”void init_rotation_yxz(float yAngle, float xAngle, float zAngle) noexceptCalls: shz_mat4x4_init_rotation_yxz()
init_rotation
Section titled “init_rotation”void init_rotation(float angle, float x, float y, float z) noexceptvoid init_rotation(float angle, const vec3 &axis) noexceptvoid init_rotation(const quat &q) noexceptCalls: shz_mat4x4_init_rotation(), shz_mat4x4_init_rotation_quat()
init_rotation_dir
Section titled “init_rotation_dir”void init_rotation_dir(float angle, float x, float y, float z) noexceptvoid init_rotation_dir(float angle, const vec3 &dir) noexceptCalls: shz_mat4x4_init_rotation_dir()
init_diagonal
Section titled “init_diagonal”void init_diagonal(float x, float y, float z, float w) noexceptvoid init_diagonal(const vec4 &v) noexceptCalls: shz_mat4x4_init_diagonal()
init_upper_triangular
Section titled “init_upper_triangular”void init_upper_triangular(float col1, const vec2 &col2, const vec3 &col3, const vec4 &col4) noexceptCalls: shz_mat4x4_init_upper_triangular()
init_lower_triangular
Section titled “init_lower_triangular”void init_lower_triangular(const vec4 &col1, const vec3 &col2, const vec2 &col3, float col4) noexceptCalls: shz_mat4x4_init_lower_triangular()
init_symmetric_skew
Section titled “init_symmetric_skew”void init_symmetric_skew(float x, float y, float z) noexceptvoid init_symmetric_skew(const vec3 &v) noexceptCalls: shz_mat4x4_init_symmetric_skew()
init_outer_product
Section titled “init_outer_product”void init_outer_product(const vec4 &v1, const vec4 &v2) noexceptCalls: shz_mat4x4_init_outer_product()
init_permutation_wxyz
Section titled “init_permutation_wxyz”void init_permutation_wxyz() noexceptCalls: shz_mat4x4_init_permutation_wxyz()
init_permutation_yzwx
Section titled “init_permutation_yzwx”void init_permutation_yzwx() noexceptCalls: shz_mat4x4_init_permutation_yzwx()
init_screen
Section titled “init_screen”void init_screen(float width, float height) noexceptCalls: shz_mat4x4_init_screen()
init_lookat
Section titled “init_lookat”void init_lookat(const vec3 &eye, const vec3 ¢er, const vec3 &up) noexceptCalls: shz_mat4x4_init_lookat()
init_ortho
Section titled “init_ortho”void init_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexceptCalls: shz_mat4x4_init_ortho()
init_frustum
Section titled “init_frustum”void init_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexceptCalls: shz_mat4x4_init_frustum()
init_perspective
Section titled “init_perspective”void init_perspective(float fov, float aspect, float znear) noexceptCalls: shz_mat4x4_init_perspective()
vec4 row(size_t index) const noexceptC++ wrapper for shz_mat4x4_row().
Calls: shz_mat4x4_row()
vec4 col(size_t index) const noexceptC++ wrapper for shz_mat4x4_col().
Calls: shz_mat4x4_col()
get_translation
Section titled “get_translation”vec3 get_translation() const noexceptCalls: shz_mat4x4_get_translation()
get_scale
Section titled “get_scale”vec3 get_scale() const noexceptReturns the scaling components from the inner 3x3 matrix of XMTRX, as a 3D vector.
Calls: shz_mat4x4_get_scale()
set_row
Section titled “set_row”void set_row(size_t index, vec4 values) noexceptCalls: shz_mat4x4_set_row()
set_col
Section titled “set_col”void set_col(size_t index, vec4 values) noexceptCalls: shz_mat4x4_set_col()
swap_rows
Section titled “swap_rows”void swap_rows(size_t row1, size_t row2) noexceptCalls: shz_mat4x4_swap_rows()
swap_cols
Section titled “swap_cols”void swap_cols(size_t col1, size_t col2) noexceptCalls: shz_mat4x4_swap_cols()
set_translation
Section titled “set_translation”void set_translation(float x, float y, float z) noexceptvoid set_translation(const vec3 &v) noexceptCalls: shz_mat4x4_set_translation()
set_scale
Section titled “set_scale”void set_scale(float x, float y, float z) noexceptvoid set_scale(const vec3 &v) noexceptCalls: shz_mat4x4_set_scale()
set_rotation
Section titled “set_rotation”void set_rotation(const quat &rot) noexceptCalls: shz_mat4x4_set_rotation_quat()
set_diagonal
Section titled “set_diagonal”void set_diagonal(float x, float y, float z, float w) noexceptvoid set_diagonal(const vec4 &v) noexceptCalls: shz_mat4x4_set_diagonal()
void apply(const shz_mat4x4_t &mat) noexceptvoid apply(const float mat[16]) noexceptCalls: shz_mat4x4_apply(), shz_mat4x4_apply_unaligned()
apply_transpose
Section titled “apply_transpose”void apply_transpose(const shz_mat4x4_t &mat) noexceptvoid apply_transpose(const float mat[16]) noexceptCalls: shz_mat4x4_apply_transpose(), shz_mat4x4_apply_transpose_unaligned()
apply_scale
Section titled “apply_scale”void apply_scale(float x, float y, float z) noexceptvoid apply_scale(const vec3 &v) noexceptCalls: shz_mat4x4_apply_scale()
apply_translation
Section titled “apply_translation”void apply_translation(float x, float y, float z) noexceptvoid apply_translation(const vec3 &v) noexceptCalls: shz_mat4x4_apply_translation()
apply_rotation_x
Section titled “apply_rotation_x”void apply_rotation_x(float angle) noexceptCalls: shz_mat4x4_apply_rotation_x()
apply_rotation_y
Section titled “apply_rotation_y”void apply_rotation_y(float angle) noexceptCalls: shz_mat4x4_apply_rotation_y()
apply_rotation_z
Section titled “apply_rotation_z”void apply_rotation_z(float angle) noexceptCalls: shz_mat4x4_apply_rotation_z()
apply_rotation_xyz
Section titled “apply_rotation_xyz”void apply_rotation_xyz(float xAngle, float yAngle, float zAngle) noexceptCalls: shz_mat4x4_apply_rotation_xyz()
apply_rotation_zyx
Section titled “apply_rotation_zyx”void apply_rotation_zyx(float zAngle, float yAngle, float xAngle) noexceptCalls: shz_mat4x4_apply_rotation_zyx()
apply_rotation_zxy
Section titled “apply_rotation_zxy”void apply_rotation_zxy(float zAngle, float xAngle, float yAngle) noexceptCalls: shz_mat4x4_apply_rotation_zxy()
apply_rotation_yxz
Section titled “apply_rotation_yxz”void apply_rotation_yxz(float yAngle, float xAngle, float zAngle) noexceptCalls: shz_mat4x4_apply_rotation_yxz()
apply_rotation
Section titled “apply_rotation”void apply_rotation(float angle, float x, float y, float z) noexceptvoid apply_rotation(float angle, vec3 axis) noexceptvoid apply_rotation(const quat &q) noexceptCalls: shz_mat4x4_apply_rotation(), shz_mat4x4_apply_rotation_quat()
apply_lookat
Section titled “apply_lookat”void apply_lookat(vec3 pos, vec3 target, vec3 up) noexceptCalls: shz_mat4x4_apply_lookat()
apply_ortho
Section titled “apply_ortho”void apply_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexceptCalls: shz_mat4x4_apply_ortho()
apply_frustum
Section titled “apply_frustum”void apply_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexceptCalls: shz_mat4x4_apply_frustum()
apply_perspective
Section titled “apply_perspective”void apply_perspective(float fov, float aspect, float znear) noexceptCalls: shz_mat4x4_apply_perspective()
apply_screen
Section titled “apply_screen”void apply_screen(float width, float height) noexceptCalls: shz_mat4x4_apply_screen()
apply_symmetric_skew
Section titled “apply_symmetric_skew”void apply_symmetric_skew(float x, float y, float z) noexceptCalls: shz_mat4x4_apply_symmetric_skew()
apply_permutation_wxyz
Section titled “apply_permutation_wxyz”void apply_permutation_wxyz() noexceptCalls: shz_mat4x4_apply_permutation_wxyz()
apply_permutation_yzwx
Section titled “apply_permutation_yzwx”void apply_permutation_yzwx() noexceptCalls: shz_mat4x4_apply_permutation_yzwx()
apply_self
Section titled “apply_self”void apply_self() noexceptCalls: shz_mat4x4_apply_self()
translate
Section titled “translate”void translate(float x, float y, float z) noexceptvoid translate(vec3 v) noexceptCalls: shz_mat4x4_translate()
void scale(float x, float y, float z) noexceptvoid scale(vec3 v) noexceptCalls: shz_mat4x4_scale()
rotate_x
Section titled “rotate_x”void rotate_x(float radians) noexceptCalls: shz_mat4x4_rotate_x()
rotate_y
Section titled “rotate_y”void rotate_y(float radians) noexceptCalls: shz_mat4x4_rotate_y()
rotate_z
Section titled “rotate_z”void rotate_z(float radians) noexceptCalls: shz_mat4x4_rotate_z()
rotate_xyz
Section titled “rotate_xyz”void rotate_xyz(float xRadians, float yRadians, float zRadians) noexceptCalls: shz_mat4x4_rotate_xyz()
rotate_zyx
Section titled “rotate_zyx”void rotate_zyx(float zRadians, float yRadians, float xRadians) noexceptCalls: shz_mat4x4_rotate_zyx()
rotate_zxy
Section titled “rotate_zxy”void rotate_zxy(float zRadians, float xRadians, float yRadians) noexceptCalls: shz_mat4x4_rotate_zxy()
rotate_yxz
Section titled “rotate_yxz”void rotate_yxz(float yRadians, float xRadians, float zRadians) noexceptCalls: shz_mat4x4_rotate_yxz()
rotate
Section titled “rotate”void rotate(float radians, float xAxis, float yAxis, float zAxis) noexceptvoid rotate(float radians, vec3 axis) noexceptCalls: shz_mat4x4_rotate()
translate_reverse
Section titled “translate_reverse”void translate_reverse(float x, float y, float z) noexceptvoid translate_reverse(const shz::vec3 &pos) noexceptPre-multiplies and accumulates the given matrix onto the 3D translation matrix with the given components.
Calls: shz_mat4x4_translate_reverse()
scale_reverse
Section titled “scale_reverse”void scale_reverse(float x, float y, float z) noexceptvoid scale_reverse(const shz::vec3 &size) noexceptPre-multiplies and accumulates the given matrix onto the 3D scaling matrix with the given components.
Calls: shz_mat4x4_scale_reverse()
transform
Section titled “transform”vec2 transform(const vec2 &in) const noexceptvec3 transform(const vec3 &in) const noexceptvec4 transform(const vec4 &in) const noexceptCalls: shz_mat4x4_transform_vec2(), shz_mat4x4_transform_vec3(), shz_mat4x4_transform_vec4()
transform_point
Section titled “transform_point”vec2 transform_point(const vec2 &pt) const noexceptvec3 transform_point(const vec3 &pt) const noexceptCalls: shz_mat4x4_transform_point2(), shz_mat4x4_transform_point3()
transform_transpose
Section titled “transform_transpose”vec2 transform_transpose(const vec2 &in) const noexceptvec3 transform_transpose(const vec3 &in) const noexceptvec4 transform_transpose(const vec4 &in) const noexceptCalls: shz_mat4x4_transform_vec2_transpose(), shz_mat4x4_transform_vec3_transpose(), shz_mat4x4_transform_vec4_transpose()
transform_point_transpose
Section titled “transform_point_transpose”vec2 transform_point_transpose(const vec2 &pt) const noexceptvec3 transform_point_transpose(const vec3 &pt) const noexceptCalls: shz_mat4x4_transform_point2_transpose(), shz_mat4x4_transform_point3_transpose()
to_quat
Section titled “to_quat”quat to_quat() const noexceptCalls: shz_mat4x4_to_quat()
determinant
Section titled “determinant”float determinant() const noexceptCalls: shz_mat4x4_determinant()
float trace() const noexceptCalls: shz_mat4x4_trace()
inverse
Section titled “inverse”void inverse(mat4x4 *out) const noexceptCalls: shz_mat4x4_inverse()
inverse_block_triangular
Section titled “inverse_block_triangular”void inverse_block_triangular(mat4x4 *out) const noexceptCalls: shz_mat4x4_inverse_block_triangular()
decompose
Section titled “decompose”void decompose(vec3 *translation, quat *rotation, vec3 *scale) const noexceptCalls: shz_mat4x4_decompose()
void blend(const shz_mat4x4_t &matrix, float weight) noexceptAdds and accumulates a scaled 4x4 matrix into the given matrix.
Calls: shz_mat4x4_blend()
void swap(shz_mat4x4_t &matA, shz_mat4x4_t &matB) noexceptmat4x4
Section titled “mat4x4”mat4x4() noexcept=defaultmat4x4(const mat4x4 &other) noexceptmat4x4(const shz_mat4x4_t &other) noexceptCalls: shz_mat4x4_copy()
operator=
Section titled “operator=”mat4x4 & operator=(const shz_mat4x4_t &other) noexceptCalls: shz_mat4x4_copy()
operator==
Section titled “operator==”bool operator==(const mat4x4 &lhs, const mat4x4 &rhs) noexceptOverloaded equality operator, for comparing vectors.