quaternion VEX function
Creates a vector4 representing a quaternion.
Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex
See also: qconvert
-
vector4 quaternion(matrix3 rotations)Creates a vector4 representing a quaternion from a 3×3 rotational matrix.
-
vector4 quaternion(float angle, vector axis)Creates a vector4 representing a quaternion from an angle and axis. The angle is specified in degrees.
-
vector4 quaternion(vector rotations, int order)Creates a vector4 representing a quaternion from a vector representing Euler rotations in X, Y, and Z.
Specify the rotation order with the order integer. Use the constants defined in $HH/vex/include/math.h (for example,
XFORM_XYZ).
Creates a vector4 representing a quaternion.