# AxisAlignedBoundingBox

#### new Cesium.AxisAlignedBoundingBox(minimum, maximum, center)
engine/Source/Core/AxisAlignedBoundingBox.js 19

Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.

Name | Type | Default | Description
--- | --- | --- | ---
`minimum` | Cartesian3 | `Cartesian3.ZERO` | optional The minimum point along the x, y, and z axes.
`maximum` | Cartesian3 | `Cartesian3.ZERO` | optional The maximum point along the x, y, and z axes.
`center` | Cartesian3 |  | optional The center of the box; automatically computed if not supplied.

##### See:

- BoundingSphere
- BoundingRectangle

### Members

#### center : Cartesian3
engine/Source/Core/AxisAlignedBoundingBox.js 45

The center point of the bounding box.

#### maximum : Cartesian3
engine/Source/Core/AxisAlignedBoundingBox.js 32

The maximum point defining the bounding box.

Default Value: ``Cartesian3.ZERO``

#### minimum : Cartesian3
engine/Source/Core/AxisAlignedBoundingBox.js 25

The minimum point defining the bounding box.

Default Value: ``Cartesian3.ZERO``

### Methods

#### static Cesium.AxisAlignedBoundingBox.clone(box, result) → AxisAlignedBoundingBox
engine/Source/Core/AxisAlignedBoundingBox.js 146

Duplicates a AxisAlignedBoundingBox instance.

Name | Type | Description
--- | --- | ---
`box` | AxisAlignedBoundingBox | The bounding box to duplicate.
`result` | AxisAlignedBoundingBox | optional The object onto which to store the result.

##### Returns:

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

#### static Cesium.AxisAlignedBoundingBox.equals(left, right) → boolean
engine/Source/Core/AxisAlignedBoundingBox.js 169

Compares the provided AxisAlignedBoundingBox componentwise and returns `true` if they are equal, `false` otherwise.

Name | Type | Description
--- | --- | ---
`left` | AxisAlignedBoundingBox | optional The first AxisAlignedBoundingBox.
`right` | AxisAlignedBoundingBox | optional The second AxisAlignedBoundingBox.

##### Returns:

`true` if left and right are equal, `false` otherwise.

#### static Cesium.AxisAlignedBoundingBox.fromCorners(minimum, maximum, result) → AxisAlignedBoundingBox
engine/Source/Core/AxisAlignedBoundingBox.js 60

Creates an instance of an AxisAlignedBoundingBox from its corners.

Name | Type | Description
--- | --- | ---
`minimum` | Cartesian3 | The minimum point along the x, y, and z axes.
`maximum` | Cartesian3 | The maximum point along the x, y, and z axes.
`result` | AxisAlignedBoundingBox | optional The object onto which to store the result.

##### Returns:

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

##### Example:

    // Compute an axis aligned bounding box from the two corners.
    const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));

#### static Cesium.AxisAlignedBoundingBox.fromPoints(positions, result) → AxisAlignedBoundingBox
engine/Source/Core/AxisAlignedBoundingBox.js 89

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.

Name | Type | Description
--- | --- | ---
`positions` | Array.<Cartesian3> | List of points that the bounding box will enclose. Each point must have a `x`, `y`, and `z` properties.
`result` | AxisAlignedBoundingBox | optional The object onto which to store the result.

##### Returns:

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

##### Example:

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

#### static Cesium.AxisAlignedBoundingBox.intersectPlane(box, plane) → Intersect
engine/Source/Core/AxisAlignedBoundingBox.js 191

Determines which side of a plane a box is located.

Name | Type | Description
--- | --- | ---
`box` | AxisAlignedBoundingBox | The bounding box to test.
`plane` | Plane | The plane to test against.

##### Returns:

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

#### clone(result) → AxisAlignedBoundingBox
engine/Source/Core/AxisAlignedBoundingBox.js 232

Duplicates this AxisAlignedBoundingBox instance.

Name | Type | Description
--- | --- | ---
`result` | AxisAlignedBoundingBox | optional The object onto which to store the result.

##### Returns:

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

#### equals(right) → boolean
engine/Source/Core/AxisAlignedBoundingBox.js 256

Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns `true` if they are equal, `false` otherwise.

Name | Type | Description
--- | --- | ---
`right` | AxisAlignedBoundingBox | optional The right hand side AxisAlignedBoundingBox.

##### Returns:

`true` if they are equal, `false` otherwise.

#### intersectPlane(plane) → Intersect
engine/Source/Core/AxisAlignedBoundingBox.js 245

Determines which side of a plane this box is located.

Name | Type | Description
--- | --- | ---
`plane` | Plane | The plane to test against.

##### Returns:

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

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.