Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

BoundingBox Class Reference
[GLT Math]

Axis-Aligned 3D Bounding Box Class. More...

#include <bbox.h>

Collaboration diagram for BoundingBox:

Collaboration graph
List of all members.

Public Methods

 BoundingBox ()
 Default constructor.

 BoundingBox (const Vector &min, const Vector &max)

bool & defined ()

const bool defined () const

Vectormin ()
 Minimum x,y,z.

const Vectormin () const
 Minimum x,y,z.

Vectormax ()
 Minimum x,y,z.

const Vectormax () const
 Minimum x,y,z.

Vector center () const
 Box center.

real width () const
 Box width (Xmax - Xmin).

real height () const
 Box height (Ymax - Ymin).

real depth () const
 Box depth (Zmax - Zmin).

void points (std::vector< Vector > &p) const
 Extract the 8 corners of the box.

void reset ()
 Empty set (undefined).

BoundingBox & operator+= (const Vector &p)
 Boolean union.

BoundingBox & operator+= (const std::vector< Vector > &p)
 Boolean union.

BoundingBox & operator+= (const BoundingBox &box)
 Boolean union.

BoundingBox & operator *= (const BoundingBox &box)
 Boolean intersection.

bool operator== (const BoundingBox &box) const
 Box equality operator.

bool inside (const Vector &pos) const
 Volumetric classification.

bool intersects (const BoundingBox &box) const
 Intersection between boxes.

bool project (const Matrix &model, const Matrix &proj, const GltViewport &view)
 Map object co-ordinates to window co-ordinates.

Protected Attributes

bool _defined
 Is the bounding box undefined?

Vector _min
 Box minimum.

Vector _max
 Box maximum.


std::ostream & operator<< (std::ostream &os, const BoundingBox &b)
 Output AAB to stream.

BoundingBox sum (const BoundingBox &a, const BoundingBox &b)
 Union of two axis aligned bounding boxes.

BoundingBox intersection (const BoundingBox &a, const BoundingBox &b)
 Intersection of two axis aligned bounding boxes.

Detailed Description

Axis-Aligned 3D Bounding Box Class.

Rename BoundingBox to AABB (Axis-Aligned Bounding Box?)

Definition at line 46 of file bbox.h.

The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:41 2002 for GLT by doxygen1.2.18