This class can be used to represent points in 3D space as Spherical coordinates.
Constructs a new spherical.
radius
The radius, or the Euclidean distance (straight-line distance) from the point to the origin.
Default is 1.
phi
The polar angle in radians from the y (up) axis.
Default is 0.
theta
The equator/azimuthal angle in radians around the y (up) axis.
Default is 0.
The polar angle in radians from the y (up) axis.
Default is 0.
The radius, or the Euclidean distance (straight-line distance) from the point to the origin.
Default is 1.
The equator/azimuthal angle in radians around the y (up) axis.
Default is 0.
Returns a new spherical with copied values from this instance.
Returns: A clone of this instance.
Copies the values of the given spherical to this instance.
other
The spherical to copy.
Returns: A reference to this spherical.
Restricts the polar angle [page:.phi phi] to be between 0.000001 and pi - 0.000001.
Returns: A reference to this spherical.
Sets the spherical components by copying the given values.
radius
The radius.
phi
The polar angle.
theta
The azimuthal angle.
Returns: A reference to this spherical.
Sets the spherical components from the given Cartesian coordinates.
x
The x value.
y
The y value.
z
The z value.
Returns: A reference to this spherical.
Sets the spherical components from the given vector which is assumed to hold Cartesian coordinates.
v
The vector to set.
Returns: A reference to this spherical.