shz_mat4x4_billboard_z
SHZ_INLINE void shz_mat4x4_billboard_z(shz_mat4x4_t* mat, shz_vec3_t pos, shz_vec3_t eye) SHZ_NOEXCEPT;Multiplies and accumulates mat by the rotation about the Z axis that turns local +X toward eye, as seen from pos.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mat | shz_mat4x4_t * | The matrix to accumulate into. |
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).
- If
eyelies on the Z axis throughpos, the facing direction is undefined and no rotation is applied.
Warnings
Section titled “Warnings”- 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::billboard_z - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_matrix.h:749 - Module: Matrix, section "GL Transformations"