Changeset 4695 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 24, 2005, 11:15:12 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bv_tree.h
r4635 r4695 14 14 // FORWARD DEFINITION 15 15 class BoundingVolume; 16 class BVTreeNode; 16 17 17 18 typedef enum DrawMode … … 38 39 virtual void flushTree() = NULL; 39 40 41 virtual void collideWith(BVTree* tree) = NULL; 42 40 43 virtual void drawBV(int depth, int drawMode) const = NULL; 44 41 45 42 46 protected: -
orxonox/trunk/src/lib/collision_detection/bv_tree_node.h
r4635 r4695 29 29 inline const int getIndex() { return this->treeIndex; } 30 30 31 virtual void collideWith( const BVTree &tree) = NULL;31 virtual void collideWith(BVTreeNode* treeNode) = NULL; 32 32 33 33 virtual void drawBV(int depth, int drawMode) const = NULL; -
orxonox/trunk/src/lib/collision_detection/cd_engine.cc
r4694 r4695 54 54 55 55 56 /** 57 \brief this is the collision checking function 58 59 there are some speed improvements that can be done here. a rewrite of the list a would be appropriate to 60 be able to enhance iteration speed. 61 */ 56 62 void CDEngine::checkCollisions() 57 63 { -
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r4682 r4695 103 103 104 104 105 void OBBTree::collideWith(const OBBTree &tree) 106 {} 105 void OBBTree::collideWith(BVTree* tree) 106 { 107 //this->rootNode->collideWith(tree->); 108 } 107 109 108 110 -
orxonox/trunk/src/lib/collision_detection/obb_tree.h
r4682 r4695 27 27 virtual void flushTree(); 28 28 29 v oid collideWith(const OBBTree &tree);29 virtual void collideWith(BVTree* tree); 30 30 31 31 virtual void drawBV(int depth, int drawMode) const; -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4688 r4695 530 530 tList<sVec3D> partition2; //!< the vertex partition 2 531 531 532 printf("vertex index: %i, of %i\n", vertexIndex, box->numOfVertices);532 PRINTF(3)("vertex index: %i, of %i\n", vertexIndex, box->numOfVertices); 533 533 this->separationPlane = new Plane(box->axis[axisIndex], box->vertices[vertexIndex]); //!< separation plane 534 534 this->sepPlaneCenter = &box->vertices[vertexIndex]; … … 604 604 605 605 606 void OBBTreeNode::collideWith(const BVTree &tree) 607 {} 608 609 606 void OBBTreeNode::collideWith(BVTreeNode* treeNode) 607 { 608 /* if the obb overlap, make subtests: check which node is realy overlaping */ 609 if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement)) 610 { 611 /* check if left node overlaps */ 612 if( unlikely( this->nodeLeft != NULL)) 613 if( this->overlapTest(this->nodeLeft->bvElement, ((OBBTreeNode*)treeNode)->bvElement)) 614 this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeLeft); 615 /* check if right node overlaps */ 616 if( unlikely( this->nodeRight != NULL)) 617 if(this->overlapTest(this->nodeRight->bvElement, ((OBBTreeNode*)treeNode)->bvElement)) 618 this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeRight); 619 } 620 } 621 622 623 624 bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB) 625 { 626 627 } 610 628 611 629 -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
r4685 r4695 33 33 inline void setTreeRef(OBBTree* tree) { this->obbTree = tree;} 34 34 35 virtual void collideWith( const BVTree &tree);35 virtual void collideWith(BVTreeNode* treeNode); 36 36 37 37 virtual void drawBV(int depth, int drawMode) const; … … 45 45 void forkBox(OBB* box); 46 46 47 bool overlapTest(OBB* boxA, OBB* boxB); 47 48 48 49 protected:
Note: See TracChangeset
for help on using the changeset viewer.