mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 18:11:01 -05:00
Enable basic saving and restoring camera position between runs
This commit is contained in:
@@ -194,9 +194,14 @@ public:
|
||||
void mousePositionCallback(double x, double y);
|
||||
void mouseScrollWheelCallback(double pos);
|
||||
|
||||
void saveCameraPosition(const std::string& filepath = "");
|
||||
void restoreCameraPosition(const std::string& filepath = "");
|
||||
|
||||
private:
|
||||
void setInteractionMode(std::shared_ptr<InteractionMode> interactionMode);
|
||||
|
||||
bool _cameraUpdatedFromScript = false;
|
||||
|
||||
std::multimap<KeyWithModifier, std::string > _keyLua;
|
||||
|
||||
std::unique_ptr<InputState> _inputState;
|
||||
@@ -210,7 +215,6 @@ private:
|
||||
// Properties
|
||||
properties::StringProperty _origin;
|
||||
properties::StringProperty _coordinateSystem;
|
||||
|
||||
};
|
||||
|
||||
#endif // USE_OLD_INTERACTIONHANDLER
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace openspace {
|
||||
/**
|
||||
This class still needs some more love. Suggested improvements:
|
||||
@@ -122,6 +124,9 @@ namespace openspace {
|
||||
void serialize(SyncBuffer* syncBuffer);
|
||||
void deserialize(SyncBuffer* syncBuffer);
|
||||
|
||||
void serialize(std::ostream& os) const;
|
||||
void deserialize(std::istream& is);
|
||||
|
||||
/**
|
||||
Handles SGCT's internal matrices. Also caches a calculated viewProjection
|
||||
matrix. This is the data that is different for different cameras within
|
||||
@@ -171,6 +176,7 @@ namespace openspace {
|
||||
const glm::mat4& projectionMatrix() const;
|
||||
[[deprecated("Replaced by Camera::SgctInternal::viewProjectionMatrix()")]]
|
||||
const glm::mat4& viewProjectionMatrix() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
Class encapsulating data that needs to be synched between SGCT nodes.
|
||||
|
||||
Reference in New Issue
Block a user