Physical2D_Updater.cpp
Go to the documentation of this file.
1 #include "Physical2D_Updater.hpp"
2 #include "../Defs.hpp"
3 
4 namespace comp
5 {
6 
8  iv::FixedUpdateClient( inst, ::comp::Defs::Time::Physics ),
9  cm( inst, this, "Physical2D_Updater" ),
10  world( world )
11 {
12  this->cm.inherits( this->iv::FixedUpdateClient::cm );
13 }
14 
15 void Physical2D_Updater::fixed_update( iv::TimeId time, int time_step, int steps )
16 {
17  for( size_t i = 0; i < steps; i++ )
18  this->world->Step( float( time_step ) / 1000.0f );
19 }
20 
21 
22 }