Changeset 4695 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
- Timestamp:
- Jun 24, 2005, 11:15:12 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.