VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrv::DtBoundingBox Class Reference

A simple bounding box.

Public Member Functions

 DtBoundingBox ()
 
 DtBoundingBox (float lx, float ly, float ux, float uy)
 
 DtBoundingBox (Dt2dPoint l, Dt2dPoint u)
 
 ~DtBoundingBox ()
 
void invalidate ()
 
bool valid () const
 
bool contains (float x, float y) const
 
DtBoundingBox & operator+= (const Dt2dPoint &vector)
 
DtBoundingBox & operator|= (const DtBoundingBox &other)
 
void centerOn (Dt2dPoint pos)
 
void expandTo (float width, float height)
 
void getCenter (Dt2dPoint &point) const
 
void toPoints (float points[8]) const
 
Size accessors.
float width () const
 
float height () const
 
Location accessors.
Dt2dPoint & upperPoint ()
 
const Dt2dPoint & upperPoint () const
 
Dt2dPoint & lowerPoint ()
 
const Dt2dPoint & lowerPoint () const
 

Protected Attributes

Dt2dPoint myLowerPoint
 
Dt2dPoint myUpperPoint
 

Constructor & Destructor Documentation

makVrv::DtBoundingBox::DtBoundingBox ( )

Default constructor. Bounding box is set to zero.

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

Constructor.

makVrv::DtBoundingBox::DtBoundingBox ( Dt2dPoint  l,
Dt2dPoint  u 
)
makVrv::DtBoundingBox::~DtBoundingBox ( )

Destructor.

Member Function Documentation

void makVrv::DtBoundingBox::invalidate ( )

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

bool makVrv::DtBoundingBox::valid ( ) const

Is the bounds valid.

bool makVrv::DtBoundingBox::contains ( float  x,
float  y 
) const

Does this bounding box contain the point.

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

Move the Bounding Box by a vector.

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

Combine the two boxes together.

void makVrv::DtBoundingBox::centerOn ( Dt2dPoint  pos)

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 ( Dt2dPoint &  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.

Dt2dPoint& makVrv::DtBoundingBox::upperPoint ( )
inline

Get the upper point.

const Dt2dPoint& makVrv::DtBoundingBox::upperPoint ( ) const
inline

Get the upper point (const).

Dt2dPoint& makVrv::DtBoundingBox::lowerPoint ( )
inline

Get the lower point.

const Dt2dPoint& 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

Dt2dPoint makVrv::DtBoundingBox::myLowerPoint
protected
Dt2dPoint makVrv::DtBoundingBox::myUpperPoint
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)