Quat

Quat

Quaternion rotation

Constructor

new Quat()

Source:
Creates a new identity quaternion.

Methods

multiply(other)

Source:
Multiplies this quaternion with another.
Parameters:
Name Type Description
other Quat quaternion.

rotateX(rad)

Source:
Rotate this quaternion on the X axis
Parameters:
Name Type Description
rad Number radians to rotate by

rotateY(rad)

Source:
Rotate this quaternion on the Y axis
Parameters:
Name Type Description
rad Number radians to rotate by

rotateZ(rad)

Source:
Rotate this quaternion on the Z axis
Parameters:
Name Type Description
rad Number radians to rotate by

setAxisAngle(axis, angle)

Source:
sets this quaternion from axis and angle.
Parameters:
Name Type Description
axis Vec3 axis of rotation
angle Number angle in radians

setEuler(x, y, z)

Source:
Calculates this quaternion from euler angles.
Parameters:
Name Type Description
x Number
y Number
z Number