Classes |
struct | SimpleQuaternion |
| Simple quaternion class used in OBB. More...
|
Public Member Functions |
Vec3f | center () const |
| Center of the OBB.
|
bool | contain (const Vec3f &p) const |
| Check whether the OBB contains a point.
|
BVH_REAL | depth () const |
| Depth of the OBB.
|
BVH_REAL | distance (const OBB &other) const |
| The distance between two OBB Not implemented.
|
BVH_REAL | height () const |
| Height of the OBB.
|
| OBB () |
OBB | operator+ (const OBB &other) const |
| Return the merged OBB of current OBB and the other one.
|
OBB & | operator+= (const OBB &other) |
| Merge the OBB and another OBB.
|
OBB & | operator+= (const Vec3f &p) |
| A simple way to merge the OBB and a point, not compact.
|
bool | overlap (const OBB &other, OBB &overlap_part) const |
| Check collision between two OBB and return the overlap part. For OBB, we return nothing, as the overlap part of two obbs usually is not an obb.
|
bool | overlap (const OBB &other) const |
| Check collision between two OBB.
|
BVH_REAL | size () const |
| Size of the OBB, for split order.
|
BVH_REAL | volume () const |
| Volume of the OBB.
|
BVH_REAL | width () const |
| Width of the OBB.
|
Static Public Member Functions |
static bool | obbDisjoint (const Vec3f B[3], const Vec3f &T, const Vec3f &a, const Vec3f &b) |
Public Attributes |
Vec3f | axis [3] |
| Orientation of OBB.
|
Vec3f | extent |
| Half dimensions of OBB.
|
Vec3f | To |
| center of OBB
|
Private Member Functions |
void | computeVertices (Vec3f vertex[8]) const |
Static Private Member Functions |
static void | getCovariance (Vec3f *ps, int n, Vec3f M[3]) |
| Compute the variance of the vertex points of two OBBs.
|
static void | getExtentAndCenter (Vec3f *ps, int n, Vec3f axis[3], Vec3f ¢er, Vec3f &extent) |
| Compute the extent and center for the OBB merge two smaller OBBs.
|
static void | Meigen (Vec3f a[3], BVH_REAL dout[3], Vec3f vout[3]) |
| Compute the eigen values and vectors for matrix a.
|
static OBB | merge_largedist (const OBB &b1, const OBB &b2) |
| OBB merge method when the centers of two smaller OBB are far away.
|
static OBB | merge_smalldist (const OBB &b1, const OBB &b2) |
| OBB merge method when the centers of two smaller OBB are close.
|