Last change
on this file since 4656 was
4638,
checked in by patrick, 19 years ago
|
orxonox/trunk: changed the way the data is displayed, now supports colors and stuff. noticed some data drawing problems. the tree separation seems so work perfectly but the graphical data representation is buggy
|
File size:
938 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file obb_tree.h |
---|
3 | \brief Definition of an obb tree (object oriented Bounding Box) |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _OBB_TREE_H |
---|
8 | #define _OBB_TREE_H |
---|
9 | |
---|
10 | #include "bv_tree.h" |
---|
11 | #include "abstract_model.h" |
---|
12 | #include "material.h" |
---|
13 | |
---|
14 | class Material; |
---|
15 | class OBBTreeNode; |
---|
16 | |
---|
17 | //! A class for representing an obb tree |
---|
18 | class OBBTree : public BVTree { |
---|
19 | |
---|
20 | public: |
---|
21 | OBBTree(); |
---|
22 | virtual ~OBBTree(); |
---|
23 | |
---|
24 | virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length); |
---|
25 | virtual void flushTree(); |
---|
26 | |
---|
27 | void collideWith(const OBBTree &tree); |
---|
28 | |
---|
29 | virtual void drawBV(int depth, int drawMode) const; |
---|
30 | |
---|
31 | Material* getMaterial(unsigned int depth) { return material[depth%5]; } |
---|
32 | int getID() { return ++this->id;} |
---|
33 | |
---|
34 | |
---|
35 | void debug(); |
---|
36 | |
---|
37 | public: |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | private: |
---|
42 | OBBTreeNode* rootNode; //!< reference to the root node of the tree |
---|
43 | Material** material; |
---|
44 | int id; |
---|
45 | }; |
---|
46 | |
---|
47 | #endif /* _OBB_TREE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.