Spherical.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  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. <p class="desc">
  12. A point's [link:https://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates].
  13. </p>
  14. <h2>Constructor</h2>
  15. <h3>
  16. [name]( [param:Float radius], [param:Float phi], [param:Float theta] )
  17. </h3>
  18. <p>
  19. [page:Float radius] - the radius, or the
  20. [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance]
  21. (straight-line distance) from the point to the origin. Default is
  22. `1.0`.<br />
  23. [page:Float phi] - polar angle in radians from the y (up) axis. Default is
  24. `0`.<br />
  25. [page:Float theta] - equator angle in radians around the y (up) axis.
  26. Default is `0`.<br /><br />
  27. The poles (phi) are at the positive and negative y axis. The equator
  28. (theta) starts at positive z.
  29. </p>
  30. <h2>Properties</h2>
  31. <h3>[property:Float radius]</h3>
  32. <h3>[property:Float phi]</h3>
  33. <h3>[property:Float theta]</h3>
  34. <h2>Methods</h2>
  35. <h3>[method:Spherical clone]()</h3>
  36. <p>
  37. Returns a new spherical with the same [page:.radius radius], [page:.phi phi]
  38. and [page:.theta theta] properties as this one.
  39. </p>
  40. <h3>[method:this copy]( [param:Spherical s] )</h3>
  41. <p>
  42. Copies the values of the passed Spherical's [page:.radius radius],
  43. [page:.phi phi] and [page:.theta theta] properties to this spherical.
  44. </p>
  45. <h3>[method:this makeSafe]()</h3>
  46. <p>
  47. Restricts the polar angle [page:.phi phi] to be between 0.000001 and pi -
  48. 0.000001.
  49. </p>
  50. <h3>
  51. [method:this set]( [param:Float radius], [param:Float phi], [param:Float theta] )
  52. </h3>
  53. <p>
  54. Sets values of this spherical's [page:.radius radius], [page:.phi phi] and
  55. [page:.theta theta] properties.
  56. </p>
  57. <h3>[method:this setFromVector3]( [param:Vector3 vec3] )</h3>
  58. <p>
  59. Sets values of this spherical's [page:.radius radius], [page:.phi phi] and
  60. [page:.theta theta] properties from the [page:Vector3 Vector3].
  61. </p>
  62. <h3>
  63. [method:this setFromCartesianCoords]( [param:Float x], [param:Float y], [param:Float z] )
  64. </h3>
  65. <p>
  66. Sets values of this spherical's [page:.radius radius], [page:.phi phi] and
  67. [page:.theta theta] properties from Cartesian coordinates.
  68. </p>
  69. <h2>Source</h2>
  70. <p>
  71. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  72. </p>
  73. </body>
  74. </html>