Last change
on this file since 6787 was
6022,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the NewModel branche back to the trunk.
merged with command
svn merge branches/newModel/ trunk/ -r 6016:HEAD
no conflicts
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file obb_tree.h |
---|
3 | * Definition of an obb tree (object oriented Bounding Box) |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _OBB_TREE_H |
---|
8 | #define _OBB_TREE_H |
---|
9 | |
---|
10 | #include "bv_tree.h" |
---|
11 | #include "model.h" |
---|
12 | #include "material.h" |
---|
13 | |
---|
14 | class Material; |
---|
15 | class OBBTreeNode; |
---|
16 | class PNode; |
---|
17 | |
---|
18 | //! A class for representing an obb tree |
---|
19 | class OBBTree : public BVTree { |
---|
20 | |
---|
21 | public: |
---|
22 | OBBTree(); |
---|
23 | OBBTree(int depth, sVec3D *verticesList, const int length); |
---|
24 | OBBTree(int depth, const modelInfo& modInfo); |
---|
25 | virtual ~OBBTree(); |
---|
26 | void init(); |
---|
27 | |
---|
28 | virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length); |
---|
29 | virtual void spawnBVTree(int depth, const modelInfo& modInfo); |
---|
30 | virtual void flushTree(); |
---|
31 | |
---|
32 | virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB); |
---|
33 | virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2); |
---|
34 | |
---|
35 | virtual void drawBV(int depth, int drawMode) const; |
---|
36 | |
---|
37 | int getID() { return ++this->id;} |
---|
38 | inline OBBTreeNode* getRootNode() { return this->rootNode; } |
---|
39 | |
---|
40 | void debug(); |
---|
41 | |
---|
42 | private: |
---|
43 | OBBTreeNode* rootNode; //!< reference to the root node of the tree |
---|
44 | int id; |
---|
45 | }; |
---|
46 | |
---|
47 | #endif /* _OBB_TREE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.