Menu

Flatland::Object::Move() function

Help
anton
2005-08-28
2013-03-22
  • anton

    anton - 2005-08-28

    I am looking through the "simple demo" source code.

    Every frame  "app.Step(delta)" does this:

    world.GenerateContacts(space);
    world.QuickStep(delta);

    As I understand, before "world.GenerateContatcs()" is called, the position of the geometry in each "Flatland::Object", should be syncronized with the position of the body in that object, becaue the body has been moved in the previous frame by "world.QuickStep()".

    I assume this syncronization is done with the "Object::Move()", correct ???  However, I couldn't find where this function is called (if its called at all). 

    So, can you tell me where this syncronization happens ( and if its done with "Object::Move()"  )???

     
    • Philip Rideout

      Philip Rideout - 2005-09-04

      Correct, it happens in Object::Move.  ODE calls a callback function called "dGeomMove" whenever it needs to update the position of an object.  At the top of flatland.cpp, you can see this line:

      void dGeomMoved(dGeomID g) { g->Move(); }

      That's where the sync occurs.

       

Log in to post a comment.