Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gmtl::AABox Class Template Reference
[Abstract Data Types: Matrix, Vec, Quat, Coord, Sphere, Plane]

Describes an axially aligned box in 3D space. More...

#include <AABox.h>

Collaboration diagram for gmtl::AABox:

Collaboration graph
[legend]
List of all members.

Public Types

typedef DATA_TYPE DataType

Public Methods

 AABox ()
 Creates a new empty box. More...

 AABox (const Point< DATA_TYPE, 3 > &min, const Point< DATA_TYPE, 3 > &max)
 Creates a new box with the given min and max points. More...

 AABox (const AABox< DATA_TYPE > &box)
 Construcst a duplicate of the given box. More...

const Point< DATA_TYPE, 3 > & getMin () const
 Gets the minimum point of the box. More...

const Point< DATA_TYPE, 3 > & getMax () const
 Gets the maximum point of the box. More...

bool isEmpty () const
 Tests if this box occupies no space. More...

void setMin (const Point< DATA_TYPE, 3 > &min)
 Sets the minimum point of the box. More...

void setMax (const Point< DATA_TYPE, 3 > &max)
 Sets the maximum point of the box. More...

void setEmpty (bool empty)
 Sets the empty flag on this box. More...


Public Attributes

Point< DATA_TYPE, 3 > mMin
 The minimum point of the box. More...

Point< DATA_TYPE, 3 > mMax
 The maximum point on the box. More...

bool mEmpty
 Flag for empty box. More...


Detailed Description

template<class DATA_TYPE>
class gmtl::AABox< DATA_TYPE >

Describes an axially aligned box in 3D space.

This is usually used for graphics applications. It is defined by its minimum and maximum points.

Parameters:
DATA_TYPE  the internal type used for the points

Definition at line 51 of file AABox.h.


Member Typedef Documentation

template<class DATA_TYPE>
typedef DATA_TYPE gmtl::AABox::DataType
 

Definition at line 54 of file AABox.h.


Constructor & Destructor Documentation

template<class DATA_TYPE>
gmtl::AABox< DATA_TYPE >::AABox   [inline]
 

Creates a new empty box.

Definition at line 60 of file AABox.h.

References mEmpty, mMax, and mMin.

00061          : mMin(0,0,0), mMax(0,0,0), mEmpty(true)
00062       {}

template<class DATA_TYPE>
gmtl::AABox< DATA_TYPE >::AABox const Point< DATA_TYPE, 3 > &    min,
const Point< DATA_TYPE, 3 > &    max
[inline]
 

Creates a new box with the given min and max points.

Parameters:
min  the minimum point on the box
max  the maximum point on the box
Precondition:
all elements of min are less than max
bot min and max are not zero

Definition at line 73 of file AABox.h.

References mEmpty, mMax, and mMin.

00074          : mMin(min), mMax(max), mEmpty(false)
00075       {}

template<class DATA_TYPE>
gmtl::AABox< DATA_TYPE >::AABox const AABox< DATA_TYPE > &    box [inline]
 

Construcst a duplicate of the given box.

Parameters:
box  the box the make a copy of

Definition at line 82 of file AABox.h.

References mEmpty, mMax, and mMin.

00083          : mMin(box.mMin), mMax(box.mMax), mEmpty(box.mEmpty)
00084       {}


Member Function Documentation

template<class DATA_TYPE>
const Point<DATA_TYPE, 3>& gmtl::AABox< DATA_TYPE >::getMax   const [inline]
 

Gets the maximum point of the box.

Returns:
the max point

Definition at line 101 of file AABox.h.

References mMax.

00102       {
00103          return mMax;
00104       }

template<class DATA_TYPE>
const Point<DATA_TYPE, 3>& gmtl::AABox< DATA_TYPE >::getMin   const [inline]
 

Gets the minimum point of the box.

Returns:
the min point

Definition at line 91 of file AABox.h.

References mMin.

00092       {
00093          return mMin;
00094       }

template<class DATA_TYPE>
bool gmtl::AABox< DATA_TYPE >::isEmpty   const [inline]
 

Tests if this box occupies no space.

Returns:
true if the box is empty, false otherwise

Definition at line 111 of file AABox.h.

References mEmpty.

00112       {
00113          return mEmpty;
00114       }

template<class DATA_TYPE>
void gmtl::AABox< DATA_TYPE >::setEmpty bool    empty [inline]
 

Sets the empty flag on this box.

Parameters:
empty  true to make the box empty, false otherwise

Definition at line 141 of file AABox.h.

References mEmpty.

00142       {
00143          mEmpty = empty;
00144       }

template<class DATA_TYPE>
void gmtl::AABox< DATA_TYPE >::setMax const Point< DATA_TYPE, 3 > &    max [inline]
 

Sets the maximum point of the box.

Parameters:
max  the max point

Definition at line 131 of file AABox.h.

References mMax.

00132       {
00133          mMax = max;
00134       }

template<class DATA_TYPE>
void gmtl::AABox< DATA_TYPE >::setMin const Point< DATA_TYPE, 3 > &    min [inline]
 

Sets the minimum point of the box.

Parameters:
min  the min point

Definition at line 121 of file AABox.h.

References mMin.

00122       {
00123          mMin = min;
00124       }


Member Data Documentation

template<class DATA_TYPE>
bool gmtl::AABox::mEmpty
 

Flag for empty box.

True if the box is empty.

Definition at line 160 of file AABox.h.

Referenced by AABox, isEmpty, and setEmpty.

template<class DATA_TYPE>
Point<DATA_TYPE, 3> gmtl::AABox::mMax
 

The maximum point on the box.

Definition at line 155 of file AABox.h.

Referenced by AABox, getMax, and setMax.

template<class DATA_TYPE>
Point<DATA_TYPE, 3> gmtl::AABox::mMin
 

The minimum point of the box.

Definition at line 150 of file AABox.h.

Referenced by AABox, getMin, and setMin.


The documentation for this class was generated from the following file:
Generated on Mon Apr 7 15:29:26 2003 for GenericMathTemplateLibrary by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002