Constructor
new Spherical(radiusopt, phiopt, thetaopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
radius | number | <optional> | 1 | the radius, or the Euclidean distance (straight-line distance) from the point to the origin. Default is 1.0. |
phi | number | <optional> | 0 |
|
theta | number | <optional> | 0 |
|
Methods
clone() → {Spherical}
Returns a new spherical with the same radius, phi and theta properties as this one.
Returns:
- Type:
- Spherical
copy(other) → {Spherical}
Copies the values of the passed Spherical's radius, phi and theta properties to this spherical.
Parameters:
Name | Type | Description |
---|---|---|
other | Spherical |
Returns:
- Type:
- Spherical
makeSafe() → {Spherical}
Restrict phi to be betwee EPS and PI-EPS.
Returns:
- Type:
- Spherical
set(radius, phi, theta) → {Spherical}
Sets values of this spherical's radius, phi and theta properties.
Parameters:
Name | Type | Description |
---|---|---|
radius | number | |
phi | number | |
theta | number |
Returns:
- Type:
- Spherical
setFromVector3(vec3) → {Spherical}
Sets values of this spherical's radius, phi and theta properties from the Vector3.
Parameters:
Name | Type | Description |
---|---|---|
vec3 | Vector3 |
Returns:
- Type:
- Spherical