Class arel.Rotation
Rotation Object. Internal storage format is Quaternions. Can be initialized in with quaternions
- Version 2.0
- Defined in: Parameters.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
arel.Rotation(q1, q2, q3, q4)
|
Method Summary
Class Detail
arel.Rotation(q1, q2, q3, q4)
Author: metaio GmbH.
- Parameters:
- {Number} q1
- Quaternion value 1
- {Number} q2
- Quaternion value 2
- {Number} q3
- Quaternion value 3
- {Number} q4
- Quaternion value 4
Method Detail
-
{Object} getAxisAngle()Returns the Rotation in Axis Angle representation
- Returns:
- {Object} Object with axis and angle information e.g. {axis: arel.Vetor3D, angle: angleRad}
-
{arel.Vector3D} getEulerAngleDegrees()Returns the Rotation in Euler representation
- Returns:
- {arel.Vector3D} Euler rotation values in degrees
-
{arel.Vector3D} getEulerAngleRadians()Returns the Rotation in Euler representation
- Returns:
- {arel.Vector3D} Euler rotation values in radians
-
{Array} getMatrix()Returns the Rotation in Matrix representation
- Returns:
- {Array} 3x3 rotationMatrix in row-major order
-
{arel.Rotation} inverse()Returns an inverted copy of this rotation. This inverse corresponds to a rotation in the opposite direction rotation*rotation.inverse() == no Rotation
- Returns:
- {arel.Rotation} The inverse of the rotation
-
setFromAxisAngle(axis, angle)Creates the Rotation from Axis Angle representation
- Parameters:
- {arel.Vector3D} axis
- the axis
- {Number} angle
- in radians *
-
setFromEulerAngleDegrees(vec3D)Creates the Rotation from Euler representation in degree (order: x-y-z)
- Parameters:
- {arel.Vector3D} vec3D
- Euler rotation values in degree
-
setFromEulerAngleRadians(vec3D)Creates the Rotation from Euler representation in Radians (order: x-y-z)
- Parameters:
- {arel.Vector3D} vec3D
- Euler rotation values in radians
-
setFromMatrix(rotationMatrix)Creates an arel.Rotation Object from Matrix (3x3) representation (row major order)
- Parameters:
- {Array} rotationMatrix
- 3x3 rotationMatrix in row-major order