Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (18 years ago)
Author:
bensch
Message:

merged the presentation back

File:
1 edited

Legend:

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

    r9008 r9235  
    9090    delete this->bvElement;
    9191}
     92
     93
     94
     95void OBBTreeNode::createBox(Vector start, Vector end)
     96{
     97
     98  this->bvElement = new OBB();
     99  this->nodeLeft = NULL;
     100  this->nodeRight = NULL;
     101//   this->depth = 0;
     102
     103  this->bvElement->center = (end - start) * 0.5f;
     104  this->bvElement->halfLength[0] = (end.x - start.x) * 0.5f;
     105  this->bvElement->halfLength[1] = (end.y - start.y) * 0.5f;
     106  this->bvElement->halfLength[2] = (end.z - start.z) * 0.5f;
     107
     108  this->bvElement->axis[0] = Vector(1,0,0);
     109  this->bvElement->axis[1] = Vector(0,1,0);
     110  this->bvElement->axis[2] = Vector(0,0,1);
     111}
     112
    92113
    93114
     
    561582bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB, WorldEntity* nodeA, WorldEntity* nodeB)
    562583{
     584
    563585  //HACK remove this again
    564586  this->owner = nodeA;
     
    677699void OBBTreeNode::drawBV(int depth, int drawMode, const Vector& color,  bool top) const
    678700{
     701
    679702  /* this function can be used to draw the triangles and/or the points only  */
    680703  if( 1 /*drawMode & DRAW_MODEL || drawMode & DRAW_ALL*/)
     
    682705    if( depth == 0/*!(drawMode & DRAW_SINGLE && depth != 0)*/)
    683706    {
    684       if( 1 /*drawMode & DRAW_POINTS*/)
     707      if( 0 /*drawMode & DRAW_POINTS*/)
    685708      {
    686709        glBegin(GL_POINTS);
Note: See TracChangeset for help on using the changeset viewer.