shz_quat_t
typedef struct shz_quat { union { //!< Convenience anonymous union between named and array-indexed components. struct { //!< Anonymous structure with named components. float w; //!< W or scalar component/real part of quaternion. union { //!< Convenience anonymous union for vector components. struct { float x; //!< X component of axis of rotation (imaginary) float y; //!< Y component of axis of rotation (imaginary) float z; //!< Z component of axis of rotation (imaginary) }; shz_vec3_t axis; //!< 3D vector representing axis of rotation }; }; float e[4]; //!< Array-indexed components. };} shz_quat_t;Represents a 3D quaternion.
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
e | float[4] | Array-indexed components. |
w | float | < Anonymous structure with named components. |
axis | shz_vec3_t | 3D vector representing axis of rotation |
x | float | X component of axis of rotation (imaginary). |
y | float | Y component of axis of rotation (imaginary). |
z | float | Z component of axis of rotation (imaginary). |
Details
Section titled “Details”Quaternions are a mathematical structure representing a rotation about a single arbitrary axis.
Availability
Section titled “Availability”- C++ equivalent:
shz::quat - Back-ends: n/a (not a function)
- Defined in:
sh4zam/shz_quat.h:31 - Module: Quaternion, section "Types"