Last change
on this file since 4553 was
4542,
checked in by patrick, 19 years ago
|
some more structural work and start of spawn tree function
|
File size:
1.1 KB
|
Rev | Line | |
---|
[4510] | 1 | /*! |
---|
[4511] | 2 | \file obb.h |
---|
[4526] | 3 | \brief Definition of an OBB (object Oriented Bounding Box) |
---|
[4510] | 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
[4511] | 7 | #ifndef _OBB_H |
---|
| 8 | #define _OBB_H |
---|
[4510] | 9 | |
---|
| 10 | #include "base_object.h" |
---|
[4514] | 11 | #include "bounding_volume.h" |
---|
[4510] | 12 | |
---|
[4541] | 13 | template<class T> class tList; |
---|
[4510] | 14 | |
---|
[4511] | 15 | //! A class representing an extended bounding volume tree: an obb tree |
---|
[4514] | 16 | class OBB : public BoundingVolume { |
---|
[4510] | 17 | |
---|
| 18 | public: |
---|
[4511] | 19 | OBB(); |
---|
| 20 | virtual ~OBB(); |
---|
[4510] | 21 | |
---|
[4541] | 22 | |
---|
[4525] | 23 | inline const Vector* getAxis () const { return this->axis; } |
---|
| 24 | inline const sVect3D* getHalfLength() const { return this->halfLength; } |
---|
[4510] | 25 | |
---|
[4541] | 26 | virtual tList<sVect3D>* getVertices() const { return this->verticesBuffer; } |
---|
[4531] | 27 | virtual void mergeWith(const BoundingVolume &bv); |
---|
| 28 | |
---|
| 29 | virtual void drawBV(int currentDepth, const int depth) const; |
---|
| 30 | virtual void drawBVPolygon(int currentDepth, const int depth) const; |
---|
| 31 | virtual void drawBVBlended(int currentDepth, const int depth) const; |
---|
| 32 | |
---|
| 33 | |
---|
[4525] | 34 | private: |
---|
| 35 | Vector* axis; //!< Axes of oriented box [x,y,z] |
---|
| 36 | sVect3D* halfLength; //!< Half lengths of the box |
---|
[4521] | 37 | |
---|
[4525] | 38 | OBB* leftNode; //!< left node of the tree |
---|
| 39 | OBB* rightNode; //!< right node of the tree |
---|
[4510] | 40 | }; |
---|
| 41 | |
---|
[4511] | 42 | #endif /* _OBB_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.