new Quaternion(x, y, z, w)
Creates new quaternion
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
z |
Number | |
w |
Number |
- Source:
Methods
copy() → {Ayce.Quaternion}
Returns copy of quaternion
- Source:
Returns:
quaternion
- Type
- Ayce.Quaternion
copyToQuaternion(from, to)
Copies values from one quaternion to another
Parameters:
Name | Type | Description |
---|---|---|
from |
||
to |
- Source:
fromAxisAngle(axis, angle)
Sets quaternion to rotation around axis
Parameters:
Name | Type | Description |
---|---|---|
axis |
Ayce.Vector3 | |
angle |
Number |
- Source:
fromEulerAngles(ax, ay, az)
Sets Quaternion values based on rotation around euler angles (radians)
Parameters:
Name | Type | Description |
---|---|---|
ax |
Number | |
ay |
Number | |
az |
Number |
- Source:
getConjugate() → {Ayce.Quaternion}
Returns conjugated quaternion
- Source:
Returns:
quaternion
- Type
- Ayce.Quaternion
getForwardVector() → {Ayce.Vector3}
Returns forward vector
- Source:
Returns:
vector
- Type
- Ayce.Vector3
getRightVector() → {Ayce.Vector3}
Returns right vector
- Source:
Returns:
vector
- Type
- Ayce.Vector3
getRotatedPoint(vector, target) → {Ayce.Vector3}
TODO: Description
Parameters:
Name | Type | Description |
---|---|---|
vector |
Ayce.Vector3 | |
target |
Ayce.Vector3 |
- Source:
Returns:
v
- Type
- Ayce.Vector3
getUpVector() → {Ayce.Vector3}
Returns up vector
- Source:
Returns:
vector
- Type
- Ayce.Vector3
multiply(qa, qb)
Multiplies two quaternions
Parameters:
Name | Type | Description |
---|---|---|
qa |
Ayce.Quaternion | |
qb |
Ayce.Quaternion |
- Source:
normalize() → {Ayce.Quaternion}
Normalizes Quaternion
- Source:
Returns:
quaternion
- Type
- Ayce.Quaternion
reset()
Sets quaternion to (0, 0, 0, 1)
- Source:
rotatePoint(vector)
TODO: Description
Parameters:
Name | Type | Description |
---|---|---|
vector |
Ayce.Vector3 |
- Source:
Returns:
vector
set(x, y, z, w)
Sets quaternion to given values
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
z |
Number | |
w |
Number |
- Source:
slerp(ga, gb, t)
TODO: Description
Parameters:
Name | Type | Description |
---|---|---|
ga |
||
gb |
||
t |
- Source:
toRotationMatrix(matrix)
TODO: Description
Parameters:
Name | Type | Description |
---|---|---|
matrix |
Ayce.Matrix4 |
- Source: