class Quaternion
Creates a new Quaternion from the passed floats.
Name | Type | Description | |
---|---|---|---|
optional | x | number | |
optional | y | number | |
optional | z | number |
Returns a string with the Quaternion coordinates.
Returns the string "Quaternion".
Returns the Quaternion hash code.
Returns a new array populated with 4 elements : the Quaternion coordinates.
Boolean : True if the current Quaterion and the passed one coordinates are strictly equal.
Name | Type | Description | |
---|---|---|---|
otherQuaternion | Quaternion |
Returns a new Quaternion copied from the current one.
Updates the current Quaternion from the passed one coordinates.
Returns the updated Quaterion.
Name | Type | Description | |
---|---|---|---|
other | Quaternion |
Updates the current Quaternion from the passed float coordinates.
Returns the updated Quaterion.
Name | Type | Description | |
---|---|---|---|
x | number | ||
y | number | ||
z | number |
Updates the current Quaternion from the passed float coordinates.
Returns the updated Quaterion.
Name | Type | Description | |
---|---|---|---|
x | number | ||
y | number | ||
z | number |
Returns a new Quaternion as the addition result of the passed one and the current Quaternion.
Name | Type | Description | |
---|---|---|---|
other | Quaternion |
Returns a new Quaternion as the subtraction result of the passed one from the current Quaternion.
Name | Type | Description | |
---|---|---|---|
other | Quaternion |
Returns a new Quaternion set by multiplying the current Quaterion coordinates by the float "scale".
Name | Type | Description | |
---|---|---|---|
value | number |
Returns a new Quaternion set as the quaternion mulplication result of the current one with the passed one "q1".
Name | Type | Description | |
---|---|---|---|
q1 | Quaternion |
Sets the passed "result" as the quaternion mulplication result of the current one with the passed one "q1".
Returns the current Quaternion.
Name | Type | Description | |
---|---|---|---|
q1 | Quaternion | ||
result | Quaternion |
Updates the current Quaternion with the quaternion mulplication result of itself with the passed one "q1".
Returns the updated Quaternion.
Name | Type | Description | |
---|---|---|---|
q1 | Quaternion |
Sets the passed "ref" with the conjugation of the current Quaternion.
Returns the current Quaternion.
Name | Type | Description | |
---|---|---|---|
ref | Quaternion |
Conjugates in place the current Quaternion.
Returns the updated Quaternion.
Returns a new Quaternion as the conjugate of the current Quaternion.
Returns the Quaternion length (float).
Normalize in place the current Quaternion.
Returns the updated Quaternion.
Returns a new Vector3 set with the Euler angles translated from the current Quaternion.
Name | Type | Description | |
---|---|---|---|
optional | order | string |
Sets the passed vector3 "result" with the Euler angles translated from the current Quaternion.
Returns the current Quaternion.
Name | Type | Description | |
---|---|---|---|
result | Vector3 | ||
optional | order | string |
Updates the passed rotation matrix with the current Quaternion values.
Returns the current Quaternion.
Name | Type | Description | |
---|---|---|---|
result | Matrix |
Updates the current Quaternion from the passed rotation matrix values.
Returns the updated Quaternion.
Name | Type | Description | |
---|---|---|---|
matrix | Matrix |
Returns a new Quaternion set from the passed rotation matrix values.
Name | Type | Description | |
---|---|---|---|
matrix | Matrix |
Updates the passed quaternion "result" with the passed rotation matrix values.
Name | Type | Description | |
---|---|---|---|
matrix | Matrix | ||
result | Quaternion |
Returns a new Quaternion set to (0.0, 0.0, 0.0).
Returns a new Quaternion as the inverted current Quaternion.
Name | Type | Description | |
---|---|---|---|
q | Quaternion |
Returns the identity Quaternion.
Name | Type | Description | |
---|---|---|---|
quaternion | Quaternion |
Returns a new Quaternion set from the passed axis (Vector3) and angle in radians (float).
Name | Type | Description | |
---|---|---|---|
axis | Vector3 | ||
angle | number |
Sets the passed quaternion "result" from the passed axis (Vector3) and angle in radians (float).
Name | Type | Description | |
---|---|---|---|
axis | Vector3 | ||
angle | number | ||
result | Quaternion |
Retuns a new Quaternion set from the starting index of the passed array.
Name | Type | Description | |
---|---|---|---|
array | ArrayLike<number> | ||
optional | offset | number |
Returns a new Quaternion set from the passed Euler float angles (y, x, z).
Name | Type | Description | |
---|---|---|---|
yaw | number | ||
pitch | number | ||
roll | number |
Sets the passed quaternion "result" from the passed float Euler angles (y, x, z).
Name | Type | Description | |
---|---|---|---|
yaw | number | ||
pitch | number | ||
roll | number |
Returns a new Quaternion from the passed float Euler angles expressed in z-x-z orientation
Name | Type | Description | |
---|---|---|---|
alpha | number | ||
beta | number | ||
gamma | number |
Sets the passed quaternion "result" from the passed float Euler angles expressed in z-x-z orientation
Name | Type | Description | |
---|---|---|---|
alpha | number | ||
beta | number | ||
gamma | number |
Returns a new Quaternion as the quaternion rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system.
cf to Vector3.RotationFromAxis() documentation.
Note : axis1, axis2 and axis3 are normalized during this operation.
Name | Type | Description | |
---|---|---|---|
axis1 | Vector3 | ||
axis2 | Vector3 | ||
axis3 | Vector3 |
Sets the passed quaternion "ref" with the quaternion rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system.
cf to Vector3.RotationFromAxis() documentation.
Note : axis1, axis2 and axis3 are normalized during this operation.
Name | Type | Description | |
---|---|---|---|
axis1 | Vector3 | ||
axis2 | Vector3 | ||
axis3 | Vector3 |
Name | Type | Description | |
---|---|---|---|
left | Quaternion | ||
right | Quaternion | ||
amount | number |
Name | Type | Description | |
---|---|---|---|
left | Quaternion | ||
right | Quaternion | ||
amount | number |
Returns a new Quaternion located for "amount" (float) on the Hermite interpolation spline defined by the vectors "value1", "tangent1", "value2", "tangent2".
Name | Type | Description | |
---|---|---|---|
value1 | Quaternion | ||
tangent1 | Quaternion | ||
value2 | Quaternion | ||
tangent2 | Quaternion |