SQuat
A Quaternion.
Quaternions are used to represent rotations. They are compact, don't suffer from gimbal lock and can easily be interpolated.
Constructors
Method New(x:Float, y:Float, z:Float, w:Float)
Creates a new SQuat from the supplied arguments.
Operators
Method Operator*:SQuat(b:SQuat)
Multiplies the quaternion by b, returning a new quaternion.
Method Operator-:SQuat()
Returns the quaternion, negated.
Methods
Method Dot:Float(b:SQuat)
The dot product between two rotations.
Method Invert:SQuat()
Returns the Inverse of rotation.
Method Lerp:SQuat(b:SQuat, t:Float)
Interpolates between the SQuat and b by t and normalizes the result afterwards.
Method Normal:SQuat()
Converts this quaternion to one with the same orientation but with a magnitude of 1.
Method Slerp:SQuat(b:SQuat, t:Float)
Spherically interpolates between this SQuat and b by t.
Method EulerXYZ:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Method EulerXZY:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Method EulerYXZ:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Method EulerYZX:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Method EulerZXY:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Method EulerZYX:SQuat(rot:SVec3)
Returns a rotation that rotates around rot.
Functions
Function Identity:SQuat()
The identity rotation.