Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7660 in orxonox.OLD for branches/cd


Ignore:
Timestamp:
May 18, 2006, 12:15:48 AM (19 years ago)
Author:
patrick
Message:

cd: collision boxes getting better. but still not centered correctly

Location:
branches/cd/src
Files:
2 edited

Legend:

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

    r7658 r7660  
    131131    for(int j = 0; j < 3; ++j)
    132132    {
    133       PRINTF(2)("  vertex[%i]: %f, %f, %f\n", j, modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]]);
     133      PRINTF(2)("  vertex[%i]: %f, %f, %f\n", j, (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[0],
     134      (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[1],
     135      (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[2]);
    134136    }
    135137  }
     
    231233  }
    232234  //box.center = center;
     235  //FIXME setting center to 0,0,0
    233236  box.center = Vector();
    234237
     
    281284  box.axis[2] = axis[2];
    282285
    283 //   box.axis[0] = Vector(1,0,0);
    284 //   box.axis[1] = Vector(0,1,0);
    285 //   box.axis[2] = Vector(0,0,1);
     286  box.axis[0] = Vector(1,0,0);
     287  box.axis[1] = Vector(0,1,0);
     288  box.axis[2] = Vector(0,0,1);
    286289
    287290  PRINTF(3)("Eigenvectors:\n");
     
    391394
    392395  // FIXME: += anstatt -= ????????? verwirr
    393   box.center.x -= centerOffset[0];
    394   box.center.y -= centerOffset[1];
    395   box.center.z -= centerOffset[2];
     396  box.center.x += centerOffset[0];
     397  box.center.y += centerOffset[1];
     398  box.center.z += centerOffset[2];
    396399
    397400  PRINTF(3)("\n");
  • branches/cd/src/subprojects/collision_detection/collision_detection.cc

    r7658 r7660  
    9090     printf("no path specified, using default model: models/ships/fighter.obj\n\n");
    9191     printf("----------------------- WARNING ---------------------\n");
    92      b = new CollisionTestEntity("models/test/cd_test_1.obj"); b->setName("Jaeger");
     92     b = new CollisionTestEntity("models/test/cd_test_0.obj"); b->setName("Jaeger");
    9393   }
    9494//   b->setRelCoor(0.0, 0.0, -20.0);
     
    267267  while( entity != NULL)
    268268  {
    269     if( likely(drawModel))
     269    //if( likely(drawModel))
    270270      entity->draw();
    271271    entity->drawBVTree(depth, drawMode);
Note: See TracChangeset for help on using the changeset viewer.