![]() |
VR-Forces 4.0.4 Class Documentation
|
Class Description: DtSimBoundingGeometry describes on objects bounding volume or bounding area (or nothing at all, for true point objects!). More...
Public Types | |
| enum | DtSimBoundingGeometryType { BoundingTypeUndefined = 0, BoundingTypeArea, BoundingTypeVolume } |
Public Member Functions | |
| DtSimBoundingGeometry (DtSimBoundingGeometryType boundingType=BoundingTypeVolume) | |
| Constructor; By default, our geometry is a BoundingTypeVolume, for easier back-compatibility. | |
| virtual | ~DtSimBoundingGeometry () |
| Destructor. | |
| DtSimBoundingGeometry (const DtSimBoundingGeometry &orig) | |
| Copy Constructor. | |
| const DtSimBoundingGeometry & | operator= (const DtSimBoundingGeometry &orig) |
| Assignment Operator. | |
| virtual DtSimBoundingGeometry * | clone () const |
| Clone. | |
| virtual const Dt3dBoundingVolume & | boundingVolume () const |
| Get the bounding object. | |
| virtual Dt3dBoundingVolume & | boundingVolume () |
| Get the bounding object. | |
| virtual DtSimBoundingGeometryType | boundingGeometryType () const |
| Get the bounding geometry type. | |
| virtual void | setBoundingGeometryType (DtSimBoundingGeometryType boundingGeometryType) |
| Set the bounding geometry type. | |
| virtual bool | inside (const DtVector &point, const DtVector &position, const DtDcm &orientation) const |
| virtual void | setBoundingVolume (const DtDcm &localBvol, DtVector offset=DtVector::zero()) |
| virtual void | setBoundingVolume (const Dt3dBoundingVolume &bv) |
| virtual void | setBoundingVolume (double halfLength, double halfWidth, double halfHeight, const DtVector &latticeOffset) |
| virtual void | setHalfLengthWidthHeight (double halfLength, double halfWidth, double halfHeight) |
| virtual double | halfLength () const |
| virtual double | halfWidth () const |
| virtual double | halfHeight () const |
Protected Attributes | |
| DtSimBoundingGeometryType | myBoundingGeometryType |
| Dt3dBoundingVolume | myBoundingVolume |
Class Description: DtSimBoundingGeometry describes on objects bounding volume or bounding area (or nothing at all, for true point objects!).
If DtSimBoundingGeometryType is BoundingTypeVolume, then boundingVolume() returns a Dt3dBoundingVolume, which describes the objects bounding volume.
If DtSimBoundingGeometry is BoundingTypeArea, then only the first 2 rows and 2 columns of the DtDcm are used to define the area. The third row/ column is set to [0 0 1] to keep the Dcm a valid, orthonormal matrix. This can still be used to do bounding volume checks by setting the Z dimension as desired (for example, one could test to see if an airplane is flying over an area by supply a large Z vector (set element [2][2] to 100,000, e.g.) and then do a point in bounding volume test.
If DtSimBoundingGeometry is BoundingTypeUndefined, then no bounding information is contained (for example, a waypoint), but again, a user could supply values as desired to the Dcm to check intersections as desired.
The DtDcm supplied to either the constructor or setBoundingVolume() The radial-length (along body x), radial-width (along body y) and radial height (along body Z) centered about the object. The offset vector allows the bounding volume to be offset from the object position in X (down the body nose) Y (to the right) and Z (down).
For example, the following approximates the bounding volume of an M1 tank, whose position is indicated at the center-base of the vehicle. Note the Z offset to compensate for the difference in origin.
DtDcm Volume: |4.00 0.00 0.00| | | |0.00 1.80 0.00| | | |0.00 0.00 1.44|
DtVector Offset: [0.00 0.00 -1.44]
This indicates that the entity is 8 meters long, 3.6 meters wide, and 2.88 meters high.
| DtSimBoundingGeometry::DtSimBoundingGeometry | ( | DtSimBoundingGeometryType | boundingType = BoundingTypeVolume | ) |
Constructor; By default, our geometry is a BoundingTypeVolume, for easier back-compatibility.
| virtual DtSimBoundingGeometry::~DtSimBoundingGeometry | ( | ) | [virtual] |
Destructor.
| DtSimBoundingGeometry::DtSimBoundingGeometry | ( | const DtSimBoundingGeometry & | orig | ) |
Copy Constructor.
| const DtSimBoundingGeometry& DtSimBoundingGeometry::operator= | ( | const DtSimBoundingGeometry & | orig | ) |
Assignment Operator.
| virtual DtSimBoundingGeometry* DtSimBoundingGeometry::clone | ( | ) | const [virtual] |
Clone.
| virtual const Dt3dBoundingVolume& DtSimBoundingGeometry::boundingVolume | ( | ) | const [virtual] |
Get the bounding object.
| virtual Dt3dBoundingVolume& DtSimBoundingGeometry::boundingVolume | ( | ) | [virtual] |
Get the bounding object.
| virtual void DtSimBoundingGeometry::setBoundingVolume | ( | const Dt3dBoundingVolume & | bv | ) | [inline, virtual] |
| virtual void DtSimBoundingGeometry::setBoundingVolume | ( | double | halfLength, |
| double | halfWidth, | ||
| double | halfHeight, | ||
| const DtVector & | latticeOffset | ||
| ) | [virtual] |
| virtual void DtSimBoundingGeometry::setHalfLengthWidthHeight | ( | double | halfLength, |
| double | halfWidth, | ||
| double | halfHeight | ||
| ) | [virtual] |
| virtual double DtSimBoundingGeometry::halfLength | ( | ) | const [virtual] |
| virtual double DtSimBoundingGeometry::halfWidth | ( | ) | const [virtual] |
| virtual double DtSimBoundingGeometry::halfHeight | ( | ) | const [virtual] |
| virtual DtSimBoundingGeometryType DtSimBoundingGeometry::boundingGeometryType | ( | ) | const [virtual] |
Get the bounding geometry type.
| virtual void DtSimBoundingGeometry::setBoundingGeometryType | ( | DtSimBoundingGeometryType | boundingGeometryType | ) | [virtual] |
Set the bounding geometry type.
| virtual bool DtSimBoundingGeometry::inside | ( | const DtVector & | point, |
| const DtVector & | position, | ||
| const DtDcm & | orientation | ||
| ) | const [virtual] |
| virtual void DtSimBoundingGeometry::setBoundingVolume | ( | const DtDcm & | localBvol, |
| DtVector | offset = DtVector::zero() |
||
| ) | [virtual] |
Dt3dBoundingVolume DtSimBoundingGeometry::myBoundingVolume [protected] |