diff --git a/data/scene/atmosphereearth.scene b/data/scene/atmosphereearth.scene
index f0daa2545c..6b5738f34f 100644
--- a/data/scene/atmosphereearth.scene
+++ b/data/scene/atmosphereearth.scene
@@ -24,8 +24,7 @@ function preInitialization()
-- 6:20 -> 23:20 day before in UTC
]]--
-
- openspace.time.setTime("2016-03-08T22:45:00")
+ --openspace.time.setTime("2016-03-08T22:45:00")
-- Total Lunar Eclipse Jan 31, 2018 at 10:51:13 UTC
-- Regions seeing, at least, some parts of the eclipse: North/East Europe,
@@ -33,6 +32,9 @@ function preInitialization()
-- Pacific, Atlantic, Indian Ocean, Arctic, Antarctica.
--openspace.time.setTime("2018-01-31T10:30:00")
+
+ openspace.time.setTime("2017-05-17T08:00:00")
+
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
end
@@ -43,7 +45,7 @@ function postInitialization()
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
- openspace.setPropertyValue("Sun.renderable.enabled", true)
+ openspace.setPropertyValue("Sun.renderable.enabled", false)
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false)
@@ -67,8 +69,8 @@ return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
- --Focus = "Earth",
- Focus = "Mars",
+ Focus = "Earth",
+ --Focus = "Mars",
--Position = {526781518487.171326, 257168309890.072144, -1381125204152.817383},
--Rotation = {-0.106166, 0.981574, -0.084545, 0.134513},
--Position = {-21230341452.764542, -75199905816.520981, 126295587136.952240},
@@ -87,8 +89,8 @@ return {
--"moon",
"lodglobes/earth",
- "lodglobes/mars",
- "lodglobes/moon",
+ --"lodglobes/mars",
+ --"lodglobes/moon",
--"toyvolume",
--"earth",
diff --git a/data/scene/lodglobes/earth/earth.mod b/data/scene/lodglobes/earth/earth.mod
index b01abc182a..1c39b6df1b 100644
--- a/data/scene/lodglobes/earth/earth.mod
+++ b/data/scene/lodglobes/earth/earth.mod
@@ -57,7 +57,7 @@ return {
SegmentsPerPatch = 64,
Atmosphere = {
-- Atmosphere radius in Km
- AtmoshereRadius = 6420,
+ AtmoshereRadius = 6450,
PlanetRadius = 6378.1366,
PlanetAverageGroundReflectance = 0.1,
Rayleigh = {
diff --git a/data/scene/milkyway-eso/milkyway-eso.mod b/data/scene/milkyway-eso/milkyway-eso.mod
index 86902a48e7..60c6f71696 100644
--- a/data/scene/milkyway-eso/milkyway-eso.mod
+++ b/data/scene/milkyway-eso/milkyway-eso.mod
@@ -4,7 +4,7 @@ return {
Parent = "SolarSystem",
Renderable = {
Type = "RenderableSphere",
- Size = { 10, 20 },
+ Size = 10E20,
Segments = 40,
Texture = "textures/eso0932a_blend.png",
Orientation = "Inside/Outside"
diff --git a/data/scene/milkyway/milkyway.mod b/data/scene/milkyway/milkyway.mod
index 8fa37be7a5..49c07a217c 100644
--- a/data/scene/milkyway/milkyway.mod
+++ b/data/scene/milkyway/milkyway.mod
@@ -4,7 +4,7 @@ return {
Parent = "SolarSystem",
Renderable = {
Type = "RenderableSphere",
- Size = { 10, 22 },
+ Size = 10E22,
Segments = 40,
Texture = "textures/DarkUniverse_mellinger_8k.jpg",
Orientation = "Inside/Outside"
diff --git a/data/scene/sun/sun.mod b/data/scene/sun/sun.mod
index 6905d9de89..11b0e1516d 100644
--- a/data/scene/sun/sun.mod
+++ b/data/scene/sun/sun.mod
@@ -30,7 +30,7 @@ return {
},
PerformShading = false,
},
- Transformation = {
+ Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "SUN",
@@ -56,7 +56,7 @@ return {
Texture = "textures/sun-glare.png",
BlendMode = "Additive"
},
- Transformation = {
+ Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "SUN",
diff --git a/data/web/keybindings/keybinding.hbs b/data/web/keybindings/keybinding.hbs
index 29773e357e..4873cdef05 100644
--- a/data/web/keybindings/keybinding.hbs
+++ b/data/web/keybindings/keybinding.hbs
@@ -6,6 +6,7 @@
{{key}} {{#if remoteScripting}}Remote scripting{{else}}Local scripting{{/if}}
{{script}}
+ {{documentation}}
diff --git a/data/web/properties/main.hbs b/data/web/properties/main.hbs
index fc56bca0b8..6af37752cd 100644
--- a/data/web/properties/main.hbs
+++ b/data/web/properties/main.hbs
@@ -18,7 +18,6 @@
OpenSpace Scene Properties
Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}
-
Scene name: {{sceneFilename}}
Generated: {{generationTime}}
{{#each propertyOwners}}
diff --git a/data/web/properties/script.js b/data/web/properties/script.js
index f7302a5e0b..52b8a468fa 100644
--- a/data/web/properties/script.js
+++ b/data/web/properties/script.js
@@ -53,7 +53,7 @@ window.onload = function () {
var data = {
propertyOwners: propertyOwners,
version: version,
- sceneFilename: sceneFilename,
+ // sceneFilename: sceneFilename,
generationTime: generationTime
}
diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h
index 41400602fb..5ab18d9f03 100644
--- a/include/openspace/documentation/documentationengine.h
+++ b/include/openspace/documentation/documentationengine.h
@@ -26,8 +26,9 @@
#define __OPENSPACE_CORE___DOCUMENTATIONENGINE___H__
#include
-
+#include
#include
+
#include
namespace openspace {
@@ -38,7 +39,9 @@ namespace documentation {
* produced in the application an write them out as a documentation file for human
* consumption.
*/
-class DocumentationEngine : public ghoul::Singleton {
+class DocumentationEngine : public ghoul::Singleton
+ , public DocumentationGenerator
+{
public:
/**
* This exception is thrown by the addDocumentation method if a provided Documentation
@@ -57,16 +60,7 @@ public:
Documentation documentation;
};
- /**
- * Write the collected Documentation%s to disk at the \p filename in the specified
- * \p type. A new file is created and silently overwritten in the location that
- * \p filename is pointed to.
- * \param filename The file that is to be created containing all the Documentation
- * information.
- * \param type The type of documentation that is written. Currently allowed values are
- * \c text and \c html
- */
- void writeDocumentation(const std::string& filename, const std::string& type);
+ DocumentationEngine();
/**
* Adds the \p documentation to the list of Documentation%s that are written to a
@@ -90,6 +84,8 @@ public:
static DocumentationEngine& ref();
private:
+ std::string generateJson() const override;
+
/// The list of all Documentation%s that are stored by the DocumentationEngine
std::vector _documentations;
diff --git a/include/openspace/documentation/documentationgenerator.h b/include/openspace/documentation/documentationgenerator.h
new file mode 100644
index 0000000000..ca91bc9eff
--- /dev/null
+++ b/include/openspace/documentation/documentationgenerator.h
@@ -0,0 +1,105 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014-2017 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __OPENSPACE_CORE___DOCUMENTATIONGENERATOR___H__
+#define __OPENSPACE_CORE___DOCUMENTATIONGENERATOR___H__
+
+#include
+#include
+
+namespace openspace {
+
+/*
+ * This abstract class is used for instances when another class has the ability to
+ * generate a Handlebar generated documentation file that contains valuable information
+ * for the user. Instances of this are the DocumentationEngine results, the list of
+ * Property%s generated by the Scene, or the FactoryEngine results. The documentation is
+ * generated through the writeDocumentation method.
+ *
+ * The concrete subclass needs to overload the generateJson class that will return the
+ * Json that is parsed by Handlebar to generate the webpage.
+ *
+ * A list of Handlebar templates, the variable name for the result of the generateJson
+ * method, and the Javascript file that contains additional logic is passed in the
+ * constructor.
+ */
+class DocumentationGenerator {
+public:
+ /// This struct contains a single Handlebar template, with the name and the filename
+ struct HandlebarTemplate {
+ std::string name; ///< The name of the Handlebar template defined in \m filename
+ std::string filename; ///< The filename referenced in the \m name
+ };
+
+ /**
+ * The constructor that is used to set the member variables later used in the
+ * writeDocumentation method.
+ * \param name The name of the written documentation
+ * \param jsonName The variable name of the value generated by the generateJson
+ * \param handlebarTemplates A list of Handlebar templates that is added to the
+ * documentation file
+ * \param javascriptFilename The path to a Javascript source file that is added to the
+ * documentation and that can contain additional functionality
+ * \pre name must not be empty
+ * \pre jsonName must not be empty
+ * \pre Each handlebarTemplates' \c name must not be empty
+ * \pre javascriptFilename must not be empty
+ */
+ DocumentationGenerator(std::string name, std::string jsonName,
+ std::vector handlebarTemplates,
+ std::string javascriptFilename);
+
+ /// Default constructor
+ virtual ~DocumentationGenerator() = default;
+
+ /**
+ * Create the documentation into the provided filename. Any existing file will be
+ * silently overwritten. This method will call the generateJson method that can be
+ * used by concrete subclasses to provide the actual data that is provided in the
+ * documentation.
+ * \param filename The filename in which the documentation is written
+ */
+ void writeDocumentation(const std::string& filename);
+
+protected:
+ /**
+ * This abstract method is used by concrete subclasses to provide the actual data that
+ * is used in the documentation written by this DocumentationGenerator class. The JSON
+ * string returned by this function will be stored in the variable with the
+ * \c jsonName as passed in the constructor.
+ * \return A JSON script that is parsed and stored in the variable passed in the
+ * DocumentationGenerator constructor
+ */
+ virtual std::string generateJson() const = 0;
+
+private:
+ const std::string _name;
+ const std::string _jsonName;
+ const std::vector _handlebarTemplates;
+ const std::string _javascriptFile;
+};
+
+} // namespace openspace
+
+#endif // __OPENSPACE_CORE___DOCUMENTATIONGENERATOR___H__
diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h
index 76ab9b5610..891dfca494 100644
--- a/include/openspace/interaction/interactionhandler.h
+++ b/include/openspace/interaction/interactionhandler.h
@@ -25,9 +25,11 @@
#ifndef __OPENSPACE_CORE___INTERACTIONHANDLER___H__
#define __OPENSPACE_CORE___INTERACTIONHANDLER___H__
+#include
+#include
+
#include
#include
-#include
#include
#include
#include
@@ -47,8 +49,7 @@ class SceneGraphNode;
namespace interaction {
-
-class InteractionHandler : public properties::PropertyOwner
+class InteractionHandler : public properties::PropertyOwner, public DocumentationGenerator
{
public:
InteractionHandler();
@@ -121,7 +122,6 @@ public:
void saveCameraStateToFile(const std::string& filepath);
void restoreCameraStateFromFile(const std::string& filepath);
- void writeKeyboardDocumentation(const std::string& type, const std::string& file);
private:
using Synchronized = ghoul::Boolean;
@@ -131,6 +131,8 @@ private:
Synchronized synchronization;
std::string documentation;
};
+
+ std::string generateJson() const override;
void setInteractionMode(std::shared_ptr interactionMode);
diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h
index 914afb040c..b5dfe70f50 100644
--- a/include/openspace/mission/mission.h
+++ b/include/openspace/mission/mission.h
@@ -62,26 +62,25 @@ public:
* Returns the name of the MissionPhase.
* \return The name of the MissionPhase
*/
- const std::string& name() const;
+ std::string name() const;
/**
* Returns the TimeRange of the MissionPhase.
* \return The TimeRange of the MissionPhase
*/
- const TimeRange& timeRange() const;
+ TimeRange timeRange() const;
/**
* Returns the description of the MissionPhase.
* \return The description of the MissionPhase
*/
- const std::string& description() const;
+ std::string description() const;
/**
* Returns all subphases sorted by start time.
* \return All subphases sorted by start time
*/
- const std::vector& phases() const;
-
+ std::vector phases() const;
using Trace = std::vector>;
@@ -111,6 +110,7 @@ protected:
* \param time The time which the subphases have to cover to be added to the \p trace
* \param trace The list of MissionPhase%s that are active during the time \p time
* \param maxDepth The maximum depth of levels that will be considered
+ * \pre maxDepth must not be negative
*/
void phaseTrace(double time, Trace& trace, int maxDepth) const;
@@ -139,7 +139,7 @@ using Mission = MissionPhase;
* \pre \p filename must not contain tokens
* \pre \p filename must exist
*/
-Mission missionFromFile(std::string filename);
+Mission missionFromFile(const std::string& filename);
} // namespace openspace
diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h
index db3d000413..f14c871599 100644
--- a/include/openspace/network/parallelconnection.h
+++ b/include/openspace/network/parallelconnection.h
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
//glm includes
#include
diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h
index b2abbb7710..b9fe5cf7a3 100644
--- a/include/openspace/rendering/renderable.h
+++ b/include/openspace/rendering/renderable.h
@@ -28,20 +28,21 @@
#include
#include
-#include
-#include
-
-// Forward declare to minimize dependencies
namespace ghoul {
namespace opengl {
+ class ProgramObject;
class Texture;
}
class Dictionary;
-}
+} // namespace ghoul
namespace openspace {
+struct RenderData;
+struct UpdateData;
+struct RendererTasks;
+
namespace documentation { struct Documentation; }
// Forward declare to minimize dependencies
diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h
index e690b94c85..bdda2dbb97 100644
--- a/include/openspace/rendering/renderengine.h
+++ b/include/openspace/rendering/renderengine.h
@@ -25,21 +25,13 @@
#ifndef __OPENSPACE_CORE___RENDERENGINE___H__
#define __OPENSPACE_CORE___RENDERENGINE___H__
-#include
-#include
#include
+
+#include
#include
#include
#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include
namespace ghoul {
namespace fontrendering {
@@ -50,17 +42,22 @@ namespace opengl {
}
class Dictionary;
class SharedMemory;
-}
+} // namespace ghoul
namespace openspace {
-// Forward declare to minimize dependencies
+namespace performance { class PerformanceManager; }
+namespace scripting { struct LuaLibrary; }
class Camera;
-class SyncBuffer;
+class RaycasterManager;
+class DeferredcasterManager;
+class Renderer;
class Scene;
class SceneManager;
class ScreenLog;
class ScreenSpaceRenderable;
+class Syncable;
+class SyncBuffer;
class RenderEngine : public properties::PropertyOwner {
public:
@@ -77,7 +74,7 @@ public:
};
RenderEngine();
- ~RenderEngine() = default;
+ ~RenderEngine();
void initialize();
void initializeGL();
@@ -207,6 +204,7 @@ private:
//FrametimeType _frametimeType;
+ properties::BoolProperty _showDate;
properties::BoolProperty _showInfo;
properties::BoolProperty _showLog;
@@ -215,7 +213,7 @@ private:
properties::BoolProperty _applyWarping;
properties::BoolProperty _showFrameNumber;
properties::BoolProperty _disableMasterRendering;
- properties::BoolProperty _disableSceneOnMaster;
+ properties::BoolProperty _disableSceneTranslationOnMaster;
float _globalBlackOutFactor;
float _fadeDuration;
diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h
index 76f87a3e41..26660b7568 100644
--- a/include/openspace/scene/scene.h
+++ b/include/openspace/scene/scene.h
@@ -25,6 +25,8 @@
#ifndef __OPENSPACE_CORE___SCENE___H__
#define __OPENSPACE_CORE___SCENE___H__
+#include
+
#include
#include