Skip to content

Commit

Permalink
Merge pull request mrdoob#10553 from looeee/docs/euler/eulerTypeNote
Browse files Browse the repository at this point in the history
Added note on intrinsic and extrinsic Euler types
  • Loading branch information
mrdoob authored Jan 11, 2017
2 parents e7dc951 + 19c9247 commit 240065e
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions docs/api/math/Euler.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<body>
<h1>[name]</h1>

<div class="desc">A class representing [link:http://en.wikipedia.org/wiki/Euler_angles Euler Angles].<br /><br />
<div class="desc">
A class representing [link:http://en.wikipedia.org/wiki/Euler_angles Euler Angles].<br /><br />

Euler angles describe a rotational transformation by rotating an object on its various
axes in specified amounts per axis, and a specified axis order.
</div>
Euler angles describe a rotational transformation by rotating an object on its various
axes in specified amounts per axis, and a specified axis order.
</div>

<h2>Example</h2>

Expand Down Expand Up @@ -51,9 +52,23 @@ <h3>[property:String order]</h3>
<div>
The order in which to apply rotations. Default is 'XYZ', which means that the object will first be
rotated around its X axis, then its Y axis and finally its Z axis. Other possibilities are:
'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. Note that these must be in upper case.<br /><br />
'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. These must be in upper case.<br /><br />

If this is changed, [page:.onChangeCallback onChangeCallback] will be called.
Three.js uses <em>intrinsic</em> (Tait-Bryan) ordering, also known as <em>yaw</em>, <em>pitch</em>
and <em>roll</em>. This means that rotations are performed with respect to the <em>local</em>
coordinate system. That is, for order 'XYZ', the rotation is first around world-X, then around
local-Y (which may now be different from the world Y-axis), then local-Z (which may be different
from the world Z-axis).<br /><br />

Some implementations may use <em>extrinsic</em> (proper) ordering, in which case rotations are performed
with respect to the <em>world</em> coordinate system, so that for order 'XYZ', the rotations
are around world-X, world-Y, and world-Z.<br /><br />

Converting between the two types is relatively straightforward, you just need to reverse the order
and the rotation, so that an intrinsic (three.js) Euler rotation of angles a, b, c about XYZ
will be equivalent to to an extrinsic Euler rotation of angles c, b, a about ZYX.<br /><br />

If the order is changed, [page:.onChangeCallback onChangeCallback] will be called.
</div>

<h3>[property:Float x]</h3>
Expand Down

0 comments on commit 240065e

Please sign in to comment.