Constructor
new SphericalCoords(radius, phi, theta)
- Source:
Creates an instance of SphericalCoords.
Parameters:
Name | Type | Description |
---|---|---|
radius |
Number | The radius. |
phi |
Number | Phi in radians. |
theta |
Number | Theta in radians. |
Methods
clone() → {SphericalCoords}
- Source:
Clone this spherical coordinates object.
Returns:
A clone of the spherical coordinates object.
- Type
- SphericalCoords
limit(phiMin, phiMax, thetaMin, thetaMax) → {SphericalCoords}
- Source:
Limit the rotation by setting maxima and minima for phi and theta.
Parameters:
Name | Type | Description |
---|---|---|
phiMin |
Number | The minimum for phi. |
phiMax |
Number | The maximum for phi. |
thetaMin |
Number | The minimum for theta. |
thetaMax |
Number | The maximum for theta. |
Returns:
Returns itself.
- Type
- SphericalCoords
secure() → {SphericalCoords}
- Source:
Avoid overflows.
Returns:
Returns itself.
- Type
- SphericalCoords
set(radius, phi, theta) → {SphericalCoords}
- Source:
Set the spherical coordinates from the radius, the phi angle and the theta angle.
Parameters:
Name | Type | Description |
---|---|---|
radius |
Number | |
phi |
Number | |
theta |
Number |
Returns:
Returns itself.
- Type
- SphericalCoords
setFromVector(v) → {SphericalCoords}
- Source:
Set the spherical coordaintes from a vector.
Parameters:
Name | Type | Description |
---|---|---|
v |
Vector3f | A vector. |
Returns:
Returns itself.
- Type
- SphericalCoords
toString() → {String}
- Source:
Returns a string representation of these spherical coordinates.
Returns:
A string representing spherical coordinates.
- Type
- String