A newer version of Max is available. Click here to access the latest version of the documentation

jit.euler2quat Reference

Convert Euler angles to quaternion

jit.euler2quat

Description

Convert Euler X/Y/Z representation of an orientation to a quaternion. Jitter quaternions are ordered X Y Z W.

Examples

Discussion

A quaternion is a mathematical construct that is a four dimensional vector, and can be visualized as a rotation around an arbitrary axis. Quaternions are a useful representation of an orientation in 3D space.

Attributes

euler [3 floats]

The Euler angles to be converted. (default = 0 0 0)

normalize [int]

Normalize the quaternion before outputting (default = 0).

quat [4 floats]

g/s(get)

The resulting quaternion after the conversion.

rotate_order [symbol]

Set the order rotations are applied (default = auto). E.G. if set to xyz , the object is first rotated around its X axis, then Y, and finally Z. The default of auto implements yzx ordering. To replicate Max 5, use zyx .

Possible values:

'auto'
'xyz'
'xzy'
'yxz'
'yzx'
'zxy'
'zyx'

Common Box Attributes

Messages

bang

Output the resulting quaternion conversion.

list

Arguments

x [float]
y [float]
z [float]
A three element list of floating point numbers interpreted as Euler angles in degrees, is converted to a quaternion and output.

See Also

Name Description
jit.quat
jit.quat2euler
jit.quat2axis
jit.axis2quat
jit.anim.node