Class Spherical

Hierarchy

  • Base
    • Spherical

Constructors

  • Create a new instance. The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z..

    Parameters

    • Optional radius: number

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

    • Optional phi: number

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

    • Optional theta: number

      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

  • 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

  • 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