mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-06 19:39:56 -05:00
First test of actual remote controlling
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user