Line | |
---|
1 | /*! |
---|
2 | \file bounding_volume.h |
---|
3 | \brief Definition of a bounding volume for collision detection algorithms |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _BOUNDING_VOLUME_H |
---|
8 | #define _BOUNDING_VOLUME_H |
---|
9 | |
---|
10 | #include "base_object.h" |
---|
11 | |
---|
12 | class sVect3D; |
---|
13 | class Vector; |
---|
14 | |
---|
15 | //! An abstract class representing a bounding volume |
---|
16 | class BoundingVolume : public BaseObject { |
---|
17 | |
---|
18 | public: |
---|
19 | BoundingVolume(); |
---|
20 | virtual ~BoundingVolume(); |
---|
21 | |
---|
22 | inline const Vector* getCenter() const { return this->center; } |
---|
23 | inline const int getIndex() { return this->treeIndex; } |
---|
24 | |
---|
25 | virtual sVect3D* getVertices() const = NULL; |
---|
26 | virtual void mergeWith(const BoundingVolume &bv) = NULL; |
---|
27 | |
---|
28 | virtual void drawBV(int currentDepth, const int depth) const = NULL; |
---|
29 | virtual void drawBVPolygon(int currentDepth, const int depth) const = NULL; |
---|
30 | virtual void drawBVBlended(int currentDepth, const int depth) const = NULL; |
---|
31 | |
---|
32 | |
---|
33 | protected: |
---|
34 | Vector* center; //!< Center point of box |
---|
35 | |
---|
36 | unsigned int treeIndex; //!< Index number of the BV in the tree |
---|
37 | }; |
---|
38 | |
---|
39 | #endif /* _BOUNDING_VOLUME_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.