VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
3dBoundingVolume.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 
7 #ifndef _3dBoundingVolume_H
8 #define _3dBoundingVolume_H
9 
13 
14 #include <vlutil/vlMachineTypes.h>
15 #include "vlVector.h"
16 
17 #ifdef DtUSE_UTILITIES_NAMESPACE
18 namespace DtUSE_UTILITIES_NAMESPACE
19 {
20 #endif
21 
22 
68 {
69 
70 public:
72 
74 
77 
78  Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight );
79 
80  Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight,
81  double lengthOffset, double widthOffset, double heightOffset );
82  Dt3dBoundingVolume( double halfLength, double halfWidth, double halfHeight,
83  const DtVector& latticeOffset );
84 
85  virtual ~Dt3dBoundingVolume();
86 
88  Dt3dBoundingVolume& operator=( const Dt3dBoundingVolume& orig );
89 
91  bool operator==(const Dt3dBoundingVolume& other) const;
93  bool operator!=(const Dt3dBoundingVolume& other) const;
94 
95  virtual void setToDefault();
97 
98 public:
99 
101 
102  virtual double length() const { return 2*myHalfDimensions[0]; }
103  virtual double width() const { return 2*myHalfDimensions[1]; }
104  virtual double height() const { return 2*myHalfDimensions[2]; }
105 
106  virtual double halfLength() const { return myHalfDimensions[0]; }
107  virtual double halfWidth() const { return myHalfDimensions[1]; }
108  virtual double halfHeight() const { return myHalfDimensions[2]; }
109 
111  virtual double boundingRadius() const { return myBoundingRadius; }
112 
113  virtual void setHalfLengthWidthHeight( double halfLength, double halfWidth,
114  double halfHeight);
115  virtual void setHalfLength( double newHalfLength );
116 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144  virtual void stretchForward( double x, double y );
145  virtual void stretchBackward( double x, double y );
147 
149 
150 public:
152 
153 
154  virtual void setLatticeOffset( const DtVector & newOffset );
155  virtual void setLatticeOffset( double lengthOffset, double widthOffset,
156  double heightOffset );
157  virtual void clearLatticeOffset();
158  virtual const DtVector& latticeOffset() const { return myLatticeOffset; }
159  virtual bool isOffset() const { return myIsOffset; }
160  virtual double offsetLength() const { return myOffsetLength; }
162 
163 protected:
165 
168 
169 
170 
172 
173  bool myIsOffset;
177 };
178 
179 #ifdef DtUSE_UTILITIES_NAMESPACE
180 }
181 #endif
182 
183 
184 #endif
185 

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)