Class Spherical
Hierarchy
- Spherical
Index
Constructors
Properties
Methods
- add
- add
In Place - add
In Place From Floats - add
To Ref - as
Array - clone
- copy
From - copy
From Floats - divide
- divide
In Place - divide
To Ref - get
Class Name - multiply
- multiply
In Place - multiply
To Ref - scale
- scale
In Place - scale
To Ref - set
- set
All - subtract
- subtract
From Floats - subtract
From Floats To Ref - subtract
In Place - subtract
To Ref - to
String - to
Vector3 - to
Vector3 To Ref - From
Array - From
Vector3 - From
Vector3 To Ref
Constructors
constructor
Parameters
radius: number
spherical radius
theta: number
angle from positive y axis to radial line from 0 to PI (vertical)
phi: number
angle from positive x axis measured anticlockwise from -PI to PI (horizontal)
Returns Spherical
Properties
phiSearch playground for phi
radiusSearch playground for radius
thetaSearch playground for theta
Methods
addSearch playground for add
add In PlaceSearch playground for addInPlace
add In Place From FloatsSearch playground for addInPlaceFromFloats
Adds the provided values to the current spherical
Parameters
radius: number
the amount to add to the radius
theta: number
the amount to add to the theta
phi: number
the amount to add to the phi
Returns Spherical
the current spherical
add To RefSearch playground for addToRef
as ArraySearch playground for asArray
Converts the current spherical to an array
Returns number[]
cloneSearch playground for clone
Clones the current spherical
Returns Spherical
a clone of the current spherical
copy FromSearch playground for copyFrom
copy From FloatsSearch playground for copyFromFloats
Copies the given values into the current spherical
Parameters
radius: number
the radius to use
theta: number
the theta to use
phi: number
the phi to use
Returns Spherical
the current spherical
divideSearch playground for divide
divide In PlaceSearch playground for divideInPlace
divide To RefSearch playground for divideToRef
get Class NameSearch playground for getClassName
Gets the class name
Returns string
the string "Spherical"
multiplySearch playground for multiply
multiply In PlaceSearch playground for multiplyInPlace
multiply To RefSearch playground for multiplyToRef
scaleSearch playground for scale
Scales the current spherical and returns a new spherical with the scaled coordinates
Parameters
scale: number
defines the multiplication factor
Returns Spherical
the scaled spherical
scale In PlaceSearch playground for scaleInPlace
Scales the current spherical
Parameters
scale: number
defines the multiplication factor
Returns Spherical
the current spherical
scale To RefSearch playground for scaleToRef
setSearch playground for set
Sets the values of the current spherical
Parameters
radius: number
the new radius
theta: number
the new theta
phi: number
the new phi
Returns Spherical
the current spherical
set AllSearch playground for setAll
Sets the values of the current spherical
Parameters
value: number
the new values
Returns Spherical
the current spherical
subtractSearch playground for subtract
subtract From FloatsSearch playground for subtractFromFloats
Subtracts the given floats from the current spherical
Parameters
radius: number
the amount to subtract from the radius
theta: number
the amount to subtract from the theta
phi: number
the amount to subtract from the phi
Returns Spherical
the difference spherical
subtract From Floats To RefSearch playground for subtractFromFloatsToRef
Subtracts the given floats from the current spherical
Parameters
radius: number
the amount to subtract from the radius
theta: number
the amount to subtract from the theta
phi: number
the amount to subtract from the phi
ref: Spherical
the spherical to store the result in
Returns Spherical
the updated ref
subtract In PlaceSearch playground for subtractInPlace
subtract To RefSearch playground for subtractToRef
to StringSearch playground for toString
Converts the current spherical to a string
Returns string
the current spherical as a string
to Vector3Search playground for toVector3
Gets a Vector3 from the current spherical coordinates
Returns Vector3
the (x, y,z) form of the current Spherical
to Vector3 To RefSearch playground for toVector3ToRef
Assigns the rectangular coordinates of the current Spherical to a Vector3
Parameters
ref: DeepImmutableObject<Vector3>
the Vector3 to update
Returns Vector3
the updated Vector3
Static From ArraySearch playground for FromArray
Converts an array of floats to a spherical
Parameters
array: number[]
the array to convert
Returns Spherical
the converted spherical
Static From Vector3Search playground for FromVector3
Gets a Spherical from a Vector3
Parameters
vector: DeepImmutableObject<Vector3>
defines the vector in (x, y, z) coordinate space
Returns Spherical
a new Spherical
Static From Vector3 To RefSearch playground for FromVector3ToRef
Assigns the spherical coordinates from a Vector3
Parameters
vector: DeepImmutableObject<Vector3>
the vector to convert
ref: Spherical
the Spherical to update
Returns Spherical
the updated ref
Class used for (radius, theta, phi) vector representation.