Changeset 7365 in orxonox.OLD for branches/cd/src/lib/collision_detection/obb_tree.h
- Timestamp:
- Apr 25, 2006, 3:17:20 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/lib/collision_detection/obb_tree.h
r6022 r7365 15 15 class OBBTreeNode; 16 16 class PNode; 17 class WorldEntity; 17 18 18 19 //! A class for representing an obb tree 19 class OBBTree : public BVTree { 20 class OBBTree : public BVTree 21 { 20 22 21 23 public: 22 OBBTree(); 23 OBBTree(int depth, sVec3D *verticesList, const int length); 24 OBBTree(int depth, const modelInfo& modInfo); 24 OBBTree(int depth, const modelInfo* modInfo, WorldEntity* entity); 25 25 virtual ~OBBTree(); 26 26 void init(); 27 27 28 virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length); 29 virtual void spawnBVTree(int depth, const modelInfo& modInfo); 28 virtual void spawnBVTree(const modelInfo& modelInf); 30 29 virtual void flushTree(); 31 30 32 virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB);33 31 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2); 34 35 32 virtual void drawBV(int depth, int drawMode) const; 36 33 37 int getID() { return ++this->id;} 38 inline OBBTreeNode* getRootNode() { return this->rootNode; } 34 /** returns the next if for the obb tree node @return integer id number of the next node */ 35 inline const int getID() { return ++this->id;} 36 /** returns the root node of the bounding volume tree @return reference to the root node */ 37 inline OBBTreeNode* getRootNode() const { return this->rootNode; } 38 inline WorldEntity* getOwner() const { return this->owner; } 39 39 40 40 void debug(); … … 42 42 private: 43 43 OBBTreeNode* rootNode; //!< reference to the root node of the tree 44 int id; 44 int id; //!< the next id of a obb tree node 45 int depth; //!< the depth of the tree to generate 46 WorldEntity* owner; //!< owner 45 47 }; 46 48
Note: See TracChangeset
for help on using the changeset viewer.