Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AxisAlignedBoundingBox
    • Box

Index

Constructors

constructor

  • new Box(minimum?: Cartesian3, maximum?: Cartesian3, center?: Cartesian3): Box
  • Parameters

    • Optional minimum: Cartesian3
    • Optional maximum: Cartesian3
    • Optional center: Cartesian3

    Returns Box

Properties

center

center: Cartesian3

The center point of the bounding box.

maximum

maximum: Cartesian3

The maximum point defining the bounding box.

minimum

minimum: Cartesian3

The minimum point defining the bounding box.

Methods

addBox

  • addBox(box: AxisAlignedBoundingBox): void
  • addBox

    Parameters

    • box: AxisAlignedBoundingBox

      input.

    Returns void

addPt

  • addPt(pt: Cartesian3): void
  • addPt

    Parameters

    • pt: Cartesian3

      input.

    Returns void

clone

  • clone(result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
  • Duplicates this AxisAlignedBoundingBox instance.

    Parameters

    • Optional result: AxisAlignedBoundingBox

    Returns AxisAlignedBoundingBox

    The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.

equals

  • equals(right?: AxisAlignedBoundingBox): boolean
  • Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.

    Parameters

    • Optional right: AxisAlignedBoundingBox

    Returns boolean

    true if they are equal, false otherwise.

getCornerAry

  • getCornerAry(): Cartesian3[]
  • get corner ary.

    Returns Cartesian3[]

    corner ary

getLength

  • getLength(): number
  • getLength

    Returns number

    len

getTopPlane

  • getTopPlane(): Plane
  • Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns

    Returns Plane

intersectPlane

  • intersectPlane(plane: Plane): Intersect
  • Determines which side of a plane this box is located.

    Parameters

    • plane: Plane

      The plane to test against.

    Returns Intersect

    {@link Intersect.INSIDE} if the entire box is on the side of the plane the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is on the opposite side, and {@link Intersect.INTERSECTING} if the box intersects the plane.

isOverlap

  • isOverlap(box: AxisAlignedBoundingBox): boolean
  • isOverlap

    Parameters

    • box: AxisAlignedBoundingBox

      input.

    Returns boolean

    isOverlap

transformBy

  • transformBy(matrix: Matrix4): AxisAlignedBoundingBox
  • transformBy

    Parameters

    • matrix: Matrix4

      input.

    Returns AxisAlignedBoundingBox

    self.

Static clone

  • clone(box: AxisAlignedBoundingBox, result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
  • Duplicates a AxisAlignedBoundingBox instance.

    Parameters

    • box: AxisAlignedBoundingBox

      The bounding box to duplicate.

    • Optional result: AxisAlignedBoundingBox

    Returns AxisAlignedBoundingBox

    The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)

Static equals

  • equals(left?: AxisAlignedBoundingBox, right?: AxisAlignedBoundingBox): boolean
  • Compares the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.

    Parameters

    • Optional left: AxisAlignedBoundingBox
    • Optional right: AxisAlignedBoundingBox

    Returns boolean

    true if left and right are equal, false otherwise.

Static fromArray

Static fromBoundingSphere

  • fromBoundingSphere(center: Cartesian3, radius: number): AxisAlignedBoundingBox
  • Parameters

    • center: Cartesian3
    • radius: number

    Returns AxisAlignedBoundingBox

Static fromPoints

  • fromPoints(positions: Cartesian3[], result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
  • Computes an instance of an AxisAlignedBoundingBox. The box is determined by finding the points spaced the farthest apart on the x, y, and z axes.

    example

    // Compute an axis aligned bounding box enclosing two points. var box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);

    Parameters

    • positions: Cartesian3[]

      List of points that the bounding box will enclose. Each point must have a x, y, and z properties.

    • Optional result: AxisAlignedBoundingBox

    Returns AxisAlignedBoundingBox

    The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.

Static intersectPlane

  • intersectPlane(box: AxisAlignedBoundingBox, plane: Plane): Intersect
  • Determines which side of a plane a box is located.

    Parameters

    • box: AxisAlignedBoundingBox

      The bounding box to test.

    • plane: Plane

      The plane to test against.

    Returns Intersect

    {@link Intersect.INSIDE} if the entire box is on the side of the plane the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is on the opposite side, and {@link Intersect.INTERSECTING} if the box intersects the plane.

Static toArray