VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Attributes
makVrv::DtBoundingBox Class Reference

A simple bounding box. More...

List of all members.

Public Member Functions

 DtBoundingBox ()
 Default constructor. Bounding box is set to zero.
 DtBoundingBox (float lx, float ly, float ux, float uy)
 Constructor.
 DtBoundingBox (DtPoint l, DtPoint u)
 ~DtBoundingBox ()
 Destructor.
void invalidate ()
 Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions.
bool valid () const
 Is the bounds valid.
DtBoundingBoxoperator+= (const DtPoint vector)
 Move the Bounding Box by a vector.
DtBoundingBoxoperator|= (const DtBoundingBox &other)
 Combine the two boxes together.
void centerOn (DtPoint pos)
 Move the box's center point to the position, without changing the size.
void expandTo (float width, float height)
 Expand the boxes size around its current center to have a width and height specified.
void getCenter (DtPoint &point) const
 Get the center of the box.
void toPoints (float points[8]) const
 Fill in an array of 2d points with the box corners.
Size accessors.
float width () const
 Get the bounding box width.
float height () const
 Get the bounding box height.
Location accessors.
DtPointupperPoint ()
 Get the upper point.
const DtPointupperPoint () const
 Get the upper point (const).
DtPointlowerPoint ()
 Get the lower point.
const DtPointlowerPoint () const
 Get the lower point (const).

Protected Attributes

DtPoint myLowerPoint
DtPoint myUpperPoint

Detailed Description

A simple bounding box.


Constructor & Destructor Documentation

Default constructor. Bounding box is set to zero.

makVrv::DtBoundingBox::DtBoundingBox ( float  lx,
float  ly,
float  ux,
float  uy 
)

Constructor.

Destructor.


Member Function Documentation

Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions.

Is the bounds valid.

DtBoundingBox& makVrv::DtBoundingBox::operator+= ( const DtPoint  vector)

Move the Bounding Box by a vector.

DtBoundingBox& makVrv::DtBoundingBox::operator|= ( const DtBoundingBox other)

Combine the two boxes together.

Move the box's center point to the position, without changing the size.

void makVrv::DtBoundingBox::expandTo ( float  width,
float  height 
)

Expand the boxes size around its current center to have a width and height specified.

void makVrv::DtBoundingBox::getCenter ( DtPoint point) const

Get the center of the box.

float makVrv::DtBoundingBox::width ( ) const [inline]

Get the bounding box width.

float makVrv::DtBoundingBox::height ( ) const [inline]

Get the bounding box height.

Get the upper point.

const DtPoint& makVrv::DtBoundingBox::upperPoint ( ) const [inline]

Get the upper point (const).

Get the lower point.

const DtPoint& makVrv::DtBoundingBox::lowerPoint ( ) const [inline]

Get the lower point (const).

void makVrv::DtBoundingBox::toPoints ( float  points[8]) const

Fill in an array of 2d points with the box corners.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)