|
Last change
on this file since 5551 was
5481,
checked in by bensch, 20 years ago
|
|
orxonox/trunk: BV-nodes are now renddered more efficiently.
|
|
File size:
1005 bytes
|
| Line | |
|---|
| 1 | /*! |
|---|
| 2 | * @file bv_tree.h |
|---|
| 3 | * Definition of a bounding volume tree |
|---|
| 4 | |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #ifndef _BV_TREE_NODE_H |
|---|
| 8 | #define _BV_TREE_NODE_H |
|---|
| 9 | |
|---|
| 10 | #include "base_object.h" |
|---|
| 11 | #include "abstract_model.h" |
|---|
| 12 | #include "vector.h" |
|---|
| 13 | |
|---|
| 14 | // FORWARD DECLARATION |
|---|
| 15 | class BoundingVolume; |
|---|
| 16 | class BVTree; |
|---|
| 17 | class PNode; |
|---|
| 18 | class WorldEntity; |
|---|
| 19 | template<class T> class tList; |
|---|
| 20 | |
|---|
| 21 | //! A class that represents a bounding volume tree |
|---|
| 22 | class BVTreeNode : public BaseObject { |
|---|
| 23 | |
|---|
| 24 | public: |
|---|
| 25 | BVTreeNode(); |
|---|
| 26 | virtual ~BVTreeNode(); |
|---|
| 27 | |
|---|
| 28 | virtual void spawnBVTree(const int depth, sVec3D *verticesList, const int length ) = 0; |
|---|
| 29 | |
|---|
| 30 | virtual BoundingVolume* getBV(int index) const = 0; |
|---|
| 31 | inline const int getIndex() { return this->treeIndex; } |
|---|
| 32 | |
|---|
| 33 | virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0; |
|---|
| 34 | |
|---|
| 35 | virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0; |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | private: |
|---|
| 39 | unsigned int treeIndex; //!< Index number of the BV in the tree |
|---|
| 40 | |
|---|
| 41 | }; |
|---|
| 42 | |
|---|
| 43 | #endif /* _BV_TREE_NODE_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.