Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 13, 2005, 6:25:54 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: drawing in diffrent hirarchies works now, with diffrent colors

File:
1 edited

Legend:

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

    r4618 r4622  
    4141using namespace std;
    4242
     43OBBTree*  OBBTreeNode::obbTree = NULL;
    4344
    4445/**
     
    391392void OBBTreeNode::drawBV(int depth) const
    392393{
    393 //   glBegin(GL_LINE_LOOP);
    394 //   glColor3f(1.0, 1.0, 1.0);
    395 //   for(int i = 0; i < this->bvElement->numOfVertices; ++i)
    396 //     {
    397 //       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
    398 //       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
    399 //     }
    400 //   glEnd();
    401   //this->drawBVPolygon(currentDepth, depth);
     394  glBegin(GL_TRIANGLES);
     395  glColor3f(1.0, 1.0, 1.0);
     396  for(int i = 0; i < this->bvElement->numOfVertices; ++i)
     397    {
     398      glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
     399      //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
     400    }
     401  glEnd();
     402  //this->drawBVPolygon(depth);
    402403}
    403404
     
    405406void OBBTreeNode::drawBVPolygon(int depth) const
    406407{
    407 
    408   OBBTree::material->select();
     408  //OBBTree::material->select();
     409
     410  this->obbTree->getMaterial(depth)->select();
    409411
    410412  /* draw world axes */
     
    520522  glEnd();
    521523
    522   if( this->nodeLeft != NULL && depth != 0)
    523     this->nodeLeft->drawBVPolygon(depth -1);
     524  if( this->nodeLeft != NULL && depth != 0 )
     525    this->nodeLeft->drawBVPolygon(depth - 1);
    524526  if( this->nodeRight != NULL && depth != 0)
    525     this->nodeRight->drawBVPolygon(depth -1);
     527    this->nodeRight->drawBVPolygon(depth - 1);
    526528
    527529}
Note: See TracChangeset for help on using the changeset viewer.