#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# AABB Class

Defined in: `src/collision/AABB.js:6`

Axis aligned bounding box class.

## Constructor

### `AABB`

(

- `[options]`

)

Defined in `src/collision/AABB.js:6`

#### Parameters:

- `[options]` Object optional
  - `[upperBound]` Vec3 optional
  - `[lowerBound]` Vec3 optional

- Index
- Methods
- Properties

## Item Index

### Methods

- clone
- contains
- copy
- extend
- getCorners
- overlaps
- setFromPoints
- toLocalFrame
- toWorldFrame

### Properties

- lowerBound
- upperBound

## Methods

### `clone`

()

Defined in `src/collision/AABB.js:107`

Clone an AABB

### `contains`

(

- `aabb`

)
Boolean

Defined in `src/collision/AABB.js:180`

Returns true if the given AABB is fully contained in this AABB.

#### Parameters:

- `aabb` AABB

#### Returns:

Boolean:

### `copy`

(

- `aabb`

)
AABB

Defined in `src/collision/AABB.js:95`

Copy bounds from an AABB to this AABB

#### Parameters:

- `aabb` AABB

  Source to copy from

#### Returns:

AABB:

The this object, for chainability

### `extend`

(

- `aabb`

)

Defined in `src/collision/AABB.js:115`

Extend this AABB so that it covers the given AABB too.

#### Parameters:

- `aabb` AABB

### `getCorners`

(

- `a`
- `b`
- `c`
- `d`
- `e`
- `f`
- `g`
- `h`

)

Defined in `src/collision/AABB.js:204`

#### Parameters:

- `a` Vec3
- `b` Vec3
- `c` Vec3
- `d` Vec3
- `e` Vec3
- `f` Vec3
- `g` Vec3
- `h` Vec3

### `overlaps`

(

- `aabb`

)
Boolean

Defined in `src/collision/AABB.js:158`

Returns true if the given AABB overlaps this AABB.

#### Parameters:

- `aabb` AABB

#### Returns:

Boolean:

### `setFromPoints`

(

- `points`
- `position`
- `quaternion`
- `skinSize`

)
AABB

Defined in `src/collision/AABB.js:40`

Set the AABB bounds from a set of points.

#### Parameters:

- `points` Array

  An array of Vec3's.

- `position` Vec3
- `quaternion` Quaternion
- `skinSize` Number

#### Returns:

AABB:

The self object

### `toLocalFrame`

(

- `frame`
- `target`

)
AABB

Defined in `src/collision/AABB.js:240`

Get the representation of an AABB in another frame.

#### Parameters:

- `frame` Transform
- `target` AABB

#### Returns:

AABB:

The "target" AABB object.

### `toWorldFrame`

(

- `frame`
- `target`

)
AABB

Defined in `src/collision/AABB.js:271`

Get the representation of an AABB in the global frame.

#### Parameters:

- `frame` Transform
- `target` AABB

#### Returns:

AABB:

The "target" AABB object.

## Properties

### `lowerBound`

Vec3

Defined in `src/collision/AABB.js:17`

The lower bound of the bounding box.

### `upperBound`

Vec3

Defined in `src/collision/AABB.js:27`

The upper bound of the bounding box.