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

AABB Class Reference

Class representing an axis-aligned bounding box (AABB). More...

#include <aabb.h>

List of all members.

Public Member Functions

 AABB ()
 Default constructor, initializing the box to the degenerate case of minimum=+inf, maximum=-inf.
 AABB (const Point &p)
 Constructor initializing the box to a single points.
 AABB (const Point &p1, const Point &p2)
 Constructor initializing the box to include two points.
 AABB (const Point &p1, const Point &p2, const Point &p3)
 Constructor initializing the box to include three points.
virtual ~AABB ()
 Destructor.
void init (const Point &p)
 Initializes the bounding box to a single point.
void include (const Point &p)
 Sets the bounding box to the union of the current box and the point p.
void include (const AABB &b)
 Sets the bounding box to the union of the current box and the box b.
void grow (float d)
 Grow the box by a distance d in all directions.
float getVolume () const
 Returns the volume of the bounding box.
float getArea () const
 Returns the surface area of the bounding box.
int getLargestAxis () const
 Returns the index of the largest axis in the range [0,2].
bool intersect (const Ray &r, float &tmin, float &tmax) const
 Performs ray/box intersection.

Public Attributes

Point mMin
 Minimum.
Point mMax
 Maximum.


Detailed Description

Class representing an axis-aligned bounding box (AABB).


The documentation for this class was generated from the following files:
Generated on Sun Mar 26 19:14:10 2006 for ASR by  doxygen 1.4.4