class Quat
package iron.math
Constructor
Variables
Methods
inlinedot(q:Quat):FastFloat
Find the dot product of this quaternion with another.
Parameters:
q | The other quaternion. |
---|
Returns:
The dot product.
inlinefromEuler(x:FastFloat, y:FastFloat, z:FastFloat):Quat
Set this quaternion to the rotation represented by a YZX Euler (XZY in blender terms).
Parameters:
x | The Euler's x component. |
---|---|
y | The Euler's y component. |
z | The Euler's z component. |
Returns:
This quaternion.
inlinefromEulerOrdered(e:Vec4, order:String):Quat
Set this quaternion to the rotation represented by an Euler.
Parameters:
x | The Euler's x component. |
---|---|
y | The Euler's y component. |
z | The Euler's z component. |
order: | the (blender) order of the euler (which is the OPPOSITE of the mathematical order) can be "XYZ", "XZY", "YXZ", "YZX", "ZXY", or "ZYX". |
Returns:
This quaternion.
inlinegetEuler():Vec4
Convert this quaternion to a YZX Euler (note: XZY in blender order terms).
Returns:
A new YZX Euler that represents the same rotation as this quaternion.
inlineinverse(q:Quat):Quat
Invert the given quaternion and store the result in this one.
Parameters:
q | Quaternion to invert. |
---|
Returns:
This quaternion.
inlinelerp(from:Quat, to:Quat, s:FastFloat):Quat
Linearly interpolate between two other quaterions, and store the result in this one. This is not a so-called slerp operation.
Parameters:
from | The quaterion to interpolate from. |
---|---|
to | The quaterion to interpolate to. |
s | The amount to interpolate, with 0 being |
Returns:
This quaternion.
inlinemult(q:Quat):Quat
Multiply this quaternion by another.
Parameters:
q | The quaternion to multiply this one with. |
---|
Returns:
This quaternion.
inlinemultquats(q1:Quat, q2:Quat):Quat
Multiply two other quaternions and store the result in this one.
Parameters:
q1 | The first operand. |
---|---|
q2 | The second operand. |
Returns:
This quaternion.
inlinesetFrom(q:Quat):Quat
Copy the rotation of another quaternion to this one.
Parameters:
q | A quaternion to copy. |
---|
Returns:
This quaternion.
inlinetoEulerOrdered(p:String):Vec4
Convert this quaternion to an Euler of arbitrary order.
Parameters:
the | order of the euler to obtain (in blender order, opposite from mathematical order) can be "XYZ", "XZY", "YXZ", "YZX", "ZXY", or "ZYX". |
---|
Returns:
A new YZX Euler that represents the same rotation as this quaternion.