API Docs for: 0.6.1
Show:

AABB Class

Axis aligned bounding box class.

Constructor

AABB

(
  • [options]
)

Parameters:

  • [options] Object optional
    • [upperBound] Vec3 optional
    • [lowerBound] Vec3 optional

Methods

clone

()

Clone an AABB

contains

(
  • aabb
)
Boolean

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

Parameters:

Returns:

Boolean:

copy

(
  • aabb
)
AABB

Copy bounds from an AABB to this AABB

Parameters:

  • aabb AABB

    Source to copy from

Returns:

AABB:

The this object, for chainability

extend

(
  • aabb
)

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

Parameters:

getCorners

(
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
)

Parameters:

overlaps

(
  • aabb
)
Boolean

Returns true if the given AABB overlaps this AABB.

Parameters:

Returns:

Boolean:

setFromPoints

(
  • points
  • position
  • quaternion
  • skinSize
)
AABB

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

Get the representation of an AABB in another frame.

Parameters:

Returns:

AABB:

The "target" AABB object.

toWorldFrame

(
  • frame
  • target
)
AABB

Get the representation of an AABB in the global frame.

Parameters:

Returns:

AABB:

The "target" AABB object.

Properties

lowerBound

Vec3

The lower bound of the bounding box.

upperBound

Vec3

The upper bound of the bounding box.