2
0

Spherical.html 2.4 KB

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