Spherical

A point's spherical coordinates.

Constructor

Spherical(radius : Float, phi : Float, theta : Float)

radius - the radius, or the Euclidean distance (straight-line distance) from the point to the origin. Default is 1.0.
phi - polar angle from the y (up) axis. Default is 0.
theta - equator angle around the y (up) axis. Default is 0.

The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z.

Properties

.radius : Float

.phi : Float

.theta : Float

Methods

.clone () : Spherical

Returns a new plane with the same radius, phi and theta properties as this one.

.copy (s : Spherical) : Spherical

Copies the values of the passed Spherical's radius, phi and theta properties to this spherical.

.makeSafe () : Spherical

Restricts the polar angle phi to be between 0.000001 and pi - 0.000001.

.set (radius : Float, phi : Float, theta : Float) : Spherical

Sets values of this spherical's radius, phi and theta properties.

.setFromVector3 (vec3 : Vector3) : Spherical

Sets values of this spherical's radius, phi and theta properties from the Vector3.

.setFromCartesianCoords (x : Float, y : Float, z : Float) : Spherical

Sets values of this spherical's radius, phi and theta properties from Cartesian coordinates.

Source

For more info on how to obtain the source code of this module see this page.