shz_xmtrx_init_billboard_x
SHZ_INLINE void shz_xmtrx_init_billboard_x(shz_vec3_t pos, shz_vec3_t eye) SHZ_NOEXCEPT;Initializes XMTRX to the rotation about the X axis that turns local +Z toward eye, as seen from pos.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
pos | shz_vec3_t | Position of the billboarded object, used only to compute the direction to eye. |
eye | shz_vec3_t | Position to face, such as the camera eye, in the same space as pos. |
Returns
Section titled “Returns”Nothing (void).
Details
Section titled “Details”Axial billboarding about X: the direction from pos to eye is projected onto the YZ plane, normalized, and passed to shz_xmtrx_init_rotation_x_yz(). Only the rotation is written; pos is used for the direction and is not applied as a translation.
- If
eyelies on the X axis throughpos, the facing direction is undefined and no rotation is applied, leaving local +Z unrotated.
Availability
Section titled “Availability”- C++ equivalent:
shz::xmtrx::init_billboard_x - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_xmtrx.h:407 - Module: XMTRX, section "Initialization"
See also
Section titled “See also”shz_xmtrx_init_rotation_x_yz, shz_xmtrx_billboard_x, shz_xmtrx_init_billboard_y