Provides an interface for Euler angles. They express 3D orientations in space with pitch, roll, and yaw. Although they're explicitly easier to use, implementations should prefer quaternions to avoid gimbal lock.
- Source:
- See:
Members
pitch :Number
Rotation along the y-axis.
Normally within [-π/2, π/2]
.
Type:
- Number
- Source:
roll :Number
Rotation along the x-axis.
Normally within [-π, π]
.
Type:
- Number
- Source:
yaw :Number
Rotation along the z-axis.
Normally within [-π, π]
.
Type:
- Number
- Source:
Methods
(static) create(optionsopt) → {syngen.utility.euler}
Instantiates a new Euler angle.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
syngen.utility.euler | Object |
<optional> |
{} |
Properties
|
- Source:
Returns:
- Type
- syngen.utility.euler
(static) fromQuaternion(quaternion, sequenceopt) → {syngen.utility.euler}
Converts a quaternion to an Euler angle.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
quaternion |
syngen.utility.quaternion | |||
sequence |
String |
<optional> |
syngen.const.eulerToQuaternion
|
- Source:
- See:
Returns:
- Type
- syngen.utility.euler
clone() → {syngen.utility.euler}
Returns a new instance with the same properties.
- Source:
Returns:
- Type
- syngen.utility.euler
equals(euleropt) → {Boolean}
Returns whether this is equal to euler
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
euler |
syngen.utility.euler | Object |
<optional> |
- Source:
Returns:
- Type
- Boolean
forward() → {syngen.utility.vector3d}
Returns the unit vector that's ahead of the orientation. The vector can be inverted to receive a vector behind.
- Source:
Returns:
isZero() → {Boolean}
Returns whether all properties are zero.
- Source:
Returns:
- Type
- Boolean
right() → {syngen.utility.vector3d}
Returns the unit vector that's to the right of the orientation. The vector can be inverted to receive a vector to its left.
- Source:
Returns:
scale(scalaropt) → {syngen.utility.euler}
Multiplies this by scalar
and returns it as a new instance.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
scalar |
Number |
<optional> |
0 |
- Source:
Returns:
- Type
- syngen.utility.euler
set(optionsopt)
Sets all properties to options
.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
syngen.utility.euler | Object |
<optional> |
Properties
|
- Source:
up() → {syngen.utility.vector3d}
Returns the unit vector that's above of the orientation. The vector can be inverted to receive a vector below.
- Source: