Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CBoundingBox3D Class Reference

#include <CBoundingBox3D.h>

Inheritance diagram for CBoundingBox3D::

STQGLViewerBoundingBox List of all members.

Public Methods

 CBoundingBox3D (void)
 CBoundingBox3D (double, double, double, double, double, double)
 CBoundingBox3D (const CP3D &minVec, const CP3D &maxVec)
 CBoundingBox3D (const CP4D &minVec, const CP4D &maxVec)
 CBoundingBox3D (const CBoundingBox3D &bbox)
void CommonConstructor (CP3D, CP3D)
 ~CBoundingBox3D ()
void setBBox (CBoundingBox3D &bbox)
const CBoundingBox3D & operator= (const CBoundingBox3D &bbox)
CBoundingBox3D operator+ (const CBoundingBox3D &bbox) const
CBoundingBox3D & operator+= (const CBoundingBox3D &bbox)
void addPoint (const CP3D &)
void addPoint (const CP4D &)
void move (const CV3D &)
void scale (const CV3D &)
CP3D getLowerLeft () const
CP3D getUpperRight () const
CP3D getCornerVertex (int) const
double getSize (int) const
double getMinSize (void) const
double getMaxSize (void) const
const CP3D getCenter (void) const
double getCenter (int nDimension)
double getOuterRadius (void) const
double getInnerRadius (void) const
double getDiagonal (void) const
double getVolume (void) const
bool isInside (const CP3D &) const
bool isInside (const CP4D &) const
bool operator== (const CBoundingBox3D &cSource) const
void print (void) const

Static Public Attributes

double epsilon = 1e-6

Protected Attributes

CP3D m_LowerLeft
CP3D m_UpperRight

Friends

ostream & operator<< (ostream &, const CBoundingBox3D &)
istream & operator>> (istream &, CBoundingBox3D &)

Detailed Description

This class provides a interface to a 3D bounding box.

Author:
Rainer Jaeger and Michael Meissner


Constructor & Destructor Documentation

CBoundingBox3D::CBoundingBox3D void   [inline]
 

default constructor (Bounding box will be set to 0,0,0 to 0,0,0.

CBoundingBox3D::CBoundingBox3D double   rdXmin,
double   rdYmin,
double   rdZmin,
double   rdXmax,
double   rdYmax,
double   rdZmax
 

Constructor using the two given points. The minimum and the maximum of all components of these points will be used to set the bounding box.

CBoundingBox3D::CBoundingBox3D const CP3D &   minPnt,
const CP3D &   maxPnt
 

Constructor using the two given points. The minimum and the maximum of all components of these points will be used to set the bounding box.

CBoundingBox3D::CBoundingBox3D const CP4D &   minVec,
const CP4D &   maxVec
 

Constructor using the two given points. The minimum and the maximum of all components of these points will be used to set the bounding box.

CBoundingBox3D::CBoundingBox3D const CBoundingBox3D &   bbox
 

copy constructor.

CBoundingBox3D::~CBoundingBox3D  
 

default destructor.


Member Function Documentation

void CBoundingBox3D::CommonConstructor CP3D   Point1,
CP3D   Point2
 

Initializes common stuff, called by all constructors.

void CBoundingBox3D::addPoint const CP4D &   point
 

Adds the specified point to the bounding box, extending it, to include the point.

void CBoundingBox3D::addPoint const CP3D &   point
 

Adds the specified point to the bounding box, extending it, to include the point.

double CBoundingBox3D::getCenter int   nDimension [inline]
 

Returns the center of the bounding box in the specified dimension.

const CP3D CBoundingBox3D::getCenter void   const
 

Returns the center of the bounding box.

CP3D CBoundingBox3D::getCornerVertex int   i const
 

Returns the corner vertex. 0=000 (xyz), 1=100, 2=010, 3=110, 4=001, 5=101, 6=011, 7=111.

double CBoundingBox3D::getDiagonal void   const
 

Returns the radius of the maximum sphere being enclosing in the bounding box.

double CBoundingBox3D::getInnerRadius void   const [inline]
 

Returns the radius of the maximum sphere being enclosing in the bounding box.

CP3D CBoundingBox3D::getLowerLeft   const [inline]
 

Returns the lower left corner point of the bounding box.

double CBoundingBox3D::getMaxSize void   const
 

Returns the maximum of the range in all dimensions.

double CBoundingBox3D::getMinSize void   const
 

Returns the minimum of the range in all dimensions.

double CBoundingBox3D::getOuterRadius void   const [inline]
 

Returns the radius of the minimal sphere enclosing the bounding box.

double CBoundingBox3D::getSize int   nDimension const
 

Returns the range in the given dimension.

CP3D CBoundingBox3D::getUpperRight   const [inline]
 

Returns the upper right corner point of the bounding box.

double CBoundingBox3D::getVolume void   const
 

Returns the radius of the maximum sphere being enclosing in the bounding box.

bool CBoundingBox3D::isInside const CP4D &   Point const
 

Returns whether a point/vector is within the bounding box.

bool CBoundingBox3D::isInside const CP3D &   Point const
 

Returns whether a point/vector is within the bounding box.

void CBoundingBox3D::move const CV3D &   v
 

Move the bounding box by the specified vector.

CBoundingBox3D CBoundingBox3D::operator+ const CBoundingBox3D &   bbox const
 

operator+ returns sum of both bounding boxes.

CBoundingBox3D & CBoundingBox3D::operator+= const CBoundingBox3D &   bbox
 

operator+= adds specified bounding box to this.

const CBoundingBox3D & CBoundingBox3D::operator= const CBoundingBox3D &   bbox
 

operator= assigns specified bounding box to this.

bool CBoundingBox3D::operator== const CBoundingBox3D &   cSource const [inline]
 

Compares two bounding boxes.

void CBoundingBox3D::print void   const
 

Prints the parameters of CBoundingBox3D to standard out.

void CBoundingBox3D::scale const CV3D &   v
 

Scale the bounding box by the specified vector. CV3D(1.0, 1.0, 1.0) would let the bounding box unmodified, negative components of the vector are illegal but are not checked against.

void CBoundingBox3D::setBBox CBoundingBox3D &   bbox
 

Set the bounding box to the specified bounding box.


Friends And Related Function Documentation

ostream& operator<< ostream &   s,
const CBoundingBox3D &   bbox
[friend]
 

Same as above. But more useful for streams.

istream& operator>> istream &   s,
CBoundingBox3D &   bbox
[friend]
 

Reads a vector from the given stream.


Member Data Documentation

double CBoundingBox3D::epsilon = 1e-6 [static]
 

documentation stuff

Author:
Rainer Jaeger, Michael Meissner
Version:
0.0 //see cvs docu

CP3D CBoundingBox3D::m_LowerLeft [protected]
 

CP3D CBoundingBox3D::m_UpperRight [protected]
 


The documentation for this class was generated from the following files:
Generated at Thu Oct 4 17:17:28 2001 for QGLViewer by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001