|
@@ -10,7 +10,7 @@
|
|
|
<body>
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">A point's spherical coordinates.</div>
|
|
|
+ <div class="desc">A point's [link:https://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates].</div>
|
|
|
|
|
|
|
|
|
<h2>Constructor</h2>
|
|
@@ -18,11 +18,11 @@
|
|
|
|
|
|
<h3>[name]( [page:Float radius], [page:Float phi], [page:Float theta] )</h3>
|
|
|
<div>
|
|
|
- radius -- [page:Float] the radius<br />
|
|
|
- phi -- [page:Float] polar angle from the y (up) axis<br />
|
|
|
- theta -- [page:Float] equator angle around the y (up) axis
|
|
|
- </div>
|
|
|
- <div>
|
|
|
+ [page:Float radius] - the radius, or the Euclidean distance from the point to the
|
|
|
+ origin. Default is *1.0*.<br />
|
|
|
+ [page:Float phi] - polar angle from the y (up) axis. Default is *0*.<br />
|
|
|
+ [page:Float theta] - equator angle around the y (up) axis. Default is *0*.<br /><br />
|
|
|
+
|
|
|
The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z.
|
|
|
</div>
|
|
|
|
|
@@ -38,29 +38,34 @@
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>[method:Spherical set]( [page:Float radius], [page:Float phi], [page:Float theta] ) [page:Spherical this]</h3>
|
|
|
+ <h3>[method:Spherical clone]()</h3>
|
|
|
<div>
|
|
|
- Sets values of this spherical's component coordinates.
|
|
|
+ Returns a new plane with the same [page:.radius radius], [page:.phi phi]
|
|
|
+ and [page:.theta theta] properties as this one.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Spherical copy]( [page:Spherical s] ) [page:Spherical this]</h3>
|
|
|
+ <h3>[method:Spherical copy]( [page:Spherical s] )</h3>
|
|
|
<div>
|
|
|
- Copies value of *s* to this spherical.
|
|
|
+ Copies the values of the passed Spherical's [page:.radius radius], [page:.phi phi]
|
|
|
+ and [page:.theta theta] properties to this spherical.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Spherical clone]() [page:Spherical this]</h3>
|
|
|
+ <h3>[method:Spherical makeSafe]()</h3>
|
|
|
<div>
|
|
|
- Clones this spherical.
|
|
|
+ Restricts the polar angle page:.phi phi] to be between 0.000001 and pi - 0.000001.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Spherical makeSafe]() [page:Spherical this]</h3>
|
|
|
- <div>
|
|
|
- Restricts the polar angle phi to be between 0.000001 and pi - 0.000001.
|
|
|
- </div>
|
|
|
+ <h3>[method:Spherical set]( [page:Float radius], [page:Float phi], [page:Float theta] )</h3>
|
|
|
+ <div>Sets values of this spherical's [page:.radius radius], [page:.phi phi]
|
|
|
+ and [page:.theta theta] properties.</div>
|
|
|
|
|
|
- <h3>[method:Spherical setFromVector3]( [page:Vector3 v] ) [page:Spherical this]</h3>
|
|
|
+ <h3>[method:Spherical setFromVector3]( [page:Vector3 vec3] )</h3>
|
|
|
<div>
|
|
|
- Sets this object from the vector *v*.
|
|
|
+ Sets values of this spherical's [page:.radius radius], [page:.phi phi]
|
|
|
+ and [page:.theta theta] properties from the [page:Vector3 Vector3].<br /><br />
|
|
|
+
|
|
|
+ The [page:.radius radius] is set the vector's [page:Vector3.length], while the
|
|
|
+ [page:.phi phi] and [page:.theta theta] properties are set from its direction.
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|