Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2005, 1:37:14 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: a collision is now marked with a white box, not yet fully functional, since there are mission some axis to check

File:
1 edited

Legend:

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

    r4701 r4702  
    694694    }
    695695
    696   return true;
    697 }
    698 
    699 
    700 
    701 void OBBTreeNode::drawBV(int depth, int drawMode) const
     696    boxA->bCollided = true; /* use this ONLY!!!! for drawing operations */
     697    boxB->bCollided = true;
     698    return true;
     699}
     700
     701
     702
     703void OBBTreeNode::drawBV(int depth, int drawMode)
    702704{
    703705  this->obbTree->getMaterial(treeIndex)->select();
     
    774776    float* len = this->bvElement->halfLength;
    775777
    776     if( drawMode & DRAW_BV_BLENDED)
     778    if( this->bvElement->bCollided)
     779      this->obbTree->getCollisionMaterial()->select();
     780    else if( drawMode & DRAW_BV_BLENDED)
    777781      this->obbTree->getTransparentMaterial(treeIndex)->select();
     782
     783
    778784
    779785    /* draw bounding box */
     
    918924  }
    919925
     926
     927
    920928  if( this->nodeLeft != NULL && depth != 0 )
    921929    this->nodeLeft->drawBV(depth - 1, drawMode);
     
    923931    this->nodeRight->drawBV(depth - 1, drawMode);
    924932
     933  this->bvElement->bCollided = false;
    925934}
    926935
Note: See TracChangeset for help on using the changeset viewer.