Skip to content

shz_mat4x4_billboard_x

Markdown
SHZ_INLINE void shz_mat4x4_billboard_x(shz_mat4x4_t* mat, shz_vec3_t pos, shz_vec3_t eye) SHZ_NOEXCEPT;

Multiplies and accumulates mat by the rotation about the X axis that turns local +Z toward eye, as seen from pos.

NameTypeDescription
matshz_mat4x4_t *The matrix to accumulate into.
posshz_vec3_tPosition of the billboarded object, used only to compute the direction to eye.
eyeshz_vec3_tPosition to face, such as the camera eye, in the same space as pos.

Nothing (void).

  • If eye lies on the X axis through pos, the facing direction is undefined and no rotation is applied.
  • 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.

shz_xmtrx_billboard_x, shz_mat4x4_init_billboard_x