Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/collision_detection/bv_tree_node.h @ 5615

Last change on this file since 5615 was 5481, checked in by bensch, 19 years ago

orxonox/trunk: BV-nodes are now renddered more efficiently.

File size: 1005 bytes
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
15class BoundingVolume;
16class BVTree;
17class PNode;
18class WorldEntity;
19template<class T> class tList;
20
21//! A class that represents a bounding volume tree
22class BVTreeNode : public BaseObject {
23
24 public:
25  BVTreeNode();
26  virtual ~BVTreeNode();
27
28  virtual void spawnBVTree(const int depth, sVec3D *verticesList, const int length ) = 0;
29
30  virtual BoundingVolume* getBV(int index) const = 0;
31  inline const int getIndex() { return this->treeIndex; }
32
33  virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0;
34
35  virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0;
36
37
38 private:
39  unsigned int        treeIndex;                  //!< Index number of the BV in the tree
40
41};
42
43#endif /* _BV_TREE_NODE_H */
Note: See TracBrowser for help on using the repository browser.