mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 16:59:37 -05:00
Send view scaling over parallel connection
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
glm::dvec3 position;
|
||||
glm::quat rotation;
|
||||
std::string focusNode;
|
||||
float scale;
|
||||
bool followFocusNodeRotation;
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ struct CameraKeyframe {
|
||||
glm::dquat _rotation;
|
||||
bool _followNodeRotation;
|
||||
std::string _focusNode;
|
||||
float _scale;
|
||||
|
||||
double _timestamp;
|
||||
|
||||
@@ -88,6 +89,12 @@ struct CameraKeyframe {
|
||||
_focusNode.data() + nodeNameLength
|
||||
);
|
||||
|
||||
buffer.insert(
|
||||
buffer.end(),
|
||||
reinterpret_cast<char*>(&_scale),
|
||||
reinterpret_cast<char*>(&_scale) + sizeof(_scale)
|
||||
);
|
||||
|
||||
// Add timestamp
|
||||
buffer.insert(
|
||||
buffer.end(),
|
||||
@@ -124,6 +131,11 @@ struct CameraKeyframe {
|
||||
_focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size);
|
||||
offset += size;
|
||||
|
||||
// Scale
|
||||
size = sizeof(_scale);
|
||||
memcpy(&_scale, buffer.data() + offset, size);
|
||||
offset += size;
|
||||
|
||||
// Timestamp
|
||||
size = sizeof(_timestamp);
|
||||
memcpy(&_timestamp, buffer.data() + offset, size);
|
||||
|
||||
Reference in New Issue
Block a user