mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Merge branch 'master' into feature/loadingscreen-refactor
# Conflicts: # modules/base/rendering/renderabletrailorbit.h # modules/digitaluniverse/rendering/renderablebillboardscloud.cpp # modules/digitaluniverse/rendering/renderableplanescloud.cpp # modules/digitaluniverse/rendering/renderablepoints.cpp # modules/galaxy/rendering/renderablegalaxy.cpp # modules/galaxy/rendering/renderablegalaxy.h # modules/kameleonvolume/rendering/renderablekameleonvolume.cpp # modules/kameleonvolume/rendering/renderablekameleonvolume.h # modules/spacecraftinstruments/rendering/renderablefov.h # modules/spacecraftinstruments/rendering/renderableplaneprojection.h # modules/toyvolume/rendering/renderabletoyvolume.cpp # modules/toyvolume/rendering/renderabletoyvolume.h # modules/volume/rendering/renderabletimevaryingvolume.cpp # modules/volume/rendering/renderabletimevaryingvolume.h
This commit is contained in:
@@ -182,7 +182,7 @@ public:
|
||||
* \throw ghoul::RuntimeError If the configuration could not be found
|
||||
*/
|
||||
static std::string findConfiguration(const std::string& filename);
|
||||
|
||||
|
||||
/**
|
||||
* Load the provided configuration file (\p filename) into this Dictionary. All paths
|
||||
* that are specified in the configuration file will automatically be registered in
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
* name
|
||||
*/
|
||||
void initialize();
|
||||
|
||||
|
||||
/**
|
||||
* Deinitializes all of the contained OpenSpaceModule%s by calling the
|
||||
* OpenSpaceModule::deinitialize methods.
|
||||
@@ -73,14 +73,14 @@ public:
|
||||
* \pre \p module must not be nullptr
|
||||
*/
|
||||
void registerModule(std::unique_ptr<OpenSpaceModule> module);
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of all registered OpenSpaceModule%s that have been registered with
|
||||
* this ModuleEngine. All returned OpenSpaceModule%s are guaranteed to be initialized.
|
||||
* \return A list of all registered OpenSpaceModule%s
|
||||
*/
|
||||
std::vector<OpenSpaceModule*> modules() const;
|
||||
|
||||
|
||||
/**
|
||||
* Get the module subclass with given template argument. Requires the module subclass
|
||||
* to have the public static member variable <code>name</code> which must be equal to
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
void decode();
|
||||
|
||||
void scheduleLoadScene(std::string scenePath);
|
||||
|
||||
|
||||
void writeDocumentation();
|
||||
void toggleShutdownMode();
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
scripting::ScriptScheduler& scriptScheduler();
|
||||
VirtualPropertyManager& virtualPropertyManager();
|
||||
|
||||
|
||||
|
||||
// This method is only to be called from Modules
|
||||
enum class CallbackOption {
|
||||
Initialize = 0, // Callback for the end of the initialization
|
||||
@@ -137,14 +137,14 @@ public:
|
||||
Render, // Callback for the end of the render function
|
||||
PostDraw // Callback for the end of the post-draw function
|
||||
};
|
||||
|
||||
|
||||
// Registers a callback for a specific CallbackOption
|
||||
void registerModuleCallback(CallbackOption option, std::function<void()> function);
|
||||
|
||||
|
||||
// Registers a callback that is called when a new keyboard event is received
|
||||
void registerModuleKeyboardCallback(
|
||||
std::function<bool (Key, KeyModifier, KeyAction)> function);
|
||||
|
||||
|
||||
// Registers a callback that is called when a new character event is received
|
||||
void registerModuleCharCallback(
|
||||
std::function<bool (unsigned int, KeyModifier)> function);
|
||||
@@ -152,16 +152,16 @@ public:
|
||||
// Registers a callback that is called when a new mouse button is received
|
||||
void registerModuleMouseButtonCallback(
|
||||
std::function<bool (MouseButton, MouseAction)> function);
|
||||
|
||||
|
||||
// Registers a callback that is called when a new mouse movement is received
|
||||
void registerModuleMousePositionCallback(
|
||||
std::function<void (double, double)> function);
|
||||
|
||||
|
||||
// Registers a callback that is called when a scroll wheel change is received
|
||||
void registerModuleMouseScrollWheelCallback(
|
||||
std::function<bool (double, double)> function
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the Lua library that contains all Lua functions available to affect the
|
||||
* application.
|
||||
@@ -177,7 +177,7 @@ private:
|
||||
void loadFonts();
|
||||
void runPreInitializationScripts(const std::string& sceneDescription);
|
||||
void configureLogging();
|
||||
|
||||
|
||||
// Components
|
||||
std::unique_ptr<ConfigurationManager> _configurationManager;
|
||||
std::unique_ptr<SceneManager> _sceneManager;
|
||||
@@ -208,30 +208,30 @@ private:
|
||||
properties::StringProperty versionString;
|
||||
properties::StringProperty sourceControlInformation;
|
||||
} _versionInformation;
|
||||
|
||||
|
||||
bool _scheduledSceneSwitch;
|
||||
std::string _scenePath;
|
||||
|
||||
struct {
|
||||
std::vector<std::function<void()>> initialize;
|
||||
std::vector<std::function<void()>> deinitialize;
|
||||
|
||||
|
||||
std::vector<std::function<void()>> initializeGL;
|
||||
std::vector<std::function<void()>> deinitializeGL;
|
||||
|
||||
|
||||
std::vector<std::function<void()>> preSync;
|
||||
std::vector<std::function<void()>> postSyncPreDraw;
|
||||
std::vector<std::function<void()>> render;
|
||||
std::vector<std::function<void()>> postDraw;
|
||||
|
||||
|
||||
std::vector<std::function<bool (Key, KeyModifier, KeyAction)>> keyboard;
|
||||
std::vector<std::function<bool (unsigned int, KeyModifier)>> character;
|
||||
|
||||
|
||||
std::vector<std::function<bool (MouseButton, MouseAction)>> mouseButton;
|
||||
std::vector<std::function<void (double, double)>> mousePosition;
|
||||
std::vector<std::function<bool (double, double)>> mouseScrollWheel;
|
||||
} _moduleCallbacks;
|
||||
|
||||
|
||||
// Structure that is responsible for the delayed shutdown of the application
|
||||
struct {
|
||||
// Whether the application is currently in shutdown mode (i.e. counting down the
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
|
||||
class OpenSpaceModule;
|
||||
|
||||
class SettingsEngine : public properties::PropertyOwner {
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
SettingsEngine();
|
||||
|
||||
void initialize();
|
||||
|
||||
|
||||
void setModules(const std::vector<OpenSpaceModule*>& modules);
|
||||
|
||||
private:
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
* Invokes the postsync method of all added Syncables
|
||||
*/
|
||||
void postSynchronization(IsMaster isMaster);
|
||||
|
||||
|
||||
/**
|
||||
* Add a Syncable to be synchronized over the SGCT cluster.
|
||||
* \pre syncable must not be nullptr
|
||||
|
||||
@@ -64,14 +64,14 @@ public:
|
||||
bool isMaster() const override;
|
||||
bool isUsingSwapGroups() const override;
|
||||
bool isSwapGroupMaster() const override;
|
||||
|
||||
|
||||
glm::mat4 viewProjectionMatrix() const override;
|
||||
glm::mat4 modelMatrix() const override;
|
||||
void setNearFarClippingPlane(float near, float far) override;
|
||||
void setEyeSeparationDistance(float distance) override;
|
||||
|
||||
|
||||
glm::ivec4 viewportPixelCoordinates() const override;
|
||||
|
||||
|
||||
bool isExternalControlConnected() const override;
|
||||
void sendMessageToExternalControl(const std::vector<char>& message) const override;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
* disables it
|
||||
*/
|
||||
virtual void setSynchronization(bool enabled);
|
||||
|
||||
|
||||
/**
|
||||
* This method clears all the rendering windows with the specified \p clearColor. In
|
||||
* most OpenGL cases, this will end up with one or mode <code>glClear</code> calls.
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
* \param clearColor The color with which to clear all windows
|
||||
*/
|
||||
virtual void clearAllWindows(const glm::vec4& clearColor);
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether the current window has been resized recently. On default, this
|
||||
* method always returns <code>false</code>.
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
* \return The location of the mouse cursor in pixel screen coordinates
|
||||
*/
|
||||
virtual glm::vec2 mousePosition() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns a bitmask of the status of all available mouse buttons. Bit <code>i</code>
|
||||
* is <code>1</code> if mouse button <code>i</code> is pressed down;
|
||||
@@ -129,28 +129,28 @@ public:
|
||||
* \return A bitmask showing the status of all mouse buttons (up to \p maxNumber)
|
||||
*/
|
||||
virtual uint32_t mouseButtons(int maxNumber = 8) const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the size of the currently active window in pixel coordinates. On default,
|
||||
* this method returns a window size of <code>0,0</code>.
|
||||
* \return The size of the currently active window in pixel coordinates
|
||||
*/
|
||||
virtual glm::ivec2 currentWindowSize() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the resolution of the currently active window in pixel coordinates. On
|
||||
* default, this method returns the same size as #currentWindowSize.
|
||||
* \return The resolution of the currently active window in pixel coordinates
|
||||
*/
|
||||
virtual glm::ivec2 currentWindowResolution() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the resolution of the currently active framebuffer in pixel coordinates.
|
||||
* On default, this method returns the same size as #currentWindowSize.
|
||||
* \return The resolution of the currently active window in pixel coordinates
|
||||
*/
|
||||
virtual glm::ivec2 currentDrawBufferResolution() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the DPI scaling factor for the current window. This is normally 1 on all
|
||||
* regular monitors and 2 on Retina screens.
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
* \return Whether the current rendering window is GUI-only
|
||||
*/
|
||||
virtual bool isGuiWindow() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if this application is the master for a clustered
|
||||
* environment.
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
* \return The currently employed model matrix
|
||||
*/
|
||||
virtual glm::mat4 modelMatrix() const;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the near and far clipping planes of the rendering window. This method defaults
|
||||
* to a no-op.
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
* \param far The far clipping plane
|
||||
*/
|
||||
virtual void setNearFarClippingPlane(float near, float far);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the stereo eye separation distance for the render engine.
|
||||
* \param distance The distance between eyes for stereo rendering.
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
* \return The location and size of the current viewport
|
||||
*/
|
||||
virtual glm::ivec4 viewportPixelCoordinates() const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if there is an external control connected, i.e., an
|
||||
* application that can receive control commands. On default, this method will return
|
||||
@@ -249,13 +249,13 @@ public:
|
||||
* \return If there is an external control connected
|
||||
*/
|
||||
virtual bool isExternalControlConnected() const;
|
||||
|
||||
|
||||
/**
|
||||
* Sends a \p message to an external control. This method defaults to a no-op.
|
||||
* \param message The message to be sent
|
||||
*/
|
||||
virtual void sendMessageToExternalControl(const std::vector<char>& message) const;
|
||||
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the rendering is a single viewport with an single
|
||||
* window; <code>false</code> otherwise. On default, this method returns
|
||||
|
||||
Reference in New Issue
Block a user