#include <CBoundingBox3D.h>
Inheritance diagram for CBoundingBox3D:
Public Member Functions | |
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 | |
static double | epsilon = 1e-6 |
Protected Attributes | |
CP3D | m_LowerLeft |
CP3D | m_UpperRight |
Friends | |
friend::ostream & | operator<< (::ostream &, const CBoundingBox3D &) |
friend::istream & | operator>> (::istream &, CBoundingBox3D &) |
CBoundingBox3D::CBoundingBox3D | ( | void | ) | [inline] |
default constructor (Bounding box will be set to 0,0,0 to 0,0,0.
CBoundingBox3D::CBoundingBox3D | ( | double | , | |
double | , | |||
double | , | |||
double | , | |||
double | , | |||
double | ||||
) |
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.
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.
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.
void CBoundingBox3D::addPoint | ( | const CP4D & | ) |
Adds the specified point to the bounding box, extending it, to include the point.
void CBoundingBox3D::addPoint | ( | const CP3D & | ) |
Adds the specified point to the bounding box, extending it, to include the point.
Initializes common stuff, called by all constructors.
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 | ) | 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 | ) | 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 & | ) | const |
Returns whether a point/vector is within the bounding box.
bool CBoundingBox3D::isInside | ( | const CP3D & | ) | const |
Returns whether a point/vector is within the bounding box.
void CBoundingBox3D::move | ( | const CV3D & | ) |
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 & | ) |
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.
::ostream& operator<< | ( | ::ostream & | , | |
const CBoundingBox3D & | ||||
) | [friend] |
Same as above. But more useful for streams.
::istream& operator>> | ( | ::istream & | , | |
CBoundingBox3D & | ||||
) | [friend] |
Reads a vector from the given stream.
double CBoundingBox3D::epsilon = 1e-6 [static] |
documentation stuff
CP3D CBoundingBox3D::m_LowerLeft [protected] |
CP3D CBoundingBox3D::m_UpperRight [protected] |