Class Sphere

Constructors

Properties

center: number[]

Gets or sets the center point of the sphere.

diameter: number

Gets or sets the diameter for this sphere.

isValid: boolean

Gets a value that indicates whether the sphere is valid.

northPole: number[]

Gets the point at the North Pole of the sphere. This is the parameterization singularity that can be obtained, at V value +Math.Pi/2.

radius: number

Gets or sets the Radius for this sphere.

southPole: number[]

Gets the point at the South Pole of the sphere. This is the parameterization singularity that can be obtained, at V value -Math.Pi/2.

Methods

  • Parameters

    • testPoint: number[]

      Point to project onto the sphere.

    Returns object

    [boolean, number, number] (boolean) true on success, false on failure. This function will fail if the point it coincident with the sphere center. (number) The longitudinal angle (in radians; 0.0 to 2pi) where the sphere approaches testPoint best. (number) The latitudinal angle (in radians; -0.5pi to +0.5pi) where the sphere approaches testPoint best.

    Description

    Finds the angle parameters on this sphere that are closest to a test point.

  • Parameters

    • testPoint: number[]

      Point to project onto Sphere.

    Returns number[]

    Point on sphere surface closest to testPoint.

    Description

    Returns point on sphere that is closest to given point.

  • Returns object

    A js object.

    Description

    Encodes a sphere to json formatted data.

  • Parameters

    • degrees: number

      An angle in degrees for the meridian.

    Returns Circle

    A circle.

    Description

    Computes the parallel at a specific latitude angle. The angle is specified in degrees.

  • Parameters

    • radians: number

      An angle in radians for the parallel.

    Returns Circle

    A circle.

    Description

    Computes the parallel at a specific latitude angle. The angle is specified in radians.

  • Parameters

    • degrees: number

      An angle in degrees.

    Returns Circle

    A circle.

    Description

    Computes the meridian at a specific longitude angle. The angle is specified in degrees.

  • Parameters

    • radians: number

      An angle in radians.

    Returns Circle

    A circle.

    Description

    Computes the meridian at a specific longitude angle. The angle is specified in radians.

  • Parameters

    • longitudeRadians: number

      A number within the interval [0, 2pi].

    • latitudeRadians: number

      A number within the interval [-pi/2, pi/2].

    Returns number[]

    A vector.

    Description

    Computes the normal at a specific angular location on the sphere.

  • Parameters

    • longitudeRadians: number

      A number within the interval [0, 2pi].

    • latitudeRadians: number

      A number within the interval [-pi/2,pi/2].

    Returns number[]

    A point value.

    Description

    Evaluates the sphere at specific longitude and latitude angles.

  • Returns object

    A js object.

    Description

    Encodes a sphere to json formatted data. Internally calls encode()

  • Returns NurbsSurface

    A nurbs surface representation of this sphere or null.

    Description

    Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().

  • Parameters

    • json: object

      A js object in the following format:

      { 
      Radius: <number>,
      EquatorialPlane: {
      Origin: { X: <number>, Y: <number>, Z: <number> },
      XAxis: { X: <number>, Y: <number>, Z: <number> },
      YAxis: { X: <number>, Y: <number>, Z: <number> },
      ZAxis: { X: <number>, Y: <number>, Z: <number> }
      }
      }

    Returns Sphere

    Description

    Decodes js formated sphere data into a Sphere

Generated using TypeDoc