Last change
on this file since 4524 was
4524,
checked in by patrick, 19 years ago
|
orxonox/trunk: mod some interface arguments, defined some functions of bv tree
|
File size:
1.3 KB
|
Rev | Line | |
---|
[4510] | 1 | /*! |
---|
[4511] | 2 | \file bounding_volume.h |
---|
| 3 | \brief Definition of a bounding volume for collision detection algorithms |
---|
[4510] | 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
[4511] | 7 | #ifndef _BOUNDING_VOLUME_H |
---|
| 8 | #define _BOUNDING_VOLUME_H |
---|
[4510] | 9 | |
---|
| 10 | #include "base_object.h" |
---|
| 11 | |
---|
[4520] | 12 | class sVect3D; |
---|
| 13 | class Vector; |
---|
[4510] | 14 | |
---|
[4511] | 15 | //! An abstract class representing a bounding volume |
---|
| 16 | class BoundingVolume : public BaseObject { |
---|
[4510] | 17 | |
---|
| 18 | public: |
---|
[4511] | 19 | BoundingVolume(); |
---|
| 20 | virtual ~BoundingVolume(); |
---|
[4510] | 21 | |
---|
[4520] | 22 | inline const Vector* getCenter() const { return this->center; } |
---|
| 23 | inline const Vector* getAxis () const { return this->axis; } |
---|
| 24 | inline const sVect3D* getHalfLength() const { return this->halfLength; } |
---|
[4510] | 25 | |
---|
[4521] | 26 | virtual sVect3D* getVertices() const = NULL; |
---|
[4524] | 27 | virtual void mergeWith(const BoundingVolume &bv) = NULL; |
---|
[4520] | 28 | |
---|
[4524] | 29 | virtual void drawBV(int currentDepth, const int depth) const = NULL; |
---|
| 30 | virtual void drawBVPolygon(int currentDepth, const int depth) const = NULL; |
---|
| 31 | virtual void drawBVBlended(int currentDepth, const int depth) const = NULL; |
---|
[4521] | 32 | |
---|
[4510] | 33 | private: |
---|
[4521] | 34 | Vector* center; //!< Center point of box |
---|
| 35 | Vector* axis; //!< Axes of oriented box [x,y,z] |
---|
| 36 | sVect3D* halfLength; //!< Half lengths of the box |
---|
[4510] | 37 | |
---|
[4521] | 38 | unsigned int treeIndex; //!< Index number of the BV in the tree |
---|
[4510] | 39 | }; |
---|
| 40 | |
---|
[4511] | 41 | #endif /* _BOUNDING_VOLUME_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.