![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: boundingGeom.h,v $ $Revision: 1.18 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef boundingGeom_H_ 00013 #define boundingGeom_H_ 00014 00015 #include <matrix/vlVector.h> 00016 #include <matrix/vlDcm.h> 00017 #include <matrix/3dBoundingVolume.h> 00018 00060 00061 #include "vrfutil/vrfutilDefines.h" 00062 class DT_DLL_vrfutil DtSimBoundingGeometry 00063 { 00064 public: 00065 00066 enum DtSimBoundingGeometryType 00067 { 00068 BoundingTypeUndefined = 0, 00069 BoundingTypeArea, 00070 BoundingTypeVolume 00071 }; 00072 00073 public: 00076 DtSimBoundingGeometry(DtSimBoundingGeometryType boundingType = BoundingTypeVolume); 00077 00079 virtual ~DtSimBoundingGeometry(); 00080 00082 DtSimBoundingGeometry(const DtSimBoundingGeometry& orig); 00083 00085 const DtSimBoundingGeometry& operator=(const DtSimBoundingGeometry& orig); 00086 00088 virtual DtSimBoundingGeometry* clone() const; 00089 00091 virtual const Dt3dBoundingVolume& boundingVolume() const; 00092 00094 virtual Dt3dBoundingVolume& boundingVolume(); 00095 00097 virtual void setBoundingVolume( const Dt3dBoundingVolume& bv ) { myBoundingVolume = bv; } 00098 00099 virtual void setBoundingVolume(double halfLength, double halfWidth, 00100 double halfHeight, const DtVector& latticeOffset); 00101 00102 virtual void setHalfLengthWidthHeight(double halfLength, double halfWidth, double halfHeight); 00103 virtual double halfLength() const; 00104 virtual double halfWidth() const; 00105 virtual double halfHeight() const; 00106 00108 00110 virtual DtSimBoundingGeometryType boundingGeometryType() const; 00111 00113 virtual void setBoundingGeometryType(DtSimBoundingGeometryType boundingGeometryType); 00114 00115 virtual bool inside(const DtVector& point, const DtVector& position, const DtDcm& orientation) const; 00116 00118 virtual void setBoundingVolume(const DtDcm& localBvol, DtVector offset = DtVector::zero()); 00119 00120 protected: 00121 DtSimBoundingGeometryType myBoundingGeometryType; 00122 Dt3dBoundingVolume myBoundingVolume; 00123 }; 00124 00125 #endif