Skip to content

shz::mat4x4

Markdown

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 void copy(shz_mat4x4_t *lhs, const shz_mat4x4_t &rhs) noexcept
static void copy(shz_mat4x4_t *lhs, const float rhs[16]) noexcept

Calls: shz_mat4x4_copy(), shz_mat4x4_copy_unaligned()

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

Calls: shz_mat4x4_mult(), shz_mat4x4_mult_unaligned()

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

Calls: shz_mat4x4_mult_transpose(), shz_mat4x4_mult_transpose_unaligned()

void init_identity() noexcept

Calls: shz_mat4x4_init_identity()

void init_identity_safe() noexcept

Calls: shz_mat4x4_init_identity()

void init_zero() noexcept

Calls: shz_mat4x4_init_zero()

void init_one() noexcept

Calls: shz_mat4x4_init_one()

void init_fill(float value) noexcept

Calls: shz_mat4x4_init_fill()

void init_translation(float x, float y, float z) noexcept
void init_translation(const vec3 &v) noexcept

Calls: shz_mat4x4_init_translation()

void init_scale(float x, float y, float z) noexcept
void init_scale(const vec3 &v) noexcept

Calls: shz_mat4x4_init_scale()

void init_rotation_x(float angle) noexcept

Calls: shz_mat4x4_init_rotation_x()

void init_rotation_y(float angle) noexcept

Calls: shz_mat4x4_init_rotation_y()

void init_rotation_z(float angle) noexcept

Calls: shz_mat4x4_init_rotation_z()

void init_rotation_xyz(float xAngle, float yAngle, float zAngle) noexcept

Calls: shz_mat4x4_init_rotation_xyz()

void init_rotation_zyx(float zAngle, float yAngle, float xAngle) noexcept

Calls: shz_mat4x4_init_rotation_zyx()

void init_rotation_zxy(float zAngle, float xAngle, float yAngle) noexcept

Calls: shz_mat4x4_init_rotation_zxy()

void init_rotation_yxz(float yAngle, float xAngle, float zAngle) noexcept

Calls: shz_mat4x4_init_rotation_yxz()

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

Calls: shz_mat4x4_init_rotation(), shz_mat4x4_init_rotation_quat()

void init_rotation_dir(float angle, float x, float y, float z) noexcept
void init_rotation_dir(float angle, const vec3 &dir) noexcept

Calls: shz_mat4x4_init_rotation_dir()

void init_diagonal(float x, float y, float z, float w) noexcept
void init_diagonal(const vec4 &v) noexcept

Calls: shz_mat4x4_init_diagonal()

void init_upper_triangular(float col1, const vec2 &col2, const vec3 &col3, const vec4 &col4) noexcept

Calls: shz_mat4x4_init_upper_triangular()

void init_lower_triangular(const vec4 &col1, const vec3 &col2, const vec2 &col3, float col4) noexcept

Calls: shz_mat4x4_init_lower_triangular()

void init_symmetric_skew(float x, float y, float z) noexcept
void init_symmetric_skew(const vec3 &v) noexcept

Calls: shz_mat4x4_init_symmetric_skew()

void init_outer_product(const vec4 &v1, const vec4 &v2) noexcept

Calls: shz_mat4x4_init_outer_product()

void init_permutation_wxyz() noexcept

Calls: shz_mat4x4_init_permutation_wxyz()

void init_permutation_yzwx() noexcept

Calls: shz_mat4x4_init_permutation_yzwx()

void init_screen(float width, float height) noexcept

Calls: shz_mat4x4_init_screen()

void init_lookat(const vec3 &eye, const vec3 &center, const vec3 &up) noexcept

Calls: shz_mat4x4_init_lookat()

void init_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept

Calls: shz_mat4x4_init_ortho()

void init_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept

Calls: shz_mat4x4_init_frustum()

void init_perspective(float fov, float aspect, float znear) noexcept

Calls: shz_mat4x4_init_perspective()

vec4 row(size_t index) const noexcept

C++ wrapper for shz_mat4x4_row().

Calls: shz_mat4x4_row()

vec4 col(size_t index) const noexcept

C++ wrapper for shz_mat4x4_col().

Calls: shz_mat4x4_col()

vec3 get_translation() const noexcept

Calls: shz_mat4x4_get_translation()

vec3 get_scale() const noexcept

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

Calls: shz_mat4x4_get_scale()

void set_row(size_t index, vec4 values) noexcept

Calls: shz_mat4x4_set_row()

void set_col(size_t index, vec4 values) noexcept

Calls: shz_mat4x4_set_col()

void swap_rows(size_t row1, size_t row2) noexcept

Calls: shz_mat4x4_swap_rows()

void swap_cols(size_t col1, size_t col2) noexcept

Calls: shz_mat4x4_swap_cols()

void set_translation(float x, float y, float z) noexcept
void set_translation(const vec3 &v) noexcept

Calls: shz_mat4x4_set_translation()

void set_scale(float x, float y, float z) noexcept
void set_scale(const vec3 &v) noexcept

Calls: shz_mat4x4_set_scale()

void set_rotation(const quat &rot) noexcept

Calls: shz_mat4x4_set_rotation_quat()

void set_diagonal(float x, float y, float z, float w) noexcept
void set_diagonal(const vec4 &v) noexcept

Calls: shz_mat4x4_set_diagonal()

void apply(const shz_mat4x4_t &mat) noexcept
void apply(const float mat[16]) noexcept

Calls: shz_mat4x4_apply(), shz_mat4x4_apply_unaligned()

void apply_transpose(const shz_mat4x4_t &mat) noexcept
void apply_transpose(const float mat[16]) noexcept

Calls: shz_mat4x4_apply_transpose(), shz_mat4x4_apply_transpose_unaligned()

void apply_scale(float x, float y, float z) noexcept
void apply_scale(const vec3 &v) noexcept

Calls: shz_mat4x4_apply_scale()

void apply_translation(float x, float y, float z) noexcept
void apply_translation(const vec3 &v) noexcept

Calls: shz_mat4x4_apply_translation()

void apply_rotation_x(float angle) noexcept

Calls: shz_mat4x4_apply_rotation_x()

void apply_rotation_y(float angle) noexcept

Calls: shz_mat4x4_apply_rotation_y()

void apply_rotation_z(float angle) noexcept

Calls: shz_mat4x4_apply_rotation_z()

void apply_rotation_xyz(float xAngle, float yAngle, float zAngle) noexcept

Calls: shz_mat4x4_apply_rotation_xyz()

void apply_rotation_zyx(float zAngle, float yAngle, float xAngle) noexcept

Calls: shz_mat4x4_apply_rotation_zyx()

void apply_rotation_zxy(float zAngle, float xAngle, float yAngle) noexcept

Calls: shz_mat4x4_apply_rotation_zxy()

void apply_rotation_yxz(float yAngle, float xAngle, float zAngle) noexcept

Calls: shz_mat4x4_apply_rotation_yxz()

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

Calls: shz_mat4x4_apply_rotation(), shz_mat4x4_apply_rotation_quat()

void apply_lookat(vec3 pos, vec3 target, vec3 up) noexcept

Calls: shz_mat4x4_apply_lookat()

void apply_ortho(float left, float right, float bottom, float top, float znear, float zfar) noexcept

Calls: shz_mat4x4_apply_ortho()

void apply_frustum(float left, float right, float bottom, float top, float znear, float zfar) noexcept

Calls: shz_mat4x4_apply_frustum()

void apply_perspective(float fov, float aspect, float znear) noexcept

Calls: shz_mat4x4_apply_perspective()

void apply_screen(float width, float height) noexcept

Calls: shz_mat4x4_apply_screen()

void apply_symmetric_skew(float x, float y, float z) noexcept

Calls: shz_mat4x4_apply_symmetric_skew()

void apply_permutation_wxyz() noexcept

Calls: shz_mat4x4_apply_permutation_wxyz()

void apply_permutation_yzwx() noexcept

Calls: shz_mat4x4_apply_permutation_yzwx()

void apply_self() noexcept

Calls: shz_mat4x4_apply_self()

void translate(float x, float y, float z) noexcept
void translate(vec3 v) noexcept

Calls: shz_mat4x4_translate()

void scale(float x, float y, float z) noexcept
void scale(vec3 v) noexcept

Calls: shz_mat4x4_scale()

void rotate_x(float radians) noexcept

Calls: shz_mat4x4_rotate_x()

void rotate_y(float radians) noexcept

Calls: shz_mat4x4_rotate_y()

void rotate_z(float radians) noexcept

Calls: shz_mat4x4_rotate_z()

void rotate_xyz(float xRadians, float yRadians, float zRadians) noexcept

Calls: shz_mat4x4_rotate_xyz()

void rotate_zyx(float zRadians, float yRadians, float xRadians) noexcept

Calls: shz_mat4x4_rotate_zyx()

void rotate_zxy(float zRadians, float xRadians, float yRadians) noexcept

Calls: shz_mat4x4_rotate_zxy()

void rotate_yxz(float yRadians, float xRadians, float zRadians) noexcept

Calls: shz_mat4x4_rotate_yxz()

void rotate(float radians, float xAxis, float yAxis, float zAxis) noexcept
void rotate(float radians, vec3 axis) noexcept

Calls: shz_mat4x4_rotate()

void translate_reverse(float x, float y, float z) noexcept
void translate_reverse(const shz::vec3 &pos) noexcept

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

Calls: shz_mat4x4_translate_reverse()

void scale_reverse(float x, float y, float z) noexcept
void scale_reverse(const shz::vec3 &size) noexcept

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

Calls: shz_mat4x4_scale_reverse()

vec2 transform(const vec2 &in) const noexcept
vec3 transform(const vec3 &in) const noexcept
vec4 transform(const vec4 &in) const noexcept

Calls: shz_mat4x4_transform_vec2(), shz_mat4x4_transform_vec3(), shz_mat4x4_transform_vec4()

vec2 transform_point(const vec2 &pt) const noexcept
vec3 transform_point(const vec3 &pt) const noexcept

Calls: shz_mat4x4_transform_point2(), shz_mat4x4_transform_point3()

vec2 transform_transpose(const vec2 &in) const noexcept
vec3 transform_transpose(const vec3 &in) const noexcept
vec4 transform_transpose(const vec4 &in) const noexcept

Calls: shz_mat4x4_transform_vec2_transpose(), shz_mat4x4_transform_vec3_transpose(), shz_mat4x4_transform_vec4_transpose()

vec2 transform_point_transpose(const vec2 &pt) const noexcept
vec3 transform_point_transpose(const vec3 &pt) const noexcept

Calls: shz_mat4x4_transform_point2_transpose(), shz_mat4x4_transform_point3_transpose()

quat to_quat() const noexcept

Calls: shz_mat4x4_to_quat()

float determinant() const noexcept

Calls: shz_mat4x4_determinant()

float trace() const noexcept

Calls: shz_mat4x4_trace()

void inverse(mat4x4 *out) const noexcept

Calls: shz_mat4x4_inverse()

void inverse_block_triangular(mat4x4 *out) const noexcept

Calls: shz_mat4x4_inverse_block_triangular()

void decompose(vec3 *translation, quat *rotation, vec3 *scale) const noexcept

Calls: shz_mat4x4_decompose()

void blend(const shz_mat4x4_t &matrix, float weight) noexcept

Adds and accumulates a scaled 4x4 matrix into the given matrix.

Calls: shz_mat4x4_blend()

void swap(shz_mat4x4_t &matA, shz_mat4x4_t &matB) noexcept
mat4x4() noexcept=default
mat4x4(const mat4x4 &other) noexcept
mat4x4(const shz_mat4x4_t &other) noexcept

Calls: shz_mat4x4_copy()

mat4x4 & operator=(const shz_mat4x4_t &other) noexcept

Calls: shz_mat4x4_copy()

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

Overloaded equality operator, for comparing vectors.