VR-Link API Documentation for HLA 1.3
3dBoundingVolume.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00006 
00007 #ifndef _3dBoundingVolume_H
00008 #define _3dBoundingVolume_H
00009 
00013 
00014 #include <vlutil/vlMachineTypes.h>
00015 #include "vlVector.h"
00016 
00017 #ifdef DtUSE_UTILITIES_NAMESPACE
00018 namespace DtUSE_UTILITIES_NAMESPACE
00019 {
00020 #endif
00021 
00022 
00067 class DT_DLL_MATRIX Dt3dBoundingVolume
00068 {
00069 
00070 public: 
00072 
00073    Dt3dBoundingVolume();
00074 
00076    Dt3dBoundingVolume( const Dt3dBoundingVolume& orig );
00077 
00078    Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight );
00079 
00080    Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight, 
00081                      double lengthOffset, double widthOffset, double heightOffset );
00082    Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight, 
00083                      const DtVector& latticeOffset );
00084 
00085    virtual ~Dt3dBoundingVolume();
00086 
00088    Dt3dBoundingVolume& operator=( const Dt3dBoundingVolume& orig );
00089 
00091    bool operator==(const Dt3dBoundingVolume& other) const;
00093    bool operator!=(const Dt3dBoundingVolume& other) const;
00094 
00095    virtual void setToDefault();
00097 
00098 public:  
00099 
00101 
00102    virtual double length() const { return 2*myHalfDimensions[0]; }
00103    virtual double width()  const { return 2*myHalfDimensions[1]; }
00104    virtual double height() const { return 2*myHalfDimensions[2]; }
00105 
00106    virtual double halfLength() const { return myHalfDimensions[0]; }
00107    virtual double halfWidth()  const { return myHalfDimensions[1]; }
00108    virtual double halfHeight() const { return myHalfDimensions[2]; }
00109 
00111    virtual double boundingRadius() const { return myBoundingRadius; }
00112 
00113    virtual void setHalfLengthWidthHeight( double halfLength, double halfWidth, 
00114                                        double halfHeight);
00115    virtual void setHalfLength( double newHalfLength );
00116 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144    virtual void stretchForward( double x, double y );
00145    virtual void stretchBackward( double x, double y );
00147 
00149 
00150 public: 
00152 
00153 
00154    virtual void setLatticeOffset( const DtVector & newOffset );
00155    virtual void setLatticeOffset( double lengthOffset, double widthOffset, 
00156                                   double heightOffset );
00157    virtual void clearLatticeOffset();
00158    virtual const DtVector& latticeOffset() const { return myLatticeOffset; }
00159    virtual bool isOffset() const { return myIsOffset; }
00160    virtual double offsetLength() const { return myOffsetLength; }
00162 
00163 protected:
00165 
00166    DtVector      myHalfDimensions;      
00167    DtVector      myLatticeOffset;       
00168 
00169 
00170 
00172 
00173    bool        myIsOffset;            
00174    double      myOffsetLength;
00175    double      myBoundingRadius;
00177 };
00178 
00179 #ifdef DtUSE_UTILITIES_NAMESPACE
00180 }
00181 #endif
00182 
00183 
00184 #endif
00185 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)