AnimatLab  2
Test
AnimatSim::BoundingBox Class Reference

Bounding box class for geometric objects. More...

#include <BoundingBox.h>

+ Collaboration diagram for AnimatSim::BoundingBox:

Public Member Functions

 BoundingBox (void)
 Default constructor. More...
 
 ~BoundingBox (void)
 Destructor. More...
 
float GetDimensionSize (int iAxis)
 Gets the size along the supplied dimension. More...
 
float Height ()
 Gets the height = (Max.y - Min.y). More...
 
float Length ()
 Gets the length = (Max.x - Min.x). More...
 
float MaxDimension ()
 Gets the maximum dimension. More...
 
void operator= (const BoundingBox &oBox)
 Compares two bounding boxes to see if they are equal. More...
 
void Set (CStdFPoint &vMin, CStdFPoint &vMax)
 Sets the minimum and maximum widths of the bounding box. More...
 
void Set (float MinX, float MinY, float MinZ, float MaxX, float MaxY, float MaxZ)
 Sets the minimum and maximum widths of the bounding box. More...
 
float Width ()
 Gets the width = (Max.z - Min.z). More...
 

Public Attributes

CStdFPoint Max
 A vertex with the maximum widths of the bounding box.
 
CStdFPoint Min
 A vertex with the minimum widths of the bounding box.
 

Detailed Description

Bounding box class for geometric objects.

Author
dcofer
Date
3/24/2011

Definition at line 17 of file BoundingBox.h.

Constructor & Destructor Documentation

AnimatSim::BoundingBox::BoundingBox ( void  )

Default constructor.

Author
dcofer
Date
3/24/2011

Definition at line 19 of file BoundingBox.cpp.

AnimatSim::BoundingBox::~BoundingBox ( void  )

Destructor.

Author
dcofer
Date
3/24/2011

Definition at line 29 of file BoundingBox.cpp.

Member Function Documentation

float AnimatSim::BoundingBox::GetDimensionSize ( int  iAxis)

Gets the size along the supplied dimension.

Author
dcofer
Date
3/24/2011
Parameters
iAxisThe axis along which we want the size.
Returns
size of bounding box along the given dimension.

Definition at line 61 of file BoundingBox.cpp.

References Height(), Length(), and Width().

Referenced by AnimatSim::Environment::Bodies::Mesh::SetBoundingBox().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float AnimatSim::BoundingBox::Height ( )

Gets the height = (Max.y - Min.y).

Author
dcofer
Date
3/24/2011
Returns
Height of bounding box.

Definition at line 56 of file BoundingBox.cpp.

References Max, and Min.

Referenced by GetDimensionSize().

+ Here is the caller graph for this function:

float AnimatSim::BoundingBox::Length ( )

Gets the length = (Max.x - Min.x).

Author
dcofer
Date
3/24/2011
Returns
Length of bounding box.

Definition at line 46 of file BoundingBox.cpp.

References Max, and Min.

Referenced by GetDimensionSize().

+ Here is the caller graph for this function:

float AnimatSim::BoundingBox::MaxDimension ( )

Gets the maximum dimension.

Author
dcofer
Date
3/24/2011
Returns
Max of any dimension.

Definition at line 73 of file BoundingBox.cpp.

References Max, and Min.

void AnimatSim::BoundingBox::operator= ( const BoundingBox oBox)

Compares two bounding boxes to see if they are equal.

Author
dcofer
Date
3/24/2011
Parameters
oBoxThe box to compare with.

Definition at line 88 of file BoundingBox.cpp.

References Max, and Min.

void AnimatSim::BoundingBox::Set ( CStdFPoint &  vMin,
CStdFPoint &  vMax 
)

Sets the minimum and maximum widths of the bounding box.

Author
dcofer
Date
3/24/2011
Parameters
[in,out]vMinThe minimum vertex.
[in,out]vMaxThe maximum vertex.

Definition at line 34 of file BoundingBox.cpp.

References Max, and Min.

void AnimatSim::BoundingBox::Set ( float  MinX,
float  MinY,
float  MinZ,
float  MaxX,
float  MaxY,
float  MaxZ 
)

Sets the minimum and maximum widths of the bounding box.

Author
dcofer
Date
3/24/2011
Parameters
MinXThe minimum x coordinate.
MinYThe minimum y coordinate.
MinZThe minimum z coordinate.
MaxXThe maximum x coordinate.
MaxYThe maximum y coordinate.
MaxZThe maximum z coordinate.

Definition at line 40 of file BoundingBox.cpp.

References Max, and Min.

float AnimatSim::BoundingBox::Width ( )

Gets the width = (Max.z - Min.z).

Author
dcofer
Date
3/24/2011
Returns
Width of bounding box.

Definition at line 51 of file BoundingBox.cpp.

References Max, and Min.

Referenced by GetDimensionSize().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: