Spherical.html 2.4 KB

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