- Timestamp:
- Aug 15, 2005, 8:59:02 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bv_tree.h
r5026 r5028 42 42 virtual void flushTree() = NULL; 43 43 44 virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB) = NULL;44 virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB) = NULL; 45 45 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = NULL; 46 46 -
orxonox/trunk/src/lib/collision_detection/bv_tree_node.h
r4836 r5028 15 15 class BVTree; 16 16 class PNode; 17 class WorldEntity; 17 18 template<class T> class tList; 18 19 … … 29 30 inline const int getIndex() { return this->treeIndex; } 30 31 31 virtual void collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB) = NULL;32 virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = NULL; 32 33 33 34 virtual void drawBV(int depth, int drawMode) = NULL; -
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r5027 r5028 113 113 { 114 114 if( likely(entity2->getOBBTree() != NULL) ) 115 this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), (PNode*)entity1, (PNode*)entity2);115 this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), entity1, entity2); 116 116 } 117 117 … … 123 123 * @param nodeB: Pnode of object B 124 124 */ 125 void OBBTree::collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB)125 void OBBTree::collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB) 126 126 { 127 127 this->rootNode->collideWith(((OBBTree*)tree)->getRootNode(), nodeA, nodeB); -
orxonox/trunk/src/lib/collision_detection/obb_tree.h
r5026 r5028 28 28 virtual void flushTree(); 29 29 30 virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB);30 virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB); 31 31 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2); 32 32 -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4836 r5028 22 22 #include "vector.h" 23 23 #include "abstract_model.h" 24 #include " p_node.h"24 #include "world_entity.h" 25 25 26 26 #include <math.h> … … 620 620 621 621 622 void OBBTreeNode::collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB)622 void OBBTreeNode::collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) 623 623 { 624 624 PRINTF(3)("collideWith\n"); … … 647 647 this->nodeRight->collideWith(((OBBTreeNode*)treeNode)->nodeRight, nodeA, nodeB); 648 648 } 649 } 650 } 651 } 652 653 654 655 bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB, PNode* nodeA, PNode* nodeB) 649 650 /* so there is a collision and this is the last box in the tree (i.e. leaf) */ 651 if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL)) 652 { 653 //nodeA->collidesWith() 654 } 655 } 656 } 657 } 658 659 660 661 bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB, WorldEntity* nodeA, WorldEntity* nodeB) 656 662 { 657 663 /* first check all axis */ -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
r4836 r5028 34 34 inline void setTreeRef(OBBTree* tree) { this->obbTree = tree;} 35 35 36 virtual void collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB);36 virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB); 37 37 38 38 virtual void drawBV(int depth, int drawMode); … … 46 46 void forkBox(OBB* box); 47 47 48 bool overlapTest(OBB* boxA, OBB* boxB, PNode* nodeA, PNode* nodeB);48 bool overlapTest(OBB* boxA, OBB* boxB, WorldEntity* nodeA, WorldEntity* nodeB); 49 49 50 50 protected:
Note: See TracChangeset
for help on using the changeset viewer.