shz_mat4x4_inverse_rigid
SHZ_INLINE void shz_mat4x4_inverse_rigid(const shz_mat4x4_t* mtx, shz_mat4x4_t* out) SHZ_NOEXCEPT;Computes the inverse of a rigid 4x4 transform matrix.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mtx | const shz_mat4x4_t * | |
out | shz_mat4x4_t * |
Returns
Section titled “Returns”Nothing (void).
Details
Section titled “Details”mtx must be a rigid affine transform [R t; 0 1], where R is orthonormal. The result, [transpose(R), -transpose(R) * t; 0 1], is computed by transposing R rather than by a general inversion, making this far cheaper than shz_mat4x4_inverse().
shz_mat4x4_inverse()does not dynamically check whether to use this optimization.
Warnings
Section titled “Warnings”- Scale, shear, and projective matrices are not inverted correctly. Use
shz_mat4x4_inverse()for those. - This routine clobbers XMTRX.
Naming and requirements
Section titled “Naming and requirements”shz_mat4x4_tandshz_mat2x2_targuments must be 8-byte aligned. Unaligned data goes through thefloat[16]parameters of the_unalignedroutines.
Availability
Section titled “Availability”- C++ equivalent:
shz::mat4x4::inverse_rigid - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_matrix.h:1114 - Module: Matrix, section "Miscellaneous"