Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 11, 2006, 1:29:04 AM (19 years ago)
Author:
patrick
Message:

cd: changing to new coordinate format

File:
1 edited

Legend:

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

    r7584 r7587  
    121121  this->calculateBoxEigenvectors(*this->bvElement, modelInf, triangleIndexes, length);
    122122  this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length);
     123  this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length);
     124  this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length);
    123125
    124126  /* do we need to descent further in the obb tree?*/
     
    163165  for( int i = 0; i < length ; ++i)
    164166  {
    165     tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[0]]);
    166     p = tmpVec;
    167     tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[1]]);
    168     q = tmpVec;
    169     tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[2]]);
    170     r = tmpVec;
     167    p = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[0]];
     168    q = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[1]];
     169    r = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[2]];
    171170
    172171    /* finding the facelet surface via cross-product */
     
    195194      for( int i = 0; i < length; ++i)
    196195      {
    197         tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[0]]);
    198         p = tmpVec;
    199         tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[1]]);
    200         q = tmpVec;
    201         tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[2]]);
    202         r = tmpVec;
     196        p = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[0]]);
     197        q = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[1]]);
     198        r = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[2]]);
    203199
    204200        covariance[j][k] = facelet[i] * (9.0f * centroid[i][j] * centroid[i][k] + p[j] * p[k] +
     
    215211  }
    216212  box.center = center;
    217 
    218 
    219   std::vector<int>           vertIndexVector;                           //!< vertex indexes list
    220   int                        vertIndex;                                 //!< index to vertex
    221   bool                       vertexFound;                               //!< vertex found flag
    222   Vector                     arithCenter;                               //!< aritmetical center
    223213
    224214
     
    363353  }
    364354  // FIXME: += anstatt -= ????????? verwirr
    365   box.center.x -= centerOffset[0];
    366   box.center.y -= centerOffset[1];
    367   box.center.z -= centerOffset[2];
     355  box.center.x += centerOffset[0];
     356  box.center.y += centerOffset[1];
     357  box.center.z += centerOffset[2];
    368358
    369359  PRINTF(3)("\n");
    370360  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]);
     361  PRINT(3)("\tAxis halflength y: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[1], maxLength[1], minLength[1], centerOffset[1] );
     362  PRINT(3)("\tAxis halflength z: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[2], maxLength[2], minLength[2], centerOffset[2]);
    373363}
    374364
Note: See TracChangeset for help on using the changeset viewer.