[name]
Euler Angles.
Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
(More information on
Wikipedia)
Example
var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
var b = new THREE.Vector3( 1, 0, 1 );
b.applyEuler(a);
Constructor
[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )
x -- [page:Float] the angle of the x axis in radians
y -- [page:Float] the angle of the y axis in radians
z -- [page:Float] the angle of the z axis in radians
order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
A euler angle for transforming
Properties
.[page:Float x]
.[page:Float y]
.[page:Float z]
.[page:String order]
Methods
.set( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]
x -- [page:Float] Angle in x axis in radians
x -- [page:Float] Angle in x axis in radians
x -- [page:Float] Angle in x axis in radians
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
Sets the angles of this euler transform.
.copy( [page:Euler euler] ) [page:Euler this]
Copies value of *euler* to this euler.
.setFromRotationMatrix( [page:Matrix4 m], [page:String order] ) [page:Euler this]
m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
.setFromQuaternion( [page:Quaternion q], [page:String order] ) [page:Euler this]
q -- [page:Quaternion] quaternion must be normalized
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
.reorder( [page:String newOrder] ) [page:Euler this]
Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order.
WARNING: this discards revolution information.
.fromArray([page:Array array]) [page:Euler this]
array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.
Assigns this euler's x angle to array[0].
Assigns this euler's y angle to array[1].
Assigns this euler's z angle to array[2].
Optionally assigns this euler's order to array[3].
.toArray() [page:Array]
Returns an array [x, y, z, order].
.equals( [page:Euler euler] ) [page:Boolean]
Checks for strict equality of this euler and *euler*.
.clone() [page:Euler]
Returns a new euler created from this euler.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]