Skip to main content

aabb

An Axis Aligned Bounding Box, or AABB for short.

They take the form of a dictionary with the following keys:

  • low vector: Min. bounds vector
  • high vector: Max. bounds vector

The following functions are in the aabb module.

aabb

aabb() -> aabb 

Compute an axis aligned bounding box (aabb) for a list of vectors.

List of vectors.

init:

Default: none

Initial aabb

mid

mid() -> vector 

Get the mid-point of an AABB as vector.

bounds:

The AABB to get the mid-point of.

size

size() -> vector 

Get the size of an aabb as vector. This is a vector from the aabb's low to high.

bounds:

The aabb to get the size of.

padded

padded() -> aabb 

Pad AABB with padding from dictionary with keys top, left, right and bottom.

bounds:

The AABB to pad.

padding:

Padding values