Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2005, 1:06:44 AM (18 years ago)
Author:
patrick
Message:

collision_detection: and again a heavy cleanup in the function arguments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/collision_detection/src/lib/collision_detection/obb_tree.cc

    r5717 r5718  
    104104
    105105
    106 void OBBTree::collideWith(WorldEntity* entity1, WorldEntity* entity2)
    107 {
    108   if( likely(entity2->getOBBTree() != NULL) )
    109     this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), entity1, entity2);
    110 }
    111 
    112 
    113106/**
    114107 * this collides two bvtrees together. the trees are attached to pnodes Objects A and B
    115  * @param tree: the other tree to collide with (Object B)
    116108 * @param nodeA: PNode of object A
    117109 * @param nodeB: Pnode of object B
    118110 */
    119 void OBBTree::collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB)
     111void OBBTree::collideWith(const WorldEntity& entity1, const WorldEntity& entity2) const
    120112{
    121   this->rootNode->collideWith(((OBBTree*)tree)->getRootNode(), nodeA, nodeB);
     113  if( likely(entity2.getOBBTree() != NULL) )
     114    this->rootNode->collideWith(*(((OBBTree*)entity2.getOBBTree())->getRootNode()), entity1, entity2);
    122115}
     116
    123117
    124118
Note: See TracChangeset for help on using the changeset viewer.