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 () |
|
AABBox (const Vector3 & center, const Vector3 & extent) |
|
void |
box (Vector3 & min, Vector3 & max) const |
void |
encapsulate (const AABBox & aabb) |
void |
encapsulate (const Vector3 & position, areal radius = 0.0f) |
bool |
intersect (const Plane & plane) const |
bool |
intersect (const Vector3 & position, areal radius) const |
bool |
isValid () const |
void |
setBox (const Vector3 & min, const Vector3 & max) |
void |
setBox (const Vector3 * points, uint32_t number) |
bool |
operator!= (const AABBox & box) const |
const AABBox |
operator* (areal factor) const |
const AABBox |
operator* (const Matrix3 & matrix) const |
const AABBox |
operator* (const Matrix4 & matrix) const |
const AABBox |
operator* (const Quaternion & quaternion) const |
const AABBox |
operator* (const Vector3 & vector) const |
AABBox & |
operator*= (const Matrix3 & matrix) |
AABBox & |
operator*= (const Matrix4 & matrix) |
AABBox & |
operator*= (const Quaternion & quaternion) |
AABBox & |
operator= (const AABBox & value) |
bool |
operator== (const AABBox & box) const |
Static Methods¶
None
Methods Description¶
AABBox::AABBox ()
Constructs an bounding box with center (0, 0, 0) and extent (0.5, 0.5, 0.5).
AABBox::AABBox (Vector3 & center, Vector3 & extent)
Constructs a bounding box with center and extent.
Returns min and max points of bounding box as output arguments.
See also setBox().
void AABBox::encapsulate (AABBox & aabb)
Grow the AABBox to encapsulate the aabb.
void AABBox::encapsulate (Vector3 & position, areal radius = 0.0f)
Grow the AABBox to encapsulate a spehere with position and radius.
bool AABBox::intersect (Plane & plane) const
Returns true if this bounding box intersects the given plane; otherwise returns false.
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::isValid () const
Returns true in case of AABBox is valid; otherwise returns false.
Set current bounding box by min and max points.
See also box().
void AABBox::setBox (Vector3 * points, uint32_t 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* (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.
const AABBox AABBox::operator* (Quaternion & quaternion) const
Returns a copy of this box, multiplied by the given quaternion.
const AABBox AABBox::operator* (Vector3 & vector) const
Returns a copy of this box, multiplied by the given vector.
Multiplies this box by the given rotation matrix, and returns a reference to this AABB.
Multiplies this box by the given transform matrix, and returns a reference to this AABB.
AABBox & AABBox::operator*= (Quaternion & quaternion)
Multiplies this box by the given quaternion, and returns a reference to this AABB.
Assignment operator. The value will be assigned to this object.
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.