Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7582 in orxonox.OLD for branches/cd


Ignore:
Timestamp:
May 10, 2006, 11:42:29 PM (19 years ago)
Author:
patrick
Message:

cd: some more debug infos

File:
1 edited

Legend:

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

    r7554 r7582  
    313313      tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
    314314      tmpLength = p0.distancePoint(*tmpVec);
     315      PRINTF(0)("point[%i][%i]: %f, %f, %f with distance to plane: %f\n", j, i, tmpVec[0], tmpVec[1], tmpVec[2], tmpLength);
    315316      if( tmpLength > maxLength[0])
    316317        maxLength[0] = tmpLength;
     
    361362  {
    362363    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
    364   }
    365   box.center.x += centerOffset[0];
    366   box.center.y += centerOffset[1];
    367   box.center.z += centerOffset[2];
     364    box.halfLength[i] = (maxLength[i] - minLength[i]) / 3.0f;                 // min length is negative
     365  }
     366  // FIXME: += anstatt -= ????????? verwirr
     367  box.center.x -= centerOffset[0];
     368  box.center.y -= centerOffset[1];
     369  box.center.z -= centerOffset[2];
    368370
    369371  PRINTF(3)("\n");
Note: See TracChangeset for help on using the changeset viewer.