Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6668 was 6022, checked in by bensch, 19 years ago

orxonox/trunk: merged the NewModel branche back to the trunk.
merged with command
svn merge branches/newModel/ trunk/ -r 6016:HEAD
no conflicts

File size: 1.2 KB
RevLine 
[4616]1/*!
[5039]2 * @file obb_tree.h
[4836]3  *  Definition of an obb tree (object oriented Bounding Box)
[4510]4
5*/
6
[4511]7#ifndef _OBB_TREE_H
8#define _OBB_TREE_H
[4510]9
[4514]10#include "bv_tree.h"
[6022]11#include "model.h"
[4616]12#include "material.h"
[4510]13
[4616]14class Material;
[4550]15class OBBTreeNode;
[4700]16class PNode;
[4550]17
[4511]18//! A class for representing an obb tree
[4514]19class OBBTree : public BVTree {
[4510]20
[4616]21  public:
22    OBBTree();
[4682]23    OBBTree(int depth, sVec3D *verticesList, const int length);
[5684]24    OBBTree(int depth, const modelInfo& modInfo);
[4616]25    virtual ~OBBTree();
[4682]26    void init();
[4510]27
[4616]28    virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);
[5684]29    virtual void spawnBVTree(int depth, const modelInfo& modInfo);
[4616]30    virtual void flushTree();
[4510]31
[5028]32    virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB);
[5026]33    virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2);
[4528]34
[4635]35    virtual void drawBV(int depth, int drawMode) const;
[4528]36
[4638]37    int getID() { return ++this->id;}
[4696]38    inline OBBTreeNode* getRootNode() { return this->rootNode; }
[4622]39
[4616]40    void debug();
[4546]41
[4616]42  private:
43    OBBTreeNode*         rootNode;                        //!< reference to the root node of the tree
[4638]44    int                  id;
[4510]45};
46
[4511]47#endif /* _OBB_TREE_H */
Note: See TracBrowser for help on using the repository browser.