00001 #include "stage.hh" 00002 using namespace Stg; 00003 00004 // static data members 00005 std::vector<LogEntry> LogEntry::log; 00006 00007 LogEntry::LogEntry( usec_t timestamp, Model* mod ) : 00008 timestamp( timestamp ), 00009 mod( mod ), 00010 pose( mod->GetPose() ) 00011 { 00012 // all log entries are added to the static vector history 00013 log.push_back( *this ); 00014 } 00015 00016 00017 00018 void LogEntry::Print() 00019 { 00020 for( size_t i=0; i<log.size(); i++ ) 00021 { 00022 LogEntry* e = &log[i]; 00023 00024 printf( "%.3f\t%u\t%s\n", 00025 (double)e->timestamp / 1e6, 00026 e->mod->GetId(), 00027 e->mod->PoseString().c_str() ); 00028 } 00029 }