Hierarchy

  • Base
    • Spherical

Constructors

  • new Spherical(radius?: number, phi?: number, theta?: number): Spherical
  • Create a new instance. The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z..

    Parameters

    • radius: number = 1

      The radius, or the Euclidean distance (straight-line distance) from the point to the origin. Default is 1.0

    • phi: number = 0

      Polar angle in radians from the y (up) axis. Default is 0.

    • theta: number = 0

      Equator angle in radians around the y (up) axis. Default is 0.

    Returns Spherical

Properties

phi: number

Polar angle in radians from the y (up) axis. Default is 0.

radius: number

The radius, or the Euclidean distance (straight-line distance) from the point to the origin. Default is 1.0.

theta: number

Equator angle in radians around the y (up) axis. Default is 0.

Accessors

  • get isBox2(): boolean
  • Returns boolean

  • get isBox3(): boolean
  • Returns boolean

  • get isColor(): boolean
  • Returns boolean

  • get isCylindrical(): boolean
  • Returns boolean

  • get isEuler(): boolean
  • Returns boolean

  • get isLine3(): boolean
  • Returns boolean

  • get isMatrix3(): boolean
  • Returns boolean

  • get isMatrix4(): boolean
  • Returns boolean

  • get isPlane(): boolean
  • Returns boolean

  • get isQuaternion(): boolean
  • Returns boolean

  • get isRay(): boolean
  • Returns boolean

  • get isSphere(): boolean
  • Returns boolean

  • get isSpherical(): boolean
  • Read-only flag to check if a given object is of type Spherical.

    Returns boolean

  • get isTriangle(): boolean
  • Returns boolean

  • get isVector2(): boolean
  • Returns boolean

  • get isVector3(): boolean
  • Returns boolean

  • get isVector4(): boolean
  • Returns boolean

Methods

  • Create a new spherical with the same radius, phi and theta properties as this one.

    Returns

    A new Spherical instance

    Returns Spherical

  • Copies the values of the passed Spherical's radius, phi and theta properties to this spherical.

    Returns

    This instance.

    Parameters

    • other: Spherical

      A spherical to copy properties from.

    Returns Spherical

  • Restricts the polar angle phi to be between 0.000001 and pi - 0.000001.

    Returns

    This instance.

    Returns Spherical

  • set(radius: number, phi: number, theta: number): Spherical
  • Sets values of this spherical's radius, phi and theta properties.

    Returns

    This instance.

    Parameters

    • radius: number

      The radius, or the Euclidean distance (straight-line distance) from the point to the origin.

    • phi: number

      Polar angle in radians from the y (up) axis.

    • theta: number

      Equator angle in radians around the y (up) axis.

    Returns Spherical

  • setFromCartesianCoords(x: number, y: number, z: number): Spherical
  • Sets values of this spherical's radius, phi and theta properties from Cartesian coordinates.

    Returns

    This instance.

    Parameters

    • x: number

      The X coordinate.

    • y: number

      The Y coordinate.

    • z: number

      The Z coordinate.

    Returns Spherical

  • Sets values of this spherical's radius, phi and theta properties from the Vector3.

    Returns

    This instance.

    Parameters

    Returns Spherical