Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 24, 2005, 1:13:32 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: added the model draw functionality to the framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc

    r4682 r4686  
    4141
    4242int lastFrame, currentFrame, dt;
     43bool drawModel;
    4344
    4445void Framework::moduleInit(int argc, char** argv)
     
    201202  dt = currentFrame - lastFrame;
    202203
    203   if( dt > 55)
     204  if( dt > 10)
    204205  {
    205206    float fps = 1000/dt;
     
    213214          /* the frame-rate is limited to 100 frames per second, all other things are for nothing.
    214215          */
    215     SDL_Delay((unsigned int)(50-dt));
    216     dt = 55;
     216    SDL_Delay((unsigned int)(10-dt));
     217    dt = 10;
    217218  }
    218219
     
    240241  while( entity != NULL)                        /* nextElement() will return NULL at the end */
    241242  {
     243    if( drawModel)
    242244    entity->draw();
    243245    entity->drawBVTree(depth, drawMode);
     
    314316
    315317
     318int drawModels(GtkWidget* nonInterest, void* widget)
     319{
     320  drawModel = !drawModel;
     321}
     322
     323
    316324int treeDepth(GtkWidget* nonInterest, void* widget)
    317325{
     
    350358
    351359
     360      CheckButton* DrawModels = new CheckButton("Draw Models");
     361      DrawModels->connectSignal("clicked", (void*)DrawModels, drawModels);
     362      windowBox->fill(DrawModels);
     363
     364
    352365      CheckButton* SeperatingPlanes = new CheckButton("SeperatingPlanes");
    353366      SeperatingPlanes->connectSignal("clicked", (void*)SeperatingPlanes, seperatingPlanes);
Note: See TracChangeset for help on using the changeset viewer.