Skip to content

shz_mat4x4_decompose

Markdown
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.

NameTypeDescription
matconst shz_mat4x4_t *
translationshz_vec3_t *
rotationshz_quat_t *
scaleshz_vec3_t *

Nothing (void).

  • Any output pointer may be NULL to skip that component.
  • This routine clobbers XMTRX.
  • shz_mat4x4_t and shz_mat2x2_t arguments must be 8-byte aligned. Unaligned data goes through the float[16] parameters of the _unaligned routines.