Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 31, 2006, 7:12:41 PM (18 years ago)
Author:
patrick
Message:

cd: compiles again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/current_cd/src/lib/collision_detection/obb_tree_node.cc

    r6909 r6911  
    515515
    516516
    517 void OBBTreeNode::collideWith(const BVTreeNode& treeNode, const WorldEntity& nodeA, const WorldEntity& nodeB) const
     517void OBBTreeNode::collideWith(const BVTreeNode& treeNode, WorldEntity* nodeA, WorldEntity* nodeB)
    518518{
    519519  PRINTF(3)("collideWith\n");
     
    525525  if( this->overlapTest(*this->bvElement, *(((const OBBTreeNode*)&treeNode)->bvElement), nodeA, nodeB))
    526526  {
    527     PRINTF(3)("collision @ lvl %i, object %s vs. %s, (%p, %p)\n", this->depth, nodeA.getClassName(), nodeB.getClassName(), this->nodeLeft, this->nodeRight);
     527    PRINTF(3)("collision @ lvl %i, object %s vs. %s, (%p, %p)\n", this->depth, nodeA->getClassName(), nodeB->getClassName(), this->nodeLeft, this->nodeRight);
    528528
    529529    /* check if left node overlaps */
     
    552552    if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL))
    553553    {
    554       nodeA.collidesWith(nodeB, (((const OBBTreeNode*)&treeNode)->bvElement->center));
    555 
    556       nodeB.collidesWith(nodeA, this->bvElement->center);
    557     }
    558 
    559   }
    560 }
    561 
    562 
    563 
    564 bool OBBTreeNode::overlapTest(const OBB& boxA, const OBB& boxB, const WorldEntity& nodeA, const WorldEntity& nodeB) const
     554      nodeA->collidesWith(nodeB, (((const OBBTreeNode*)&treeNode)->bvElement->center));
     555
     556      nodeB->collidesWith(nodeA, this->bvElement->center);
     557    }
     558
     559  }
     560}
     561
     562
     563
     564bool OBBTreeNode::overlapTest(const OBB& boxA, const OBB& boxB, WorldEntity* nodeA, WorldEntity* nodeB)
    565565{
    566566  //   if( boxB == NULL || boxA == NULL)
     
    575575  Vector rotAxisB[3];
    576576
    577   rotAxisA[0] =  nodeA.getAbsDir().apply(boxA.axis[0]);
    578   rotAxisA[1] =  nodeA.getAbsDir().apply(boxA.axis[1]);
    579   rotAxisA[2] =  nodeA.getAbsDir().apply(boxA.axis[2]);
    580 
    581   rotAxisB[0] =  nodeB.getAbsDir().apply(boxB.axis[0]);
    582   rotAxisB[1] =  nodeB.getAbsDir().apply(boxB.axis[1]);
    583   rotAxisB[2] =  nodeB.getAbsDir().apply(boxB.axis[2]);
    584 
    585 
    586   t = nodeA.getAbsCoor() + nodeA.getAbsDir().apply(boxA.center) - ( nodeB.getAbsCoor() + nodeB.getAbsDir().apply(boxB.center));
     577  rotAxisA[0] =  nodeA->getAbsDir().apply(boxA.axis[0]);
     578  rotAxisA[1] =  nodeA->getAbsDir().apply(boxA.axis[1]);
     579  rotAxisA[2] =  nodeA->getAbsDir().apply(boxA.axis[2]);
     580
     581  rotAxisB[0] =  nodeB->getAbsDir().apply(boxB.axis[0]);
     582  rotAxisB[1] =  nodeB->getAbsDir().apply(boxB.axis[1]);
     583  rotAxisB[2] =  nodeB->getAbsDir().apply(boxB.axis[2]);
     584
     585
     586  t = nodeA->getAbsCoor() + nodeA->getAbsDir().apply(boxA.center) - ( nodeB->getAbsCoor() + nodeB->getAbsDir().apply(boxB.center));
    587587
    588588  //   printf("\n");
Note: See TracChangeset for help on using the changeset viewer.