Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 25, 2005, 12:22:50 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: started calculating the prjection axis

File:
1 edited

Legend:

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

    r4695 r4696  
    606606void OBBTreeNode::collideWith(BVTreeNode* treeNode)
    607607{
     608  PRINTF(0)("collideWith");
    608609  /* if the obb overlap, make subtests: check which node is realy overlaping  */
    609610  if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement))
     
    624625bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB)
    625626{
    626 
    627 }
     627  /* first check all axis */
     628  float r = 0.0f;
     629  Vector l = boxA->axis[0];
     630  for(int i = 0; i < 3; ++i)
     631  {
     632    r += boxA->halfLength[i] * boxA->axis[i].dot(l);
     633  }
     634
     635  printf("r = %f\n", r);
     636  /* now check all orthogonals from the axis */
     637}
     638
    628639
    629640
Note: See TracChangeset for help on using the changeset viewer.