Class: Spherical

Spherical

new Spherical(clockopt, coneopt, magnitudeopt)

A set of curvilinear 3-dimensional coordinates.
Parameters:
Name Type Attributes Default Description
clock Number <optional>
0.0 The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
cone Number <optional>
0.0 The angular coordinate measured from the positive z-axis and toward the negative z-axis.
magnitude Number <optional>
1.0 The linear coordinate measured from the origin.
Source:

Methods

(static) clone(spherical, resultopt) → {Spherical}

Creates a duplicate of a Spherical.
Parameters:
Name Type Attributes Description
spherical Spherical The spherical to clone.
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Source:
Returns:
The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)
Type
Spherical

(static) equals(left, right) → {Boolean}

Returns true if the first spherical is equal to the second spherical, false otherwise.
Parameters:
Name Type Description
left Spherical The first Spherical to be compared.
right Spherical The second Spherical to be compared.
Source:
Returns:
true if the first spherical is equal to the second spherical, false otherwise.
Type
Boolean

(static) equalsEpsilon(left, right, epsilonopt) → {Boolean}

Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
Parameters:
Name Type Attributes Default Description
left Spherical The first Spherical to be compared.
right Spherical The second Spherical to be compared.
epsilon Number <optional>
0.0 The epsilon to compare against.
Source:
Returns:
true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
Type
Boolean

(static) fromCartesian3(cartesian3, sphericalopt) → {Spherical}

Converts the provided Cartesian3 into Spherical coordinates.
Parameters:
Name Type Attributes Description
cartesian3 Cartesian3 The Cartesian3 to be converted to Spherical.
spherical Spherical <optional>
The object in which the result will be stored, if undefined a new instance will be created.
Source:
Returns:
The modified result parameter, or a new instance if one was not provided.
Type
Spherical

(static) normalize(spherical, resultopt) → {Spherical}

Computes the normalized version of the provided spherical.
Parameters:
Name Type Attributes Description
spherical Spherical The spherical to be normalized.
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Source:
Returns:
The modified result parameter or a new instance if result was undefined.
Type
Spherical

clone(resultopt) → {Spherical}

Creates a duplicate of this Spherical.
Parameters:
Name Type Attributes Description
result Spherical <optional>
The object to store the result into, if undefined a new instance will be created.
Source:
Returns:
The modified result parameter or a new instance if result was undefined.
Type
Spherical

equals(other) → {Boolean}

Returns true if this spherical is equal to the provided spherical, false otherwise.
Parameters:
Name Type Description
other Spherical The Spherical to be compared.
Source:
Returns:
true if this spherical is equal to the provided spherical, false otherwise.
Type
Boolean

equalsEpsilon(other, epsilon) → {Boolean}

Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
Parameters:
Name Type Description
other Spherical The Spherical to be compared.
epsilon Number The epsilon to compare against.
Source:
Returns:
true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
Type
Boolean

toString() → {String}

Returns a string representing this instance in the format (clock, cone, magnitude).
Source:
Returns:
A string representing this instance.
Type
String