First test of actual remote controlling

This commit is contained in:
Joakim Kilby
2015-06-17 13:10:19 +02:00
parent 4e4cf4cd6a
commit 8297f2e683
4 changed files with 22 additions and 22 deletions
@@ -76,6 +76,7 @@
#include <openspace/interaction/keyboardcontroller.h>
#include <openspace/interaction/mousecontroller.h>
#include <openspace/network/osparallelconnection.h>
#include <mutex>
@@ -139,7 +140,7 @@ public:
void setInvertRotation(bool invert);
bool invertRotation() const;
// void addKeyframe(const network::Keyframe &kf);
void addKeyframe(const network::Keyframe &kf);
/**
* Returns the Lua library that contains all Lua functions available to affect the
@@ -177,7 +178,7 @@ private:
std::vector<Controller*> _controllers;
//remote controller
// std::vector<network::Keyframe> _keyframes;
std::vector<network::Keyframe> _keyframes;
};
} // namespace interaction
@@ -59,11 +59,11 @@ namespace openspace{
namespace network{
struct Keyframe{
glm::quat _viewRotationQuat;
psc _position;
double _timeStamp;
struct Keyframe{
glm::quat _viewRotationQuat;
psc _position;
double _timeStamp;
void serialize(std::vector<char> &buffer){
//add position
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_position), reinterpret_cast<char*>(&_position) + sizeof(_position));
@@ -94,7 +94,7 @@ namespace openspace{
memcpy(&_timeStamp, buffer.data() + offset, size);
offset += size;
};
};
};
class OSParallelConnection : public properties::PropertyOwner {
public: