new Spherical(clock, cone, magnitude)
A set of curvilinear 3-dimensional coordinates.
| Name | Type | Default | Description |
|---|---|---|---|
clock |
Number |
0.0
|
optional The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis. |
cone |
Number |
0.0
|
optional The angular coordinate measured from the positive z-axis and toward the negative z-axis. |
magnitude |
Number |
1.0
|
optional The linear coordinate measured from the origin. |
Source:
Core/Spherical.js, line 22
Methods
-
staticSpherical.clone(spherical, result)
-
Creates a duplicate of a Spherical.
Name Type Description sphericalSpherical The spherical to clone. resultSpherical optional The object to store the result into, if undefined a new instance will be created. Returns:
The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)Source: Core/Spherical.js, line 64 -
staticSpherical.equals(left, right)
-
Returns true if the first spherical is equal to the second spherical, false otherwise.
Name Type Description leftSpherical The first Spherical to be compared. rightSpherical The second Spherical to be compared. Returns:
true if the first spherical is equal to the second spherical, false otherwise.Source: Core/Spherical.js, line 110 -
staticSpherical.equalsEpsilon(left, right, epsilon)
-
Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
Name Type Default Description leftSpherical The first Spherical to be compared. rightSpherical The second Spherical to be compared. epsilonNumber 0.0optional The epsilon to compare against. Returns:
true if the first spherical is within the provided epsilon of the second spherical, false otherwise.Source: Core/Spherical.js, line 127 -
staticSpherical.fromCartesian3(cartesian3, spherical)
-
Converts the provided Cartesian3 into Spherical coordinates.
Name Type Description cartesian3Cartesian3 The Cartesian3 to be converted to Spherical. sphericalSpherical optional The object in which the result will be stored, if undefined a new instance will be created. Returns:
The modified result parameter, or a new instance if one was not provided.Source: Core/Spherical.js, line 35 -
staticSpherical.normalize(spherical, result)
-
Computes the normalized version of the provided spherical.
Name Type Description sphericalSpherical The spherical to be normalized. resultSpherical optional The object to store the result into, if undefined a new instance will be created. Returns:
The modified result parameter or a new instance if result was undefined.Source: Core/Spherical.js, line 86 -
clone(result)
-
Creates a duplicate of this Spherical.
Name Type Description resultSpherical optional The object to store the result into, if undefined a new instance will be created. Returns:
The modified result parameter or a new instance if result was undefined.Source: Core/Spherical.js, line 153 -
equals(other)
-
Returns true if this spherical is equal to the provided spherical, false otherwise.
Name Type Description otherSpherical The Spherical to be compared. Returns:
true if this spherical is equal to the provided spherical, false otherwise.Source: Core/Spherical.js, line 143 -
equalsEpsilon(other, epsilon)
-
Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
Name Type Description otherSpherical The Spherical to be compared. epsilonNumber The epsilon to compare against. Returns:
true if this spherical is within the provided epsilon of the provided spherical, false otherwise.Source: Core/Spherical.js, line 164 -
toString()
-
Returns a string representing this instance in the format (clock, cone, magnitude).
Returns:
A string representing this instance.Source: Core/Spherical.js, line 173
