Last change
on this file since 5937 was
5688,
checked in by patrick, 19 years ago
|
orxonox/trunk: the const collision detection war - strike
|
File size:
1.1 KB
|
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, const sVec3D *verticesList, unsigned int length ) = 0; |
---|
29 | virtual void spawnBVTree(const int depth, const modelInfo& modInfo) = 0; |
---|
30 | |
---|
31 | virtual BoundingVolume* getBV(int index) const = 0; |
---|
32 | inline const int getIndex() { return this->treeIndex; } |
---|
33 | |
---|
34 | virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0; |
---|
35 | |
---|
36 | virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0; |
---|
37 | |
---|
38 | |
---|
39 | private: |
---|
40 | unsigned int treeIndex; //!< Index number of the BV in the tree |
---|
41 | |
---|
42 | }; |
---|
43 | |
---|
44 | #endif /* _BV_TREE_NODE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.