VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
Dt3dBoundingVolume Class Reference

A 3d bounding volume. More...

+ Collaboration diagram for Dt3dBoundingVolume:

Public Member Functions

 Dt3dBoundingVolume ()
 Dt3dBoundingVolume (const Dt3dBoundingVolume &orig)
 Copy constructor.
 Dt3dBoundingVolume (double halfLength, double halfWidth, double halfHeight)
 Dt3dBoundingVolume (double halfLength, double halfWidth, double halfHeight, double lengthOffset, double widthOffset, double heightOffset)
 Dt3dBoundingVolume (double halfLength, double halfWidth, double halfHeight, const DtVector &latticeOffset)
virtual ~Dt3dBoundingVolume ()
Dt3dBoundingVolumeoperator= (const Dt3dBoundingVolume &orig)
 Assignment operator.
bool operator== (const Dt3dBoundingVolume &other) const
 Equality operator.
bool operator!= (const Dt3dBoundingVolume &other) const
 Non-equality operator.
virtual void setToDefault ()
virtual double length () const
virtual double width () const
virtual double height () const
virtual double halfLength () const
virtual double halfWidth () const
virtual double halfHeight () const
virtual double boundingRadius () const
 The radius is calculated from other data, and is always valid.
virtual void setHalfLengthWidthHeight (double halfLength, double halfWidth, double halfHeight)
virtual void setHalfLength (double newHalfLength)
virtual void setLatticeOffset (const DtVector &newOffset)
virtual void setLatticeOffset (double lengthOffset, double widthOffset, double heightOffset)
virtual void clearLatticeOffset ()
virtual const DtVectorlatticeOffset () const
virtual bool isOffset () const
virtual double offsetLength () const
virtual void stretchForward (double x, double y)
 Stretch bounding volume forward/backward.
virtual void stretchBackward (double x, double y)
 Stretch bounding volume forward/backward.

Protected Attributes

DtVector myHalfDimensions
DtVector myLatticeOffset
 Diagonal of associated matrix.
bool myIsOffset
double myOffsetLength
 true if offset is non-zero.
double myBoundingRadius

Detailed Description

A 3d bounding volume.

Fast "how to use" guide:

  1. Set the dimensions of the bounding volume.
  2. Set the offset of the bounding volume (optional).

Note #2: The BV is aligned with an internal lattice coordinate system. The length is aligned with the x-axis. The width is aligned with the y-axis. The height is aligned with the z-axis (not shown).

The offset is the vector from the origin of this lattice coordinate system (0,0,0) to the center of the BV.

y /\ | --------— | | .5 | | | len | | | *-—>| * is the center of the BV | | /| .5 | | | / |width| | |/ \/ | | / ------— | / | / diagonal line is the offset | / | / |/___________________________________\ x (0,0,0) /


Additional info based on our chosen implementation.

For convenience, we often use a vector to represent the 3 components of the bounding box dimensions. The dimensions are specified as follows: half length == "forward" == x component == vector[0] half width == "right" == y component == vector[1] half height == "down" == z component == vector[2] The vector also represents the vector from the center of the BV to the front, right, bottom corner of the BV.


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

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)