Quat extension

A Quaternion describes a rotation in 3D space. The Quaternion is mathematically defined as Q = xi + yj + z*k + w, where (i,j,k) are imaginary basis vectors. (x,y,z) can be seen as a vector related to the axis of rotation, while the real multiplier, w, is related to the amount of rotation. @param x Multiplier of the imaginary basis vector i. @param y Multiplier of the imaginary basis vector j. @param z Multiplier of the imaginary basis vector k. @param w Multiplier of the real part. @see http://en.wikipedia.org/wiki/Quaternion

on
  • Quaternion

Methods

integrate(Vector3 angularVelocity, double dt, Vector3 angularFactor, [Quaternion? target]) → Quaternion

Available on Quaternion, provided by the Quat extension

Rotate an absolute orientation quaternion given an angular velocity and a time step.
multiply(Quaternion quat) → Quaternion

Available on Quaternion, provided by the Quat extension

Multiply the quaternion with an other quaternion.
multiply2(Quaternion quat, Quaternion target) → Quaternion

Available on Quaternion, provided by the Quat extension

Multiply the quaternion with an other quaternion.
normalizeFast() → Quaternion

Available on Quaternion, provided by the Quat extension

Approximation of quaternion normalization. Works best when quat is already almost-normalized. @author unphased, https://github.com/unphased
setFromAxisAngle(Vector3 vector, double angle) → Quaternion

Available on Quaternion, provided by the Quat extension

Set the quaternion components given an axis and an angle in radians.
setFromEuler(double x, double y, double z, [Order order = Order.xyz]) → Quaternion

Available on Quaternion, provided by the Quat extension

Set the quaternion components given Euler angle representation.
slerp(Quaternion toQuat, double t, [Quaternion? target]) → Quaternion

Available on Quaternion, provided by the Quat extension

Performs a spherical linear interpolation between two quat
vmult(Vector3 v, [Vector3? target]) → Vector3

Available on Quaternion, provided by the Quat extension

Multiply the quaternion by a vector