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 | - polar angle in radians from the y (up) axis. Default is 0. |
theta | Number | <optional> | 0 | - equator angle in radians around the y (up) axis. Default is 0. |
Methods
clone() → {t3d.Spherical}
Returns a new spherical with the same radius, phi and theta properties as this one.
Returns:
- Type:
- t3d.
Spherical
copy(other) → {t3d.Spherical}
Copies the values of the passed Spherical's radius, phi and theta properties to this spherical.
Parameters:
Name | Type | Description |
---|---|---|
other | t3d. |
Returns:
- Type:
- t3d.
Spherical
makeSafe() → {t3d.Spherical}
Restrict phi to be betwee EPS and PI-EPS.
Returns:
- Type:
- t3d.
Spherical
set(radius, phi, theta)
Sets values of this spherical's radius, phi and theta properties.
Parameters:
Name | Type | Description |
---|---|---|
radius | Number | |
phi | Number | |
theta | Number |
setFromVector3(vec3) → {t3d.Spherical}
Sets values of this spherical's radius, phi and theta properties from the Vector3.
Parameters:
Name | Type | Description |
---|---|---|
vec3 | t3d. |
Returns:
- Type:
- t3d.
Spherical