Skip to content

shz_quat_t

Markdown
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.

FieldTypeDescription
efloat[4]Array-indexed components.
wfloat< Anonymous structure with named components.
axisshz_vec3_t3D vector representing axis of rotation
xfloatX component of axis of rotation (imaginary).
yfloatY component of axis of rotation (imaginary).
zfloatZ component of axis of rotation (imaginary).

Quaternions are a mathematical structure representing a rotation about a single arbitrary axis.