shz_xmtrx_init_rotation_dir
SHZ_INLINE void shz_xmtrx_init_rotation_dir(float angle, float x, float y, float z) SHZ_NOEXCEPT;Initializes XMTRX to contain a 3D rotation matrix of angle radians about the given axis.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
angle | float | |
x | float | |
y | float | |
z | float |
Returns
Section titled “Returns”Nothing (void).
Details
Section titled “Details”This is a faster version of shz_xmtrx_init_rotation() or glRotatef() which requires being passed a unit vector for the rotation axis.
Warnings
Section titled “Warnings”- The vector components representing the axis of rotation must be prenormalized!
Availability
Section titled “Availability”- C++ equivalent:
shz::xmtrx::init_rotation_dir - Type-generic form: none
- Back-ends: SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_xmtrx.h:329 - Module: XMTRX, section "Initialization"