Euler.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">Euler Angles. <br/><br/>
  12. Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
  13. (More information on <a href='http://en.wikipedia.org/wiki/Euler_angles' target='blank'>Wikipedia</a>)</div>
  14. <h2>Example</h2>
  15. <code>var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
  16. var b = new THREE.Vector3( 1, 0, 1 );
  17. b.applyEuler(a);
  18. </code>
  19. <h2>Constructor</h2>
  20. <h3>[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )</h3>
  21. <div>
  22. x -- [page:Float] the angle of the x axis in radians<br />
  23. y -- [page:Float] the angle of the y axis in radians<br />
  24. z -- [page:Float] the angle of the z axis in radians<br />
  25. order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
  26. </div>
  27. <div>
  28. A euler angle for transforming
  29. </div>
  30. <h2>Properties</h2>
  31. <h3>[property:Float x]</h3>
  32. <h3>[property:Float y]</h3>
  33. <h3>[property:Float z]</h3>
  34. <h3>[property:String order]</h3>
  35. <h2>Methods</h2>
  36. <h3>[method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]</h3>
  37. <div>
  38. x -- [page:Float] Angle in x axis in radians<br />
  39. y -- [page:Float] Angle in y axis in radians<br />
  40. z -- [page:Float] Angle in z axis in radians<br />
  41. order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
  42. </div>
  43. <div>
  44. Sets the angles of this euler transform.
  45. </div>
  46. <h3>[method:Euler copy]( [page:Euler euler] ) [page:Euler this]</h3>
  47. <div>
  48. Copies value of *euler* to this euler.
  49. </div>
  50. <h3>[method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]</h3>
  51. <div>
  52. m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)<br />
  53. order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
  54. </div>
  55. <div>
  56. Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
  57. </div>
  58. <h3>[method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]</h3>
  59. <div>
  60. q -- [page:Quaternion] quaternion must be normalized<br />
  61. order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
  62. </div>
  63. <div>
  64. Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
  65. </div>
  66. <h3>[method:Euler reorder]( [page:String newOrder] ) [page:Euler this]</h3>
  67. <div>
  68. 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. <br />
  69. WARNING: this discards revolution information.
  70. </div>
  71. <h3>[method:Euler fromArray]([page:Array array]) [page:Euler this]</h3>
  72. <div>
  73. array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.
  74. </div>
  75. <div>
  76. Assigns this euler's x angle to array[0]. <br />
  77. Assigns this euler's y angle to array[1]. <br />
  78. Assigns this euler's z angle to array[2]. <br />
  79. Optionally assigns this euler's order to array[3].
  80. </div>
  81. <h3>[method:Array toArray]()</h3>
  82. <div>
  83. Returns an array [x, y, z, order].
  84. </div>
  85. <h3>[method:Boolean equals]( [page:Euler euler] )</h3>
  86. <div>
  87. Checks for strict equality of this euler and *euler*.
  88. </div>
  89. <h3>[method:Euler clone]()</h3>
  90. <div>
  91. Returns a new euler created from this euler.
  92. </div>
  93. <h2>Source</h2>
  94. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  95. </body>
  96. </html>