Last change
on this file since 10611 was
8724,
checked in by bensch, 19 years ago
|
merged the bsp-model-stuff back here
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file aabb.h |
---|
3 | * Definition of an AABB (Axix Aligned Bounding Box) |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _AABB_H |
---|
8 | #define _AABB_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 AABB : public BoundingVolume { |
---|
17 | |
---|
18 | public: |
---|
19 | AABB(); |
---|
20 | virtual ~AABB(); |
---|
21 | |
---|
22 | |
---|
23 | inline Vector getAxisX () const { return this->axis[0]; } |
---|
24 | inline Vector getAxisY () const { return this->axis[1]; } |
---|
25 | inline Vector getAxisZ () const { return this->axis[2]; } |
---|
26 | |
---|
27 | inline const float* getHalfLength() const { return this->halfLength; } |
---|
28 | |
---|
29 | virtual void mergeWith(const BoundingVolume &bv); |
---|
30 | |
---|
31 | virtual void drawBV(int currentDepth, int drawMode) const; |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | public: |
---|
36 | Vector axis[3]; //!< Axes of oriented box [x,y,z] |
---|
37 | float halfLength[3]; //!< Half lengths of the box along the axis |
---|
38 | float covarianceMatrix[3][3]; //!< the covariance matrix |
---|
39 | |
---|
40 | bool bCollided; //!< is true if this obb has collided |
---|
41 | |
---|
42 | }; |
---|
43 | |
---|
44 | #endif /* _AABB_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.