Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 24, 2005, 11:15:12 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: no only the overlap test is missing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4688 r4695  
    530530  tList<sVec3D>      partition2;                           //!< the vertex partition 2
    531531
    532   printf("vertex index: %i, of %i\n", vertexIndex, box->numOfVertices);
     532  PRINTF(3)("vertex index: %i, of %i\n", vertexIndex, box->numOfVertices);
    533533  this->separationPlane = new Plane(box->axis[axisIndex], box->vertices[vertexIndex]);  //!< separation plane
    534534  this->sepPlaneCenter = &box->vertices[vertexIndex];
     
    604604
    605605
    606 void OBBTreeNode::collideWith(const BVTree &tree)
    607 {}
    608 
    609 
     606void 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
     624bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB)
     625{
     626
     627}
    610628
    611629
Note: See TracChangeset for help on using the changeset viewer.