$search

collision_checking::OBB Class Reference

OBB class. More...

#include <obb.h>

List of all members.

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.
OBBoperator+= (const OBB &other)
 Merge the OBB and another OBB.
OBBoperator+= (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 &center, 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.

Detailed Description

OBB class.

Definition at line 51 of file obb.h.


Constructor & Destructor Documentation

collision_checking::OBB::OBB (  )  [inline]

Definition at line 93 of file obb.h.


Member Function Documentation

Vec3f collision_checking::OBB::center (  )  const [inline]

Center of the OBB.

Definition at line 153 of file obb.h.

void collision_checking::OBB::computeVertices ( Vec3f  vertex[8]  )  const [private]

Compute the 8 vertices of a OBB

Definition at line 479 of file obb.cpp.

bool collision_checking::OBB::contain ( const Vec3f p  )  const [inline]

Check whether the OBB contains a point.

Definition at line 154 of file obb.cpp.

BVH_REAL collision_checking::OBB::depth (  )  const [inline]

Depth of the OBB.

Definition at line 135 of file obb.h.

BVH_REAL collision_checking::OBB::distance ( const OBB other  )  const [inline]

The distance between two OBB Not implemented.

Definition at line 161 of file obb.h.

void collision_checking::OBB::getCovariance ( Vec3f ps,
int  n,
Vec3f  M[3] 
) [static, private]

Compute the variance of the vertex points of two OBBs.

Definition at line 495 of file obb.cpp.

void collision_checking::OBB::getExtentAndCenter ( Vec3f ps,
int  n,
Vec3f  axis[3],
Vec3f center,
Vec3f extent 
) [static, private]

Compute the extent and center for the OBB merge two smaller OBBs.

Definition at line 610 of file obb.cpp.

BVH_REAL collision_checking::OBB::height (  )  const [inline]

Height of the OBB.

Definition at line 129 of file obb.h.

void collision_checking::OBB::Meigen ( Vec3f  a[3],
BVH_REAL  dout[3],
Vec3f  vout[3] 
) [static, private]

Compute the eigen values and vectors for matrix a.

Definition at line 523 of file obb.cpp.

OBB collision_checking::OBB::merge_largedist ( const OBB b1,
const OBB b2 
) [static, private]

OBB merge method when the centers of two smaller OBB are far away.

Definition at line 643 of file obb.cpp.

OBB collision_checking::OBB::merge_smalldist ( const OBB b1,
const OBB b2 
) [static, private]

OBB merge method when the centers of two smaller OBB are close.

Definition at line 690 of file obb.cpp.

bool collision_checking::OBB::obbDisjoint ( const Vec3f  B[3],
const Vec3f T,
const Vec3f a,
const Vec3f b 
) [static]

Kernel check whether two OBB are disjoint

Definition at line 202 of file obb.cpp.

OBB collision_checking::OBB::operator+ ( const OBB other  )  const

Return the merged OBB of current OBB and the other one.

Definition at line 186 of file obb.cpp.

OBB& collision_checking::OBB::operator+= ( const OBB other  )  [inline]

Merge the OBB and another OBB.

Definition at line 113 of file obb.h.

OBB & collision_checking::OBB::operator+= ( const Vec3f p  ) 

A simple way to merge the OBB and a point, not compact.

A simple way to add new point to the OBB, not compact.

Definition at line 173 of file obb.cpp.

bool collision_checking::OBB::overlap ( const OBB other,
OBB overlap_part 
) const [inline]

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.

Definition at line 101 of file obb.h.

bool collision_checking::OBB::overlap ( const OBB other  )  const

Check collision between two OBB.

Definition at line 137 of file obb.cpp.

BVH_REAL collision_checking::OBB::size (  )  const [inline]

Size of the OBB, for split order.

Definition at line 147 of file obb.h.

BVH_REAL collision_checking::OBB::volume (  )  const [inline]

Volume of the OBB.

Definition at line 141 of file obb.h.

BVH_REAL collision_checking::OBB::width (  )  const [inline]

Width of the OBB.

Definition at line 123 of file obb.h.


Member Data Documentation

Orientation of OBB.

Definition at line 85 of file obb.h.

Half dimensions of OBB.

Definition at line 91 of file obb.h.

center of OBB

Definition at line 88 of file obb.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


collision_checking
Author(s): Jia Pan, Dinesh Manocha (UNC, Chapel Hill)
autogenerated on Fri Mar 1 14:57:00 2013