Oriented bounding box class. More...
#include <OBB.h>
Public Types | |
using | S = S_ |
Public Member Functions | |
const Vector3< S > | center () const |
Center of the OBB. More... | |
bool | contain (const Vector3< S > &p) const |
Check whether the OBB contains a point. More... | |
S | depth () const |
Depth of the OBB. More... | |
S | distance (const OBB &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const |
Distance between two OBBs, not implemented. More... | |
S | height () const |
Height of the OBB. More... | |
OBB () | |
Constructor. More... | |
OBB (const Matrix3< S > &axis, const Vector3< S > ¢er, const Vector3< S > &extent) | |
Constructor. More... | |
OBB< S > | operator+ (const OBB< S > &other) const |
Return the merged OBB of current OBB and the other one (the result is not compact). More... | |
OBB< S > & | operator+= (const OBB< S > &other) |
Merge the OBB and another OBB (the result is not compact). More... | |
OBB< S > & | operator+= (const Vector3< S > &p) |
A simple way to merge the OBB and a point (the result is not compact). More... | |
bool | overlap (const OBB< S > &other) const |
Check collision between two OBB, return true if collision happens. More... | |
bool | overlap (const OBB< S > &other, OBB< S > &overlap_part) const |
Check collision between two OBB and return the overlap part. For OBB, the overlap_part return value is NOT used as the overlap part of two obbs usually is not an obb. More... | |
S | size () const |
Size of the OBB (used in BV_Splitter to order two OBBs) More... | |
S | volume () const |
Volume of the OBB. More... | |
S | width () const |
Width of the OBB. More... | |
Public Attributes | |
Matrix3< S > | axis |
Orientation of OBB. The axes of the rotation matrix are the principle directions of the box. We assume that the first column corresponds to the axis with the longest box edge, second column corresponds to the shorter one and the third coulumn corresponds to the shortest one. More... | |
Vector3< S > | extent |
Half dimensions of OBB. More... | |
Vector3< S > | To |
Center of OBB. More... | |
Oriented bounding box class.
Orientation of OBB. The axes of the rotation matrix are the principle directions of the box. We assume that the first column corresponds to the axis with the longest box edge, second column corresponds to the shorter one and the third coulumn corresponds to the shortest one.