Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8849 in orxonox.OLD for branches/multi_player_map/src/lib


Ignore:
Timestamp:
Jun 28, 2006, 1:49:00 PM (18 years ago)
Author:
patrick
Message:

collision detection works now

File:
1 edited

Legend:

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

    r8845 r8849  
    489489      if( this->overlapTest(this->nodeLeft->bvElement, treeNode->bvElement, nodeA, nodeB))
    490490      {
     491        bool bAdvance = false;
    491492        if( treeNode->nodeLeft != NULL)
    492493          this->nodeLeft->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     494        else
     495          bAdvance = true;
     496
    493497        if( treeNode->nodeRight != NULL)
    494498          this->nodeLeft->collideWith(treeNode->nodeRight, nodeA, nodeB);
     499        else
     500          bAdvance = true;
     501
     502        if( bAdvance)
     503          this->nodeLeft->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    495504      }
    496505    }
     
    501510      if( this->overlapTest(this->nodeRight->bvElement, treeNode->bvElement, nodeA, nodeB))
    502511      {
     512        bool bAdvance = false;
     513
    503514        if( treeNode->nodeLeft != NULL)
    504515          this->nodeRight->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     516        else
     517          bAdvance = true;
     518
    505519        if( treeNode->nodeRight != NULL)
    506520          this->nodeRight->collideWith(treeNode->nodeRight, nodeA, nodeB);
     521        else
     522          bAdvance = true;
     523
     524        if( bAdvance)
     525          this->nodeRight->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    507526      }
    508527    }
     
    523542        (treeNode->nodeRight == NULL && treeNode->nodeLeft == NULL)) )
    524543    {
    525       PRINTF(0)("----------------------------------------------\\n\n\n\n\n\n--------------------------------\n\n\n");
     544//       PRINTF(0)("----------------------------------------------\n\n\n\n\n\n--------------------------------\n\n\n");
    526545      nodeA->registerCollision(nodeA, nodeB, (BoundingVolume*)this->bvElement, (BoundingVolume*)treeNode->bvElement);
    527546    }
Note: See TracChangeset for help on using the changeset viewer.