Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 17, 2006, 10:36:01 PM (19 years ago)
Author:
patrick
Message:

cd: on debug tour again

File:
1 edited

Legend:

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

    r7597 r7658  
    117117  this->bvElement->triangleIndexesLength = length;
    118118
     119  // full debug output
     120
     121  //indexes debug
     122  for( int i = 0; i < length; ++i)
     123  {
     124    PRINTF(2)("triangle[%i], index: %i\n", i, triangleIndexes[i]);
     125  }
     126
     127  // vertex coordinates
     128  for( int i = 0; i < length; ++i)
     129  {
     130    PRINTF(2)("triangle[%i]\n", i);
     131    for(int j = 0; j < 3; ++j)
     132    {
     133      PRINTF(2)("  vertex[%i]: %f, %f, %f\n", j, modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]]);
     134    }
     135  }
     136
     137
     138
    119139  /* create the bounding boxes in three steps */
    120140  this->calculateBoxCovariance(*this->bvElement, modelInf, triangleIndexes, length);
     
    210230    box.covarianceMatrix[i][2] = covariance[i][2];
    211231  }
    212   box.center = center;
     232  //box.center = center;
     233  box.center = Vector();
    213234
    214235
     
    259280  box.axis[1] = axis[1];
    260281  box.axis[2] = axis[2];
     282
     283//   box.axis[0] = Vector(1,0,0);
     284//   box.axis[1] = Vector(0,1,0);
     285//   box.axis[2] = Vector(0,0,1);
    261286
    262287  PRINTF(3)("Eigenvectors:\n");
     
    308333    minLength[k] = p->distancePoint(tmpVec);
    309334
    310     for( int j = 0; j < length; ++j)
    311     {
    312       for( int i = 0; i < 3; ++i)
    313       {
    314         tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
     335
     336    for( int j = 0; j < length; ++j) {
     337      for( int i = 0; i < 3; ++i) {
     338        tmpVec = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]];
    315339        tmpLength = p->distancePoint(tmpVec);
    316340        if( tmpLength > maxLength[k])
Note: See TracChangeset for help on using the changeset viewer.