Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5487 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Nov 4, 2005, 3:34:58 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: blended rendering works again in the CollisionDetection Debug-Draw

Location:
trunk/src
Files:
2 edited

Legend:

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

    r5481 r5487  
    838838    glDisable(GL_LIGHTING);
    839839    glDisable(GL_TEXTURE_2D);
    840     glDisable(GL_BLEND);
    841840  }
    842841  glColor3f(color.x, color.y, color.z);
     
    891890  if( drawMode & DRAW_BV_POLYGON || drawMode & DRAW_ALL || drawMode & DRAW_BV_BLENDED)
    892891  {
     892    if (top)
     893    {
     894      glEnable(GL_BLEND);
     895      glBlendFunc(GL_SRC_ALPHA, GL_ONE);
     896    }
     897
    893898    if(this->nodeLeft == NULL || this->nodeRight == NULL)
    894899      depth = 0;
     
    901906    if( this->bvElement->bCollided)
    902907    {
    903       glColor3f(1.0, 1.0, 1.0); // COLLISION COLOR
     908      glColor4f(1.0, 1.0, 1.0, .5); // COLLISION COLOR
    904909    }
    905910    else if( drawMode & DRAW_BV_BLENDED)
     
    907912      glColor4f(color.x, color.y, color.z, .5);
    908913    }
    909 
    910 
    911914
    912915    /* draw bounding box */
     
    10551058  if (depth > 0)
    10561059  {
    1057     Vector childColor =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0));
     1060    Vector childColor1 =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(10.0,0.0,0.0));
     1061    Vector childColor2 =  Color::HSVtoRGB(Color::RGBtoHSV(color)-Vector(10.0,0.0,0.0));
    10581062    if( this->nodeLeft != NULL)
    1059       this->nodeLeft->drawBV(depth - 1, drawMode, childColor, false);
     1063      this->nodeLeft->drawBV(depth - 1, drawMode, childColor1, false);
    10601064    if( this->nodeRight != NULL)
    1061       this->nodeRight->drawBV(depth - 1, drawMode, childColor, false);
     1065      this->nodeRight->drawBV(depth - 1, drawMode, childColor2, false);
    10621066  }
    10631067  this->bvElement->bCollided = false;
  • trunk/src/subprojects/collision_detection/collision_test_entity.cc

    r5486 r5487  
    3636  this->loadModel("models/ships/fighter.obj");
    3737
    38   if(this->obbTree == NULL)
    39     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
     38  this->buildObbTree(10);
    4039}
    4140
Note: See TracChangeset for help on using the changeset viewer.