![]() |
VR-Link API Documentation for HLA Evolved
|
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 () |
| Dt3dBoundingVolume & | operator= (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 DtVector & | latticeOffset () 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 |
A 3d bounding volume.
Fast "how to use" guide:
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) /
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.