Last change
on this file since 4541 was
4541,
checked in by patrick, 19 years ago
|
orxonox/trunk: added obb tree node structure to be more modular
|
File size:
1017 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file bv_tree.h |
---|
3 | \brief Definition of a bounding volume tree |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _OBB_TREE_NODE_H |
---|
8 | #define _OBB_TREE_NODE_H |
---|
9 | |
---|
10 | #include "bv_tree_node.h" |
---|
11 | |
---|
12 | // FORWARD DEFINITION |
---|
13 | class BoundingVolume; |
---|
14 | class sVec3D; |
---|
15 | |
---|
16 | //! A class that represents a bounding volume tree |
---|
17 | class OBBTreeNode : public BVTreeNode { |
---|
18 | |
---|
19 | |
---|
20 | public: |
---|
21 | OBBTreeNode(); |
---|
22 | virtual ~OBBTreeNode(); |
---|
23 | |
---|
24 | virtual void spawnBVTree(int depth); |
---|
25 | |
---|
26 | BoundingVolume* getBV(int index) const { return this->bvElement; } |
---|
27 | inline const int getIndex() { return this->treeIndex; } |
---|
28 | |
---|
29 | virtual void collideWith(const BVTree &tree); |
---|
30 | |
---|
31 | virtual void drawBV(int currentDepth, const int depth) const; |
---|
32 | virtual void drawBVPolygon(int currentDepth, const int depth) const; |
---|
33 | virtual void drawBVBlended(int currentDepth, const int depth) const; |
---|
34 | |
---|
35 | |
---|
36 | protected: |
---|
37 | BoundingVolume* bvElement; |
---|
38 | OBBTreeNode* nodeLeft; |
---|
39 | OBBTreeNode* nodeRight; |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | unsigned int treeIndex; //!< Index number of the BV in the tree |
---|
44 | |
---|
45 | }; |
---|
46 | |
---|
47 | #endif /* _OBB_TREE_NODE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.