Spherical.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. <div class="desc">A point's [link:https://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates].</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]( [page:Float radius], [page:Float phi], [page:Float theta] )</h3>
  15. <div>
  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. </div>
  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. <div>
  29. Returns a new plane with the same [page:.radius radius], [page:.phi phi]
  30. and [page:.theta theta] properties as this one.
  31. </div>
  32. <h3>[method:Spherical copy]( [page:Spherical s] )</h3>
  33. <div>
  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. </div>
  37. <h3>[method:Spherical makeSafe]()</h3>
  38. <div>
  39. Restricts the polar angle page:.phi phi] to be between 0.000001 and pi - 0.000001.
  40. </div>
  41. <h3>[method:Spherical set]( [page:Float radius], [page:Float phi], [page:Float theta] )</h3>
  42. <div>Sets values of this spherical's [page:.radius radius], [page:.phi phi]
  43. and [page:.theta theta] properties.</div>
  44. <h3>[method:Spherical setFromVector3]( [page:Vector3 vec3] )</h3>
  45. <div>
  46. Sets values of this spherical's [page:.radius radius], [page:.phi phi]
  47. and [page:.theta theta] properties from the [page:Vector3 Vector3].<br /><br />
  48. The [page:.radius radius] is set the vector's [page:Vector3.length], while the
  49. [page:.phi phi] and [page:.theta theta] properties are set from its direction.
  50. </div>
  51. <h2>Source</h2>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  53. </body>
  54. </html>