| Property | Defined by | ||
|---|---|---|---|
| conjugate : Quaternion
[read-only]
The conjugate of this quaternion.
| Quaternion | ||
| IDENTITY : Quaternion
[static]
| Quaternion | ||
| inverse : Quaternion
[read-only]
The inverse of this quaternion.
| Quaternion | ||
| magnitude : Number [read-only]
The magnitude of this quaternion.
| Quaternion | ||
| magnitudeSquared : Number [read-only]
The square of the magnitude of this quaternion.
| Quaternion | ||
| w : Number
The w coordinate of the quaternion.
| Quaternion | ||
| x : Number
The x coordinate of the quaternion.
| Quaternion | ||
| y : Number
The y coordinate of the quaternion.
| Quaternion | ||
| z : Number
The z coordinate of the quaternion.
| Quaternion | ||
| ZERO : Quaternion
[static]
| Quaternion | ||
| Method | Defined by | ||
|---|---|---|---|
|
Quaternion(w:Number = 1, x:Number = 0, y:Number = 0, z:Number = 0)
Constructor
| Quaternion | ||
|
Adds another quaternion to this one, returning a new quaternion.
| Quaternion | ||
|
Copies another quaternion into this one.
| Quaternion | ||
|
Makes a copy of this Quaternion object.
| Quaternion | ||
|
[static]
Create a new unit quaternion that represents a rotation about an axis in
3D space.
| Quaternion | ||
|
Subtract another quaternion from this one.
| Quaternion | ||
|
dotProduct(q:Quaternion):Number
Calculate the dot product of this quaternion with another.
| Quaternion | ||
|
equals(q:Quaternion):Boolean
Compare this quaternion to another.
| Quaternion | ||
|
Add another quaternion to this one.
| Quaternion | ||
|
Set this quaternion to its inverse.
| Quaternion | ||
|
Set this quaternion equal to its conjugate.
| Quaternion | ||
|
nearEquals(q:Quaternion, e:Number):Boolean
Compare this quaternion to another.
| Quaternion | ||
|
Convert this quaternion to have magnitude 1.
| Quaternion | ||
|
Post multiply this quaternion by another quaternion, returning a new quaternion.
| Quaternion | ||
|
Post multiply this quaternion by another quaternion
| Quaternion | ||
|
Pre multiply this quaternion by another quaternion, returning a new quaternion.
| Quaternion | ||
|
Pre multiply this quaternion by another quaternion
| Quaternion | ||
|
reset(w:Number = 0, x:Number = 0, y:Number = 0, z:Number = 0):Quaternion
Assigns new coordinates to this quaternion
| Quaternion | ||
|
scalarMultiply(s:Number):Quaternion
| Quaternion | ||
|
scaleBy(s:Number):Quaternion
Multiply this quaternion by a number.
| Quaternion | ||
|
Set this quaternion to a unit quaternion that represents a rotation
about an axis in 3D space.
| Quaternion | ||
|
Subtract another quaternion from this one, returning a new quaternion.
| Quaternion | ||
|
Convert this quaternion to an axis/angle rotation, returning the result in a Vector3D
where x, y, z represent the axis and w represents the angle, in radians.
| Quaternion | ||
|
Convert this quaternion to a matrix transformation.
| Quaternion | ||
|
toString():String
Get a string representation of this quaternion
| Quaternion | ||
|
Create a unit quaternion in the same direction as this one.
| Quaternion | ||
| conjugate | property |
conjugate:Quaternion [read-only]The conjugate of this quaternion.
Implementation public function get conjugate():Quaternion
| IDENTITY | property |
public static var IDENTITY:Quaternion
| inverse | property |
inverse:Quaternion [read-only]The inverse of this quaternion.
Implementation public function get inverse():Quaternion
| magnitude | property |
magnitude:Number [read-only]The magnitude of this quaternion.
Implementation public function get magnitude():Number
| magnitudeSquared | property |
magnitudeSquared:Number [read-only]The square of the magnitude of this quaternion.
Implementation public function get magnitudeSquared():Number
| w | property |
public var w:NumberThe w coordinate of the quaternion.
| x | property |
public var x:NumberThe x coordinate of the quaternion.
| y | property |
public var y:NumberThe y coordinate of the quaternion.
| z | property |
public var z:NumberThe z coordinate of the quaternion.
| ZERO | property |
public static var ZERO:Quaternion
| Quaternion | () | constructor |
public function Quaternion(w:Number = 1, x:Number = 0, y:Number = 0, z:Number = 0)Constructor
Parametersw:Number (default = 1) — the x coordinate of the quaternion
|
|
x:Number (default = 0) — the y coordinate of the quaternion
|
|
y:Number (default = 0) — the z coordinate of the quaternion
|
|
z:Number (default = 0) — the w coordinate of the quaternion
|
| add | () | method |
public function add(q:Quaternion):QuaternionAdds another quaternion to this one, returning a new quaternion.
Parametersq:Quaternion — the quaternion to add
|
Quaternion —
the result of the addition
|
| assign | () | method |
public function assign(q:Quaternion):QuaternionCopies another quaternion into this one.
Parametersq:Quaternion — The quaternion to copy
|
Quaternion —
a reference to this Quaternion object
|
| clone | () | method |
public function clone():QuaternionMakes a copy of this Quaternion object.
ReturnsQuaternion —
A copy of this Quaternion
|
| createFromAxisRotation | () | method |
public static function createFromAxisRotation(axis:Vector3D, angle:Number):QuaternionCreate a new unit quaternion that represents a rotation about an axis in 3D space.
Parametersaxis:Vector3D — The axis of the rotation.
|
|
angle:Number — The angle, in radians, of the rotation. If no value is set,
the w coordinate of the axis Vector3D is used.
|
Quaternion —
A Quaternion representing the rotation.
|
| decrementBy | () | method |
public function decrementBy(q:Quaternion):QuaternionSubtract another quaternion from this one.
Parametersq:Quaternion — The quaternion to subtract
|
Quaternion —
A reference to this Quaternion object.
|
| dotProduct | () | method |
public function dotProduct(q:Quaternion):NumberCalculate the dot product of this quaternion with another.
Parametersq:Quaternion — The quaternion to calculate the dot product with
|
Number — The dot product of the two quaternions
|
| equals | () | method |
public function equals(q:Quaternion):BooleanCompare this quaternion to another.
Parametersq:Quaternion — The quaternion to compare with.
|
Boolean — true if the quaternions have the same coordinates, false otherwise.
|
| incrementBy | () | method |
public function incrementBy(q:Quaternion):QuaternionAdd another quaternion to this one.
Parametersq:Quaternion — The quaternion to add
|
Quaternion —
A reference to this Quaternion object.
|
| invert | () | method |
public function invert():QuaternionSet this quaternion to its inverse.
ReturnsQuaternion —
A reference to this quaternion.
|
| makeConjugate | () | method |
public function makeConjugate():QuaternionSet this quaternion equal to its conjugate.
ReturnsQuaternion —
A reference to this quaternion.
|
| nearEquals | () | method |
public function nearEquals(q:Quaternion, e:Number):BooleanCompare this quaternion to another.
Parametersq:Quaternion — The quaternion to compare with.
|
|
e:Number — The distance allowed between the coordinates of the two quaternions.
|
Boolean — true if the quaternions are within
distance e of each other, false otherwise
|
| normalize | () | method |
public function normalize():QuaternionConvert this quaternion to have magnitude 1.
ReturnsQuaternion —
A reference to this Vector3D object.
|
| postMultiply | () | method |
public function postMultiply(q:Quaternion):QuaternionPost multiply this quaternion by another quaternion, returning a new quaternion.
Parametersq:Quaternion — The quaternion to multiply by.
|
Quaternion —
A result of the multiplication.
|
| postMultiplyBy | () | method |
public function postMultiplyBy(q:Quaternion):QuaternionPost multiply this quaternion by another quaternion
Parametersq:Quaternion — The quaternion to multiply by
|
Quaternion —
A reference to this Quaternion object.
|
| preMultiply | () | method |
public function preMultiply(q:Quaternion):QuaternionPre multiply this quaternion by another quaternion, returning a new quaternion.
Parametersq:Quaternion — The quaternion to multiply by.
|
Quaternion —
A result of the multiplication.
|
| preMultiplyBy | () | method |
public function preMultiplyBy(q:Quaternion):QuaternionPre multiply this quaternion by another quaternion
Parametersq:Quaternion — The quaternion to multiply by
|
Quaternion —
A reference to this Quaternion object.
|
| reset | () | method |
public function reset(w:Number = 0, x:Number = 0, y:Number = 0, z:Number = 0):QuaternionAssigns new coordinates to this quaternion
Parametersw:Number (default = 0) — The new x coordinate
|
|
x:Number (default = 0) — The new y coordinate
|
|
y:Number (default = 0) — The new z coordinate
|
|
z:Number (default = 0) — The new w coordinate
|
Quaternion —
a reference to this Quaternion object
|
| scalarMultiply | () | method |
| scaleBy | () | method |
public function scaleBy(s:Number):QuaternionMultiply this quaternion by a number.
Parameterss:Number — The number to multiply by
|
Quaternion —
A reference to this Quaternion object.
|
| setFromAxisRotation | () | method |
public function setFromAxisRotation(axis:Vector3D, angle:Number):QuaternionSet this quaternion to a unit quaternion that represents a rotation about an axis in 3D space.
Parametersaxis:Vector3D — The axis of the rotation.
|
|
angle:Number — The angle, in radians, of the rotation. If no value is set,
the w coordinate of the axis Vector3D is used.
|
Quaternion —
A reference to this Quaternion.
|
| subtract | () | method |
public function subtract(q:Quaternion):QuaternionSubtract another quaternion from this one, returning a new quaternion.
Parametersq:Quaternion — The quaternion to subtract
|
Quaternion —
The result of the subtraction
|
| toAxisRotation | () | method |
public function toAxisRotation():Vector3DConvert this quaternion to an axis/angle rotation, returning the result in a Vector3D where x, y, z represent the axis and w represents the angle, in radians.
ReturnsVector3D —
The axis/angle rotation.
|
| toMatrixTransformation | () | method |
public function toMatrixTransformation():Matrix3DConvert this quaternion to a matrix transformation.
ReturnsMatrix3D —
The matrix transformation.
|
| toString | () | method |
public function toString():StringGet a string representation of this quaternion
ReturnsString — a string representation of this quaternion
|
| unit | () | method |
public function unit():QuaternionCreate a unit quaternion in the same direction as this one.
ReturnsQuaternion —
A unit quaternion in the same direction as this one.
|