Last change
on this file since 6890 was
6890,
checked in by patrick, 18 years ago
|
cd_merge: comipiles again. major interface adjustements
|
File size:
1.1 KB
|
Rev | Line | |
---|
[4618] | 1 | /*! |
---|
[5039] | 2 | * @file bv_tree.h |
---|
[4836] | 3 | * Definition of a bounding volume tree |
---|
[4541] | 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #ifndef _BV_TREE_NODE_H |
---|
| 8 | #define _BV_TREE_NODE_H |
---|
| 9 | |
---|
[6657] | 10 | |
---|
[4541] | 11 | #include "base_object.h" |
---|
[6022] | 12 | #include "model.h" |
---|
[5481] | 13 | #include "vector.h" |
---|
[4541] | 14 | |
---|
[6657] | 15 | |
---|
| 16 | // forward declarations |
---|
[4541] | 17 | class BoundingVolume; |
---|
| 18 | class BVTree; |
---|
[4700] | 19 | class PNode; |
---|
[5028] | 20 | class WorldEntity; |
---|
[4542] | 21 | template<class T> class tList; |
---|
[4541] | 22 | |
---|
[6657] | 23 | |
---|
[4541] | 24 | //! A class that represents a bounding volume tree |
---|
| 25 | class BVTreeNode : public BaseObject { |
---|
| 26 | |
---|
[6657] | 27 | |
---|
[4541] | 28 | public: |
---|
| 29 | BVTreeNode(); |
---|
| 30 | virtual ~BVTreeNode(); |
---|
| 31 | |
---|
[6657] | 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; } |
---|
[4541] | 35 | |
---|
[6657] | 36 | virtual void spawnBVTree(const modelInfo& modInfo, const int* triangleIndexes, int length) = 0; |
---|
[6890] | 37 | virtual void collideWith(const BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0; |
---|
[5481] | 38 | virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0; |
---|
[4541] | 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.