Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/collision_detection/obb_tree.h @ 4924

Last change on this file since 4924 was 4836, checked in by bensch, 19 years ago

orxonox/trunk: renamed all the \param → @param and so on in Doxygen tags.
Thanks a lot to the kDevelop team. this took since the last commit :)

File size: 1.4 KB
Line 
1/*!
2    \file obb_tree.h
3  *  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
14class Material;
15class OBBTreeNode;
16class PNode;
17
18//! A class for representing an obb tree
19class OBBTree : public BVTree {
20
21  public:
22    OBBTree();
23    OBBTree(int depth, sVec3D *verticesList, const int length);
24    virtual ~OBBTree();
25    void init();
26
27    virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);
28    virtual void flushTree();
29
30    virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB);
31
32    virtual void drawBV(int depth, int drawMode) const;
33
34    Material* getMaterial(unsigned int depth) { return this->material[depth%5]; }
35    Material* getTransparentMaterial(unsigned int depth) { return this->transparentMaterial[depth%5]; }
36    Material* getCollisionMaterial() { return this->collisionMaterial; }
37    int getID() { return ++this->id;}
38    inline OBBTreeNode* getRootNode() { return this->rootNode; }
39
40    void debug();
41
42  public:
43
44
45
46  private:
47    OBBTreeNode*         rootNode;                        //!< reference to the root node of the tree
48    Material**           material;
49    Material**           transparentMaterial;
50    Material*            collisionMaterial;
51    int                  id;
52};
53
54#endif /* _OBB_TREE_H */
Note: See TracBrowser for help on using the repository browser.