Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cd_merge/src/lib/collision_detection/bv_tree_node.h @ 6657

Last change on this file since 6657 was 6657, checked in by bensch, 18 years ago

orxonox/cd_merge: merged the old collision-detection here.

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