Last change
on this file since 6911 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
|
Rev | Line | |
---|
[4622] | 1 | /*! |
---|
[5039] | 2 | * @file bv_tree.h |
---|
[4836] | 3 | * Definition of a bounding volume tree |
---|
[4510] | 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
[4511] | 7 | #ifndef _BV_TREE_H |
---|
| 8 | #define _BV_TREE_H |
---|
[4510] | 9 | |
---|
[4553] | 10 | |
---|
[4510] | 11 | #include "base_object.h" |
---|
[6022] | 12 | #include "model.h" |
---|
[4510] | 13 | |
---|
[5405] | 14 | // FORWARD DECLARATION |
---|
[4524] | 15 | class BoundingVolume; |
---|
[4695] | 16 | class BVTreeNode; |
---|
[4700] | 17 | class PNode; |
---|
[5026] | 18 | class WorldEntity; |
---|
[4510] | 19 | |
---|
[4635] | 20 | typedef enum DrawMode |
---|
| 21 | { |
---|
| 22 | DRAW_ALL = 1<<0, |
---|
| 23 | DRAW_SINGLE = 1<<1, |
---|
[4550] | 24 | |
---|
[4635] | 25 | DRAW_SEPARATING_PLANE = 1<<2, |
---|
| 26 | DRAW_BV_AXIS = 1<<3, |
---|
| 27 | DRAW_BV_BLENDED = 1<<4, |
---|
| 28 | DRAW_BV_POLYGON = 1<<5, |
---|
[4712] | 29 | DRAW_MODEL = 1<<6, |
---|
| 30 | DRAW_POINTS = 1<<7 |
---|
[4635] | 31 | }; |
---|
| 32 | |
---|
| 33 | |
---|
[4514] | 34 | //! A class that represents a bounding volume tree |
---|
[4511] | 35 | class BVTree : public BaseObject { |
---|
[4510] | 36 | |
---|
| 37 | public: |
---|
[4511] | 38 | BVTree(); |
---|
| 39 | virtual ~BVTree(); |
---|
[4510] | 40 | |
---|
[5279] | 41 | virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length) = 0; |
---|
[5684] | 42 | virtual void spawnBVTree(int depth, const modelInfo& modInfo) = 0; |
---|
[5279] | 43 | virtual void flushTree() = 0; |
---|
[4510] | 44 | |
---|
[5279] | 45 | virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB) = 0; |
---|
| 46 | virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = 0; |
---|
[4695] | 47 | |
---|
[5481] | 48 | /** @param depth: depth, @param drawMode: how to draw the Model */ |
---|
[5279] | 49 | virtual void drawBV(int depth, int drawMode) const = 0; |
---|
[4524] | 50 | |
---|
[4695] | 51 | |
---|
[4531] | 52 | protected: |
---|
[4533] | 53 | int numberOfVertices; |
---|
[4531] | 54 | |
---|
[4510] | 55 | private: |
---|
| 56 | |
---|
[4553] | 57 | |
---|
[4510] | 58 | }; |
---|
| 59 | |
---|
[4511] | 60 | #endif /* _BV_TREE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.