Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/lib/collision_detection/bv_tree.h @ 5904

Last change on this file since 5904 was 5684, checked in by patrick, 19 years ago

orxonox/trunk: extended the obb interface dramaticaly:D , in near future it will support the modelInfo structure and therefore will be based on triangles

File size: 1.2 KB
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 "abstract_model.h"
13
14// FORWARD DECLARATION
15class BoundingVolume;
16class BVTreeNode;
17class PNode;
18class WorldEntity;
19
20typedef enum DrawMode
21{
22  DRAW_ALL               = 1<<0,
23  DRAW_SINGLE            = 1<<1,
24
25  DRAW_SEPARATING_PLANE  = 1<<2,
26  DRAW_BV_AXIS           = 1<<3,
27  DRAW_BV_BLENDED        = 1<<4,
28  DRAW_BV_POLYGON        = 1<<5,
29  DRAW_MODEL             = 1<<6,
30  DRAW_POINTS            = 1<<7
31};
32
33
34//! A class that represents a bounding volume tree
35class BVTree : public BaseObject {
36
37 public:
38  BVTree();
39  virtual ~BVTree();
40
41  virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length) = 0;
42  virtual void spawnBVTree(int depth, const modelInfo& modInfo) = 0;
43  virtual void flushTree() = 0;
44
45  virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB) = 0;
46  virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = 0;
47
48  /** @param depth: depth, @param drawMode: how to draw the Model */
49  virtual void drawBV(int depth, int drawMode) const = 0;
50
51
52 protected:
53  int numberOfVertices;
54
55 private:
56
57
58};
59
60#endif /* _BV_TREE_H */
Note: See TracBrowser for help on using the repository browser.