Line | |
---|
1 | /*! |
---|
2 | * @file bv_tree.h |
---|
3 | * Definition of a bounding volume tree |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _BV_TREE_H |
---|
8 | #define _BV_TREE_H |
---|
9 | |
---|
10 | |
---|
11 | #include "base_object.h" |
---|
12 | #include "model.h" |
---|
13 | |
---|
14 | // FORWARD DECLARATION |
---|
15 | class BoundingVolume; |
---|
16 | class BVTreeNode; |
---|
17 | class PNode; |
---|
18 | class WorldEntity; |
---|
19 | |
---|
20 | //! draw mode for the bounding volume |
---|
21 | typedef enum DrawMode |
---|
22 | { |
---|
23 | DRAW_ALL = 1<<0, |
---|
24 | DRAW_SINGLE = 1<<1, |
---|
25 | |
---|
26 | DRAW_SEPARATING_PLANE = 1<<2, |
---|
27 | DRAW_BV_AXIS = 1<<3, |
---|
28 | DRAW_BV_BLENDED = 1<<4, |
---|
29 | DRAW_BV_POLYGON = 1<<5, |
---|
30 | DRAW_MODEL = 1<<6, |
---|
31 | DRAW_POINTS = 1<<7 |
---|
32 | }; |
---|
33 | |
---|
34 | |
---|
35 | //! A class that represents a bounding volume tree |
---|
36 | class BVTree : public BaseObject |
---|
37 | { |
---|
38 | ObjectListDeclaration(BVTree); |
---|
39 | |
---|
40 | public: |
---|
41 | BVTree(); |
---|
42 | virtual ~BVTree(); |
---|
43 | |
---|
44 | virtual void spawnBVTree(const modelInfo& modelInf) = 0; |
---|
45 | virtual void flushTree() = 0; |
---|
46 | |
---|
47 | virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = 0; |
---|
48 | |
---|
49 | virtual void drawBV(int depth, int drawMode) const = 0; |
---|
50 | }; |
---|
51 | |
---|
52 | #endif /* _BV_TREE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.