changed sync variables for camera and time classes.

added a boolean _timeJumped which is synced and set to true whenever setTime is called.
(Note this is never set to false afterwards unless a call is made to setTimeJumped( bool ) with value false)
This commit is contained in:
Joakim Kilby
2015-02-13 11:02:35 +01:00
parent e39f3adc18
commit c6b358488b
4 changed files with 34 additions and 29 deletions
-5
View File
@@ -169,11 +169,6 @@ private:
glm::vec2 _sharedScaling;
psc _sharedPosition;
glm::mat4 _sharedViewRotationMatrix;
//cluster synced variables
glm::vec2 _syncedScaling;
psc _syncedPosition;
glm::mat4 _syncedViewRotationMatrix;
};
+7 -4
View File
@@ -158,6 +158,10 @@ public:
void preSynchronization();
bool timeJumped();
void setTimeJumped(bool jumped);
/**
* Returns the Lua library that contains all Lua functions available to change the
* current time, retrieve the current time etc. The functions contained are
@@ -187,15 +191,14 @@ private:
//local copies
double _time; ///< The time stored as the number of seconds past the J2000 epoch
double _dt;
bool _timeJumped;
//shared copies
double _sharedTime;
double _sharedDt;
bool _sharedTimeJumped;
//synched copies
double _syncedTime;
double _syncedDt;
std::mutex _syncMutex;
};