FCL
0.6.0
Flexible Collision Library
|
A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points. More...
#include <AABB.h>
Public Types | |
using | S = S_ |
Public Member Functions | |
AABB () | |
Creating an AABB with zero size (low bound +inf, upper bound -inf) | |
AABB (const Vector3< S > &v) | |
Creating an AABB at position v with zero size. | |
AABB (const Vector3< S > &a, const Vector3< S > &b) | |
Creating an AABB with two endpoints a and b. | |
AABB (const AABB< S > &core, const Vector3< S > &delta) | |
Creating an AABB centered as core and is of half-dimension delta. | |
AABB (const Vector3< S > &a, const Vector3< S > &b, const Vector3< S > &c) | |
Creating an AABB contains three points. | |
bool | overlap (const AABB< S > &other) const |
Check whether two AABB are overlap. | |
bool | contain (const AABB< S > &other) const |
Check whether the AABB contains another AABB. | |
bool | axisOverlap (const AABB< S > &other, int axis_id) const |
Check whether two AABB are overlapped along specific axis. | |
bool | overlap (const AABB< S > &other, AABB< S > &overlap_part) const |
Check whether two AABB are overlap and return the overlap part. | |
bool | contain (const Vector3< S > &p) const |
Check whether the AABB contains a point. | |
AABB< S > & | operator+= (const Vector3< S > &p) |
Merge the AABB and a point. | |
AABB< S > & | operator+= (const AABB< S > &other) |
Merge the AABB and another AABB. | |
AABB< S > | operator+ (const AABB< S > &other) const |
Return the merged AABB of current AABB and the other one. | |
S | width () const |
Width of the AABB. | |
S | height () const |
Height of the AABB. | |
S | depth () const |
Depth of the AABB. | |
S | volume () const |
Volume of the AABB. | |
S | size () const |
Size of the AABB (used in BV_Splitter to order two AABBs) | |
S | radius () const |
Radius of the AABB. | |
Vector3< S > | center () const |
Center of the AABB. | |
S | distance (const AABB< S > &other, Vector3< S > *P, Vector3< S > *Q) const |
Distance between two AABBs; P and Q, should not be nullptr, return the nearest points. | |
S | distance (const AABB< S > &other) const |
Distance between two AABBs. | |
bool | equal (const AABB< S > &other) const |
whether two AABB are equal | |
AABB< S > & | expand (const Vector3< S > &delta) |
expand the half size of the AABB by delta, and keep the center unchanged. | |
AABB< S > & | expand (const AABB< S > &core, S ratio) |
expand the aabb by increase the thickness of the plate by a ratio | |
Public Attributes | |
Vector3< S > | min_ |
The min point in the AABB. | |
Vector3< S > | max_ |
The max point in the AABB. | |
A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points.