Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

BBox Class Reference

#include <BBox.H>

List of all members.

Public Member Functions

 BBox ()
 BBox (const BBox &bb)
 BBox (BBox *bb)
virtual ~BBox ()
void addPt (const Wpt p)
 enlarge the bbox if necessary to contain this point

void addBBox (const BBox b2)
 enlarge the bbox if necessary to contain this other bbox

void addBBox (BBox *const b2)
 enlarge the bbox if necessary to contain this other bbox

void reset ()
 reset the bbox to be a point

Wpt minPt () const
Wpt maxPt () const
Wpt center () const
double volume ()
double volume (const Wtransf m)
 volume of the bbox transformed by m

int contains (const Wpt pt)
 for intersection tests - return true if pt lies within the bbox

int contains (const Wpt pt, const Wtransf xform)
void transformBox (const Wtransf transform)
 transform a bounding box by a given transformation

void drawBox (const GLfloat x1, const GLfloat y1, const GLfloat z1, const GLfloat x2, const GLfloat y2, const GLfloat z2)
 draw a rectangular box with these outer x, y, and z values

void draw ()
void print ()

Protected Attributes

Wpt _minPt
Wpt _maxPt
int _empty


Detailed Description

may be associated with a drawObj.. not a drawObj itself.. all methods work in a local coordinate system - push appropriate xform onto stack before calling draw(), also transform any points to local coordinates before calling contains..


Constructor & Destructor Documentation

BBox::BBox  )  [inline]
 

BBox::BBox const BBox bb  )  [inline]
 

BBox::BBox BBox bb  )  [inline]
 

virtual BBox::~BBox  )  [inline, virtual]
 


Member Function Documentation

void BBox::addBBox BBox *const   b2  )  [inline]
 

enlarge the bbox if necessary to contain this other bbox

void BBox::addBBox const BBox  b2  )  [inline]
 

enlarge the bbox if necessary to contain this other bbox

void BBox::addPt const Wpt  p  )  [inline]
 

enlarge the bbox if necessary to contain this point

Wpt BBox::center  )  const [inline]
 

int BBox::contains const Wpt  pt,
const Wtransf  xform
[inline]
 

for intersection tests - return true if pt lies within the bbox transformed by xform

int BBox::contains const Wpt  pt  )  [inline]
 

for intersection tests - return true if pt lies within the bbox

void BBox::draw  )  [inline]
 

draws the bounding box. this does not alter the GL state - it is safe for G3D.

void BBox::drawBox const GLfloat  x1,
const GLfloat  y1,
const GLfloat  z1,
const GLfloat  x2,
const GLfloat  y2,
const GLfloat  z2
[inline]
 

draw a rectangular box with these outer x, y, and z values

Wpt BBox::maxPt  )  const [inline]
 

Wpt BBox::minPt  )  const [inline]
 

void BBox::print  )  [inline]
 

void BBox::reset  )  [inline]
 

reset the bbox to be a point

void BBox::transformBox const Wtransf  transform  )  [inline]
 

transform a bounding box by a given transformation

double BBox::volume const Wtransf  m  )  [inline]
 

volume of the bbox transformed by m

double BBox::volume  )  [inline]
 


Member Data Documentation

int BBox::_empty [protected]
 

Wpt BBox::_maxPt [protected]
 

Wpt BBox::_minPt [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Jul 8 15:19:29 2004 for inspace by doxygen 1.3.4