Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2006, 2:22:19 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network bak to the trunk
merged with command:
svn merge -r8804:HEAD https://svn.orxonox.net/orxonox/branches/multi_player_map .

conflicts all resolved in favour of the branche

File:
1 edited

Legend:

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

    r8776 r9008  
    364364    }
    365365  }
     366  this->bvElement->radius = longestAxis;
    366367  PRINTF(4)("\nLongest Axis is: Nr %i with a half-length of:%11.2f\n", longestAxisIndex, longestAxis);
    367368
     
    454455    return;
    455456
     457  float distanceMax = this->bvElement->radius + ((OBBTreeNode*)treeNode)->bvElement->radius;
     458  float distance = fabs((nodeA->getAbsCoor() - nodeB->getAbsCoor()).len());
     459
     460
     461//   if( distance < distanceMax)
     462//     PRINTF(0)(" %s (%s: group %i) vs %s (%s: group %i): distanceMax: %f, distance: %f\n", nodeA->getClassName(), nodeA->getName(), nodeA->getOMListNumber(), nodeB->getClassName(),  nodeB->getName(), nodeB->getOMListNumber(), distanceMax, distance);
     463
     464
    456465  PRINTF(4)("collideWith\n");
    457466  PRINTF(5)("Checking OBB %i vs %i: ", this->getIndex(), treeNode->getIndex());
     
    482491      if( this->overlapTest(this->nodeLeft->bvElement, treeNode->bvElement, nodeA, nodeB))
    483492      {
     493        bool bAdvance = false;
    484494        if( treeNode->nodeLeft != NULL)
    485495          this->nodeLeft->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     496        else
     497          bAdvance = true;
     498
    486499        if( treeNode->nodeRight != NULL)
    487500          this->nodeLeft->collideWith(treeNode->nodeRight, nodeA, nodeB);
     501        else
     502          bAdvance = true;
     503
     504        if( bAdvance)
     505          this->nodeLeft->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    488506      }
    489507    }
     
    494512      if( this->overlapTest(this->nodeRight->bvElement, treeNode->bvElement, nodeA, nodeB))
    495513      {
     514        bool bAdvance = false;
     515
    496516        if( treeNode->nodeLeft != NULL)
    497517          this->nodeRight->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     518        else
     519          bAdvance = true;
     520
    498521        if( treeNode->nodeRight != NULL)
    499522          this->nodeRight->collideWith(treeNode->nodeRight, nodeA, nodeB);
     523        else
     524          bAdvance = true;
     525
     526        if( bAdvance)
     527          this->nodeRight->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    500528      }
    501529    }
     
    516544        (treeNode->nodeRight == NULL && treeNode->nodeLeft == NULL)) )
    517545    {
     546//       PRINTF(0)("----------------------------------------------\n\n\n\n\n\n--------------------------------\n\n\n");
    518547      nodeA->registerCollision(nodeA, nodeB, (BoundingVolume*)this->bvElement, (BoundingVolume*)treeNode->bvElement);
    519548    }
Note: See TracChangeset for help on using the changeset viewer.