VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Protected Attributes
DtSimBoundingGeometry Class Reference

Class Description: DtSimBoundingGeometry describes on objects bounding volume or bounding area (or nothing at all, for true point objects!). More...

List of all members.

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 DtSimBoundingGeometryoperator= (const DtSimBoundingGeometry &orig)
 Assignment Operator.
virtual DtSimBoundingGeometryclone () 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

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
BoundingTypeUndefined 
BoundingTypeArea 
BoundingTypeVolume 

Constructor & Destructor Documentation

Constructor; By default, our geometry is a BoundingTypeVolume, for easier back-compatibility.

Destructor.

Copy Constructor.


Member Function Documentation

const DtSimBoundingGeometry& DtSimBoundingGeometry::operator= ( const DtSimBoundingGeometry orig)

Assignment Operator.

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]

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]
Deprecated:
VR-Forces 3.11. To be removed following this release.

Member Data Documentation

Dt3dBoundingVolume DtSimBoundingGeometry::myBoundingVolume [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)