Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7707 in orxonox.OLD for branches


Ignore:
Timestamp:
May 18, 2006, 8:31:24 PM (19 years ago)
Author:
patrick
Message:

cd: obb tree gets spawned again

Location:
branches/cd/src
Files:
2 edited

Legend:

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

    r7706 r7707  
    120120
    121121  //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,
    134       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[0],
    135       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[1],
    136       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[2]);
    137     }
    138   }
    139 
    140   PRINT(0)("\n\n\n");
    141   for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3)
    142     PRINTF(0)(  "vertex[%i]: %f, %f, %f\n", i, this->bvElement->modelInf->pVertices[i],
    143                this->bvElement->modelInf->pVertices[i+1],
    144                this->bvElement->modelInf->pVertices[i+2]);
     122//   for( int i = 0; i < length; ++i)
     123//   {
     124//     PRINTF(2)("triangle[%i], index: %i\n", i, triangleIndexes[i]);
     125//   }
     126//   for( int i = 0; i < length; ++i)
     127//   {
     128//     PRINTF(2)("triangle[%i]\n", i);
     129//     for(int j = 0; j < 3; ++j)
     130//     {
     131//       PRINTF(2)("  vertex[%i]: %f, %f, %f\n", j,
     132//       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[0],
     133//       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[1],
     134//       (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[2]);
     135//     }
     136//   }
     137//   PRINT(0)("\n\n\n");
     138//   for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3)
     139//     PRINTF(0)(  "vertex[%i]: %f, %f, %f\n", i, this->bvElement->modelInf->pVertices[i],
     140//                this->bvElement->modelInf->pVertices[i+1],
     141//                this->bvElement->modelInf->pVertices[i+2]);
     142
    145143
    146144
     
    336334    maxLength[k] = p->distancePoint(tmpVec);
    337335    minLength[k] = p->distancePoint(tmpVec);
    338     PRINT(0)("axis[%i]: %f %f %f\n", k, box.axis[k].x, box.axis[k].y, box.axis[k].z);
     336//     PRINT(0)("axis[%i]: %f %f %f\n", k, box.axis[k].x, box.axis[k].y, box.axis[k].z);
    339337
    340338    for( int j = 0; j < length; ++j) {
     
    342340        tmpVec = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]];
    343341        tmpLength = p->distancePoint(tmpVec);
    344         PRINT(0)("vertex normal vec: %i, (%f, %f, %f) distance = %f\n", k, (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[0],
    345         (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[1],
    346         (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[2],
    347         tmpLength);
     342
    348343        if( tmpLength > maxLength[k])
    349344          maxLength[k] = tmpLength;
  • branches/cd/src/subprojects/collision_detection/collision_test_entity.cc

    r7597 r7707  
    3434{
    3535  this->init();
    36   this->loadModel(modelName, 1.0f, 0, 1);
     36  this->loadModel(modelName, 1.0f, 0, 10);
    3737/*  this->buildObbTree(0);*/
    3838
Note: See TracChangeset for help on using the changeset viewer.