Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Sphere

A sphere defined by a center and radius. See the ngx3js docs page for details.

Hierarchy

  • Sphere

Index

Constructors

constructor

Properties

center

center: I3JS.Vector3

A Vector3 defining the center of the sphere. Default is (0, 0, 0).

default

new Vector3()

radius

radius: number

The radius of the sphere. Default is -1.

default

1

Methods

applyMatrix4

clampPoint

  • Clamps a point within the sphere. If the point is outside the sphere, it will clamp it to the closest point on the edge of the sphere. Points already inside the sphere will not be affected.

    Parameters

    • point: I3JS.Vector3

      Vector3 The point to clamp.

    • target: I3JS.Vector3

      The result will be copied into this Vector3.

    Returns I3JS.Vector3

clone

containsPoint

copy

distanceToPoint

equals

expandByPoint

getBoundingBox

intersectsBox

intersectsPlane

intersectsSphere

isEmpty

  • isEmpty(): boolean
  • Checks to see if the sphere is empty (the radius set to a negative number).
    Spheres with a radius of 0 contain only their center point and are not considered to be empty.

    Returns boolean

makeEmpty

set

setFromPoints

translate

union

Generated using TypeDoc