Spherical.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>球坐标([name])</h1>
  12. <p class="desc">一个点的[link:https://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates](球坐标)。</p>
  13. <h2>构造函数</h2>
  14. <h3>[name]( [param:Float radius], [param:Float phi], [param:Float theta] )</h3>
  15. <p>
  16. [page:Float radius] - 半径值,或者说从该点到原点的
  17. [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance](欧几里得距离,即直线距离)。默认值为*1.0*。<br />
  18. [page:Float phi] - polar angle from the y (up) axis. Default is *0*.<br />
  19. [page:Float theta] - equator angle around the y (up) axis. Default is *0*.<br /><br />
  20. The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z.
  21. </p>
  22. <h2>属性</h2>
  23. <h3>[property:Float radius]</h3>
  24. <h3>[property:Float phi]</h3>
  25. <h3>[property:Float theta]</h3>
  26. <h2>方法</h2>
  27. <h3>[method:Spherical clone]()</h3>
  28. <p>
  29. 返回一个新的球坐标,新的球坐标与该球坐标具有相同的
  30. [page:.radius radius]、[page:.phi phi]和[page:.theta theta]。
  31. </p>
  32. <h3>[method:Spherical copy]( [param:Spherical s] )</h3>
  33. <p>
  34. 复制所传入的球坐标的[page:.radius radius]、
  35. [page:.phi phi] 和[page:.theta theta]属性到该球坐标中。
  36. </p>
  37. <h3>[method:Spherical makeSafe]()</h3>
  38. <p>
  39. 将极角 [page:.phi phi] 的值限制在0.000001 和 pi - 0.000001 之间。
  40. </p>
  41. <h3>[method:Spherical set]( [param:Float radius], [param:Float phi], [param:Float theta] )</h3>
  42. <p>设置球坐标中[page:.radius radius]、[page:.phi phi] 和 [page:.theta theta] 属性的值。</p>
  43. <h3>[method:Spherical setFromVector3]( [param:Vector3 vec3] )</h3>
  44. <p>
  45. 从[page:Vector3 Vector3]中设置球坐标的[page:.radius radius]、[page:.phi phi]和[page:.theta theta]值。
  46. </p>
  47. <h3>[method:Spherical setFromCartesianCoords]( [param:Float x], [param:Float y], [param:Float z] )</h3>
  48. <p>
  49. 从笛卡尔坐标系中设置球坐标的[page:.radius radius]、[page:.phi phi]和[page:.theta theta]值。
  50. </p>
  51. <h2>源代码</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </p>
  55. </body>
  56. </html>