mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-24 05:18:59 -05:00
added method to clear keyframes and call to that method when hostship is switched
This commit is contained in:
@@ -141,6 +141,7 @@ public:
|
||||
bool invertRotation() const;
|
||||
|
||||
void addKeyframe(const network::StreamDataKeyframe &kf);
|
||||
void clearKeyframes();
|
||||
|
||||
/**
|
||||
* Returns the Lua library that contains all Lua functions available to affect the
|
||||
|
||||
@@ -972,6 +972,11 @@ void InteractionHandler::addKeyframe(const network::StreamDataKeyframe &kf){
|
||||
_keyframeMutex.unlock();
|
||||
}
|
||||
|
||||
void InteractionHandler::clearKeyframes(){
|
||||
_keyframeMutex.lock();
|
||||
_keyframes.clear();
|
||||
_keyframeMutex.unlock();
|
||||
}
|
||||
} // namespace interaction
|
||||
//>>>>>>> feature/interactionhandler
|
||||
} // namespace openspace
|
||||
|
||||
@@ -402,6 +402,9 @@ namespace openspace {
|
||||
//we were not broadcasting so nothing to do
|
||||
}
|
||||
|
||||
//clear buffered any keyframes
|
||||
OsEng.interactionHandler()->clearKeyframes();
|
||||
|
||||
//request init package from the host
|
||||
int size = headerSize();
|
||||
std::vector<char> buffer;
|
||||
|
||||
Reference in New Issue
Block a user