Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7554 in orxonox.OLD for branches/cd/src/lib


Ignore:
Timestamp:
May 6, 2006, 1:27:07 PM (19 years ago)
Author:
patrick
Message:

cd: debuging like hell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cd/src/lib/collision_detection/obb_tree_node.cc

    r7545 r7554  
    159159  float     covariance[3][3] = {0,0,0, 0,0,0, 0,0,0};//!< the covariance matrix
    160160  sVec3D*   tmpVec = NULL;                           //!< a temp saving place for sVec3Ds
    161 
    162161
    163162  /* fist compute all the convex hull face/facelets and centroids */
     
    361360  for( int i = 0; i < 3; ++i)
    362361  {
    363     centerOffset[i] = (maxLength[i] + minLength[i]) / 2.0f;       // min length is negatie
    364     box.halfLength[i] = (maxLength[i]- minLength[i]) / 2.0f;      // min length is negative
     362    centerOffset[i] = (fabs(maxLength[i]) - fabs(minLength[i])) / 2.0f;       // min length is negatie
     363    box.halfLength[i] = (maxLength[i] - minLength[i]) / 2.0f;                 // min length is negative
    365364  }
    366365  box.center.x += centerOffset[0];
     
    369368
    370369  PRINTF(3)("\n");
    371   PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[0], maxLength[0], minLength[0]);
    372   PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[1], maxLength[1], minLength[1]);
    373   PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[2], maxLength[2], minLength[2]);
    374 
    375 
    376 //   box.halfLength[0] = halfLength[0];
    377 //   box.halfLength[1] = halfLength[1];
    378 //   box.halfLength[2] = halfLength[2];
     370  PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[0], maxLength[0], minLength[0], centerOffset[0]);
     371  PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[1], maxLength[1], minLength[1], centerOffset[1] );
     372  PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[2], maxLength[2], minLength[2], centerOffset[2]);
    379373}
    380374
     
    677671{
    678672  /* this function can be used to draw the triangles and/or the points only  */
    679   if( drawMode & DRAW_MODEL || drawMode & DRAW_ALL)
    680   {
    681     if( !(drawMode & DRAW_SINGLE && depth != 0))
    682     {
    683       if( drawMode & DRAW_POINTS)
     673  if( 1 /*drawMode & DRAW_MODEL || drawMode & DRAW_ALL*/)
     674  {
     675    if( depth == 0/*!(drawMode & DRAW_SINGLE && depth != 0)*/)
     676    {
     677      if( 1 /*drawMode & DRAW_POINTS*/)
    684678      {
    685679        glBegin(GL_POINTS);
     680        glColor3f(0.3, 0.8, 0.54);
    686681        for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3)
    687682          glVertex3f(this->bvElement->modelInf->pVertices[i],
     
    703698
    704699  /* draw world axes */
    705   if( drawMode & DRAW_BV_AXIS)
     700  if( 1 /*drawMode & DRAW_BV_AXIS*/)
    706701  {
    707702    glBegin(GL_LINES);
     
    721716
    722717
    723   if( drawMode & DRAW_BV_AXIS || drawMode & DRAW_ALL)
    724   {
    725     if( drawMode & DRAW_SINGLE && depth != 0)
     718  if( 1/*drawMode & DRAW_BV_AXIS || drawMode & DRAW_ALL*/)
     719  {
     720    if( 1/*drawMode & DRAW_SINGLE && depth != 0*/)
    726721    {
    727722      /* draw the obb axes */
Note: See TracChangeset for help on using the changeset viewer.