VR-Forces 4.7 Class Documentation
 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. More...

Public Member Functions

 DtBoundingBox ()
 Default constructor. Bounding box is set to zero.
 DtBoundingBox (float lx, float ly, float ux, float uy)
 Constructor.
 DtBoundingBox (Dt2dPoint l, Dt2dPoint 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.
bool contains (float x, float y) const
 Does this bounding box contain the point.
DtBoundingBoxoperator+= (const Dt2dPoint &vector)
 Move the Bounding Box by a vector.
DtBoundingBoxoperator|= (const DtBoundingBox &other)
 Combine the two boxes together.
void centerOn (Dt2dPoint 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 (Dt2dPoint &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.
Dt2dPointupperPoint ()
 Get the upper point.
const Dt2dPointupperPoint () const
 Get the upper point (const).
Dt2dPointlowerPoint ()
 Get the lower point.
const Dt2dPointlowerPoint () const
 Get the lower point (const).

Protected Attributes

Dt2dPoint myLowerPoint
Dt2dPoint myUpperPoint

Detailed Description

A simple bounding box.

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 Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)