Changeset 218 in flair-src for trunk/lib/FlairSimulator


Ignore:
Timestamp:
Feb 20, 2018, 2:08:56 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

reduce delay between server and client for simulated vrpn

Location:
trunk/lib/FlairSimulator/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/Model_impl.cpp

    r214 r218  
    158158
    159159void Model_impl::mainloop(void) {
     160  struct timeval _timestamp;
     161 
    160162  if (enable_opti->Value() == false)
    161163    return;
    162164  vrpn_gettimeofday(&_timestamp, NULL);
    163   vrpn_Tracker::timestamp = _timestamp;
    164 
     165 
    165166  // change to vrpn reference
    166167  states_mutex->GetMutex();
  • trunk/lib/FlairSimulator/src/Simulator_impl.cpp

    r162 r218  
    6767    WaitPeriod();
    6868    // printf("%lld\n",GetTime());
    69     mainloop();
    7069    for (size_t i = 0; i < models.size(); i++) {
    7170      models.at(i)->pimpl_->mainloop();
    7271    }
     72    mainloop();
    7373  }
    7474}
  • trunk/lib/FlairSimulator/src/unexported/Model_impl.h

    r214 r218  
    104104  flair::core::Mutex *states_mutex;
    105105
    106   struct timeval _timestamp;
    107106  void Run(void);
    108107  flair::core::Quaternion ComputeInitRotation(flair::core::Quaternion quat_in);
Note: See TracChangeset for help on using the changeset viewer.