AABBox

Inherited: None

Description

Bounded volume in space in the form of a rectangular parallelepiped, with a period parallel to the coordinate axes in the world system. When the object rotates, the AABB changes its dimensions, but it always remains oriented along the coordinate axes. Axis Aligned Bounding Box represented by center of box and extent.

Public Methods

AABBox (const Vector3 & center, const Vector3 & extent)

AABBox ()

void

box (Vector3 & min, Vector3 & max) const

void

encapsulate (const Vector3 & position, areal radius = 0.0f)

void

encapsulate (const AABBox & aabb)

bool

intersect (const Vector3 & position, areal radius) const

bool

intersect (const Plane * planes, areal count) const

bool

isValid () const

void

setBox (const Vector3 & min, const Vector3 & max)

void

setBox (const Vector3 * points, int number)

bool

operator!= (const AABBox & box) const

const AABBox

operator* (areal factor) const

const AABBox

operator* (const Vector3 & vector) const

const AABBox

operator* (const Matrix3 & matrix) const

const AABBox

operator* (const Matrix4 & matrix) const

AABBox &

operator*= (const Matrix3 & matrix)

AABBox &

operator*= (const Matrix4 & matrix)

bool

operator== (const AABBox & box) const

Static Methods

None

Methods Description

AABBox::AABBox (Vector3 & center, Vector3 & extent)

Constructs a bounding box with center and extent.


AABBox::AABBox ()

Constructs an bounding box with center (0, 0, 0) and extent (0.5, 0.5, 0.5).


void AABBox::box (Vector3 & min, Vector3 & max) const

Returns min and max points of bounding box as output arguments.

See also setBox().


void AABBox::encapsulate (Vector3 & position, areal radius = 0.0f)

Grow the AABBox to encapsulate a spehere with position and radius.


void AABBox::encapsulate (AABBox & aabb)

Grow the AABBox to encapsulate the aabb.


bool AABBox::intersect (Vector3 & position, areal radius) const

Returns true if this bounding box intersects the given sphere at position and radius; otherwise returns false.


bool AABBox::intersect (Plane * planes, areal count) const

Returns true if this bounding box intersects the given count of planes; otherwise returns false.


bool AABBox::isValid () const

Returns true in case of AABBox is valid; otherwise returns false.


void AABBox::setBox (Vector3 & min, Vector3 & max)

Set current bounding box by min and max points.

See also box().


void AABBox::setBox (Vector3 * points, int number)

Set curent bounding box by provided array of points and number of them.


bool AABBox::operator!= (AABBox & box) const

Returns true if this bounding box is NOT equal to given bounding box; otherwise returns false. This operator uses an exact floating-point comparison.


const AABBox AABBox::operator* (areal factor) const

Returns a copy of this box, multiplied by the given factor.


const AABBox AABBox::operator* (Vector3 & vector) const

Returns a copy of this box, multiplied by the given vector.


const AABBox AABBox::operator* (Matrix3 & matrix) const

Returns a copy of this box, multiplied by the given rotation matrix.


const AABBox AABBox::operator* (Matrix4 & matrix) const

Returns a copy of this box, multiplied by the given transform matrix.


AABBox & matrix)

Multiplies this box by the given rotation matrix, and returns a reference to this vector.


AABBox & matrix)

Multiplies this box by the given transform matrix, and returns a reference to this vector.


bool AABBox::operator== (AABBox & box) const

Returns true if this bounding box is equal to given bounding box; otherwise returns false. This operator uses an exact floating-point comparison.