shz_quat_transform_vec3
SHZ_INLINE shz_vec3_t shz_quat_transform_vec3(shz_quat_t q, shz_vec3_t v) SHZ_NOEXCEPT;Rotates a vector by the given quaternion.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
q | shz_quat_t | |
v | shz_vec3_t |
Returns
Section titled “Returns”shz_vec3_t
- This routine is meant for one-off rotations of a single vector by a single quaternion. If you plan to rotate multiple vectors by the same quaternion, you should use the XMTRX API to apply the quaternion as a rotation matrix.
Availability
Section titled “Availability”- C++ equivalent:
shz::quat::transform - Type-generic form: none
- Back-ends: SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_quat.h:270 - Module: Quaternion, section "Transformations"