提交 240065e0 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10553 from looeee/docs/euler/eulerTypeNote

Added note on intrinsic and extrinsic Euler types
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
<body> <body>
<h1>[name]</h1> <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 Euler angles describe a rotational transformation by rotating an object on its various
axes in specified amounts per axis, and a specified axis order. axes in specified amounts per axis, and a specified axis order.
</div> </div>
<h2>Example</h2> <h2>Example</h2>
...@@ -51,9 +52,23 @@ ...@@ -51,9 +52,23 @@
<div> <div>
The order in which to apply rotations. Default is 'XYZ', which means that the object will first be 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: 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> </div>
<h3>[property:Float x]</h3> <h3>[property:Float x]</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册