Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2005, 6:29:10 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: obb tree now can get rendered transparent

File:
1 edited

Legend:

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

    r4669 r4670  
    685685    float* len = this->bvElement->halfLength;
    686686
     687    if( drawMode & DRAW_BV_BLENDED)
     688      this->obbTree->getTransparentMaterial(treeIndex)->select();
     689
    687690    /* draw bounding box */
    688     glBegin(GL_QUAD_STRIP);
     691    if( drawMode & DRAW_BV_BLENDED)
     692      glBegin(GL_QUADS);
     693    else
     694      glBegin(GL_LINE_LOOP);
    689695    glVertex3f(cen.x + axis[0].x * len[0] + axis[1].x * len[1] + axis[2].x * len[2],
    690696               cen.y + axis[0].y * len[0] + axis[1].y * len[1] + axis[2].y * len[2],
     
    701707    glEnd();
    702708
    703     glBegin(GL_LINE_LOOP);
     709    if( drawMode & DRAW_BV_BLENDED)
     710      glBegin(GL_QUADS);
     711    else
     712      glBegin(GL_LINE_LOOP);
    704713    glVertex3f(cen.x + axis[0].x * len[0] - axis[1].x * len[1] + axis[2].x * len[2],
    705714               cen.y + axis[0].y * len[0] - axis[1].y * len[1] + axis[2].y * len[2],
     
    716725    glEnd();
    717726
    718     glBegin(GL_LINE_LOOP);
     727    if( drawMode & DRAW_BV_BLENDED)
     728      glBegin(GL_QUADS);
     729    else
     730      glBegin(GL_LINE_LOOP);
    719731    glVertex3f(cen.x - axis[0].x * len[0] - axis[1].x * len[1] + axis[2].x * len[2],
    720732               cen.y - axis[0].y * len[0] - axis[1].y * len[1] + axis[2].y * len[2],
     
    731743    glEnd();
    732744
    733     glBegin(GL_LINE_LOOP);
     745    if( drawMode & DRAW_BV_BLENDED)
     746      glBegin(GL_QUADS);
     747    else
     748      glBegin(GL_LINE_LOOP);
    734749    glVertex3f(cen.x - axis[0].x * len[0] + axis[1].x * len[1] - axis[2].x * len[2],
    735750               cen.y - axis[0].y * len[0] + axis[1].y * len[1] - axis[2].y * len[2],
     
    745760               cen.z + axis[0].z * len[0] + axis[1].z * len[1] - axis[2].z * len[2]);
    746761    glEnd();
     762
     763    if( drawMode & DRAW_BV_BLENDED)
     764      this->obbTree->getMaterial(treeIndex)->select();
    747765    }
    748766
Note: See TracChangeset for help on using the changeset viewer.