VR-Link API Documentation for DIS
 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. More...
 
 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. More...
 
bool operator== (const Dt3dBoundingVolume &other) const
 Equality operator. More...
 
bool operator!= (const Dt3dBoundingVolume &other) const
 Non-equality operator. More...
 
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. More...
 
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. More...
 
virtual void stretchBackward (double x, double y)
 Stretch bounding volume forward/backward. More...
 

Protected Attributes

DtVector myHalfDimensions
 
DtVector myLatticeOffset
 Diagonal of associated matrix. More...
 
bool myIsOffset
 
double myOffsetLength
 true if offset is non-zero. More...
 
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 Tue Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)