Skip to content

shz_xmtrx_billboard_x

Markdown
SHZ_INLINE void shz_xmtrx_billboard_x(shz_vec3_t pos, shz_vec3_t eye) SHZ_NOEXCEPT;

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

NameTypeDescription
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).

Accumulating counterpart of shz_xmtrx_init_billboard_x(): the direction from pos to eye is projected onto the YZ plane, normalized, and passed to shz_xmtrx_rotate_x_yz(). Only a rotation is applied; pos is used for the direction and is not applied as a translation.

  • If eye lies on the X axis through pos, the facing direction is undefined and no rotation is applied, leaving local +Z unrotated.

shz_xmtrx_init_billboard_x, shz_xmtrx_rotate_x_yz