Changeset 7735 in orxonox.OLD
- Timestamp:
- May 19, 2006, 5:36:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/obb_tree_node.cc
r7734 r7735 282 282 box.axis[2] = axis[2]; 283 283 284 // this is for axis aligned bouning boxes only 284 285 // box.axis[0] = Vector(1,0,0); 285 286 // box.axis[1] = Vector(0,1,0); … … 489 490 { 490 491 if( unlikely(treeNode == NULL || nodeA == NULL || nodeB == NULL)) 491 {492 // assert(false);493 492 return; 494 } 493 495 494 496 495 PRINTF(4)("collideWith\n"); … … 517 516 518 517 /* check if left node overlaps */ 519 if( likely( this->nodeLeft != NULL))518 if( this->nodeLeft != NULL ) 520 519 { 521 520 PRINTF(5)("Checking OBB %i vs %i: ", this->nodeLeft->getIndex(), treeNode->getIndex()); … … 538 537 539 538 /* so there is a collision and this is the last box in the tree (i.e. leaf) */ 540 /* FIXME: If we would choose || insead of && there would also be asymmetrical cases supported */541 if( unlikely(this->nodeRight == NULL || this->nodeLeft == NULL))539 if( unlikely((this->nodeRight == NULL || this->nodeLeft == NULL) || 540 (treeNode->nodeRight == NULL || treeNode->nodeLeft == NULL)) ) 542 541 { 543 542 nodeA->collidesWith(nodeB, treeNode->bvElement->center);
Note: See TracChangeset
for help on using the changeset viewer.