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

gmtl::OOBox Class Reference

#include <OOBox.h>

List of all members.

Public Methods

 OOBox ()
 OOBox (OOBox &box)
Point3 & center ()
const Point3 & center () const
Vec3 & axis (int i)
const Vec3 & axis (int i) const
Vec3 * axes ()
const Vec3 * axes () const
float & halfLen (int i)
const float & halfLen (int i) const
float * halfLens ()
const float * halfLens () const
OOBox & operator= (const OOBox &box)
bool operator== (const OOBox &box) const
void getVerts (Point3 verts[8]) const
void mergeWith (const OOBox &box)
void ident ()

Public Attributes

Point3 mCenter
Vec3 mAxis [3]
float mHalfLen [3]


Constructor & Destructor Documentation

gmtl::OOBox::OOBox   [inline]
 

Definition at line 52 of file OOBox.h.

References ident.

00053    { ident(); }

gmtl::OOBox::OOBox OOBox &    box [inline]
 

Definition at line 106 of file OOBox.h.

References mAxis, mCenter, and mHalfLen.

00107 {
00108    mCenter = box.mCenter;
00109    mAxis[0] = box.mAxis[0];
00110    mAxis[1] = box.mAxis[1];
00111    mAxis[2] = box.mAxis[2];
00112    mHalfLen[0] = box.mHalfLen[0];
00113    mHalfLen[1] = box.mHalfLen[1];
00114    mHalfLen[2] = box.mHalfLen[2];
00115 }


Member Function Documentation

const Vec3 * gmtl::OOBox::axes   const [inline]
 

Definition at line 143 of file OOBox.h.

References mAxis.

00144 {
00145    return mAxis;
00146 }

Vec3 * gmtl::OOBox::axes   [inline]
 

Definition at line 138 of file OOBox.h.

References mAxis.

00139 {
00140    return mAxis;
00141 }

const Vec3 & gmtl::OOBox::axis int    i const [inline]
 

Definition at line 133 of file OOBox.h.

References mAxis.

00134 {
00135    return mAxis[i];
00136 }

Vec3 & gmtl::OOBox::axis int    i [inline]
 

Definition at line 128 of file OOBox.h.

References mAxis.

00129 {
00130    return mAxis[i];
00131 }

const Point3 & gmtl::OOBox::center   const [inline]
 

Definition at line 123 of file OOBox.h.

References mCenter.

00124 {
00125    return mCenter;
00126 }

Point3 & gmtl::OOBox::center   [inline]
 

Definition at line 118 of file OOBox.h.

References mCenter.

00119 {
00120    return mCenter;
00121 }

void gmtl::OOBox::getVerts Point3    verts[8] const [inline]
 

Definition at line 193 of file OOBox.h.

References mAxis, mCenter, and mHalfLen.

00194 {
00195    Vec3 x_half_axis = mAxis[0]*mHalfLen[0];
00196    Vec3 y_half_axis = mAxis[1]*mHalfLen[1];
00197    Vec3 z_half_axis = mAxis[2]*mHalfLen[2];
00198 
00199    verts[0] = mCenter - x_half_axis - y_half_axis - z_half_axis;
00200    verts[1] = mCenter + x_half_axis - y_half_axis - z_half_axis;
00201    verts[2] = mCenter + x_half_axis + y_half_axis - z_half_axis;
00202    verts[3] = mCenter - x_half_axis + y_half_axis - z_half_axis;
00203    verts[4] = mCenter - x_half_axis - y_half_axis + z_half_axis;
00204    verts[5] = mCenter + x_half_axis - y_half_axis + z_half_axis;
00205    verts[6] = mCenter + x_half_axis + y_half_axis + z_half_axis;
00206    verts[7] = mCenter - x_half_axis + y_half_axis + z_half_axis;
00207 }

const float & gmtl::OOBox::halfLen int    i const [inline]
 

Definition at line 153 of file OOBox.h.

References mHalfLen.

00154 {
00155    return mHalfLen[i];
00156 }

float & gmtl::OOBox::halfLen int    i [inline]
 

Definition at line 148 of file OOBox.h.

References mHalfLen.

00149 {
00150    return mHalfLen[i];
00151 }

const float * gmtl::OOBox::halfLens   const [inline]
 

Definition at line 163 of file OOBox.h.

References mHalfLen.

00164 {
00165    return mHalfLen;
00166 }

float * gmtl::OOBox::halfLens   [inline]
 

Definition at line 158 of file OOBox.h.

References mHalfLen.

00159 {
00160    return mHalfLen;
00161 }

void gmtl::OOBox::ident   [inline]
 

Definition at line 86 of file OOBox.h.

References mAxis, mCenter, and mHalfLen.

Referenced by OOBox.

00087    {
00088       mCenter = ZeroVec3;
00089       mAxis[0] = XUnitVec3;
00090       mAxis[1] = YUnitVec3;
00091       mAxis[2] = ZUnitVec3;
00092       mHalfLen[0] = mHalfLen[1] = mHalfLen[2] = 0.0f;
00093    }

void gmtl::OOBox::mergeWith const OOBox &    box
 

OOBox & gmtl::OOBox::operator= const OOBox &    box [inline]
 

Definition at line 169 of file OOBox.h.

References mAxis, mCenter, and mHalfLen.

00170 {
00171    mCenter = box.mCenter;
00172    mAxis[0] = box.mAxis[0];
00173    mAxis[1] = box.mAxis[1];
00174    mAxis[2] = box.mAxis[2];
00175    mHalfLen[0] = box.mHalfLen[0];
00176    mHalfLen[1] = box.mHalfLen[1];
00177    mHalfLen[2] = box.mHalfLen[2];
00178    return *this;
00179 }

bool gmtl::OOBox::operator== const OOBox &    box const [inline]
 

Definition at line 182 of file OOBox.h.

References mAxis, mCenter, and mHalfLen.

00183 {
00184    return ((mCenter == box.mCenter) &&
00185            (mAxis[0] == box.mAxis[0]) &&
00186            (mAxis[1] == box.mAxis[1]) &&
00187            (mAxis[2] == box.mAxis[2]) &&
00188            (mHalfLen[0] == box.mHalfLen[0]) &&
00189            (mHalfLen[1] == box.mHalfLen[1]) &&
00190            (mHalfLen[2] == box.mHalfLen[2]));
00191 }


Member Data Documentation

Vec3 gmtl::OOBox::mAxis[3]
 

Definition at line 97 of file OOBox.h.

Referenced by axes, axis, getVerts, ident, OOBox, operator=, and operator==.

Point3 gmtl::OOBox::mCenter
 

Definition at line 96 of file OOBox.h.

Referenced by center, getVerts, ident, OOBox, operator=, and operator==.

float gmtl::OOBox::mHalfLen[3]
 

Definition at line 98 of file OOBox.h.

Referenced by getVerts, halfLen, halfLens, ident, OOBox, operator=, and operator==.


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