Quaternion class

Quaternion class

Quaternion is usually used to perform rotation in computer graphics.

The Quaternion type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the Quaternion class.
initConstructs a new instance of Quaternion

Properties

PropertyDescription
lengthGets the length of the quaternion
IDENTITYThe Identity quaternion.
wThe w component.
xThe x component.
yThe y component.
zThe z component.

Methods

MethodDescription
from_euler_angleCreates quaternion from given Euler angle
from_euler_angleCreates quaternion from given Euler angle
conjugateReturns a conjugate quaternion of current quaternion
inverseReturns a inverse quaternion of current quaternion
dotDots product
euler_anglesConverts quaternion to rotation represented by Euler angles
All components are in radian
normalizeNormalize the quaternion
to_angle_axis
concatConcatenate two quaternions
from_angle_axisCreates a quaternion around given axis and rotate in clockwise
from_rotationCreates a quaternion that rotate from original to destination direction
to_matrixConvert the rotation presented by quaternion to transform matrix.
interpolatePopulates this quaternion with the interpolated value between the given quaternion arguments for a t between from and to.

See Also