Last change
on this file since 9849 was
9715,
checked in by bensch, 18 years ago
|
renamed newclassid to classid and newobjectlist to objectlist
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file obb.h |
---|
3 | * Definition of an OBB (object Oriented Bounding Box) |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _OBB_H |
---|
8 | #define _OBB_H |
---|
9 | |
---|
10 | #include "base_object.h" |
---|
11 | #include "bounding_volume.h" |
---|
12 | |
---|
13 | template<class T> class tList; |
---|
14 | |
---|
15 | //! A class representing an extended bounding volume tree: an obb tree |
---|
16 | class OBB : public BoundingVolume { |
---|
17 | ObjectListDeclaration(OBB); |
---|
18 | |
---|
19 | public: |
---|
20 | OBB(); |
---|
21 | virtual ~OBB(); |
---|
22 | |
---|
23 | |
---|
24 | inline Vector getAxisX () const { return this->axis[0]; } |
---|
25 | inline Vector getAxisY () const { return this->axis[1]; } |
---|
26 | inline Vector getAxisZ () const { return this->axis[2]; } |
---|
27 | |
---|
28 | inline const float* getHalfLength() const { return this->halfLength; } |
---|
29 | |
---|
30 | virtual void mergeWith(const BoundingVolume &bv); |
---|
31 | |
---|
32 | virtual void drawBV(int currentDepth, int drawMode) const; |
---|
33 | |
---|
34 | |
---|
35 | |
---|
36 | public: |
---|
37 | Vector axis[3]; //!< Axes of oriented box [x,y,z] |
---|
38 | float halfLength[3]; //!< Half lengths of the box along the axis |
---|
39 | float covarianceMatrix[3][3]; //!< the covariance matrix |
---|
40 | |
---|
41 | bool bCollided; //!< is true if this obb has collided |
---|
42 | |
---|
43 | }; |
---|
44 | |
---|
45 | #endif /* _OBB_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.