Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 10, 2005, 3:27:05 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: axis get drawn, still strange values, debug

File:
1 edited

Legend:

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

    r4578 r4581  
    209209  printf("eigenvector: %f, %f, %f\n", V(1, 3), V(2, 3), V(3, 3));
    210210
     211  box->axis = axis;
    211212
    212213  /* now get the axis length */
     
    229230  }
    230231
     232  box->halfLength = halfLength;
     233 
    231234  printf("we got length: \n");
    232235  for(int i = 0; i < 3; ++i)
     
    260263void OBBTreeNode::drawBV(int currentDepth, const int depth) const
    261264{
     265  glBegin(GL_LINE_LOOP);
    262266  glColor3f(1.0, 1.0, 1.0);
    263   glBegin(GL_TRIANGLES);
    264267  for(int i = 0; i < this->numOfVertices; ++i)
    265268    {
     
    273276void OBBTreeNode::drawBVPolygon(int currentDepth, const int depth) const
    274277{
    275   this->bvElement->axis;
    276  
    277   //glBegin(GL_TRIANGLE);
    278   //glVertex3f(this->bvElement->center );
    279   //glEnd();
     278  glBegin(GL_LINES);
     279  glColor3f(0.0, 0.4, 0.3);
     280  glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
     281  glVertex3f(this->bvElement->axis[0]->x * this->bvElement->halfLength[0], this->bvElement->axis[0]->y * this->bvElement->halfLength[0], this->bvElement->axis[0]->z * this->bvElement->halfLength[0]);
     282
     283  glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
     284  glVertex3f(this->bvElement->axis[1]->x * this->bvElement->halfLength[1], this->bvElement->axis[1]->y * this->bvElement->halfLength[1], this->bvElement->axis[1]->z * this->bvElement->halfLength[1]);
     285
     286  glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
     287  glVertex3f(this->bvElement->axis[2]->x * this->bvElement->halfLength[2], this->bvElement->axis[2]->y * this->bvElement->halfLength[2], this->bvElement->axis[2]->z * this->bvElement->halfLength[2]);
     288 
     289  glEnd();
    280290}
    281291
Note: See TracChangeset for help on using the changeset viewer.