diff --git a/CMakeLists.txt b/CMakeLists.txt
index eee822a3f8..65f32fa11d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,26 +1,26 @@
-#########################################################################################
-# #
-# OpenSpace #
-# #
-# Copyright (c) 2014-2016 #
-# #
-# 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. #
-#########################################################################################
+##########################################################################################
+# #
+# OpenSpace #
+# #
+# Copyright (c) 2014-2016 #
+# #
+# 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. #
+##########################################################################################
cmake_minimum_required (VERSION 3.4 FATAL_ERROR)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..b025b07993
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,4 @@
+## How to contribute
+The easiest way to contribute is through a separate fork of the repository and submitting a pull-request. One of the core developers will judge the pull request and integrate it into the main `master` branch. Preferably, there is an accompanying issue (created by you or not) which is solved by the PR. In this case, feel free to use the phrase "(closes #XXX)" in the text of the pull request, where `XXX` is the number of the issue that you have solved. The PR should be in its own separate branch following the naming `pr/feature`, where `feature` is a short, descripting name of the additional feature or bug contained in the PR.
+
+For more information we refer to the [Wiki](https://github.com/OpenSpace/OpenSpace/wiki). If there are any questions, feel free to contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace: Contributing).
\ No newline at end of file
diff --git a/CREDITS b/CREDITS.md
similarity index 66%
rename from CREDITS
rename to CREDITS.md
index 3bb64218eb..02aa209148 100644
--- a/CREDITS
+++ b/CREDITS.md
@@ -1,16 +1,26 @@
Alexander Bock
Joakim Kilby
Emil Axelsson
+Eric Myers
Jonathas Costa
Matthew Territo
+Gene Payne
+Kalle Bladin
+Erik Sundén
Jonas Strandstedt
Hans-Christian Helltegen
Michal Marcinkowski
Anton Arbring
Tomas Forsyth Rosin
-Kalle Bladin
Erik Broberg
Michael Nilsson
Sebastian Piwell
Niclas Hultberg
+Rickard Lindtstedt
+Michael Sjöström
+Michael Novén
+Oskar Carlbaum
+
+Anteige
+noahdasanaike
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000000..57ff97f0f2
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,74 @@
+def modules = [
+ "base",
+ "debugging",
+ "fieldlines",
+ "galaxy",
+ "globebrowsing",
+ "iswa",
+ "kameleon",
+ "kameleonvolume",
+ "multiresvolume",
+ "newhorizons",
+ "onscreengui",
+ "space",
+ "toyvolume",
+ "volume"
+];
+
+def flags = "-DGHOUL_USE_DEVIL=OFF "
+
+for (module in modules) {
+ flags += "-DOPENSPACE_OPENSPACE_MODULE_" + module.toUpperCase() + "=ON "
+}
+
+echo flags
+
+stage('Build') {
+ parallel linux: {
+ node('linux') {
+ checkout scm
+ sh 'git submodule update --init --recursive'
+ sh '''
+ mkdir -p build
+ cd build
+ cmake .. ''' +
+ flags + ''' ..
+ make
+ '''
+ }
+ },
+ windows: {
+ node('windows') {
+ checkout scm
+ bat '''
+ git submodule update --init --recursive
+ if not exist "build" mkdir "build"
+ cd build
+ cmake -G "Visual Studio 14 2015 Win64" .. ''' +
+ flags + ''' ..
+ msbuild.exe OpenSpace.sln /m:8 /p:Configuration=Debug
+ '''
+ }
+ },
+ osx: {
+ node('osx') {
+ checkout scm
+ sh 'git submodule update --init --recursive'
+ sh '''
+ export PATH=${PATH}:/usr/local/bin:/Applications/CMake.app/Contents/bin
+ export CMAKE_BUILD_TOOL=/Applications/CMake.app/Contents/bin/CMake
+ srcDir=$PWD
+ if [ ! -d ${srcDir} ]; then
+ mkdir ${srcDir}
+ fi
+ if [ ! -d ${srcDir}/build ]; then
+ mkdir ${srcDir}/build
+ fi
+ cd ${srcDir}/build
+ /Applications/CMake.app/Contents/bin/cmake -G Xcode -D NASM=/usr/local/Cellar/nasm/2.11.08/bin/nasm ${srcDir} .. ''' +
+ flags + '''
+ xcodebuild
+ '''
+ }
+ }
+}
\ No newline at end of file
diff --git a/LICENSE b/LICENSE.md
similarity index 97%
rename from LICENSE
rename to LICENSE.md
index 0e48e547cb..9f67ee7043 100644
--- a/LICENSE
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2016
+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
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..d3c2d1e8de
--- /dev/null
+++ b/README.md
@@ -0,0 +1,9 @@
+OpenSpace is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide.
+
+The project stems from the same academic collaboration between Sweden’s Linköping University (LiU) and the American Museum of Natural History (AMNH) that led to the creation of Uniview and its parent company SCISS. Development of the software began several years ago through a close collaboration with NASA Goddard’s Community Coordinated Modeling Center (CCMC) to model space weather forecasting and continued last year with visualization of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s Scientific Computing and Imaging (SCI) Institute, New York University’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include:
+
+- Visualization of dynamic simulations via interactive volumetric rendering, as a priority for communicating research in astrophysics.
+- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualization that reveal how missions are designed to gather science.
+- Globe browsing techniques across spatial and temporal scales to examine scientific campaigns on multiple planets, including close up surface exploration.
+
+This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [Wiki](https://github.com/OpenSpace/OpenSpace/wiki) pages here on GitHub, specifically [building](https://github.com/OpenSpace/OpenSpace/wiki/General-Getting-Started-Guide%3A-Compiling-OpenSpace) for [Windows](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-Windows), [Linux](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-Linux), and [MacOS](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-OSX). Required preexisting dependencies are: [NASM](http://www.nasm.us/), [Boost](http://www.boost.org/), and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:).
\ No newline at end of file
diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt
index 45f08811fe..c5e93b08bb 100644
--- a/apps/OpenSpace/CMakeLists.txt
+++ b/apps/OpenSpace/CMakeLists.txt
@@ -1,26 +1,28 @@
-#########################################################################################
-# #
-# OpenSpace #
-# #
-# Copyright (c) 2014-2015 #
-# #
-# 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. #
-#########################################################################################
+##########################################################################################
+# #
+# 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. #
+##########################################################################################
+
+include(${GHOUL_BASE_DIR}/support/cmake/CopySharedLibraries.cmake)
set(APPLICATION_NAME OpenSpace)
set(APPLICATION_LINK_TO_OPENSPACE ON)
@@ -29,15 +31,99 @@ if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
+
+########################
+# OpenVR section start #
+########################
+option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support" OFF)
+
+if (OPENSPACE_OPENVR_SUPPORT)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/")
+
+ find_package(OpenVR REQUIRED)
+
+ set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT)
+
+ if(NOT SGCT_OPENVR_INCLUDE_DIRECTORY)
+ if( WIN32 )
+ find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
+ NAMES SGCTOpenVR.h
+ PATHS $ENV{SGCT_ROOT_DIR}/additional_includes/openvr ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH
+ REQUIRED)
+ else()
+ find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
+ NAMES SGCTOpenVR.h
+ PATH_SUFFIXES SGCTOpenVR
+ PATHS $ENV{SGCT_ROOT_DIR}/additional_includes/openvr ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr
+ REQUIRED)
+ endif()
+ else()
+ set(SGCT_OPENVR_FILES ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.h ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.cpp)
+ endif()
+else()
+ set(OPENVR_INCLUDE_DIRS "")
+ set(SGCT_OPENVR_INCLUDE_DIRECTORY "")
+ set(OPENVR_LIBRARY "")
+ set(SGCT_OPENVR_DEFINITIONS "")
+endif()
+########################
+# OpenVR section end #
+########################
+
+########################
+# Spout section start #
+########################
+if (WIN32)
+ option(OPENSPACE_SPOUT_SUPPORT "Build OpenSpace application with Spout support" OFF)
+endif ()
+
+set(SPOUT_INCLUDE_DIRS "")
+set(SPOUT_LIBRARY "")
+set(SPOUT_DEFINITIONS "")
+if (OPENSPACE_SPOUT_SUPPORT)
+ set(SPOUT_INCLUDE_DIRS ${OPENSPACE_APPS_DIR}/OpenSpace/ext/spout)
+ set(SPOUT_LIBRARY ${OPENSPACE_APPS_DIR}/OpenSpace/ext/spout/SpoutLibrary.lib)
+ set(SPOUT_DEFINITIONS "OPENSPACE_HAS_SPOUT")
+endif ()
+
+########################
+# Spout section end #
+########################
+
add_executable(${APPLICATION_NAME}
+ ${SGCT_OPENVR_FILES}
${OPENSPACE_APPS_DIR}/OpenSpace/main.cpp
${RESOURCE_FILE}
)
-target_include_directories(${APPLICATION_NAME} PUBLIC ${OPENSPACE_BASE_DIR}/include)
-target_link_libraries(${APPLICATION_NAME} libOpenSpace)
+if (OPENSPACE_SPOUT_SUPPORT)
+ copy_files(
+ ${APPLICATION_NAME}
+ ${OPENSPACE_APPS_DIR}/OpenSpace/ext/spout/SpoutLibrary.dll
+ )
+endif ()
+
+target_include_directories(
+ ${APPLICATION_NAME} PUBLIC
+ ${OPENSPACE_BASE_DIR}/include
+ ${OPENVR_INCLUDE_DIRS}
+ ${SGCT_OPENVR_INCLUDE_DIRECTORY}
+ ${SPOUT_INCLUDE_DIRS}
+)
+
+target_link_libraries(${APPLICATION_NAME}
+ libOpenSpace
+ ${OPENVR_LIBRARY}
+ ${SPOUT_LIBRARY}
+)
+
+target_compile_definitions(${APPLICATION_NAME} PUBLIC
+ ${SGCT_OPENVR_DEFINITIONS}
+ ${SPOUT_DEFINITIONS}
+)
if (MSVC)
+ target_link_libraries(${APPLICATION_NAME} Dbghelp.lib)
set_target_properties(${APPLICATION_NAME} PROPERTIES LINK_FLAGS
"/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib"
)
-endif ()
+endif()
diff --git a/apps/OpenSpace/ext/readme.md b/apps/OpenSpace/ext/readme.md
new file mode 100644
index 0000000000..2b6c321821
--- /dev/null
+++ b/apps/OpenSpace/ext/readme.md
@@ -0,0 +1,8 @@
+The spout folder is a copy of the folder:
+SpoutSDK/Source in the repository:
+https://github.com/leadedge/Spout2.git/SpoutSDK/Source/SPOUT_LIBRARY/Binaries
+and
+https://github.com/leadedge/Spout2.git/SpoutSDK/Source/SPOUT_LIBRARY/Include
+
+Last update:
+https://github.com/leadedge/Spout2/commit/28dbea6059cd7968c4d2b296d6739a5fdebe9104
diff --git a/apps/OpenSpace/ext/spout/SpoutLibrary.dll b/apps/OpenSpace/ext/spout/SpoutLibrary.dll
new file mode 100644
index 0000000000..36aca87f87
Binary files /dev/null and b/apps/OpenSpace/ext/spout/SpoutLibrary.dll differ
diff --git a/apps/OpenSpace/ext/spout/SpoutLibrary.h b/apps/OpenSpace/ext/spout/SpoutLibrary.h
new file mode 100644
index 0000000000..d50c0a1106
--- /dev/null
+++ b/apps/OpenSpace/ext/spout/SpoutLibrary.h
@@ -0,0 +1,90 @@
+//
+// SpoutLibrary.dll
+//
+// Spout SDK dll compatible with any C++ compiler
+//
+
+#include
+#include
+
+#define SPOUTLIBRARY_EXPORTS // defined for this DLL. The application imports rather than exports
+
+#ifdef SPOUTLIBRARY_EXPORTS
+#define SPOUTAPI __declspec(dllexport)
+#else
+#define SPOUTAPI __declspec(dllimport)
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// COM-Like abstract interface.
+// This interface doesn't require __declspec(dllexport/dllimport) specifier.
+// Method calls are dispatched via virtual table.
+// Any C++ compiler can use it.
+// Instances are obtained via factory function.
+//
+struct SPOUTLIBRARY
+{
+ // Sender
+ virtual bool CreateSender(const char *Sendername, unsigned int width, unsigned int height, DWORD dwFormat = 0) = 0;
+ virtual void ReleaseSender(DWORD dwMsec = 0) = 0;
+ virtual bool UpdateSender(const char* Sendername, unsigned int width, unsigned int height) = 0;
+ virtual bool SendTexture(GLuint TextureID, GLuint TextureTarget, unsigned int width, unsigned int height, bool bInvert = true, GLuint HostFBO = 0) = 0;
+ virtual bool SendImage(const unsigned char* pixels, unsigned int width, unsigned int height, GLenum glFormat = GL_RGBA, bool bInvert=false) = 0;
+
+ // Receiver
+ virtual bool CreateReceiver(char* Sendername, unsigned int &width, unsigned int &height, bool bUseActive = false) = 0;
+ virtual void ReleaseReceiver() = 0;
+ virtual bool ReceiveTexture(char* Sendername, unsigned int &width, unsigned int &height, GLuint TextureID = 0, GLuint TextureTarget = 0, bool bInvert = false, GLuint HostFBO = 0) = 0;
+ virtual bool ReceiveImage(char* Sendername, unsigned int &width, unsigned int &height, unsigned char* pixels, GLenum glFormat = GL_RGBA, bool bInvert = false, GLuint HostFBO=0) = 0;
+ virtual bool CheckReceiver(char* Sendername, unsigned int &width, unsigned int &height, bool &bConnected) = 0;
+ virtual bool GetImageSize(char* sendername, unsigned int &width, unsigned int &height, bool &bMemoryMode) = 0;
+
+ virtual bool BindSharedTexture() = 0;
+ virtual bool UnBindSharedTexture() = 0;
+
+ virtual bool DrawSharedTexture(float max_x = 1.0, float max_y = 1.0, float aspect = 1.0, bool bInvert = true) = 0;
+ virtual bool DrawToSharedTexture(GLuint TextureID, GLuint TextureTarget, unsigned int width, unsigned int height, float max_x = 1.0, float max_y = 1.0, float aspect = 1.0, bool bInvert = false, GLuint HostFBO = 0) = 0;
+
+ virtual int GetSenderCount() = 0;
+ virtual bool GetSenderName(int index, char* sendername, int MaxSize = 256) = 0;
+ virtual bool GetSenderInfo(const char* sendername, unsigned int &width, unsigned int &height, HANDLE &dxShareHandle, DWORD &dwFormat) = 0;
+ virtual bool GetActiveSender(char* Sendername) = 0;
+ virtual bool SetActiveSender(const char* Sendername) = 0;
+
+ // Utilities
+ virtual bool SetDX9(bool bDX9 = true) = 0; // User request to use DirectX 9 (default is DirectX 11)
+ virtual bool GetDX9() = 0; // Return the flag that has been set
+ virtual bool SetMemoryShareMode(bool bMem = true) = 0;
+ virtual bool GetMemoryShareMode() = 0;
+ virtual int GetMaxSenders() = 0; // Get maximum senders allowed
+ virtual void SetMaxSenders(int maxSenders) = 0; // Set maximum senders allowed
+ virtual bool GetHostPath(const char *sendername, char *hostpath, int maxchars) = 0; // The path of the host that produced the sender
+ virtual int GetVerticalSync() = 0;
+ virtual bool SetVerticalSync(bool bSync = true) = 0;
+ virtual bool SelectSenderPanel(const char* message = NULL) = 0;
+
+ // Access to globals
+ virtual bool GetSpoutSenderName(char * sendername, int maxchars) = 0; // get the global sender name
+ virtual bool IsSpoutInitialized() = 0; // has the class been initialized
+
+ // Adapter functions
+ virtual int GetNumAdapters() = 0; // Get the number of graphics adapters in the system
+ virtual bool GetAdapterName(int index, char *adaptername, int maxchars) = 0; // Get an adapter name
+ virtual bool SetAdapter(int index = 0) = 0; // Set required graphics adapter for output
+ virtual int GetAdapter() = 0; // Get the SpoutDirectX global adapter index
+
+ // Library release function
+ virtual void Release() = 0;
+
+};
+
+
+// Handle type. In C++ language the interface type is used.
+typedef SPOUTLIBRARY* SPOUTHANDLE;
+
+// Factory function that creates instances of the SPOUT object.
+extern "C" SPOUTAPI SPOUTHANDLE WINAPI GetSpout(VOID);
+
+
+////////////////////////////////////////////////////////////////////////////////
diff --git a/apps/OpenSpace/ext/spout/SpoutLibrary.lib b/apps/OpenSpace/ext/spout/SpoutLibrary.lib
new file mode 100644
index 0000000000..435552b195
Binary files /dev/null and b/apps/OpenSpace/ext/spout/SpoutLibrary.lib differ
diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp
index 0ff4b1d46d..ec55894de0 100644
--- a/apps/OpenSpace/main.cpp
+++ b/apps/OpenSpace/main.cpp
@@ -25,33 +25,151 @@
#include
#include
#include
-#include
+
#include
#include
#include
+
#include
-#include
-#include
-sgct::Engine* _sgctEngine;
+#ifdef WIN32
+
+#include
+
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+
+#endif // WIN32
+
+#ifdef OPENVR_SUPPORT
+#include
+#endif // OPENVR_SUPPORT
+
+#ifdef OPENSPACE_HAS_SPOUT
+#include "SpoutLibrary.h"
+#endif // OPENSPACE_HAS_SPOUT
+
+
+#define DEVELOPER_MODE
+
+namespace {
+
+const char* _loggerCat = "main";
+sgct::Engine* SgctEngine;
+
+const char* OpenVRTag = "OpenVR";
+const char* SpoutTag = "Spout";
+
+#ifdef WIN32
+
+LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) {
+ SYSTEMTIME stLocalTime;
+ GetLocalTime(&stLocalTime);
+
+
+ LFATAL("Printing Stack Trace that lead to the crash:");
+ std::vector stackTrace = ghoul::stackTrace();
+ for (const std::string& s : stackTrace) {
+ LINFO(s);
+ }
+
+ std::string dumpFile = fmt::format(
+ "OpenSpace_{}_{}_{}-{}-{}-{}-{}-{}-{}--{}--{}.dmp",
+ openspace::OPENSPACE_VERSION_MAJOR,
+ openspace::OPENSPACE_VERSION_MINOR,
+ openspace::OPENSPACE_VERSION_PATCH,
+ stLocalTime.wYear,
+ stLocalTime.wMonth,
+ stLocalTime.wDay,
+ stLocalTime.wHour,
+ stLocalTime.wMinute,
+ stLocalTime.wSecond,
+ GetCurrentProcessId(),
+ GetCurrentThreadId()
+ );
+
+ LINFO("Creating dump file: " << dumpFile);
+
+ HANDLE hDumpFile = CreateFile(
+ dumpFile.c_str(),
+ GENERIC_READ | GENERIC_WRITE,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ 0,
+ CREATE_ALWAYS,
+ 0,
+ 0
+ );
+
+ MINIDUMP_EXCEPTION_INFORMATION exceptionParameter;
+ exceptionParameter.ThreadId = GetCurrentThreadId();
+ exceptionParameter.ExceptionPointers = exceptionPointers;
+ exceptionParameter.ClientPointers = TRUE;
+
+ BOOL success = MiniDumpWriteDump(
+ GetCurrentProcess(),
+ GetCurrentProcessId(),
+ hDumpFile,
+ MiniDumpWithDataSegs,
+ &exceptionParameter,
+ nullptr,
+ nullptr
+ );
+
+ if (success) {
+ LINFO("Created successfully");
+ }
+ else {
+ LERROR("Dumpfile created unsuccessfully");
+ }
+
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+
+#endif // WIN32
+
+#ifdef OPENVR_SUPPORT
+sgct::SGCTWindow* FirstOpenVRWindow = nullptr;
+#endif
+
+#ifdef OPENSPACE_HAS_SPOUT
+/**
+ * This struct stores all information about a single render window. Depending on the
+ * frame setup, each window can be mono or stereo, the information of which is stored in
+ * the \c leftOrMain and \c right members respectively.
+ */
+struct SpoutWindow {
+ struct SpoutData {
+ SPOUTHANDLE handle = nullptr;
+ bool initialized = false;
+ };
+
+ /// The left framebuffer (or main, if there is no stereo rendering)
+ SpoutData leftOrMain;
+
+ /// The right framebuffer
+ SpoutData right;
+
+ /// The window ID of this windows
+ size_t windowId = size_t(-1);
+};
+
+/// The list of all windows with spout senders
+std::vector SpoutWindows;
+
+#endif // OPENSPACE_HAS_SPOUT
+
-int main_main(int argc, char** argv);
-void mainInitFunc();
-void mainPreSyncFunc();
-void mainPostSyncPreDrawFunc();
-void mainRenderFunc();
-void mainPostDrawFunc();
-void mainKeyboardCallback(int key, int scancode, int action, int mods);
-void mainCharCallback(unsigned int codepoint, int mods);
-void mainMouseButtonCallback(int key, int action);
-void mainMousePosCallback(double x, double y);
-void mainMouseScrollCallback(double posX, double posY);
-void mainEncodeFun();
-void mainDecodeFun();
-void mainExternalControlCallback(const char * receivedChars, int size);
-void mainLogCallback(const char* msg);
std::pair supportedOpenGLVersion() {
+ // Just create a window in order to retrieve the available OpenGL version before we
+ // create the real window
glfwInit();
// On OS X we need to explicitly set the version and specify that we are using CORE
@@ -66,185 +184,124 @@ std::pair supportedOpenGLVersion() {
#endif
glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
+
+ // By creating an offscreen window, the user will not know that we created this window
GLFWwindow* offscreen = glfwCreateWindow(128, 128, "", nullptr, nullptr);
glfwMakeContextCurrent(offscreen);
+ // Get the OpenGL version
int major, minor;
glGetIntegerv(GL_MAJOR_VERSION, &major);
glGetIntegerv(GL_MINOR_VERSION, &minor);
+ // And get rid of the window again
glfwDestroyWindow(offscreen);
glfwWindowHint(GLFW_VISIBLE, GL_TRUE);
+
return { major, minor };
}
-namespace {
- const std::string _loggerCat = "main";
-}
-
-int main(int argc, char** argv) {
- try {
- return main_main(argc, argv);
- }
- catch (const ghoul::RuntimeError& e) {
- // Write out all of the information about the exception, flush the logs, and throw
- LFATALC(e.component, e.message);
- LogMgr.flushLogs();
- throw;
- }
- catch (const std::exception& e) {
- // Write out all of the information about the exception, flush the logs, and throw
- LFATALC("Exception", e.what());
- LogMgr.flushLogs();
- throw;
- }
- catch (...) {
- // Write out all of the information about the exception, flush the logs, and throw
- LFATALC("Exception", "Unknown exception");
- LogMgr.flushLogs();
- throw;
- }
-}
-
-int main_main(int argc, char** argv) {
- auto glVersion = supportedOpenGLVersion();
-
- // create the OpenSpace engine and get arguments for the sgct engine
- std::vector sgctArguments;
- const bool success = openspace::OpenSpaceEngine::create(
- argc, argv,
- std::make_unique(),
- sgctArguments
- );
- if (!success)
- return EXIT_FAILURE;
-
- LINFO("Detected OpenGL version: " << glVersion.first << "." << glVersion.second);
-
- // create sgct engine c arguments
- int newArgc = static_cast(sgctArguments.size());
- char** newArgv = new char*[newArgc];
- for (int i = 0; i < newArgc; ++i) {
- newArgv[i] = const_cast(sgctArguments.at(i).c_str());
- }
-
- // Need to set this before the creation of the sgct::Engine
- sgct::MessageHandler::instance()->setLogToConsole(false);
- sgct::MessageHandler::instance()->setShowTime(false);
- sgct::MessageHandler::instance()->setLogToCallback(true);
- sgct::MessageHandler::instance()->setLogCallback(mainLogCallback);
-
-#ifdef __APPLE__
- glfwWindowHint(GLFW_STENCIL_BITS, 8);
-#endif
-
- LDEBUG("Creating SGCT Engine");
- _sgctEngine = new sgct::Engine(newArgc, newArgv);
-
- // deallocate sgct c arguments
- delete[] newArgv;
-
- // Bind functions
- _sgctEngine->setInitOGLFunction(mainInitFunc);
- _sgctEngine->setPreSyncFunction(mainPreSyncFunc);
- _sgctEngine->setPostSyncPreDrawFunction(mainPostSyncPreDrawFunc);
- _sgctEngine->setDrawFunction(mainRenderFunc);
- _sgctEngine->setPostDrawFunction(mainPostDrawFunc);
- _sgctEngine->setKeyboardCallbackFunction(mainKeyboardCallback);
- _sgctEngine->setMouseButtonCallbackFunction(mainMouseButtonCallback);
- _sgctEngine->setMousePosCallbackFunction(mainMousePosCallback);
- _sgctEngine->setMouseScrollCallbackFunction(mainMouseScrollCallback);
- _sgctEngine->setExternalControlCallback(mainExternalControlCallback);
- _sgctEngine->setCharCallbackFunction(mainCharCallback);
-
- // Disable the immediate exit of the application when the ESC key is pressed
- _sgctEngine->setExitKey(SGCT_KEY_UNKNOWN);
-
- sgct::MessageHandler::instance()->setNotifyLevel(sgct::MessageHandler::NOTIFY_ALL);
-
- // set encode and decode functions
- // NOTE: starts synchronizing before init functions
- sgct::SharedData::instance()->setEncodeFunction(mainEncodeFun);
- sgct::SharedData::instance()->setDecodeFunction(mainDecodeFun);
-
- // try to open a window
- LDEBUG("Initialize SGCT Engine");
- std::map, sgct::Engine::RunMode> versionMapping = {
- { { 3, 3 }, sgct::Engine::RunMode::OpenGL_3_3_Core_Profile },
- { { 4, 0 }, sgct::Engine::RunMode::OpenGL_4_0_Core_Profile },
- { { 4, 1 }, sgct::Engine::RunMode::OpenGL_4_1_Core_Profile },
- { { 4, 2 }, sgct::Engine::RunMode::OpenGL_4_2_Core_Profile },
- { { 4, 3 }, sgct::Engine::RunMode::OpenGL_4_3_Core_Profile },
- { { 4, 4 }, sgct::Engine::RunMode::OpenGL_4_4_Core_Profile },
- { { 4, 5 }, sgct::Engine::RunMode::OpenGL_4_5_Core_Profile }
- };
- ghoul_assert(
- versionMapping.find(glVersion) != versionMapping.end(),
- "Unknown OpenGL version. Missing statement in version mapping map"
- );
- sgct::Engine::RunMode rm = versionMapping[glVersion];
- const bool initSuccess = _sgctEngine->init(rm);
-
- if (!initSuccess) {
- LFATAL("Initializing failed");
- // could not open a window, deallocates and exits
- delete _sgctEngine;
- openspace::OpenSpaceEngine::destroy();
- return EXIT_FAILURE;
- }
-
- // Main loop
- LDEBUG("Starting rendering loop");
- _sgctEngine->render();
- LDEBUG("Ending rendering loop");
-
- //clear function bindings to avoid crash after destroying the OpenSpace Engine
- sgct::MessageHandler::instance()->setLogToCallback(false);
- sgct::MessageHandler::instance()->setLogCallback(nullptr);
-
- LDEBUG("Destroying OpenSpaceEngine");
- openspace::OpenSpaceEngine::destroy();
-
- // Clean up (deallocate)
- LDEBUG("Destroying SGCT Engine");
- delete _sgctEngine;
-
- // Exit program
- exit(EXIT_SUCCESS);
-}
-
void mainInitFunc() {
LTRACE("main::mainInitFunc(begin)");
- //is this node the master? (must be set after call to _sgctEngine->init())
- OsEng.setMaster(_sgctEngine->isMaster());
-
- LDEBUG("Initializing OpenSpace Engine");
- bool success = OsEng.initialize();
- LDEBUG("Initializing OpenGL in OpenSpace Engine");
- if (success) {
- success = OsEng.initializeGL();
+ LDEBUG("Initializing OpenSpace Engine started");
+ OsEng.initialize();
+ LDEBUG("Initializing OpenSpace Engine finished");
+
+ LDEBUG("Initializing OpenGL in OpenSpace Engine started");
+ OsEng.initializeGL();
+ LDEBUG("Initializing OpenGL in OpenSpace Engine finished");
+
+ // Find if we have at least one OpenVR window
+ // Save reference to first OpenVR window, which is the one we will copy to the HMD.
+ for (size_t i = 0; i < SgctEngine->getNumberOfWindows(); ++i) {
+ if (SgctEngine->getWindowPtr(i)->checkIfTagExists(OpenVRTag)) {
+#ifdef OPENVR_SUPPORT
+ FirstOpenVRWindow = SgctEngine->getWindowPtr(i);
+
+ // If we have an OpenVRWindow, initialize OpenVR.
+ sgct::SGCTOpenVR::initialize(
+ SgctEngine->getNearClippingPlane(), SgctEngine->getFarClippingPlane()
+ );
+#else
+ LWARNING(
+ "OpenVR was requested, but OpenSpace was compiled without VR support."
+ );
+#endif
+
+ break;
+ }
}
- if (!success) {
- LFATAL("Initializing OpenSpaceEngine failed");
- LogMgr.flushLogs();
- exit(EXIT_FAILURE);
- }
-
// Set the clear color for all non-linear projection viewports
- size_t nWindows = _sgctEngine->getNumberOfWindows();
+ // @CLEANUP: Why is this necessary? We can set the clear color in the configuration
+ // files --- abock
+ const size_t nWindows = SgctEngine->getNumberOfWindows();
for (size_t i = 0; i < nWindows; ++i) {
- sgct::SGCTWindow* w = _sgctEngine->getWindowPtr(i);
- size_t nViewports = w->getNumberOfViewports();
+ sgct::SGCTWindow* w = SgctEngine->getWindowPtr(i);
+ const size_t nViewports = w->getNumberOfViewports();
for (size_t j = 0; j < nViewports; ++j) {
sgct_core::Viewport* v = w->getViewport(j);
ghoul_assert(v != nullptr, "Number of reported viewports was incorrect");
sgct_core::NonLinearProjection* p = v->getNonLinearProjectionPtr();
- if (p)
+ if (p) {
p->setClearColor(glm::vec4(0.f, 0.f, 0.f, 1.f));
+ }
}
}
+
+ for (size_t i = 0; i < nWindows; ++i) {
+ const sgct::SGCTWindow* windowPtr = SgctEngine->getWindowPtr(i);
+
+ if (!windowPtr->checkIfTagExists(SpoutTag)) {
+ continue;
+ }
+
+#ifdef OPENSPACE_HAS_SPOUT
+ SpoutWindow w;
+
+ w.windowId = i;
+
+ const sgct::SGCTWindow::StereoMode sm = windowPtr->getStereoMode();
+ const bool hasStereo =
+ (sm != sgct::SGCTWindow::No_Stereo) &&
+ (sm < sgct::SGCTWindow::Side_By_Side_Stereo);
+
+ if (hasStereo) {
+ SpoutWindow::SpoutData& left = w.leftOrMain;
+ left.handle = GetSpout();
+ left.initialized = left.handle->CreateSender(
+ (windowPtr->getName() + "_left").c_str(),
+ windowPtr->getXFramebufferResolution(),
+ windowPtr->getYFramebufferResolution()
+ );
+
+ SpoutWindow::SpoutData& right = w.right;
+ right.handle = GetSpout();
+ right.initialized = right.handle->CreateSender(
+ (windowPtr->getName() + "_right").c_str(),
+ windowPtr->getXFramebufferResolution(),
+ windowPtr->getYFramebufferResolution()
+ );
+ }
+ else {
+ SpoutWindow::SpoutData& main = w.leftOrMain;
+ main.handle = GetSpout();
+ main.initialized = main.handle->CreateSender(
+ windowPtr->getName().c_str(),
+ windowPtr->getXFramebufferResolution(),
+ windowPtr->getYFramebufferResolution()
+ );
+ }
+
+ SpoutWindows.push_back(std::move(w));
+#else
+ LWARNING(
+ "Spout was requested, but OpenSpace was compiled without Spout support."
+ );
+
+#endif // OPENSPACE_HAS_SPOUT
+ }
LTRACE("main::mainInitFunc(end)");
}
@@ -255,59 +312,96 @@ void mainPreSyncFunc() {
LTRACE("main::mainPreSyncFunc(end)");
}
-volatile bool busyWaitDecode = false;
void mainPostSyncPreDrawFunc() {
-// if (OsEng.useBusyWaitForDecode() && !sgct::Engine::instance()->isMaster()) {
-// while (minilog.str().size() && minilog.str().back() != DECODE.end) {
-// std::this_thread::sleep_for(std::chrono::microseconds(10));
-// }
-// }
LTRACE("main::postSynchronizationPreDraw(begin)");
OsEng.postSynchronizationPreDraw();
+
+#ifdef OPENVR_SUPPORT
+ if (FirstOpenVRWindow) {
+ // Update pose matrices for all tracked OpenVR devices once per frame
+ sgct::SGCTOpenVR::updatePoses();
+ }
+#endif // OPENVR_SUPPORT
+
LTRACE("main::postSynchronizationPreDraw(end)");
}
void mainRenderFunc() {
LTRACE("main::mainRenderFunc(begin)");
- using glm::mat4;
- using glm::translate;
- //not the most efficient, but for clarity @JK
- mat4 userMatrix = translate(mat4(1.f), _sgctEngine->getDefaultUserPtr()->getPos());
- mat4 sceneMatrix = _sgctEngine->getModelMatrix();
- mat4 viewMatrix = _sgctEngine->getCurrentViewMatrix() * userMatrix;
+ glm::mat4 viewMatrix =
+ SgctEngine->getCurrentViewMatrix() *
+ // User matrix
+ glm::translate(
+ glm::mat4(1.f),
+ SgctEngine->getDefaultUserPtr()->getPos()
+ )
+ ;
- //dont shift nav-direction on master, makes it very tricky to navigate @JK
- if (!OsEng.ref().isMaster())
- viewMatrix = viewMatrix * sceneMatrix;
+ glm::mat4 projectionMatrix = SgctEngine->getCurrentProjectionMatrix();
+#ifdef OPENVR_SUPPORT
+ bool currentWindowIsHMD = FirstOpenVRWindow == SgctEngine->getCurrentWindowPtr();
+ if (sgct::SGCTOpenVR::isHMDActive() && currentWindowIsHMD) {
+ projectionMatrix = sgct::SGCTOpenVR::getHMDCurrentViewProjectionMatrix(
+ SgctEngine->getCurrentFrustumMode()
+ );
+ }
+#endif
- mat4 projectionMatrix = _sgctEngine->getCurrentProjectionMatrix();
- OsEng.render(projectionMatrix, viewMatrix);
+ OsEng.render(
+ SgctEngine->getModelMatrix(),
+ viewMatrix,
+ projectionMatrix
+ );
LTRACE("main::mainRenderFunc(end)");
}
void mainPostDrawFunc() {
LTRACE("main::mainPostDrawFunc(begin)");
- OsEng.postDraw();
- LTRACE("main::mainPostDrawFunc(end)");
-// if (OsEng.logSGCTOutOfOrderErrors()) {
-// if (sgct::Engine::instance()->isMaster()) {
-// if (minilog.str() != EXPECTED_MASTER_LOG) {
-// LERRORC("Minilog", "Bad combination: " << minilog.str());
-// }
-// }
-// else {
-// if (minilog.str() != EXPECTED_SLAVE_LOG) {
-// LERRORC("Minilog", "Bad combination: " << minilog.str());
-// }
-// }
-// }
+#ifdef OPENVR_SUPPORT
+ if (FirstOpenVRWindow) {
+ // Copy the first OpenVR window to the HMD
+ sgct::SGCTOpenVR::copyWindowToHMD(FirstOpenVRWindow);
+ }
+#endif // OPENVR_SUPPORT
+
+ OsEng.postDraw();
+
+#ifdef OPENSPACE_HAS_SPOUT
+ for (const SpoutWindow& w : SpoutWindows) {
+ sgct::SGCTWindow* window = SgctEngine->getWindowPtr(w.windowId);
+ if (w.leftOrMain.initialized) {
+ GLuint texId = window->getFrameBufferTexture(sgct::Engine::LeftEye);
+ glBindTexture(GL_TEXTURE_2D, texId);
+ w.leftOrMain.handle->SendTexture(
+ texId,
+ GL_TEXTURE_2D,
+ window->getXFramebufferResolution(),
+ window->getYFramebufferResolution()
+ );
+ }
+
+ if (w.right.initialized) {
+ GLuint texId = window->getFrameBufferTexture(sgct::Engine::RightEye);
+ glBindTexture(GL_TEXTURE_2D, texId);
+ w.right.handle->SendTexture(
+ texId,
+ GL_TEXTURE_2D,
+ window->getXFramebufferResolution(),
+ window->getYFramebufferResolution()
+ );
+ }
+ }
+ glBindTexture(GL_TEXTURE_2D, 0);
+#endif // OPENSPACE_HAS_SPOUT
+
+ LTRACE("main::mainPostDrawFunc(end)");
}
void mainExternalControlCallback(const char* receivedChars, int size) {
LTRACE("main::mainExternalControlCallback(begin)");
- if (OsEng.isMaster()) {
+ if (SgctEngine->isMaster()) {
OsEng.externalControlCallback(receivedChars, size, 0);
}
LTRACE("main::mainExternalControlCallback(end)");
@@ -315,40 +409,45 @@ void mainExternalControlCallback(const char* receivedChars, int size) {
void mainKeyboardCallback(int key, int, int action, int mods) {
LTRACE("main::mainKeyboardCallback(begin)");
- if (OsEng.isMaster()) {
+ if (SgctEngine->isMaster()) {
OsEng.keyboardCallback(
openspace::Key(key),
openspace::KeyModifier(mods),
openspace::KeyAction(action)
- );
+ );
}
LTRACE("main::mainKeyboardCallback(begin)");
}
void mainMouseButtonCallback(int key, int action) {
LTRACE("main::mainMouseButtonCallback(begin)");
- if (OsEng.isMaster()) {
+ if (SgctEngine->isMaster()) {
OsEng.mouseButtonCallback(
openspace::MouseButton(key),
openspace::MouseAction(action)
- );
+ );
}
LTRACE("main::mainMouseButtonCallback(end)");
}
void mainMousePosCallback(double x, double y) {
- if (OsEng.isMaster())
+ if (SgctEngine->isMaster()) {
OsEng.mousePositionCallback(x, y);
+ }
}
-void mainMouseScrollCallback(double posX, double posY) {
- if (OsEng.isMaster())
+void mainMouseScrollCallback(double, double posY) {
+ LTRACE("main::mainMouseScrollCallback(begin");
+ if (SgctEngine->isMaster()) {
OsEng.mouseScrollWheelCallback(posY);
+ }
+ LTRACE("main::mainMouseScrollCallback(end)");
}
void mainCharCallback(unsigned int codepoint, int mods) {
- if (OsEng.isMaster())
+ if (SgctEngine->isMaster()) {
OsEng.charCallback(codepoint, openspace::KeyModifier(mods));
+ }
}
void mainEncodeFun() {
@@ -365,10 +464,189 @@ void mainDecodeFun() {
void mainLogCallback(const char* msg) {
std::string message = msg;
- if (message.empty() || message == ".")
+ if (message.empty() || message == ".") {
// We don't want the empty '.' message that SGCT sends while it is waiting for
// connections from other network nodes
return;
+ }
// Remove the trailing \n that is passed along
- LINFOC("SGCT", message.substr(0, std::max(message.size() - 1, 0)));
+ LINFOC("SGCT", message.substr(0, message.size() - 1));
+}
+
+int main_main(int argc, char** argv) {
+ std::pair glVersion = supportedOpenGLVersion();
+
+ // Create the OpenSpace engine and get arguments for the SGCT engine
+ // @CLEANUP: Replace the return valua with throwing an exception --abock
+ std::vector sgctArguments;
+ bool requestQuit = false;
+ openspace::OpenSpaceEngine::create(
+ argc, argv,
+ std::make_unique(),
+ sgctArguments,
+ requestQuit
+ );
+
+ if (requestQuit) {
+ return EXIT_SUCCESS;
+ }
+
+ LINFO("Detected OpenGL version: " << glVersion.first << "." << glVersion.second);
+
+ // Create sgct engine c arguments
+ int newArgc = static_cast(sgctArguments.size());
+
+ char** newArgv = new char*[newArgc];
+ for (int i = 0; i < newArgc; ++i) {
+ newArgv[i] = const_cast(sgctArguments.at(i).c_str());
+ }
+
+ // Need to set this before the creation of the sgct::Engine
+ sgct::MessageHandler::instance()->setLogToConsole(false);
+ sgct::MessageHandler::instance()->setShowTime(false);
+ sgct::MessageHandler::instance()->setLogToCallback(true);
+ sgct::MessageHandler::instance()->setLogCallback(mainLogCallback);
+
+#ifdef __APPLE__
+ glfwWindowHint(GLFW_STENCIL_BITS, 8);
+#endif
+
+ LDEBUG("Creating SGCT Engine");
+ SgctEngine = new sgct::Engine(newArgc, newArgv);
+
+ // Deallocate sgct c arguments
+ delete[] newArgv;
+
+ // Bind functions
+ SgctEngine->setInitOGLFunction(mainInitFunc);
+ SgctEngine->setPreSyncFunction(mainPreSyncFunc);
+ SgctEngine->setPostSyncPreDrawFunction(mainPostSyncPreDrawFunc);
+ SgctEngine->setDrawFunction(mainRenderFunc);
+ SgctEngine->setPostDrawFunction(mainPostDrawFunc);
+ SgctEngine->setKeyboardCallbackFunction(mainKeyboardCallback);
+ SgctEngine->setMouseButtonCallbackFunction(mainMouseButtonCallback);
+ SgctEngine->setMousePosCallbackFunction(mainMousePosCallback);
+ SgctEngine->setMouseScrollCallbackFunction(mainMouseScrollCallback);
+ SgctEngine->setExternalControlCallback(mainExternalControlCallback);
+ SgctEngine->setCharCallbackFunction(mainCharCallback);
+
+ // Disable the immediate exit of the application when the ESC key is pressed
+ SgctEngine->setExitKey(SGCT_KEY_UNKNOWN);
+
+ sgct::MessageHandler::instance()->setNotifyLevel(sgct::MessageHandler::NOTIFY_ALL);
+
+ // Set encode and decode functions
+ // NOTE: starts synchronizing before init functions
+ sgct::SharedData::instance()->setEncodeFunction(mainEncodeFun);
+ sgct::SharedData::instance()->setDecodeFunction(mainDecodeFun);
+
+ // Try to open a window
+ LDEBUG("Initialize SGCT Engine");
+ std::map, sgct::Engine::RunMode> versionMapping = {
+ { { 3, 3 }, sgct::Engine::RunMode::OpenGL_3_3_Core_Profile },
+ { { 4, 0 }, sgct::Engine::RunMode::OpenGL_4_0_Core_Profile },
+ { { 4, 1 }, sgct::Engine::RunMode::OpenGL_4_1_Core_Profile },
+ { { 4, 2 }, sgct::Engine::RunMode::OpenGL_4_2_Core_Profile },
+ { { 4, 3 }, sgct::Engine::RunMode::OpenGL_4_3_Core_Profile },
+ { { 4, 4 }, sgct::Engine::RunMode::OpenGL_4_4_Core_Profile },
+ { { 4, 5 }, sgct::Engine::RunMode::OpenGL_4_5_Core_Profile }
+ };
+ ghoul_assert(
+ versionMapping.find(glVersion) != versionMapping.end(),
+ "Unknown OpenGL version. Missing statement in version mapping map"
+ );
+
+ auto cleanup = [&](){
+ OsEng.deinitialize();
+
+ // Clear function bindings to avoid crash after destroying the OpenSpace Engine
+ sgct::MessageHandler::instance()->setLogToCallback(false);
+ sgct::MessageHandler::instance()->setLogCallback(nullptr);
+
+ LDEBUG("Destroying OpenSpaceEngine");
+ openspace::OpenSpaceEngine::destroy();
+
+ LDEBUG("Destroying SGCT Engine");
+ delete SgctEngine;
+
+
+#ifdef OPENVR_SUPPORT
+ // Clean up OpenVR
+ sgct::SGCTOpenVR::shutdown();
+#endif
+
+#ifdef OPENSPACE_HAS_SPOUT
+ for (SpoutWindow& w : SpoutWindows) {
+ if (w.leftOrMain.handle) {
+ w.leftOrMain.handle->ReleaseReceiver();
+ w.leftOrMain.handle->Release();
+ }
+ if (w.right.handle) {
+ w.right.handle->ReleaseReceiver();
+ w.right.handle->Release();
+ }
+ }
+#endif // OPENSPACE_HAS_SPOUT
+ };
+
+ bool initSuccess = SgctEngine->init(versionMapping[glVersion]);
+
+ if (!initSuccess) {
+ LFATAL("Initializing failed");
+ cleanup();
+ return EXIT_FAILURE;
+ }
+
+ // Main loop
+ LDEBUG("Starting rendering loop");
+ SgctEngine->render();
+ LDEBUG("Ending rendering loop");
+
+ cleanup();
+
+ // Exit program
+ exit(EXIT_SUCCESS);
+}
+
+} // namespace
+
+int main(int argc, char** argv) {
+#ifdef WIN32
+ SetUnhandledExceptionFilter(generateMiniDump);
+#endif // WIN32
+
+ // If we are working as a developer, we don't want to catch the exceptions in order to
+ // find the locations where the exceptions are raised.
+ // If we are not in developer mode, we want to catch and at least log the error before
+ // dying
+#ifdef DEVELOPER_MODE
+ return main_main(argc, argv);
+#else
+ // We wrap the actual main function in a try catch block so that we can get and print
+ // some additional information in case an exception is raised
+ try {
+ return main_main(argc, argv);
+ }
+ catch (const ghoul::RuntimeError& e) {
+ // Write out all of the information about the exception and flush the logs
+ LFATALC(e.component, e.message);
+ LogMgr.flushLogs();
+ return EXIT_FAILURE;
+ }
+ catch (const ghoul::AssertionException& e) {
+ // We don't want to catch the assertion exception as we won't be able to add a
+ // breakpoint for debugging
+ LFATALC("Assertion failed", e.what());
+ throw;
+ } catch (const std::exception& e) {
+ LFATALC("Exception", e.what());
+ LogMgr.flushLogs();
+ return EXIT_FAILURE;
+ }
+ catch (...) {
+ LFATALC("Exception", "Unknown exception");
+ LogMgr.flushLogs();
+ return EXIT_FAILURE;
+ }
+#endif // DEVELOPER_MODE
}
diff --git a/apps/DataConverter/CMakeLists.txt b/apps/TaskRunner/CMakeLists.txt
similarity index 85%
rename from apps/DataConverter/CMakeLists.txt
rename to apps/TaskRunner/CMakeLists.txt
index 24bfdc7968..69f23771d3 100644
--- a/apps/DataConverter/CMakeLists.txt
+++ b/apps/TaskRunner/CMakeLists.txt
@@ -22,26 +22,18 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
#########################################################################################
-set(APPLICATION_NAME DataConverter)
+set(APPLICATION_NAME TaskRunner)
set(APPLICATION_LINK_TO_OPENSPACE ON)
include (${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
-set(application_path ${OPENSPACE_APPS_DIR}/DataConverter)
+set(application_path ${OPENSPACE_APPS_DIR}/TaskRunner)
set(SOURCE_FILES
${application_path}/main.cpp
- ${application_path}/milkywayconversiontask.cpp
- ${application_path}/milkywaypointsconversiontask.cpp
-)
-set(HEADER_FILES
- ${application_path}/conversiontask.h
- ${application_path}/milkywayconversiontask.h
- ${application_path}/milkywaypointsconversiontask.h
)
add_executable(${APPLICATION_NAME} MACOSX_BUNDLE
${SOURCE_FILES}
- ${HEADER_FILES}
)
diff --git a/apps/DataConverter/main.cpp b/apps/TaskRunner/main.cpp
similarity index 54%
rename from apps/DataConverter/main.cpp
rename to apps/TaskRunner/main.cpp
index eb147ec43d..5edbd82b41 100644
--- a/apps/DataConverter/main.cpp
+++ b/apps/TaskRunner/main.cpp
@@ -33,50 +33,98 @@
#include
#include
+#include
+
+#include
+
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
-#include
-#include
-
-int main(int argc, char** argv) {
- using namespace openspace;
- using namespace dataconverter;
-
- ghoul::initialize();
+namespace {
+ const std::string ConfigurationFile = "openspace.cfg";
+ const std::string _loggerCat = "TaskRunner Main";
+}
+void initTextureReaders() {
#ifdef GHOUL_USE_DEVIL
ghoul::io::TextureReader::ref().addReader(std::make_shared());
#endif // GHOUL_USE_DEVIL
#ifdef GHOUL_USE_FREEIMAGE
ghoul::io::TextureReader::ref().addReader(std::make_shared());
#endif // GHOUL_USE_FREEIMAGE
+}
- openspace::ProgressBar pb(100);
- std::function onProgress = [&](float progress) {
- pb.print(progress * 100);
- };
+int main(int argc, char** argv) {
+ using namespace openspace;
- // TODO: Make the converter configurable using either
- // config files (json, lua dictionaries),
- // lua scripts,
- // or at the very least: a command line interface.
-
- MilkyWayConversionTask mwConversionTask(
- "F:/mw_june2016/volumeslices/img/comp/v003/frames/primary/0100/cam2_main.",
- ".exr",
- 1385,
- 512,
- "F:/mw_june2016/mw_512_512_64_june.rawvolume",
- glm::vec3(512, 512, 64));
+ ghoul::initialize();
+ initTextureReaders();
+
+ FactoryManager::initialize();
+ FactoryManager::ref().addFactory(
+ std::make_unique>(),
+ "Renderable"
+ );
+ FactoryManager::ref().addFactory(
+ std::make_unique>(),
+ "Task"
+ );
+ FactoryManager::ref().addFactory(
+ std::make_unique>(),
+ "Translation"
+ );
+
+ FactoryManager::ref().addFactory(
+ std::make_unique>(),
+ "Rotation"
+ );
+
+ FactoryManager::ref().addFactory(
+ std::make_unique>(),
+ "Scale"
+ );
+
+ openspace::ConfigurationManager configuration;
+ std::string configurationFile = configuration.findConfiguration(ConfigurationFile);
+ configuration.loadFromFile(configurationFile);
+
+ ModuleEngine moduleEngine;
+ moduleEngine.initialize();
+
+ std::string tasksPath;
+ configuration.getValue(ConfigurationManager::KeyConfigTask, tasksPath);
+
+ LINFO("Initialization done.");
+
+ TaskLoader taskLoader;
+ std::vector> tasks = taskLoader.tasksFromFile(tasksPath);
- //MilkyWayPointsConversionTask mwpConversionTask("F:/mw_june2016/points.off", "F:/mw_june2016/points.off.binary");
+ size_t nTasks = tasks.size();
+ if (nTasks == 1) {
+ LINFO("Task queue has 1 item");
+ } else {
+ LINFO("Task queue has " << tasks.size() << " items");
+ }
+ for (size_t i = 0; i < tasks.size(); i++) {
+ Task& task = *tasks[i].get();
+ LINFO("Performing task " << (i+1) << " out of " << tasks.size() << ": " << task.description());
+ ProgressBar progressBar(100);
+ auto onProgress = [&progressBar](float progress) {
+ progressBar.print(progress * 100);
+ };
+ task.perform(onProgress);
+ }
- mwConversionTask.perform(onProgress);
- //mwpConversionTask.perform(onProgress);
-
-
- std::cout << "Done." << std::endl;
+ std::cout << "Done performing tasks." << std::endl;
std::cin.get();
return 0;
diff --git a/config/sgct/VRArenaSimCenter.xml b/config/sgct/VRArenaSimCenter.xml
deleted file mode 100644
index f57ec51789..0000000000
--- a/config/sgct/VRArenaSimCenter.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/sgct/ccmc_lab_all.xml b/config/sgct/ccmc_lab_all.xml
deleted file mode 100644
index 9c2fcd4958..0000000000
--- a/config/sgct/ccmc_lab_all.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/sgct/ccmc_lab_work.xml b/config/sgct/ccmc_lab_work.xml
deleted file mode 100644
index 0c9f4069b6..0000000000
--- a/config/sgct/ccmc_lab_work.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/sgct/openvr_htcVive.xml b/config/sgct/openvr_htcVive.xml
new file mode 100644
index 0000000000..e663b11521
--- /dev/null
+++ b/config/sgct/openvr_htcVive.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/sgct/openvr_oculusRiftCv1.xml b/config/sgct/openvr_oculusRiftCv1.xml
new file mode 100644
index 0000000000..e264dd3788
--- /dev/null
+++ b/config/sgct/openvr_oculusRiftCv1.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/sgct/single.xml b/config/sgct/single.xml
index 7b20bcb10c..6f8f58b23b 100644
--- a/config/sgct/single.xml
+++ b/config/sgct/single.xml
@@ -4,7 +4,7 @@
-
+
diff --git a/config/sgct/single_4k.xml b/config/sgct/single_4k.xml
deleted file mode 100644
index cb4dd6339c..0000000000
--- a/config/sgct/single_4k.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config/sgct/single_gui.xml b/config/sgct/single_gui.xml
index a3956e40f6..129232a9ea 100644
--- a/config/sgct/single_gui.xml
+++ b/config/sgct/single_gui.xml
@@ -4,7 +4,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
diff --git a/config/sgct/single_sbs_stereo.xml b/config/sgct/single_sbs_stereo.xml
deleted file mode 100644
index d92f95ed66..0000000000
--- a/config/sgct/single_sbs_stereo.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/sgct/single_stereo.xml b/config/sgct/single_stereo.xml
deleted file mode 100644
index 8497af6188..0000000000
--- a/config/sgct/single_stereo.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/sgct/single_two_win.xml b/config/sgct/single_two_win.xml
index 4cd802423a..2f7f49efc6 100644
--- a/config/sgct/single_two_win.xml
+++ b/config/sgct/single_two_win.xml
@@ -3,34 +3,26 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/config/sgct/two_nodes.xml b/config/sgct/two_nodes.xml
index 9ec00bf7bc..b4ae20f8c0 100644
--- a/config/sgct/two_nodes.xml
+++ b/config/sgct/two_nodes.xml
@@ -4,18 +4,14 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
@@ -23,18 +19,14 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/data/scene/atmosphereearth.scene b/data/scene/atmosphereearth.scene
index 914c040ca7..e00b18fc74 100644
--- a/data/scene/atmosphereearth.scene
+++ b/data/scene/atmosphereearth.scene
@@ -6,7 +6,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime(openspace.time.currentWallTime())
diff --git a/data/scene/atmosphereearth/atmosphereearth.mod b/data/scene/atmosphereearth/atmosphereearth.mod
index f5c98aaf3f..b019c71241 100644
--- a/data/scene/atmosphereearth/atmosphereearth.mod
+++ b/data/scene/atmosphereearth/atmosphereearth.mod
@@ -30,15 +30,15 @@ return {
Source1 = {
Name = "Sun",
-- All radius in meters
- Radius = {696.3, 6}
+ Radius = 696.3E6
},
- --Source2 = { Name = "Monolith", Radius = {0.01, 6} },
+ --Source2 = { Name = "Monolith", Radius = 0.01E6 },
Caster1 = {
Name = "Moon",
-- All radius in meters
- Radius = {1.737, 6}
+ Radius = 1.737E6
},
- --Caster2 = { Name = "Independency Day Ship", Radius = {0.0, 0.0} }
+ --Caster2 = { Name = "Independency Day Ship", Radius = 0 }
},
Textures = {
Type = "simple",
@@ -127,7 +127,7 @@ return {
Parent = "Earth",
Renderable = {
Type = "RenderablePlane",
- Size = {3.0, 11.0},
+ Size = 3.0E11.0,
Origin = "Center",
Billboard = true,
Texture = "textures/marker.png",
@@ -145,7 +145,7 @@ return {
-- Renderable = {
-- Type = "RenderablePlane",
-- Billboard = true,
- -- Size = { 6.371, 6 },
+ -- Size = 6.371E6,
-- Texture = "textures/graph.jpg",
-- Atmosphere = {
-- Type = "Nishita", -- for example, values missing etc etc
diff --git a/data/scene/dawn.scene b/data/scene/dawn.scene
index 6ae70e3fb9..78c03cece5 100644
--- a/data/scene/dawn.scene
+++ b/data/scene/dawn.scene
@@ -6,7 +6,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime("2011 AUG 06 00:00:00")
diff --git a/data/scene/default.scene b/data/scene/default.scene
index d2344f3ab0..3714385858 100644
--- a/data/scene/default.scene
+++ b/data/scene/default.scene
@@ -6,12 +6,11 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime(openspace.time.currentWallTime())
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
-
end
function postInitialization()
@@ -28,6 +27,8 @@ function postInitialization()
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
+ openspace.addVirtualProperty("BoolProperty", "Show Trails", "*Trail.renderable.enabled", true, nil, nil)
+
openspace.resetCameraDirection()
openspace.printInfo("Done setting default values")
diff --git a/data/scene/earth/earth.mod b/data/scene/earth/earth.mod
index 78b3a3bb90..3e293f6f3d 100644
--- a/data/scene/earth/earth.mod
+++ b/data/scene/earth/earth.mod
@@ -34,7 +34,7 @@ return {
Body = "EARTH",
Geometry = {
Type = "SimpleSphere",
- Radius = { 6.371, 6 },
+ Radius = 6.371E6,
Segments = 100
},
Textures = {
@@ -49,6 +49,7 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = {"planet_solarSystem", "planet_terrestrial"},
Transform = {
Rotation = {
Type = "SpiceRotation",
@@ -78,9 +79,10 @@ return {
-- EndTime = "2017 JAN 01 12:00:00.000",
-- SampleInterval = 3600
Period = 365.242,
- Resolution = 1000
+ Resolution = 1000,
+ Tag = {"planetTrail_solarSystem", "planetTrail_terrestrial"}
},
- GuiName = "/Solar/EarthTrail"
+ GuiName = "/Solar/EarthTrail",
},
--[[
{
@@ -88,7 +90,7 @@ return {
Parent = "Earth",
Renderable = {
Type = "RenderablePlane",
- Size = {3.0, 11.0},
+ Size = 3.0E11,
Origin = "Center",
Billboard = true,
Texture = "textures/marker.png",
diff --git a/data/scene/fieldlines.scene b/data/scene/fieldlines.scene
index 3cee4bf1e3..cf494fe43c 100644
--- a/data/scene/fieldlines.scene
+++ b/data/scene/fieldlines.scene
@@ -6,7 +6,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime("2015 JAN 01 12:00:00.000")
diff --git a/data/scene/globebrowsing.scene b/data/scene/globebrowsing.scene
index c03c92d1b7..23506f5df1 100644
--- a/data/scene/globebrowsing.scene
+++ b/data/scene/globebrowsing.scene
@@ -7,7 +7,7 @@ function preInitialization()
]]--
--openspace.time.setTime(openspace.time.currentWallTime())
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime(openspace.time.currentWallTime())
diff --git a/data/scene/juno.scene b/data/scene/juno.scene
index f63276e744..403b508435 100755
--- a/data/scene/juno.scene
+++ b/data/scene/juno.scene
@@ -5,7 +5,7 @@ function preInitialization()
which the scene should start and other settings that might determine initialization
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime("2016-07-05T10:05:00.00")
diff --git a/data/scene/jupiter/callisto/callisto.mod b/data/scene/jupiter/callisto/callisto.mod
index 74c3360adf..aa6122bd47 100644
--- a/data/scene/jupiter/callisto/callisto.mod
+++ b/data/scene/jupiter/callisto/callisto.mod
@@ -9,7 +9,7 @@ return {
Body = "CALLISTO",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.631, 6},
+ Radius = 2.631E6,
Segments = 100
},
Textures = {
diff --git a/data/scene/jupiter/europa/europa.mod b/data/scene/jupiter/europa/europa.mod
index 54df372720..fea16b4627 100644
--- a/data/scene/jupiter/europa/europa.mod
+++ b/data/scene/jupiter/europa/europa.mod
@@ -9,7 +9,7 @@ return {
Body = "EUROPA",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.561, 6},
+ Radius = 1.561E6,
Segments = 100
},
Textures = {
diff --git a/data/scene/jupiter/ganymede/ganymede.mod b/data/scene/jupiter/ganymede/ganymede.mod
index c2c9fdca08..16aa1c175a 100644
--- a/data/scene/jupiter/ganymede/ganymede.mod
+++ b/data/scene/jupiter/ganymede/ganymede.mod
@@ -9,7 +9,7 @@ return {
Body = "JUPITER BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.631, 6},
+ Radius = 2.631E6,
Segments = 100
},
Textures = {
diff --git a/data/scene/jupiter/io/io.mod b/data/scene/jupiter/io/io.mod
index 03d28e60d1..98e5e88e7f 100644
--- a/data/scene/jupiter/io/io.mod
+++ b/data/scene/jupiter/io/io.mod
@@ -9,7 +9,7 @@ return {
Body = "IO",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.8213, 6 },
+ Radius = 1.8213E6,
Segments = 100
},
Textures = {
diff --git a/data/scene/jupiter/jupiter/jupiter.mod b/data/scene/jupiter/jupiter/jupiter.mod
index 6302b66739..f9030b25f1 100644
--- a/data/scene/jupiter/jupiter/jupiter.mod
+++ b/data/scene/jupiter/jupiter/jupiter.mod
@@ -22,7 +22,7 @@ return {
Body = "JUPITER BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.71492, 8 },
+ Radius = 0.71492E8,
Segments = 200
},
Textures = {
@@ -35,6 +35,7 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = "planet_solarSystem",
Transform = {
Translation = {
Type = "StaticTranslation",
@@ -64,7 +65,8 @@ return {
},
Color = { 0.8, 0.7, 0.7 },
Period = 4330.595,
- Resolution = 1000
- }
+ Resolution = 1000,
+ },
+ Tag = "planetTrail_solarSystem"
}
}
diff --git a/data/scene/lodglobes/earth/earth.mod b/data/scene/lodglobes/earth/earth.mod
index 1df4498c85..5660cff113 100644
--- a/data/scene/lodglobes/earth/earth.mod
+++ b/data/scene/lodglobes/earth/earth.mod
@@ -56,13 +56,14 @@ return {
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
+
{
Name = "ESRI VIIRS Combo",
Type = "ByLevel",
LevelTileProviders = {
{
- MaxLevel = 7,
- TileProvider = { FilePath = "map_service_configs/GIBS/VIIRS_SNPP_CorrectedReflectance_TrueColor.xml", },
+ MaxLevel = 3,
+ TileProvider = { Type = "Temporal", FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml", },
},
{
MaxLevel = 22,
@@ -71,6 +72,10 @@ return {
},
Enabled = true,
},
+ {
+ Name = "ESRI Imagery World",
+ FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms"
+ },
{
Type = "Temporal",
Name = "Temporal VIIRS SNPP",
@@ -81,6 +86,11 @@ return {
Name = "Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature",
FilePath = "map_service_configs/GIBS/Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature.xml",
},
+ {
+ Type = "Temporal",
+ Name = "Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration",
+ FilePath = "map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml",
+ },
-- {
-- Type = "SingleImage",
-- Name = "Debug Tiles",
@@ -104,6 +114,11 @@ return {
FilePath = "map_service_configs/GIBS/VIIRS_CityLights_2012.xml",
Enabled = true,
},
+ {
+ Type = "Temporal",
+ Name = "Temporal Earth at Night",
+ FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_DayNightBand_ENCC.xml"
+ }
},
WaterMasks = {
{
@@ -159,7 +174,7 @@ return {
Name = "Terrain tileset",
FilePath = "map_service_configs/ESRI/TERRAIN.wms",
Enabled = true,
- MinimumPixelSize = 64,
+ TilePixelSize = 64,
DoPreProcessing = true,
},
},
diff --git a/data/scene/lodglobes/earth/map_service_configs/ESRI/ESRI_Imagery_World_2D.wms b/data/scene/lodglobes/earth/map_service_configs/ESRI/ESRI_Imagery_World_2D.wms
index dfaa82712b..d7d7263f5c 100644
--- a/data/scene/lodglobes/earth/map_service_configs/ESRI/ESRI_Imagery_World_2D.wms
+++ b/data/scene/lodglobes/earth/map_service_configs/ESRI/ESRI_Imagery_World_2D.wms
@@ -14,8 +14,8 @@
3
5
- ./GDAL_Cache_ESRI_Imagery_World_2d
- 10
+ ./GDAL_Cache/ESRI_Imagery_World_2d
+ 4
.jpg
false
diff --git a/data/scene/lodglobes/earth/map_service_configs/ESRI/TERRAIN.wms b/data/scene/lodglobes/earth/map_service_configs/ESRI/TERRAIN.wms
index 86f039232e..3937681945 100644
--- a/data/scene/lodglobes/earth/map_service_configs/ESRI/TERRAIN.wms
+++ b/data/scene/lodglobes/earth/map_service_configs/ESRI/TERRAIN.wms
@@ -1,14 +1,21 @@
-
- http://198.102.45.23/arcgis/rest/services/worldelevation3d/terrain3d?
- GCS_Elevation
-
-
- -180.0
- 90.0
- 180.0
- -90.0
- bottom
-
- 2
+
+ http://198.102.45.23/arcgis/rest/services/worldelevation3d/terrain3d?
+ GCS_Elevation
+
+
+ -180.0
+ 90.0
+ 180.0
+ -90.0
+ bottom
+
+ 2
+ 5
+
+ ./GDAL_Cache/TERRAIN
+ 4
+ .jpg
+
+ false
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Coastlines.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Coastlines.xml
index c9578ad205..830e32da8a 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Coastlines.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Coastlines.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/Coastlines/default/2013-08-21/EPSG4326_250m/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/Coastlines/default/2013-08-21/250m/${z}/${y}/${x}.png
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ true
+ 400
+ true
+ 5
+
+ ./GDAL_Cache/Coastlines
+ 4
+ .png
+
+ false
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/GIBS_Aqua_MODIS_true.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/GIBS_Aqua_MODIS_true.xml
index 8d3196deff..19bbcdb9c5 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/GIBS_Aqua_MODIS_true.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/GIBS_Aqua_MODIS_true.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Aqua_CorrectedReflectance_TrueColor/default/2013-08-21/EPSG4326_250m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Aqua_CorrectedReflectance_TrueColor/default/2013-08-21/250m/${z}/${y}/${x}.jpg
-180.0
@@ -16,4 +16,14 @@
512
512
3
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/GIBS_Aqua_MODIS_true
+ 4
+ .jpg
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_Brightness_Temp_Band31_Day.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_Brightness_Temp_Band31_Day.xml
index c63f815618..46a1189c43 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_Brightness_Temp_Band31_Day.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_Brightness_Temp_Band31_Day.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Terra_Brightness_Temp_Band31_Day/default/2013-08-21/EPSG4326_1km/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_Brightness_Temp_Band31_Day/default/2013-08-21/1km/${z}/${y}/${x}.png
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/MODIS_Terra_Brightness_Temp_Band31_Day
+ 4
+ .png
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor.xml
index faf07ccced..a0d82a02b0 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Terra_CorrectedReflectance_TrueColor/default/2016-05-16/EPSG4326_250m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_CorrectedReflectance_TrueColor/default/2013-08-21/250m/${z}/${y}/${x}.jpg
-180.0
@@ -16,4 +16,14 @@
512
512
3
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/MODIS_Terra_CorrectedReflectance_TrueColor
+ 4
+ .jpg
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor_temporal.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor_temporal.xml
deleted file mode 100644
index 36013e4a3a..0000000000
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Terra_CorrectedReflectance_TrueColor_temporal.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Terra_CorrectedReflectance_TrueColor/default/${t}/EPSG4326_250m/${z}/${y}/${x}.jpg
-
-
- -180.0
- 90
- 396.0
- -198
- 8
- 2
- 1
- top
-
- EPSG:4326
- 512
- 512
- 3
-
\ No newline at end of file
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Water_Mask.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Water_Mask.xml
index 0f9c24b540..b3b90a2f48 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Water_Mask.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/MODIS_Water_Mask.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Water_Mask/default/2013-08-21/EPSG4326_250m/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Water_Mask/default/2013-08-21/250m/${z}/${y}/${x}.png
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/MODIS_Water_Mask
+ 4
+ .png
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Features.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Features.xml
index 6cc0348f36..7cb0e23db1 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Features.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Features.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/Reference_Features/default/2013-08-21/EPSG4326_250m/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/Reference_Features/default/2013-08-21/250m/${z}/${y}/${x}.png
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/Reference_Features
+ 4
+ .png
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Labels.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Labels.xml
index 0a13e11f23..2731893a09 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Labels.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Reference_Labels.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/Reference_Labels/default/2013-08-21/EPSG4326_250m/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/Reference_Labels/default/2013-08-21/250m/${z}/${y}/${x}.png
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/Reference_Labels
+ 4
+ .png
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/TERRA_CR_B143_2016-04-12.wms b/data/scene/lodglobes/earth/map_service_configs/GIBS/TERRA_CR_B143_2016-04-12.wms
index 974c7da85f..ea8427a9a4 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/TERRA_CR_B143_2016-04-12.wms
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/TERRA_CR_B143_2016-04-12.wms
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/twms-geo/twms.cgi?
+ https://gibs.earthdata.nasa.gov/twms/twms.cgi?
MODIS TERRA tileset
2016-04-12
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml
new file mode 100644
index 0000000000..c838cf1667
--- /dev/null
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml
@@ -0,0 +1,28 @@
+
+ 2012-05-08
+
+ 1d
+ YYYY-MM-DD
+
+
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/AMSR2_Sea_Ice_Concentration_12km/default/${OpenSpaceTimeId}/2km/${z}/${y}/${x}.png
+
+
+ -180.0
+ 90
+ 396.0
+ -198
+ 8
+ 2
+ 1
+ top
+
+ EPSG:4326
+ 512
+ 512
+ 3
+ true
+ 400
+ true
+
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_Aqua_Orbit_Asc.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_Aqua_Orbit_Asc.xml
index e2253fabc9..a0c7ed6f8f 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_Aqua_Orbit_Asc.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_Aqua_Orbit_Asc.xml
@@ -6,7 +6,7 @@
1.1.1
- http://map2.vis.earthdata.nasa.gov/wms/wms.php?TIME=${OpenSpaceTimeId}
+ https://gibs.earthdata.nasa.gov/wms/wms.php?TIME=${OpenSpaceTimeId}
EPSG:4326
image/png
TRUE
@@ -26,11 +26,8 @@
512
512
3
+ true
+ 400
+ true
-
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature.xml
index 2a4f525511..d28ad2d84f 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature.xml
@@ -5,7 +5,7 @@
YYYY-MM-DD
- http://map1.vis.earthdata.nasa.gov/wmts-geo/GHRSST_L4_MUR_Sea_Surface_Temperature/default/${OpenSpaceTimeId}/EPSG4326_1km/${z}/${y}/${x}.png
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/GHRSST_L4_MUR_Sea_Surface_Temperature/default/${OpenSpaceTimeId}/250m/${z}/${y}/${x}.png
-180.0
@@ -21,5 +21,8 @@
512
512
4
+ true
+ 400
+ true
-
\ No newline at end of file
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml
index d09c0e9615..1637409c25 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Aqua_CorrectedReflectance_TrueColor.xml
@@ -5,7 +5,7 @@
YYYY-MM-DD
- http://map1.vis.earthdata.nasa.gov/wmts-geo/MODIS_Aqua_CorrectedReflectance_TrueColor/default/${OpenSpaceTimeId}/EPSG4326_250m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Aqua_CorrectedReflectance_TrueColor/default/${OpenSpaceTimeId}/250m/${z}/${y}/${x}.jpg
-180.0
@@ -21,5 +21,8 @@
512
512
3
+ true
+ 400
+ true
-
\ No newline at end of file
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Terra_CorrectedReflectance_TrueColor.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Terra_CorrectedReflectance_TrueColor.xml
new file mode 100644
index 0000000000..fb8ffbf297
--- /dev/null
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_MODIS_Terra_CorrectedReflectance_TrueColor.xml
@@ -0,0 +1,28 @@
+
+ 2012-05-08
+
+ 1d
+ YYYY-MM-DD
+
+
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_CorrectedReflectance_TrueColor/default/${OpenSpaceTimeId}/250m/${z}/${y}/${x}.jpg
+
+
+ -180.0
+ 90
+ 396.0
+ -198
+ 8
+ 2
+ 1
+ top
+
+ EPSG:4326
+ 512
+ 512
+ 3
+ true
+ 400
+ true
+
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
index 311f2ec097..c656c8866e 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
@@ -5,7 +5,7 @@
YYYY-MM-DD
- http://map1.vis.earthdata.nasa.gov/wmts-geo/VIIRS_SNPP_CorrectedReflectance_TrueColor/default/${OpenSpaceTimeId}/EPSG4326_250m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/VIIRS_SNPP_CorrectedReflectance_TrueColor/default/${OpenSpaceTimeId}/250m/${z}/${y}/${x}.jpg
-180.0
@@ -21,5 +21,8 @@
512
512
3
+ true
+ 400
+ true
-
\ No newline at end of file
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_DayNightBand_ENCC.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_DayNightBand_ENCC.xml
new file mode 100644
index 0000000000..d2e093a97c
--- /dev/null
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/Temporal_VIIRS_SNPP_DayNightBand_ENCC.xml
@@ -0,0 +1,28 @@
+
+ 2012-05-08
+
+ 1d
+ YYYY-MM-DD
+
+
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/VIIRS_SNPP_DayNightBand_ENCC/default/${OpenSpaceTimeId}/500m/${z}/${y}/${x}.png
+
+
+ -180.0
+ 90
+ 396.0
+ -198
+ 8
+ 2
+ 1
+ top
+
+ EPSG:4326
+ 512
+ 512
+ 3
+ true
+ 400
+ true
+
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_CityLights_2012.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_CityLights_2012.xml
index cf0c6a1866..91645c3d59 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_CityLights_2012.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_CityLights_2012.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/VIIRS_CityLights_2012/default/2012-01-01/EPSG4326_500m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/VIIRS_CityLights_2012/default/2013-08-21/500m/${z}/${y}/${x}.jpg
-180.0
@@ -16,4 +16,14 @@
512
512
4
-
\ No newline at end of file
+ 5
+
+ ./GDAL_Cache/VIIRS_CityLights_2012
+ 4
+ .jpg
+
+ false
+ true
+ 400
+ true
+
diff --git a/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_SNPP_CorrectedReflectance_TrueColor.xml b/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
index 28499cabbd..b6ffc234fa 100644
--- a/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
+++ b/data/scene/lodglobes/earth/map_service_configs/GIBS/VIIRS_SNPP_CorrectedReflectance_TrueColor.xml
@@ -1,6 +1,6 @@
- http://map1.vis.earthdata.nasa.gov/wmts-geo/VIIRS_SNPP_CorrectedReflectance_TrueColor/default/2016-10-01/EPSG4326_250m/${z}/${y}/${x}.jpg
+ https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/VIIRS_SNPP_CorrectedReflectance_TrueColor/default/2016-08-21/250m/${z}/${y}/${x}.jpg
-180.0
@@ -16,4 +16,14 @@
512
512
3
+ 5
+
+ ./GDAL_Cache/VIIRS_SNPP_CorrectedReflectance_TrueColor
+ 4
+ .jpg
+
+ false
+ true
+ 400
+ true
\ No newline at end of file
diff --git a/data/scene/lodglobes/jupiter/callisto/callisto.mod b/data/scene/lodglobes/jupiter/callisto/callisto.mod
index 8aa1bda8f0..c86a629158 100644
--- a/data/scene/lodglobes/jupiter/callisto/callisto.mod
+++ b/data/scene/lodglobes/jupiter/callisto/callisto.mod
@@ -32,7 +32,7 @@ return {
Name = "Callisto Texture",
FilePath = "textures/callisto.jpg",
Enabled = true,
- MinimumPixelSize = 112,
+ TilePixelSize = 112,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/jupiter/europa/europa.mod b/data/scene/lodglobes/jupiter/europa/europa.mod
index cd32cdd332..b3f4c1a8df 100644
--- a/data/scene/lodglobes/jupiter/europa/europa.mod
+++ b/data/scene/lodglobes/jupiter/europa/europa.mod
@@ -32,7 +32,7 @@ return {
Name = "Europa Texture",
FilePath = "textures/europa.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/jupiter/ganymede/ganymede.mod b/data/scene/lodglobes/jupiter/ganymede/ganymede.mod
index be1bb1274c..0099a57786 100644
--- a/data/scene/lodglobes/jupiter/ganymede/ganymede.mod
+++ b/data/scene/lodglobes/jupiter/ganymede/ganymede.mod
@@ -32,7 +32,7 @@ return {
Name = "Ganymede Texture",
FilePath = "textures/ganymede.jpg",
Enabled = true,
- MinimumPixelSize = 112,
+ TilePixelSize = 112,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/mars/map_service_configs/Utah/Mola_Elevation.xml b/data/scene/lodglobes/mars/map_service_configs/Utah/Mola_Elevation.xml
index a0294879cf..79332d59c9 100644
--- a/data/scene/lodglobes/mars/map_service_configs/Utah/Mola_Elevation.xml
+++ b/data/scene/lodglobes/mars/map_service_configs/Utah/Mola_Elevation.xml
@@ -12,6 +12,7 @@
6
top
+ Int16
GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]
360
360
diff --git a/data/scene/lodglobes/mars/mars.mod b/data/scene/lodglobes/mars/mars.mod
index 040fc570e8..375954c010 100644
--- a/data/scene/lodglobes/mars/mars.mod
+++ b/data/scene/lodglobes/mars/mars.mod
@@ -32,20 +32,36 @@ return {
Type = "RenderableGlobe",
Radii = marsEllipsoid,
CameraMinHeight = 10,
+ SegmentsPerPatch = 90,
+ -- Allows camera to go down 10000 meters below the reference ellipsoid
InteractionDepthBelowEllipsoid = 10000, -- Useful when having negative height map values
- SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
+ {
+ Name = "Viking combo",
+ Type = "ByLevel",
+ LevelTileProviders = {
+ {
+ MaxLevel = 3,
+ TileProvider = { FilePath = "textures/mars.jpg", },
+ },
+ {
+ MaxLevel = 22,
+ TileProvider = { FilePath = "map_service_configs/MARS_Viking_MDIM21.xml" },
+ },
+ },
+ Enabled = true,
+ },
-- {
-- Type = "SingleImage",
-- Name = "Debug Tiles",
-- FilePath = "../../debugglobe/textures/test_tile.png",
-- },
- {
- Name = "MARS_Viking",
- FilePath = "map_service_configs/MARS_Viking_MDIM21.xml",
- Enabled = true,
- },
+ --{
+ -- Name = "MARS_Viking",
+ -- FilePath = "map_service_configs/MARS_Viking_MDIM21.xml",
+ -- Enabled = true,
+ --},
{
Name = "MOLA Pseudo Color",
FilePath = "map_service_configs/Utah/MolaPseudoColor.xml",
@@ -66,16 +82,22 @@ return {
{
Name = "CTX Mosaic [Europe]",
FilePath = "map_service_configs/CTX_Mosaic.xml",
- Enabled = true,
- }, {
+ --Enabled = true,
+ },
+ {
Name = "CTX Mosaic [Utah]",
FilePath = "map_service_configs/Utah/CTX_Mosaic.xml",
},
+ {
+ Name = "West Candor Chasma",
+ FilePath = "map_datasets/CTX/West_Candor_Chasma_longlat_global.vrt",
+ --Enabled = true,
+ },
{
Name = "Layered Rock Outcrops in Southwest Candor Chasma",
FilePath = "map_datasets/HiRISE/Layered_Rock_Outcrops_in_Southwest_Candor_Chasma_Texture.vrt",
},
- {
+ --[[{
Name = "Themis IR Day",
FilePath = "map_service_configs/Utah/ThemisIRDay.xml",
},
@@ -83,12 +105,7 @@ return {
Name = "Themis IR Night",
FilePath = "map_service_configs/Utah/ThemisIRNight.xml",
},
- --[[
- {
- Name = "West Candor Chasma",
- FilePath = "map_datasets/CTX/West_Candor_Chasma_longlat_global.vrt",
- --Enabled = true,
- },
+
{
Name = "MER_Meridianni_Endeavor_Basemap_25cm",
FilePath = "map_datasets/Basemap/MER_Meridianni_Endeavor_Basemap_25cm.vrt",
@@ -115,41 +132,49 @@ return {
},
HeightLayers = {
{
- Name = "Mola Elevation",
- FilePath = "map_service_configs/Utah/Mola_Elevation.xml",
+ Name = "Mola Elevation [Europe]",
+ FilePath = "map_service_configs/Mola_Elevation.xml",
Enabled = true,
- MinimumPixelSize = 90,
+ TilePixelSize = 90,
+ DoPreProcessing = true,
+ },
+ --[[
+ {
+ Name = "Mola Elevation [Utah]",
+ FilePath = "map_service_configs/Utah/Mola_Elevation.xml",
+ Enabled = false,
+ TilePixelSize = 90,
DoPreProcessing = true,
},
{
Name = "Mola Elevation CTX",
FilePath = "map_service_configs/Utah/MolaCTX_Elevation.xml",
-- Enabled = true,
- MinimumPixelSize = 90,
+ TilePixelSize = 90,
DoPreProcessing = true,
- },
+ },]]
{
- Name = "Layered Rock Outcrops in Southwest Candor Chasma",
- FilePath = "map_datasets/HiRISE/Layered_Rock_Outcrops_in_Southwest_Candor_Chasma_Heightmap.vrt",
- MinimumPixelSize = 90,
- DoPreProcessing = true,
- },
- --[[
- {
- Name = "Mola Elevation",
- FilePath = "map_service_configs/Mars_MGS_MOLA_DEM.xml",
- Enabled = true,
- MinimumPixelSize = 64,
- DoPreProcessing = true,
- },
---]]
---[[ {
Name = "West Candor Chasma",
FilePath = "map_datasets/CTX/West_Candor_Chasma_DEM_longlat_global.vrt",
--Enabled = true,
MinimumPixelSize = 90,
DoPreProcessing = true,
},
+ {
+ Name = "Layered Rock Outcrops in Southwest Candor Chasma",
+ FilePath = "map_datasets/HiRISE/Layered_Rock_Outcrops_in_Southwest_Candor_Chasma_Heightmap.vrt",
+ TilePixelSize = 90,
+ DoPreProcessing = true,
+ },
+ --[[
+ {
+ Name = "West Candor Chasma",
+ FilePath = "map_datasets/CTX/West_Candor_Chasma_DEM_longlat_global.vrt",
+ --Enabled = true,
+ TilePixelSize = 90,
+ DoPreProcessing = true,
+ },]]
+ --[[
{
Name = "Part of Area Traversed by the Mars Exploration Rover",
FilePath = "map_datasets/HiRISE/Part_of_Area_Traversed_by_the_Mars_Exploration_Rover_Heightmap.vrt",
diff --git a/data/scene/lodglobes/mercury/lodmercury.mod b/data/scene/lodglobes/mercury/lodmercury.mod
index 8e211d3c5e..17f7383c80 100644
--- a/data/scene/lodglobes/mercury/lodmercury.mod
+++ b/data/scene/lodglobes/mercury/lodmercury.mod
@@ -42,7 +42,7 @@ return {
Name = "Simple Texture",
FilePath = "textures/mercury.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
{
Name = "Messenger_Mosaic",
diff --git a/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml b/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
index 5ba619a141..6eae17b3cf 100644
--- a/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
+++ b/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
@@ -62,4 +62,10 @@
512
512
+
+
+ ./GDAL_Cache/OnMoonColor
+ 4
+ .png
+
\ No newline at end of file
diff --git a/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml b/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
index 9fe0516d15..cdfd4114e1 100644
--- a/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
+++ b/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
@@ -16,4 +16,9 @@
1
top
+
+ ./GDAL_Cache/OnMoonHeight
+ 4
+ .png
+
\ No newline at end of file
diff --git a/data/scene/lodglobes/moon/map_service_configs/Utah/LolaDem.wms b/data/scene/lodglobes/moon/map_service_configs/Utah/LolaDem.wms
index 1ef0f4be0e..9465278db8 100644
--- a/data/scene/lodglobes/moon/map_service_configs/Utah/LolaDem.wms
+++ b/data/scene/lodglobes/moon/map_service_configs/Utah/LolaDem.wms
@@ -12,6 +12,7 @@
7
top
+ Int16
GEOGCS["GCS_Moon_2000",DATUM["D_Moon_2000",SPHEROID["Moon_2000_IAU_IAG",1737400.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]
360
360
diff --git a/data/scene/lodglobes/moon/moon.mod b/data/scene/lodglobes/moon/moon.mod
index 54c525ea6d..1247ae7187 100644
--- a/data/scene/lodglobes/moon/moon.mod
+++ b/data/scene/lodglobes/moon/moon.mod
@@ -20,8 +20,9 @@ return {
Type = "RenderableGlobe",
Radii = {1738140, 1738140, 1735970}, -- Moons's radius
CameraMinHeight = 300,
- InteractionDepthBelowEllipsoid = 5000, -- Useful when having negative height map values
SegmentsPerPatch = 64,
+ -- Allows camera to go down 10000 meters below the reference ellipsoid
+ InteractionDepthBelowEllipsoid = 10000, -- Useful when having negative height map values
Layers = {
ColorLayers = {
@@ -63,10 +64,13 @@ return {
FilePath = "map_service_configs/OnMoonHeight.xml",
Enabled = true,
DoPreProcessing = true,
+ TileSize = 64,
},
{
Name = "LolaDem",
- FilePath = "map_service_configs/Utah/LolaDem.wms"
+ FilePath = "map_service_configs/Utah/LolaDem.wms",
+ DoPreProcessing = true,
+ TileSize = 64,
}
},
},
diff --git a/data/scene/lodglobes/neptune/neptune.mod b/data/scene/lodglobes/neptune/neptune.mod
index 9f3c9f854f..cfb74029b9 100644
--- a/data/scene/lodglobes/neptune/neptune.mod
+++ b/data/scene/lodglobes/neptune/neptune.mod
@@ -40,7 +40,7 @@ return {
Name = "Texture",
FilePath = "textures/neptune.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/saturn/saturn.mod b/data/scene/lodglobes/saturn/saturn.mod
index 6ce3287d0e..da471b0979 100644
--- a/data/scene/lodglobes/saturn/saturn.mod
+++ b/data/scene/lodglobes/saturn/saturn.mod
@@ -40,7 +40,7 @@ return {
Name = "Saturn Texture",
FilePath = "textures/saturn.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/uranus/uranus.mod b/data/scene/lodglobes/uranus/uranus.mod
index 9825a16459..06b2160647 100644
--- a/data/scene/lodglobes/uranus/uranus.mod
+++ b/data/scene/lodglobes/uranus/uranus.mod
@@ -40,7 +40,7 @@ return {
Name = "Texture",
FilePath = "textures/uranus.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/lodglobes/venus/venus.mod b/data/scene/lodglobes/venus/venus.mod
index ba6e050a33..2ac91197ed 100644
--- a/data/scene/lodglobes/venus/venus.mod
+++ b/data/scene/lodglobes/venus/venus.mod
@@ -45,7 +45,7 @@ return {
Name = "Venus Texture",
FilePath = "textures/venus.jpg",
Enabled = true,
- MinimumPixelSize = 256,
+ TilePixelSize = 256,
},
},
GrayScaleLayers = { },
diff --git a/data/scene/mars/mars.mod b/data/scene/mars/mars.mod
index 54e33cbd6c..301f510e5f 100644
--- a/data/scene/mars/mars.mod
+++ b/data/scene/mars/mars.mod
@@ -22,7 +22,7 @@ return {
Body = "MARS BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 6.390, 6 },
+ Radius = 6.390E6,
Segments = 100
},
Textures = {
@@ -35,12 +35,17 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = {"planet_solarSystem", "planet_terrestrial"},
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_MARS",
DestinationFrame = "GALACTIC",
},
+ Scale = {
+ Type = "StaticScale",
+ Scale = 1,
+ },
}
},
-- MarsTrail module
@@ -56,7 +61,8 @@ return {
},
Color = { 0.814, 0.305, 0.220 },
Period = 686.973,
- Resolution = 1000
+ Resolution = 1000,
+ Tag = {"planetTrail_solarSystem", "planetTrail_terrestrial"}
}
}
}
diff --git a/data/scene/mercury/mercury.mod b/data/scene/mercury/mercury.mod
index 75bf33560e..61d5c6ff8b 100644
--- a/data/scene/mercury/mercury.mod
+++ b/data/scene/mercury/mercury.mod
@@ -22,7 +22,7 @@ return {
Body = "MERCURY",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.440, 6 },
+ Radius = 2.4397E6,
Segments = 100
},
Textures = {
@@ -35,6 +35,7 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = {"planet_solarSystem", "planet_terrestrial"},
Transform = {
Rotation = {
Type = "SpiceRotation",
@@ -60,7 +61,8 @@ return {
},
Color = {0.6, 0.5, 0.5 },
Period = 87.968,
- Resolution = 100
+ Resolution = 100,
+ Tag = {"planetTrail_solarSystem", "planetTrail_terrestrial"}
}
}
}
diff --git a/data/scene/missions/dawn/ceres/ceres.mod b/data/scene/missions/dawn/ceres/ceres.mod
index ff9c413a2a..0c29ae852b 100644
--- a/data/scene/missions/dawn/ceres/ceres.mod
+++ b/data/scene/missions/dawn/ceres/ceres.mod
@@ -10,7 +10,7 @@ return {
Body = "CERES",
Geometry = {
Type = "SimpleSphere",
- Radius = { 6.390, 5 },
+ Radius = 6.390E5,
Segments = 100
},
Textures = {
diff --git a/data/scene/missions/juno/juno/juno.mod b/data/scene/missions/juno/juno/juno.mod
index 12c2d45131..c9e4cc56df 100644
--- a/data/scene/missions/juno/juno/juno.mod
+++ b/data/scene/missions/juno/juno/juno.mod
@@ -126,19 +126,16 @@ return {
Name = "JunoTrail",
Parent = "JupiterBarycenter",
Renderable = {
- Type = "RenderableTrail",
- Body = "JUNO",
- Frame = "GALACTIC",
- Observer = "JUPITER BARYCENTER",
- RGB = { 0.70,0.50,0.20 },
- TropicalOrbitPeriod = 394250.0,
- EarthOrbitRatio = 4.5,
- DayLength = 9.9259,
- TimeStamps = false,
- Textures = {
- Type = "simple",
- Color = "textures/glare_blue.png",
- },
+ Type = "RenderableTrailTrajectory",
+ Translation = {
+ Type = "SpiceTranslation",
+ Body = "JUNO",
+ Observer = "JUPITER BARYCENTER"
+ },
+ Color = { 0.70, 0.50, 0.20 },
+ StartTime = "2016 JUN 28",
+ EndTime = "2016 APR 01",
+ SampleInterval = 3600
},
},
}
diff --git a/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod b/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod
index acf03fd873..c99c354d59 100644
--- a/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod
+++ b/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod
@@ -9,7 +9,7 @@ return {
Body = "CALLISTO",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.8213, 6 },
+ Radius = 1.8213E6,
Segments = 100
},
Textures = {
@@ -58,7 +58,7 @@ return {
Parent = "Callisto",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 7.4},
+ Size = 10^7.4,
Origin = "Center",
Billboard = true,
Texture = "textures/Callisto-Text.png",
diff --git a/data/scene/missions/newhorizons/jupiter/europa/europa.mod b/data/scene/missions/newhorizons/jupiter/europa/europa.mod
index 1bec7e5c9b..21e07a2703 100644
--- a/data/scene/missions/newhorizons/jupiter/europa/europa.mod
+++ b/data/scene/missions/newhorizons/jupiter/europa/europa.mod
@@ -9,7 +9,7 @@ return {
Body = "EUROPA",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.8213, 6 },
+ Radius = 1.8213E6,
Segments = 100
},
Textures = {
@@ -58,7 +58,7 @@ return {
Parent = "Europa",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 7.4},
+ Size = 10^7.4,
Origin = "Center",
Billboard = true,
Texture = "textures/Europa-Text.png",
diff --git a/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod b/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod
index 401babcca6..5fa473d332 100644
--- a/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod
+++ b/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod
@@ -9,7 +9,7 @@ return {
Body = "GANYMEDE",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.8213, 6 },
+ Radius = 1.8213E6,
Segments = 100
},
Textures = {
@@ -58,7 +58,7 @@ return {
Parent = "Ganymede",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 7.4},
+ Size = 10^7.4,
Origin = "Center",
Billboard = true,
Texture = "textures/Ganymede-Text.png",
diff --git a/data/scene/missions/newhorizons/jupiter/io/io.mod b/data/scene/missions/newhorizons/jupiter/io/io.mod
index c41b45f29b..d4e5260cbd 100644
--- a/data/scene/missions/newhorizons/jupiter/io/io.mod
+++ b/data/scene/missions/newhorizons/jupiter/io/io.mod
@@ -9,7 +9,7 @@ return {
Body = "IO",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.8213, 6 },
+ Radius = 1.8213E6,
Segments = 100
},
Textures = {
diff --git a/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod b/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod
index 079357b2ad..17f3a6afea 100644
--- a/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod
+++ b/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod
@@ -22,7 +22,7 @@ return {
Body = "JUPITER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.71492, 8 },
+ Radius = 0.71492E8,
Segments = 200,
},
Textures = {
@@ -101,7 +101,7 @@ return {
Parent = "JupiterProjection",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 7.5},
+ Size = 10^7.5,
Origin = "Center",
Billboard = true,
Texture = "textures/Jupiter-text.png",
diff --git a/data/scene/missions/newhorizons/newhorizonsfov/newhorizonsfov.mod b/data/scene/missions/newhorizons/newhorizonsfov/newhorizonsfov.mod
index 7fdccdf6cc..7ece77d4e9 100644
--- a/data/scene/missions/newhorizons/newhorizonsfov/newhorizonsfov.mod
+++ b/data/scene/missions/newhorizons/newhorizonsfov/newhorizonsfov.mod
@@ -295,9 +295,9 @@ return {
Type = "RenderableCrawlingLine",
Source = "NH_REX",
Target = "EARTH",
- -- Body = "NEW HORIZONS",
+ -- Body = "NEW HORIZONS",
Frame = "GALACTIC",
- RGB = { 1.0, 0.7, 0.0 },
+ Color = { 1.0, 0.7, 0.0 },
Instrument = "NH_REX"
},
}
diff --git a/data/scene/missions/newhorizons/pluto/charon/charon.mod b/data/scene/missions/newhorizons/pluto/charon/charon.mod
index 4cfff1d131..7cc7544f84 100644
--- a/data/scene/missions/newhorizons/pluto/charon/charon.mod
+++ b/data/scene/missions/newhorizons/pluto/charon/charon.mod
@@ -24,7 +24,7 @@ return {
Type = "RenderablePlanetProjection",
Geometry = {
Type = "SimpleSphere",
- Radius = { 6.035 , 5 },
+ Radius = 6.035E5,
Segments = 100
},
Textures = {
@@ -72,7 +72,7 @@ return {
Parent = "Charon",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Charon-Text.png",
diff --git a/data/scene/missions/newhorizons/pluto/hydra/hydra.mod b/data/scene/missions/newhorizons/pluto/hydra/hydra.mod
index 8dcf6d2d0f..dbffd9a8a2 100644
--- a/data/scene/missions/newhorizons/pluto/hydra/hydra.mod
+++ b/data/scene/missions/newhorizons/pluto/hydra/hydra.mod
@@ -46,7 +46,7 @@ return {
Parent = "Hydra",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10.0^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Hydra-Text.png"
diff --git a/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod b/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod
index 595baf13e8..5710783747 100644
--- a/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod
+++ b/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod
@@ -46,7 +46,7 @@ return {
Parent = "Kerberos",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Kerberos-Text.png"
diff --git a/data/scene/missions/newhorizons/pluto/nix/nix.mod b/data/scene/missions/newhorizons/pluto/nix/nix.mod
index da05401b4e..8a4373431c 100644
--- a/data/scene/missions/newhorizons/pluto/nix/nix.mod
+++ b/data/scene/missions/newhorizons/pluto/nix/nix.mod
@@ -19,7 +19,7 @@ return {
Body = "NIX",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.45 , 5 },
+ Radius = 0.45E5,
Segments = 100
},
Textures = {
@@ -46,7 +46,7 @@ return {
Parent = "Nix",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Nix-Text.png"
diff --git a/data/scene/missions/newhorizons/pluto/pluto/pluto.mod b/data/scene/missions/newhorizons/pluto/pluto/pluto.mod
index e512b74708..6709f03fdb 100644
--- a/data/scene/missions/newhorizons/pluto/pluto/pluto.mod
+++ b/data/scene/missions/newhorizons/pluto/pluto/pluto.mod
@@ -30,15 +30,15 @@ return {
},
},
},
- -- PlutoProjection module
+ -- Pluto module
{
- Name = "PlutoProjection",
+ Name = "Pluto",
Parent = "PlutoBarycenter",
Renderable = {
Type = "RenderablePlanetProjection",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.173 , 6 },
+ Radius = 1.173E6,
Segments = 100
},
Textures = {
@@ -173,7 +173,7 @@ return {
Renderable = {
Type = "RenderablePlane",
Billboard = true,
- Size = { 5, 4 },
+ Size = 5E4,
Texture = "textures/barycenter.png",
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
@@ -184,10 +184,10 @@ return {
},
{
Name = "PlutoText",
- Parent = "PlutoProjection",
+ Parent = "Pluto",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Pluto-Text.png",
@@ -202,7 +202,7 @@ return {
},
{
Name = "PlutoTexture",
- Parent = "PlutoProjection",
+ Parent = "Pluto",
Renderable = {
Type = "RenderablePlane",
Size = {1.0, 6.4},
@@ -220,7 +220,7 @@ return {
},
{
Name = "PlutoShadow",
- Parent = "PlutoProjection",
+ Parent = "Pluto",
Renderable = {
Type = "RenderableShadowCylinder",
TerminatorType = "PENUMBRAL",
diff --git a/data/scene/missions/newhorizons/pluto/styx/styx.mod b/data/scene/missions/newhorizons/pluto/styx/styx.mod
index 559062be97..8637601452 100644
--- a/data/scene/missions/newhorizons/pluto/styx/styx.mod
+++ b/data/scene/missions/newhorizons/pluto/styx/styx.mod
@@ -19,7 +19,7 @@ return {
Body = "STYX",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.75 , 4 },
+ Radius = 0.75E4,
Segments = 100
},
Textures = {
@@ -46,7 +46,7 @@ return {
Parent = "Styx",
Renderable = {
Type = "RenderablePlane",
- Size = {1.0, 6.3},
+ Size = 10^6.3,
Origin = "Center",
Billboard = true,
Texture = "textures/Styx-Text.png",
diff --git a/data/scene/moon/moon.mod b/data/scene/moon/moon.mod
index b58b056dcb..534adf617c 100644
--- a/data/scene/moon/moon.mod
+++ b/data/scene/moon/moon.mod
@@ -9,17 +9,17 @@ return {
Body = "MOON",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.737, 6},
+ Radius = 1.737E6,
Segments = 100
},
Shadow_Group = {
Source1 = {
Name = "Sun",
- Radius = {696.3, 6}
+ Radius = 696.3E6
},
Caster1 = {
Name = "Earth",
- Radius = {6.371, 6}
+ Radius = 6.371E6
},
},
Textures = {
diff --git a/data/scene/neptune/neptune.mod b/data/scene/neptune/neptune.mod
index 5967f0a8fe..38e698c9ea 100644
--- a/data/scene/neptune/neptune.mod
+++ b/data/scene/neptune/neptune.mod
@@ -23,20 +23,25 @@ return {
Body = "NEPTUNE BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.4622 , 7 },
+ Radius = 2.4622E7,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/neptune.jpg",
- },
+ }
},
- Translation = {
+ Tag = "planet_solarSystem",
+ Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_NEPTUNE",
DestinationFrame = "GALACTIC"
},
+ Scale = {
+ Type = "StaticScale",
+ Scale = 1,
+ },
}
},
-- NeptuneTrail module
@@ -52,7 +57,8 @@ return {
},
Color = {0.2, 0.5, 1.0 },
Period = 60200,
- Resolution = 1000
- },
+ Resolution = 1000,
+ Tag = "planetTrail_solarSystem"
+ }
}
}
diff --git a/data/scene/newhorizons.scene b/data/scene/newhorizons.scene
index ca5e4106c9..3ce05ababc 100644
--- a/data/scene/newhorizons.scene
+++ b/data/scene/newhorizons.scene
@@ -11,7 +11,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime("2015-07-14T10:05:00.00")
diff --git a/data/scene/osirisrex.scene b/data/scene/osirisrex.scene
index e59ce808d3..f5fff215a9 100644
--- a/data/scene/osirisrex.scene
+++ b/data/scene/osirisrex.scene
@@ -9,7 +9,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
dofile(openspace.absPath('${SCRIPTS}/bind_keys_osirisrex.lua'))
@@ -61,7 +61,7 @@ return {
"sun",
"mercury",
"venus",
- "lodglobes/lodearth",
+ "lodglobes/earth",
"moon",
"mars",
"jupiter",
diff --git a/data/scene/pluto/pluto.mod b/data/scene/pluto/pluto.mod
index 88346771ef..27f540d731 100644
--- a/data/scene/pluto/pluto.mod
+++ b/data/scene/pluto/pluto.mod
@@ -25,7 +25,7 @@ return {
Body = "PLUTO",
Geometry = {
Type = "SimpleSphere",
- Radius = { 1.173 , 6 },
+ Radius = 1.173E6,
Segments = 100
},
Textures = {
@@ -61,7 +61,7 @@ return {
Body = "CHARON",
Geometry = {
Type = "SimpleSphere",
- Radius = { 6.035 , 5 },
+ Radius = 6.035E5,
Segments = 100
},
Textures = {
diff --git a/data/scene/rosetta.scene b/data/scene/rosetta.scene
index 361397876f..3ba32966e7 100644
--- a/data/scene/rosetta.scene
+++ b/data/scene/rosetta.scene
@@ -6,7 +6,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
-- Usual start
diff --git a/data/scene/saturn/dione/dione.mod b/data/scene/saturn/dione/dione.mod
index d132bea897..477705ea2b 100644
--- a/data/scene/saturn/dione/dione.mod
+++ b/data/scene/saturn/dione/dione.mod
@@ -8,7 +8,7 @@ return {
Body = "DIONE",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.563, 3 },
+ Radius = 0.563E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/enceladus/enceladus.mod b/data/scene/saturn/enceladus/enceladus.mod
index 1d3011e4c8..f49104d3ca 100644
--- a/data/scene/saturn/enceladus/enceladus.mod
+++ b/data/scene/saturn/enceladus/enceladus.mod
@@ -8,7 +8,7 @@ return {
Body = "ENCELADUS",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.257, 3 },
+ Radius = 0.257E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/iapetus/iapetus.mod b/data/scene/saturn/iapetus/iapetus.mod
index a390af3ec4..0bcc6b8c38 100644
--- a/data/scene/saturn/iapetus/iapetus.mod
+++ b/data/scene/saturn/iapetus/iapetus.mod
@@ -8,7 +8,7 @@ return {
Body = "IAPETUS",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.746, 3 },
+ Radius = 0.746E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/mimas/mimas.mod b/data/scene/saturn/mimas/mimas.mod
index bf7b451d83..9f8e5242e6 100644
--- a/data/scene/saturn/mimas/mimas.mod
+++ b/data/scene/saturn/mimas/mimas.mod
@@ -8,7 +8,7 @@ return {
Body = "MIMAS",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.28, 3 },
+ Radius = 0.28E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/rhea/rhea.mod b/data/scene/saturn/rhea/rhea.mod
index 623dd479a6..8bb6c61393 100644
--- a/data/scene/saturn/rhea/rhea.mod
+++ b/data/scene/saturn/rhea/rhea.mod
@@ -8,7 +8,7 @@ return {
Body = "RHEA",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.765, 3 },
+ Radius = 0.765E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/saturn/saturn.mod b/data/scene/saturn/saturn/saturn.mod
index aea907718b..675910faab 100644
--- a/data/scene/saturn/saturn/saturn.mod
+++ b/data/scene/saturn/saturn/saturn.mod
@@ -23,7 +23,7 @@ return {
Body = "SATURN BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 5.8232, 7 },
+ Radius = 5.8232E7,
Segments = 100
},
Textures = {
@@ -36,6 +36,7 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = "planet_solarSystem",
Transform = {
Rotation = {
Type = "SpiceRotation",
@@ -73,7 +74,8 @@ return {
},
Color = {0.85,0.75,0.51 },
Period = 10746.94,
- Resolution = 1000
+ Resolution = 1000,
+ Tag = "planetTrail_solarSystem"
},
}
}
diff --git a/data/scene/saturn/tethys/tethys.mod b/data/scene/saturn/tethys/tethys.mod
index eb2a84b3f9..8fe16fa3cd 100644
--- a/data/scene/saturn/tethys/tethys.mod
+++ b/data/scene/saturn/tethys/tethys.mod
@@ -8,7 +8,7 @@ return {
Body = "TETHYS",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.538, 3 },
+ Radius = 0.538E3,
Segments = 50
},
Textures = {
diff --git a/data/scene/saturn/titan/titan.mod b/data/scene/saturn/titan/titan.mod
index 83e366c7ba..12cc0d6034 100644
--- a/data/scene/saturn/titan/titan.mod
+++ b/data/scene/saturn/titan/titan.mod
@@ -8,7 +8,7 @@ return {
Body = "TITAN",
Geometry = {
Type = "SimpleSphere",
- Radius = { 0.2575, 4 },
+ Radius = 0.2575E4,
Segments = 50
},
Textures = {
diff --git a/data/scene/sun/sun.mod b/data/scene/sun/sun.mod
index 3bd4e2218e..11b0e1516d 100644
--- a/data/scene/sun/sun.mod
+++ b/data/scene/sun/sun.mod
@@ -1,4 +1,9 @@
return {
+ -- Solar system module
+ {
+ Name = "SolarSystem",
+ Parent = "Root"
+ },
-- Sun barycenter module
{
Name = "SolarSystemBarycenter",
@@ -15,7 +20,8 @@ return {
Body = "SUN",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.783200, 9 },
+ --Radius = 2.783200E9,
+ Radius = 6.957E8,
Segments = 100
},
Textures = {
@@ -24,7 +30,7 @@ return {
},
PerformShading = false,
},
- Transformation = {
+ Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "SUN",
@@ -44,13 +50,13 @@ return {
Parent = "SolarSystemBarycenter",
Renderable = {
Type = "RenderablePlane",
- Size = {1.3, 10.5},
+ Size = 1.3*10^10.5,
Origin = "Center",
Billboard = true,
Texture = "textures/sun-glare.png",
BlendMode = "Additive"
},
- Transformation = {
+ Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "SUN",
@@ -65,7 +71,7 @@ return {
Parent = "Sun",
Renderable = {
Type = "RenderablePlane",
- Size = {3.0, 11.0},
+ Size = 3.0E11,
Origin = "Center",
Billboard = true,
Texture = "textures/marker.png",
diff --git a/data/scene/uranus/uranus.mod b/data/scene/uranus/uranus.mod
index 7d0a559780..28e4568118 100644
--- a/data/scene/uranus/uranus.mod
+++ b/data/scene/uranus/uranus.mod
@@ -23,7 +23,7 @@ return {
Body = "URANUS BARYCENTER",
Geometry = {
Type = "SimpleSphere",
- Radius = { 2.5362 , 7 },
+ Radius = 2.5362E7,
Segments = 100
},
Textures = {
@@ -36,12 +36,17 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
+ Tag = "planet_solarSystem",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_URANUS",
DestinationFrame = "ECLIPJ2000",
- }
+ },
+ Scale = {
+ Type = "StaticScale",
+ Scale = 1,
+ },
},
},
@@ -58,7 +63,8 @@ return {
},
Color = {0.60, 0.95, 1.00 },
Period = 30588.740,
- Resolution = 1000
- },
+ Resolution = 1000,
+ Tag = "planetTrail_solarSystem"
+ }
}
}
diff --git a/data/scene/venus/venus.mod b/data/scene/venus/venus.mod
index c7943047d3..7badb32f9c 100644
--- a/data/scene/venus/venus.mod
+++ b/data/scene/venus/venus.mod
@@ -23,7 +23,7 @@ return {
Body = "VENUS",
Geometry = {
Type = "SimpleSphere",
- Radius = { 3.760, 6 },
+ Radius = 3.760E6,
Segments = 100
},
Textures = {
@@ -36,10 +36,17 @@ return {
MieColor = {1.0, 1.0, 1.0}
}
},
- Rotation = {
- Type = "SpiceRotation",
- Frame = "IAU_VENUS",
- Reference = "GALACTIC"
+ Tag = {"planet_solarSystem", "planet_terrestrial"},
+ Transform = {
+ Rotation = {
+ Type = "SpiceRotation",
+ SourceFrame = "IAU_VENUS",
+ DestinationFrame = "GALACTIC"
+ },
+ Scale = {
+ Type = "StaticScale",
+ Scale = 1,
+ },
},
},
@@ -56,7 +63,8 @@ return {
},
Color = { 1.0, 0.5, 0.2 },
Period = 224.695,
- Resolution = 1000
+ Resolution = 1000,
+ Tag = {"planetTrail_solarSystem", "planetTrail_terrestrial"}
}
}
}
diff --git a/data/scene/volumetricmilkyway.scene b/data/scene/volumetricmilkyway.scene
index 9d6c9ba91d..3a4f4d71c2 100644
--- a/data/scene/volumetricmilkyway.scene
+++ b/data/scene/volumetricmilkyway.scene
@@ -6,7 +6,7 @@ function preInitialization()
critical objects.
]]--
- openspace.spice.loadKernel("${SPICE}/naif0011.tls")
+ openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime(openspace.time.currentWallTime())
diff --git a/data/spice/iSWAKernels/openspace_mercury.ti b/data/spice/iSWAKernels/openspace_mercury.ti
new file mode 100644
index 0000000000..218f8c3ec2
--- /dev/null
+++ b/data/spice/iSWAKernels/openspace_mercury.ti
@@ -0,0 +1,33 @@
+OpenSpace ecliptic frames:
+Mercury-centric Solar Ecliptic (MERCURYSE) frame
+
+These frames are only defined as helper frames for OpenSpace.
+
+ +X is parallel to the geometric planet-sun position vector.
+
+ -Y axis is the normalized component of the planet's orbital vector
+
+ +Z axis is parallel to the cross product of the frame's +X axis
+ and the frame's +Y axis.
+
+\begindata
+
+ FRAME_MERCURYSE = 4600199
+ FRAME_4600199_NAME = 'MERCURYSE'
+ FRAME_4600199_CLASS = 5
+ FRAME_4600199_CLASS_ID = 4600199
+ FRAME_4600199_CENTER = 199
+ FRAME_4600199_RELATIVE = 'J2000'
+ FRAME_4600199_DEF_STYLE = 'PARAMETERIZED'
+ FRAME_4600199_FAMILY = 'TWO-VECTOR'
+ FRAME_4600199_PRI_AXIS = 'X'
+ FRAME_4600199_PRI_VECTOR_DEF = 'OBSERVER_TARGET_POSITION'
+ FRAME_4600199_PRI_OBSERVER = 'MERCURY'
+ FRAME_4600199_PRI_TARGET = 'SUN'
+ FRAME_4600199_PRI_ABCORR = 'NONE'
+ FRAME_4600199_SEC_AXIS = 'Y'
+ FRAME_4600199_SEC_VECTOR_DEF = 'OBSERVER_TARGET_VELOCITY'
+ FRAME_4600199_SEC_OBSERVER = 'MERCURY'
+ FRAME_4600199_SEC_TARGET = 'SUN'
+ FRAME_4600199_SEC_ABCORR = 'NONE'
+ FRAME_4600199_SEC_FRAME = 'J2000'
diff --git a/data/spice/iSWAKernels/openspace_saturn.ti b/data/spice/iSWAKernels/openspace_saturn.ti
new file mode 100644
index 0000000000..46a81299ef
--- /dev/null
+++ b/data/spice/iSWAKernels/openspace_saturn.ti
@@ -0,0 +1,33 @@
+OpenSpace ecliptic frames:
+Saturn-centric Solar Ecliptic (SATURNSE) frame
+
+These frames are only defined as helper frames for OpenSpace.
+
+ +X is parallel to the geometric planet-sun position vector.
+
+ -Y axis is the normalized component of the planet's orbital vector
+
+ +Z axis is parallel to the cross product of the frame's +X axis
+ and the frame's +Y axis.
+
+\begindata
+
+ FRAME_SATURNSE = 4500699
+ FRAME_4500699_NAME = 'SATURNSE'
+ FRAME_4500699_CLASS = 5
+ FRAME_4500699_CLASS_ID = 4500699
+ FRAME_4500699_CENTER = 6
+ FRAME_4500699_RELATIVE = 'J2000'
+ FRAME_4500699_DEF_STYLE = 'PARAMETERIZED'
+ FRAME_4500699_FAMILY = 'TWO-VECTOR'
+ FRAME_4500699_PRI_AXIS = 'X'
+ FRAME_4500699_PRI_VECTOR_DEF = 'OBSERVER_TARGET_POSITION'
+ FRAME_4500699_PRI_OBSERVER = 'SATURN BARYCENTER'
+ FRAME_4500699_PRI_TARGET = 'SUN'
+ FRAME_4500699_PRI_ABCORR = 'NONE'
+ FRAME_4500699_SEC_AXIS = 'Y'
+ FRAME_4500699_SEC_VECTOR_DEF = 'OBSERVER_TARGET_VELOCITY'
+ FRAME_4500699_SEC_OBSERVER = 'SATURN BARYCENTER'
+ FRAME_4500699_SEC_TARGET = 'SUN'
+ FRAME_4500699_SEC_ABCORR = 'NONE'
+ FRAME_4500699_SEC_FRAME = 'J2000'
diff --git a/data/spice/naif0011.tls b/data/spice/naif0012.tls
similarity index 95%
rename from data/spice/naif0011.tls
rename to data/spice/naif0012.tls
index 58fcbcbd7f..e1afdee1b6 100644
--- a/data/spice/naif0011.tls
+++ b/data/spice/naif0012.tls
@@ -7,6 +7,9 @@ LEAPSECONDS KERNEL FILE
Modifications:
--------------
+2016, Jul. 14 NJB Modified file to account for the leapsecond that
+ will occur on December 31, 2016.
+
2015, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2015.
@@ -141,7 +144,8 @@ DELTET/DELTA_AT = ( 10, @1972-JAN-1
33, @2006-JAN-1
34, @2009-JAN-1
35, @2012-JUL-1
- 36, @2015-JUL-1 )
+ 36, @2015-JUL-1
+ 37, @2017-JAN-1 )
\begintext
diff --git a/data/tasks/default.task b/data/tasks/default.task
new file mode 100644
index 0000000000..1170166620
--- /dev/null
+++ b/data/tasks/default.task
@@ -0,0 +1,3 @@
+return {
+ "kameleonmetadatatojson"
+}
diff --git a/data/web/kameleondocumentation/main.hbs b/data/web/kameleondocumentation/main.hbs
new file mode 100644
index 0000000000..a12a1a9931
--- /dev/null
+++ b/data/web/kameleondocumentation/main.hbs
@@ -0,0 +1,59 @@
+
+
+
+
+
OpenSpace Kameleon Documentation
+
Version: {{version}}
+
CDF File: {{input}}
+
+ {{#each kameleon.globalAttributes}}
+
+ {{/each}}
+
Variable Attributes
+ {{#each kameleon.variableAttributes}}
+
+ {{#each this}}
+
+ {{/each}}
+ {{/each}}
+
+
+
\ No newline at end of file
diff --git a/data/web/kameleondocumentation/script.js b/data/web/kameleondocumentation/script.js
new file mode 100644
index 0000000000..84f9665e59
--- /dev/null
+++ b/data/web/kameleondocumentation/script.js
@@ -0,0 +1,23 @@
+window.onload = function () {
+ var mainTemplateElement = document.getElementById('mainTemplate');
+ var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML);
+
+ Handlebars.registerHelper('urlify', function(options, context) {
+ var data = context.data;
+ var identifier = options.replace(" ", "-").toLowerCase();
+
+ while (data = data._parent) {
+ if (data.key !== undefined) {
+ identifier = data.key + "-" + identifier;
+ }
+ }
+
+ return identifier;
+ });
+
+ var dataElement = document.getElementById('data');
+ var data = JSON.parse(dataElement.innerHTML);
+
+ var contents = mainTemplate(data);
+ document.body.innerHTML = contents;
+}
\ No newline at end of file
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/ext/curl/lib/libcurl.dll b/ext/curl/lib/libcurl.dll
index 1c912ca6ad..3bb272359f 100644
Binary files a/ext/curl/lib/libcurl.dll and b/ext/curl/lib/libcurl.dll differ
diff --git a/ext/curl/lib/libcurl_imp.lib b/ext/curl/lib/libcurl_imp.lib
index 917274da36..1b3d959654 100644
Binary files a/ext/curl/lib/libcurl_imp.lib and b/ext/curl/lib/libcurl_imp.lib differ
diff --git a/ext/curl/lib/libeay32.dll b/ext/curl/lib/libeay32.dll
new file mode 100644
index 0000000000..84ea405801
Binary files /dev/null and b/ext/curl/lib/libeay32.dll differ
diff --git a/ext/curl/lib/ssleay32.dll b/ext/curl/lib/ssleay32.dll
new file mode 100644
index 0000000000..b5d2864366
Binary files /dev/null and b/ext/curl/lib/ssleay32.dll differ
diff --git a/ext/ghoul b/ext/ghoul
index c007df9d95..a2f58b3085 160000
--- a/ext/ghoul
+++ b/ext/ghoul
@@ -1 +1 @@
-Subproject commit c007df9d955b934624f4374505aa5912ab483dab
+Subproject commit a2f58b30857be62ff13ee4128dec28037d940be7
diff --git a/ext/sgct b/ext/sgct
index b3bf32e8bd..55e6eb877d 160000
--- a/ext/sgct
+++ b/ext/sgct
@@ -1 +1 @@
-Subproject commit b3bf32e8bd59c7a79e899face441a26a361fe982
+Subproject commit 55e6eb877d8fc02d3e3851e94fc5417a5b856217
diff --git a/ext/spice b/ext/spice
index 1c9bb9e4dd..63e382ac76 160000
--- a/ext/spice
+++ b/ext/spice
@@ -1 +1 @@
-Subproject commit 1c9bb9e4dd562e3085c8a519c8a90668439a34ac
+Subproject commit 63e382ac76e0ef37d46a8a0ec3d1980e480f3f88
diff --git a/include/openspace/documentation/documentation.h b/include/openspace/documentation/documentation.h
index 28f777cbef..5e64e3b4bc 100644
--- a/include/openspace/documentation/documentation.h
+++ b/include/openspace/documentation/documentation.h
@@ -26,13 +26,14 @@
#define __OPENSPACE_CORE___DOCUMENTATION___H__
#include
-#include
#include
#include
#include
#include
+namespace ghoul { class Dictionary; }
+
namespace openspace {
namespace documentation {
@@ -304,10 +305,6 @@ void testSpecificationAndThrow(const Documentation& documentation,
} // namespace documentation
-// We want to make it easier for people to use it, so we pull the Documentation class into
-// the openspace namespace
-using documentation::Documentation;
-
} // namespace openspace
// Make the overload for std::to_string available for the Offense::Reason for easier
diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h
index 4841c3efc4..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,8 +84,12 @@ 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;
+
+ static DocumentationEngine* _instance;
};
} // namespace documentation
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/documentation/verifier.h b/include/openspace/documentation/verifier.h
index 07579a747d..ddf39e6c9a 100644
--- a/include/openspace/documentation/verifier.h
+++ b/include/openspace/documentation/verifier.h
@@ -27,6 +27,8 @@
#include
+#include
+
#include
#include
@@ -42,6 +44,8 @@ namespace documentation {
* description of the Verifier subclass and what it tests for.
*/
struct Verifier {
+ virtual ~Verifier() = default;
+
/**
* This method tests whether the \p key contained in the \p dictionary adheres to
* whatever the concrete Verifer needs to test. The actual testing depends on the
@@ -212,6 +216,19 @@ struct StringListVerifier : public TableVerifier {
std::string type() const override;
};
+/**
+* A Verifier that checks whether all values contained in a Table are of type \c int.
+*/
+struct IntListVerifier : public TableVerifier {
+ /**
+ * Constructor for a IntListVerifier.
+ * \param elementDocumentation The documentation for each string in the list
+ */
+ IntListVerifier(std::string elementDocumentation = "");
+
+ std::string type() const override;
+};
+
//----------------------------------------------------------------------------------------
// Vector verifiers
//----------------------------------------------------------------------------------------
diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl
index d03a05a2b9..70751ac380 100644
--- a/include/openspace/documentation/verifier.inl
+++ b/include/openspace/documentation/verifier.inl
@@ -22,7 +22,10 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
+#include
+
#include
+#include
namespace std {
std::string to_string(std::string value);
@@ -55,86 +58,62 @@ std::string TemplateVerifier::documentation() const {
template
std::string Vector2Verifier::type() const {
- using namespace std::string_literals;
-
- return "Vector2<"s + typeid(T).name() + ">";
+ return std::string("Vector2<") + typeid(T).name() + ">";
}
template
std::string Vector3Verifier::type() const {
- using namespace std::string_literals;
-
- return "Vector3<"s + typeid(T).name() + ">";
+ return std::string("Vector3<") + typeid(T).name() + ">";
}
template
std::string Vector4Verifier::type() const {
- using namespace std::string_literals;
-
- return "Vector4<"s + typeid(T).name() + ">";
+ return std::string("Vector4<") + typeid(T).name() + ">";
}
template
std::string Matrix2x2Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix2x2<"s + typeid(T).name() + ">";
+ return std::string("Matrix2x2<") + typeid(T).name() + ">";
}
template
std::string Matrix2x3Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix2x3<"s + typeid(T).name() + ">";
+ return std::string("Matrix2x3<") + typeid(T).name() + ">";
}
template
std::string Matrix2x4Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix2x4<"s + typeid(T).name() + ">";
+ return std::string("Matrix2x4<") + typeid(T).name() + ">";
}
template
std::string Matrix3x2Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix3x2<"s + typeid(T).name() + ">";
+ return std::string("Matrix3x2<") + typeid(T).name() + ">";
}
template
std::string Matrix3x3Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix3x3<"s + typeid(T).name() + ">";
+ return std::string("Matrix3x3<") + typeid(T).name() + ">";
}
template
std::string Matrix3x4Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix3x4<"s + typeid(T).name() + ">";
+ return std::string("Matrix3x4<") + typeid(T).name() + ">";
}
template
std::string Matrix4x2Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix4x2<"s + typeid(T).name() + ">";
+ return std::string("Matrix4x2<") + typeid(T).name() + ">";
}
template
std::string Matrix4x3Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix4x3<"s + typeid(T).name() + ">";
+ return std::string("Matrix4x3<") + typeid(T).name() + ">";
}
template
std::string Matrix4x4Verifier::type() const {
- using namespace std::string_literals;
-
- return "Matrix4x4<"s + typeid(T).name() + ">";
+ return std::string("Matrix4x4<") + typeid(T).name() + ">";
}
template
diff --git a/include/openspace/engine/configurationmanager.h b/include/openspace/engine/configurationmanager.h
index d65892b076..8ec3aa167d 100644
--- a/include/openspace/engine/configurationmanager.h
+++ b/include/openspace/engine/configurationmanager.h
@@ -25,11 +25,10 @@
#ifndef __OPENSPACE_CORE___CONFIGURATIONMANAGER___H__
#define __OPENSPACE_CORE___CONFIGURATIONMANAGER___H__
-#include
-
#include
namespace openspace {
+namespace documentation { struct Documentation; }
/**
* The ConfigurationManager takes care of loading the major configuration file
@@ -69,6 +68,8 @@ public:
static const std::string KeyFactoryDocumentation;
/// The key that stores the location of the scene file that is initially loaded
static const std::string KeyConfigScene;
+ /// The key that stores the location of the tasks file that is initially loaded
+ static const std::string KeyConfigTask;
/// The key that stores the subdirectory containing a list of all startup scripts to
/// be executed on application start before the scene file is loaded
static const std::string KeyStartupScript;
@@ -105,6 +106,8 @@ public:
/// The key that stores whether the master node should perform rendering just function
/// as a pure manager
static const std::string KeyDisableMasterRendering;
+ /// The key that stores whether the master node should apply the scene transformation
+ static const std::string KeyDisableSceneOnMaster;
/// The key that sets the request URL that is used to request additional data to be
/// downloaded
static const std::string KeyDownloadRequestURL;
@@ -125,7 +128,22 @@ public:
static const std::string PartHttpProxyUser;
/// The key that stores the password to use for authentication to access the http proxy
static const std::string PartHttpProxyPassword;
-
+ /// The key that stores the dictionary containing information about debug contexts
+ static const std::string KeyOpenGLDebugContext;
+ /// The part of the key storing whether an OpenGL Debug context should be created
+ static const std::string PartActivate;
+ /// The part of the key storing whether the debug callbacks are performed synchronous
+ static const std::string PartSynchronous;
+ /// The part of the key storing a list of identifiers that should be filtered out
+ static const std::string PartFilterIdentifier;
+ /// The part of the key that stores the source of the ignored identifier
+ static const std::string PartFilterIdentifierSource;
+ /// The part of the key that stores the type of the ignored identifier
+ static const std::string PartFilterIdentifierType;
+ /// The part of the key that stores the identifier of the ignored identifier
+ static const std::string PartFilterIdentifierIdentifier;
+ /// The part of the key storing a list of severities that should be filtered out
+ static const std::string PartFilterSeverity;
/**
* Iteratively walks the directory structure starting with \p filename to find the
@@ -144,27 +162,17 @@ public:
* that are specified in the configuration file will automatically be registered in
* the ghoul::filesystem::FileSystem.
* \param filename The filename to be loaded
- * \throw ghoul::FileNotFoundException If the \p filename did not exist
- * \throw ghoul::RuntimeError If the configuration file was not complete (i.e., did
+ * \throw SpecificationError If the configuration file was not complete (i.e., did
* not specify the necessary keys KeyPaths, KeyPaths.KeyCache, KeyFonts, and
* KeyConfigSgct)
* \throw ghoul::lua::LuaRuntimeException If there was Lua-based error loading the
* configuration file
* \pre \p filename must not be empty
+ * \pre \p filename must exist
*/
void loadFromFile(const std::string& filename);
- static openspace::Documentation Documentation();
-
-private:
- /**
- * Checks whether the loaded configuration file is complete, that is specifying the
- * necessary keys KeyPaths, KeyPaths.KeyCache, KeyFonts, and KeyConfigSgct. The method
- * will log fatal errors if a key is missing.
- * \return true if the configuration file was complete;
- * false otherwise
- */
- bool checkCompleteness() const;
+ static documentation::Documentation Documentation();
};
} // namespace openspace
diff --git a/include/openspace/engine/logfactory.h b/include/openspace/engine/logfactory.h
index b32d3c6380..026208f33d 100644
--- a/include/openspace/engine/logfactory.h
+++ b/include/openspace/engine/logfactory.h
@@ -28,12 +28,16 @@
#include
namespace ghoul {
+
class Dictionary;
namespace logging { class Log; }
-}
+
+} // namespace ghoul
namespace openspace {
+namespace documentation { struct Documentation; }
+
/**
* This function provides the capabilities to create a new ghoul::logging::Log from the
* provided ghoul::Dictionary%. The Dictionary must at least contain a Type
@@ -44,15 +48,24 @@ namespace openspace {
* created . Both logs can be customized using the Append,
* TimeStamping, DateStamping, CategoryStamping,
* and LogLevelStamping values.
- * \param dictionary The dictionary from which the ghoul::logging::Log should be created
+ *
+ * \param dictionary The dictionary from which the ghoul::logging::Log should be created
* \return The created ghoul::logging::Log
- * \post The return value will not be nullptr
- * \throw ghoul::RuntimeError If there was an error creating the ghoul::logging::Log
- * \sa ghoul::logging::TextLeg
- * \sa ghoul::logging::HTMLLog
+ * \post The return value will not be nullptr
+ * \throw ghoul::RuntimeError If there was an error creating the ghoul::logging::Log
+ * \sa ghoul::logging::TextLog
+ * \sa ghoul::logging::HTMLLog
*/
std::unique_ptr createLog(const ghoul::Dictionary& dictionary);
+/**
+ * Returns the Documentation that describes a Dictionary used to create a log by using the
+ * function createLog.
+ * \return The Documentation that describes an acceptable Dictionary for the method
+ * createLog
+ */
+documentation::Documentation LogFactoryDocumentation();
+
} // namespace openspace
#endif // __OPENSPACE_CORE___LOGFACTORY___H__
diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h
index cb6d6357c0..ab3a118ecc 100644
--- a/include/openspace/engine/moduleengine.h
+++ b/include/openspace/engine/moduleengine.h
@@ -25,14 +25,23 @@
#ifndef __OPENSPACE_CORE___MODULEENGINE___H__
#define __OPENSPACE_CORE___MODULEENGINE___H__
-#include
-#include
-
#include
#include
+#include
+
+namespace ghoul {
+namespace systemcapabilities {
+
+struct Version;
+
+} // namespace systemcapabilities
+} // namespace ghoul
+
namespace openspace {
+namespace scripting { struct LuaLibrary; }
+
/**
* The ModuleEngine is the central repository for registering and accessing
* OpenSpaceModule for the current application run. By initializing (#initialize) the
@@ -80,8 +89,7 @@ public:
* version of all registered modules' OpenGL versions.
* \return The combined minimum OpenGL version
*/
- ghoul::systemcapabilities::OpenGLCapabilitiesComponent::Version
- requiredOpenGLVersion() const;
+ ghoul::systemcapabilities::Version requiredOpenGLVersion() const;
/**
* Returns the Lua library that contains all Lua functions available to affect the
diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h
index 1c7ac2db50..dfc04f409b 100644
--- a/include/openspace/engine/openspaceengine.h
+++ b/include/openspace/engine/openspaceengine.h
@@ -36,71 +36,60 @@
#include
namespace ghoul {
+
class Dictionary;
+
namespace cmdparser { class CommandlineParser; }
namespace fontrendering { class FontManager; }
-}
+
+} // namespace ghoul
namespace openspace {
class ConfigurationManager;
class DownloadManager;
-class LuaConsole;
-class NetworkEngine;
class GUI;
-class RenderEngine;
+class LuaConsole;
class ModuleEngine;
-class WindowWrapper;
-class SettingsEngine;
-class TimeManager;
-class SyncEngine;
+class NetworkEngine;
class ParallelConnection;
+class RenderEngine;
+class SettingsEngine;
+class SceneManager;
+class VirtualPropertyManager;
+
+class SyncEngine;
+class TimeManager;
+class WindowWrapper;
namespace interaction { class InteractionHandler; }
namespace gui { class GUI; }
-//namespace scripting { class ScriptEngine; }
namespace properties { class PropertyOwner; }
-namespace scripting { struct LuaLibrary; }
-namespace scripting { class ScriptScheduler; }
-namespace scripting { class ScriptEngine; }
-
+namespace scripting {
+ struct LuaLibrary;
+ class ScriptEngine;
+ class ScriptScheduler;
+} // namespace scripting
+
class OpenSpaceEngine {
public:
- static bool create(int argc, char** argv,
+ static void create(int argc, char** argv,
std::unique_ptr windowWrapper,
- std::vector& sgctArguments);
+ std::vector& sgctArguments, bool& requestClose);
static void destroy();
- static bool isInitialized();
static OpenSpaceEngine& ref();
- bool isMaster();
- void setMaster(bool master);
double runTime();
void setRunTime(double t);
- // Guaranteed to return a valid pointer
- ConfigurationManager& configurationManager();
- interaction::InteractionHandler& interactionHandler();
- RenderEngine& renderEngine();
- scripting::ScriptEngine& scriptEngine();
- scripting::ScriptScheduler& scriptScheduler();
- NetworkEngine& networkEngine();
- LuaConsole& console();
- ModuleEngine& moduleEngine();
- ParallelConnection& parallelConnection();
- properties::PropertyOwner& globalPropertyOwner();
- WindowWrapper& windowWrapper();
- ghoul::fontrendering::FontManager& fontManager();
- DownloadManager& downloadManager();
- TimeManager& timeManager();
- SettingsEngine& settingsEngine();
-
- // SGCT callbacks
- bool initialize();
- bool initializeGL();
+ // callbacks
+ void initialize();
+ void initializeGL();
+ void deinitialize();
void preSynchronization();
void postSynchronizationPreDraw();
- void render(const glm::mat4& projectionMatrix, const glm::mat4& viewMatrix);
+ void render(const glm::mat4& sceneMatrix, const glm::mat4& viewMatrix,
+ const glm::mat4& projectionMatrix);
void postDraw();
void keyboardCallback(Key key, KeyModifier mod, KeyAction action);
void charCallback(unsigned int codepoint, KeyModifier mod);
@@ -111,21 +100,36 @@ public:
void encode();
void decode();
+ void scheduleLoadScene(std::string scenePath);
+
void enableBarrier();
void disableBarrier();
-
+
void writeDocumentation();
void toggleShutdownMode();
- bool useBusyWaitForDecode();
- bool logSGCTOutOfOrderErrors();
-
void runPostInitializationScripts(const std::string& sceneDescription);
+ // Guaranteed to return a valid pointer
+ ConfigurationManager& configurationManager();
+ LuaConsole& console();
+ DownloadManager& downloadManager();
+ ModuleEngine& moduleEngine();
+ NetworkEngine& networkEngine();
+ ParallelConnection& parallelConnection();
+ RenderEngine& renderEngine();
+ SettingsEngine& settingsEngine();
+ TimeManager& timeManager();
+ WindowWrapper& windowWrapper();
+ ghoul::fontrendering::FontManager& fontManager();
+ interaction::InteractionHandler& interactionHandler();
+ properties::PropertyOwner& globalPropertyOwner();
+ scripting::ScriptEngine& scriptEngine();
+ 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
Deinitialize, // Callback for the end of the deinitialization
@@ -138,34 +142,7 @@ public:
};
// Registers a callback for a specific CallbackOption
- void registerModuleCallback(CallbackOption option, std::function function) {
- switch (option) {
- case CallbackOption::Initialize:
- _moduleCallbacks.initialize.push_back(std::move(function));
- break;
- case CallbackOption::Deinitialize:
- _moduleCallbacks.deinitialize.push_back(std::move(function));
- break;
- case CallbackOption::InitializeGL:
- _moduleCallbacks.initializeGL.push_back(std::move(function));
- break;
- case CallbackOption::DeinitializeGL:
- _moduleCallbacks.deinitializeGL.push_back(std::move(function));
- break;
- case CallbackOption::PreSync:
- _moduleCallbacks.preSync.push_back(std::move(function));
- break;
- case CallbackOption::PostSyncPreDraw:
- _moduleCallbacks.postSyncPreDraw.push_back(std::move(function));
- break;
- case CallbackOption::Render:
- _moduleCallbacks.render.push_back(std::move(function));
- break;
- case CallbackOption::PostDraw:
- _moduleCallbacks.postDraw.push_back(std::move(function));
- break;
- }
- }
+ void registerModuleCallback(CallbackOption option, std::function function);
// Registers a callback that is called when a new keyboard event is received
void registerModuleKeyboardCallback(
@@ -187,43 +164,47 @@ public:
void registerModuleMouseScrollWheelCallback(std::function function);
/**
- * Returns the Lua library that contains all Lua functions available to affect the
- * application.
- */
+ * Returns the Lua library that contains all Lua functions available to affect the
+ * application.
+ */
static scripting::LuaLibrary luaLibrary();
private:
- OpenSpaceEngine(std::string programName, std::unique_ptr windowWrapper);
- ~OpenSpaceEngine();
+ OpenSpaceEngine(std::string programName,
+ std::unique_ptr windowWrapper);
- void clearAllWindows();
+ void loadScene(const std::string& scenePath);
void gatherCommandlineArguments();
void loadFonts();
- void runScripts(const ghoul::Dictionary& scripts);
void runPreInitializationScripts(const std::string& sceneDescription);
void configureLogging();
// Components
std::unique_ptr _configurationManager;
- std::unique_ptr _interactionHandler;
- std::unique_ptr _renderEngine;
- std::unique_ptr _scriptEngine;
- std::unique_ptr _scriptScheduler;
- std::unique_ptr _networkEngine;
- std::unique_ptr _syncEngine;
- std::unique_ptr _commandlineParser;
+ std::unique_ptr _sceneManager;
+ std::unique_ptr _downloadManager;
std::unique_ptr _console;
std::unique_ptr _moduleEngine;
- std::unique_ptr _settingsEngine;
- std::unique_ptr _timeManager;
- std::unique_ptr _downloadManager;
+ std::unique_ptr _networkEngine;
std::unique_ptr _parallelConnection;
+ std::unique_ptr _renderEngine;
+ std::unique_ptr _settingsEngine;
+ std::unique_ptr _syncEngine;
+ std::unique_ptr _timeManager;
std::unique_ptr _windowWrapper;
+ std::unique_ptr _commandlineParser;
std::unique_ptr _fontManager;
+ std::unique_ptr _interactionHandler;
+ std::unique_ptr _scriptEngine;
+ std::unique_ptr _scriptScheduler;
+ std::unique_ptr _virtualPropertyManager;
// Others
std::unique_ptr _globalPropertyNamespace;
+ bool _scheduledSceneSwitch;
+ std::string _scenePath;
+
struct {
std::vector> initialize;
std::vector> deinitialize;
@@ -242,25 +223,24 @@ private:
std::vector> mouseButton;
std::vector> mousePosition;
std::vector> mouseScrollWheel;
-
-
-
-
} _moduleCallbacks;
- bool _isMaster;
double _runTime;
- // Whether the application is currently in shutdown mode (i.e. counting down the timer
- // and closing it at '0'
- bool _isInShutdownMode;
- // The total amount of time the application will wait before actually shutting down
- float _shutdownWait;
- // The current state of the countdown; if it reaches '0', the application will close
- float _shutdownCountdown;
+ // 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
+ // timer and closing it at '0'
+ bool inShutdown;
+ // Total amount of time the application will wait before actually shutting down
+ float waitTime;
+ // Current state of the countdown; if it reaches '0', the application will
+ // close
+ float timer;
+ } _shutdown;
// The first frame might take some more time in the update loop, so we need to know to
- // disable the synchronization; otherwise a hardware sync will kill us after 1 sec
+ // disable the synchronization; otherwise a hardware sync will kill us after 1 minute
bool _isFirstRenderingFirstFrame;
static OpenSpaceEngine* _engine;
diff --git a/include/openspace/engine/settingsengine.h b/include/openspace/engine/settingsengine.h
index bcce9884f5..e040192928 100644
--- a/include/openspace/engine/settingsengine.h
+++ b/include/openspace/engine/settingsengine.h
@@ -43,28 +43,18 @@ public:
void initialize();
- void setModules(std::vector modules);
+ void setModules(const std::vector& modules);
bool busyWaitForDecode();
bool logSGCTOutOfOrderErrors();
bool useDoubleBuffering();
private:
- void initEyeSeparation();
- void initSceneFiles();
- void initShowFrameNumber();
- void initBusyWaitForDecode();
- void initLogSGCTOutOfOrderErrors();
- void initUseDoubleBuffering();
-
- properties::FloatProperty _eyeSeparation;
properties::OptionProperty _scenes;
- properties::BoolProperty _showFrameNumber;
properties::BoolProperty _busyWaitForDecode;
properties::BoolProperty _logSGCTOutOfOrderErrors;
properties::BoolProperty _useDoubleBuffering;
properties::BoolProperty _spiceUseExceptions;
-
};
} // namespace openspace
diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h
index 77f8a7c51b..8d2c92711e 100644
--- a/include/openspace/engine/syncengine.h
+++ b/include/openspace/engine/syncengine.h
@@ -25,80 +25,87 @@
#ifndef __OPENSPACE_CORE___SYNCENGINE___H__
#define __OPENSPACE_CORE___SYNCENGINE___H__
+#include
+
+#include
+
#include
#include
namespace openspace {
class Syncable;
-class SyncBuffer;
/**
-* Manages a collection of Syncables and ensures they are synchronized
-* over SGCT nodes. Encoding/Decoding order is handles internally.
-*/
+ * Manages a collection of Syncables and ensures they are synchronized
+ * over SGCT nodes. Encoding/Decoding order is handles internally.
+ */
class SyncEngine {
public:
+ using IsMaster = ghoul::Boolean;
/**
- * Dependency injection: a SyncEngine relies on a SyncBuffer to encode the sync data.
- */
- SyncEngine(SyncBuffer* syncBuffer);
-
+ * Creates a new SyncEngine which a buffer size of \p syncBufferSize
+ * \pre syncBufferSize must be bigger than 0
+ */
+ SyncEngine(unsigned int syncBufferSize);
/**
- * Encodes all added Syncables in the injected SyncBuffer.
- * This method is only called on the SGCT master node
- */
+ * Encodes all added Syncables in the injected SyncBuffer.
+ * This method is only called on the SGCT master node
+ */
void encodeSyncables();
/**
- * Decodes the SyncBuffer into the added Syncables.
- * This method is only called on the SGCT slave nodes
- */
+ * Decodes the SyncBuffer into the added Syncables.
+ * This method is only called on the SGCT slave nodes
+ */
void decodeSyncables();
/**
- * Invokes the presync method of all added Syncables
- */
- void presync(bool isMaster);
+ * Invokes the presync method of all added Syncables
+ */
+ void preSynchronization(IsMaster isMaster);
/**
- * Invokes the postsync method of all added Syncables
- */
- void postsync(bool isMaster);
+ * Invokes the postsync method of all added Syncables
+ */
+ void postSynchronization(IsMaster isMaster);
-
-
/**
- * Add a Syncable to be synchronized over the SGCT cluster
- */
+ * Add a Syncable to be synchronized over the SGCT cluster.
+ * \pre syncable must not be nullptr
+ */
void addSyncable(Syncable* syncable);
/**
- * Add multiple Syncables to be synchronized over the SGCT cluster
- */
+ * Add multiple Syncables to be synchronized over the SGCT cluster
+ * \pre syncables must not contain any nullptr
+ */
void addSyncables(const std::vector& syncables);
/**
- * Remove a Syncable from being synchronized over the SGCT cluster
- */
+ * Remove a Syncable from being synchronized over the SGCT cluster
+ */
void removeSyncable(Syncable* syncable);
-private:
-
- /**
- * Vector of Syncables. The vectors ensures consistent encode/decode order
+ /**
+ * Remove multiple Syncables from being synchronized over the SGCT cluster
*/
+ void removeSyncables(const std::vector& syncables);
+
+private:
+ /**
+ * Vector of Syncables. The vectors ensures consistent encode/decode order
+ */
std::vector _syncables;
/**
- * Databuffer used in encoding/decoding
- */
- std::unique_ptr _syncBuffer;
+ * Databuffer used in encoding/decoding
+ */
+ SyncBuffer _syncBuffer;
};
-
} // namespace openspace
#endif // __OPENSPACE_CORE___SYNCENGINE___H__
diff --git a/include/openspace/interaction/keyboardcontroller.h b/include/openspace/engine/virtualpropertymanager.h
similarity index 72%
rename from include/openspace/interaction/keyboardcontroller.h
rename to include/openspace/engine/virtualpropertymanager.h
index b222f9058d..5c1192ede0 100644
--- a/include/openspace/interaction/keyboardcontroller.h
+++ b/include/openspace/engine/virtualpropertymanager.h
@@ -22,36 +22,29 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
-#ifndef __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
-#define __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
+#ifndef __OPENSPACE_CORE___VIRTUALPROPERTYMANAGER___H__
+#define __OPENSPACE_CORE___VIRTUALPROPERTYMANAGER___H__
-#include
+#include
-#include
+#include
+
+#include
+#include
namespace openspace {
-namespace interaction {
-class KeyboardController : public Controller {
+class VirtualPropertyManager : public properties::PropertyOwner {
public:
- virtual ~KeyboardController() {};
- virtual void keyPressed(KeyAction action, Key key, KeyModifier modifier) = 0;
+ VirtualPropertyManager();
+
+ void addProperty(std::unique_ptr prop);
+ void removeProperty(properties::Property* prop);
+
+private:
+ std::vector> _properties;
};
-class KeyboardControllerFixed : public KeyboardController {
-public:
- void keyPressed(KeyAction action, Key key, KeyModifier modifier);
-};
-
-class KeyboardControllerLua : public KeyboardController {
-public:
- void keyPressed(KeyAction action, Key key, KeyModifier modifier);
-
-protected:
- std::string keyToString(Key key, KeyModifier mod) const;
-};
-
-} // namespace interaction
} // namespace openspace
-#endif // __OPENSPACE_CORE___KEYBOARDCONTROLLER___H__
+#endif // __OPENSPACE_CORE___VIRTUALPROPERTYMANAGER___H__
diff --git a/include/openspace/engine/wrapper/sgctwindowwrapper.h b/include/openspace/engine/wrapper/sgctwindowwrapper.h
index 3a0fd67131..7dc3db262b 100644
--- a/include/openspace/engine/wrapper/sgctwindowwrapper.h
+++ b/include/openspace/engine/wrapper/sgctwindowwrapper.h
@@ -27,6 +27,9 @@
#include
+#include
+#include
+
namespace openspace {
/**
@@ -36,6 +39,8 @@ namespace openspace {
*/
class SGCTWindowWrapper : public WindowWrapper {
public:
+ SGCTWindowWrapper();
+
void terminate() override;
void setBarrier(bool enabled) override;
void setSynchronization(bool enabled) override;
@@ -55,6 +60,7 @@ public:
bool isRegularRendering() const override;
bool hasGuiWindow() const override;
bool isGuiWindow() const override;
+ bool isMaster() const override;
bool isUsingSwapGroups() const override;
bool isSwapGroupMaster() const override;
@@ -71,6 +77,10 @@ public:
bool isSimpleRendering() const override;
void takeScreenshot(bool applyWarping = false) const override;
+
+private:
+ properties::FloatProperty _eyeSeparation;
+ properties::BoolProperty _showStatsGraph;
};
} // namespace openspace
diff --git a/include/openspace/engine/wrapper/windowwrapper.h b/include/openspace/engine/wrapper/windowwrapper.h
index b3ed6797fb..252eb4258a 100644
--- a/include/openspace/engine/wrapper/windowwrapper.h
+++ b/include/openspace/engine/wrapper/windowwrapper.h
@@ -25,6 +25,8 @@
#ifndef __OPENSPACE_CORE___WINDOWWRAPPER___H__
#define __OPENSPACE_CORE___WINDOWWRAPPER___H__
+#include
+
#include
#include
@@ -42,8 +44,11 @@ namespace scripting { struct LuaLibrary; }
* Every new windowing framework needs to have its own WindowWrapper subclass exposing the
* required features.
*/
-class WindowWrapper {
+class WindowWrapper : public properties::PropertyOwner {
public:
+ /// Default constructor
+ WindowWrapper();
+
/**
* Returns the Lua library that contains all Lua functions available to affect the
* windowing system.
@@ -175,6 +180,13 @@ public:
* \return Whether the current rendering window is GUI-only
*/
virtual bool isGuiWindow() const;
+
+ /**
+ * Returns true if this application is the master for a clustered
+ * environment.
+ * \return Whether this applicaiton is the master for a clustered environment.
+ */
+ virtual bool isMaster() const;
/**
* Returns true if the current rendering window is using swap groups.
diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h
index aa9e04fc43..891dfca494 100644
--- a/include/openspace/interaction/interactionhandler.h
+++ b/include/openspace/interaction/interactionhandler.h
@@ -25,10 +25,11 @@
#ifndef __OPENSPACE_CORE___INTERACTIONHANDLER___H__
#define __OPENSPACE_CORE___INTERACTIONHANDLER___H__
-#include
+#include
+#include
+
#include
#include
-#include
#include
#include
#include
@@ -48,8 +49,7 @@ class SceneGraphNode;
namespace interaction {
-
-class InteractionHandler : public properties::PropertyOwner
+class InteractionHandler : public properties::PropertyOwner, public DocumentationGenerator
{
public:
InteractionHandler();
@@ -66,6 +66,7 @@ public:
// Interaction mode setters
void setCameraStateFromDictionary(const ghoul::Dictionary& cameraDict);
void setInteractionMode(const std::string& interactionModeKey);
+ InteractionMode* interactionMode();
void goToChunk(int x, int y, int level);
void goToGeo(double latitude, double longitude);
@@ -73,7 +74,9 @@ public:
void resetKeyBindings();
void addKeyframe(const datamessagestructures::CameraKeyframe &kf);
+ void removeKeyframesAfter(double timestamp);
void clearKeyframes();
+ const std::vector& keyframes() const;
void bindKeyLocal(
Key key,
@@ -96,8 +99,10 @@ public:
// Accessors
ghoul::Dictionary getCameraStateDictionary();
- SceneGraphNode* const focusNode() const;
- Camera* const camera() const;
+ SceneGraphNode* focusNode() const;
+ glm::dvec3 focusNodeToCameraVector() const;
+ glm::quat focusNodeToCameraRotation() const;
+ Camera* camera() const;
const InputState& inputState() const;
/**
@@ -117,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;
@@ -127,6 +131,8 @@ private:
Synchronized synchronization;
std::string documentation;
};
+
+ std::string generateJson() const override;
void setInteractionMode(std::shared_ptr interactionMode);
@@ -144,7 +150,6 @@ private:
// Properties
properties::StringProperty _origin;
- properties::StringProperty _coordinateSystem;
properties::BoolProperty _rotationalFriction;
properties::BoolProperty _horizontalFriction;
diff --git a/include/openspace/interaction/interactionmode.h b/include/openspace/interaction/interactionmode.h
index f383866c73..0698e2992e 100644
--- a/include/openspace/interaction/interactionmode.h
+++ b/include/openspace/interaction/interactionmode.h
@@ -25,7 +25,6 @@
#ifndef __OPENSPACE_CORE___INTERACTIONMODE___H__
#define __OPENSPACE_CORE___INTERACTIONMODE___H__
-#include
#include
#include
#include
@@ -83,9 +82,12 @@ namespace interaction {
// Mutators
void addKeyframe(const datamessagestructures::CameraKeyframe &kf);
+ void removeKeyframesAfter(double timestamp);
void clearKeyframes();
void clearOldKeyframes();
+ static bool compareKeyframeTimes(const datamessagestructures::CameraKeyframe& a, const datamessagestructures::CameraKeyframe& b);
+
// Accessors
const std::list >& getPressedKeys() const;
const std::list& getPressedMouseButtons() const;
@@ -109,11 +111,10 @@ namespace interaction {
-class InteractionMode
-{
+class InteractionMode {
public:
InteractionMode();
- ~InteractionMode();
+ virtual ~InteractionMode();
// Mutators
virtual void setFocusNode(SceneGraphNode* focusNode);
@@ -121,6 +122,7 @@ public:
// Accessors
SceneGraphNode* focusNode();
Interpolator& rotateToFocusNodeInterpolator();
+ virtual bool followingNodeRotation() const = 0;
virtual void updateMouseStatesFromInput(const InputState& inputState, double deltaTime) = 0;
virtual void updateCameraStateFromMouseStates(Camera& camera, double deltaTime) = 0;
@@ -197,6 +199,7 @@ public:
virtual void updateMouseStatesFromInput(const InputState& inputState, double deltaTime);
virtual void updateCameraStateFromMouseStates(Camera& camera, double deltaTime);
+ bool followingNodeRotation() const override;
private:
std::vector _keyframes;
@@ -247,6 +250,7 @@ public:
virtual void updateMouseStatesFromInput(const InputState& inputState, double deltaTime);
virtual void updateCameraStateFromMouseStates(Camera& camera, double deltaTime);
+ bool followingNodeRotation() const override;
protected:
//void updateCameraStateFromMouseStates(Camera& camera, double deltaTime);
@@ -262,6 +266,7 @@ public:
virtual void setFocusNode(SceneGraphNode* focusNode);
//virtual void update(Camera& camera, const InputState& inputState, double deltaTime);
virtual void updateCameraStateFromMouseStates(Camera& camera, double deltaTime);
+ bool followingNodeRotation() const override;
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
void goToChunk(Camera& camera, globebrowsing::TileIndex ti, glm::vec2 uv,
bool resetCameraDirection);
diff --git a/include/openspace/interaction/luaconsole.h b/include/openspace/interaction/luaconsole.h
index 00890d18fb..77beaf3109 100644
--- a/include/openspace/interaction/luaconsole.h
+++ b/include/openspace/interaction/luaconsole.h
@@ -25,9 +25,10 @@
#ifndef __OPENSPACE_CORE___LUACONSOLE___H__
#define __OPENSPACE_CORE___LUACONSOLE___H__
-#include
#include
-
+#include
+#include
+#include
#include
#include
@@ -35,50 +36,35 @@
namespace openspace {
-class LuaConsole {
+class LuaConsole : public properties::PropertyOwner {
public:
LuaConsole();
void initialize();
void deinitialize();
- void keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
+ bool keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
void charCallback(unsigned int codepoint, KeyModifier modifier);
void render();
- Key commandInputButton();
-
- bool isVisible() const;
- void setVisible(bool visible);
- bool isRemoteScripting() const;
- void setRemoteScripting(bool remoteScripting);
-
- void toggleMode();
-
- static scripting::LuaLibrary luaLibrary();
-
-
private:
void parallelConnectionChanged(const ParallelConnection::Status& status);
void addToCommand(std::string c);
- std::string UnicodeToUTF8(unsigned int codepoint);
+
+ properties::BoolProperty _isVisible;
+ properties::BoolProperty _remoteScripting;
size_t _inputPosition;
std::vector _commandsHistory;
size_t _activeCommand;
std::vector _commands;
- std::string _filename;
-
struct {
int lastIndex;
bool hasInitialValue;
std::string initialValue;
} _autoCompleteInfo;
-
- bool _isVisible;
- bool _remoteScripting;
};
} // namespace openspace
diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h
index 24d89829d1..b5dfe70f50 100644
--- a/include/openspace/mission/mission.h
+++ b/include/openspace/mission/mission.h
@@ -25,7 +25,6 @@
#ifndef __OPENSPACE_CORE___MISSION___H__
#define __OPENSPACE_CORE___MISSION___H__
-#include
#include
#include
@@ -35,6 +34,7 @@
namespace ghoul { class Dictionary; }
namespace openspace {
+namespace documentation { struct Documentation; }
/**
* Used to represent a named period of time within a mission. Allows nested phases, i.e.
@@ -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>;
@@ -101,7 +100,7 @@ public:
* MissionPhase can be constructed from.
* \return The Documentation that describes the required structure for a Dictionary
*/
- static openspace::Documentation Documentation();
+ static documentation::Documentation Documentation();
protected:
/**
@@ -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/messagestructures.h b/include/openspace/network/messagestructures.h
index 5f85c57bcb..ee2ffc71a9 100644
--- a/include/openspace/network/messagestructures.h
+++ b/include/openspace/network/messagestructures.h
@@ -51,16 +51,28 @@ struct CameraKeyframe {
glm::dvec3 _position;
glm::dquat _rotation;
+ bool _followNodeRotation;
+ std::string _focusNode;
+
double _timestamp;
void serialize(std::vector &buffer){
- //add position
+ // Add position
buffer.insert(buffer.end(), reinterpret_cast(&_position), reinterpret_cast(&_position) + sizeof(_position));
- //add orientation
+ // Add orientation
buffer.insert(buffer.end(), reinterpret_cast(&_rotation), reinterpret_cast(&_rotation) + sizeof(_rotation));
-
- //add timestamp
+
+ // Follow focus node rotation?
+ buffer.insert(buffer.end(), reinterpret_cast(&_followNodeRotation), reinterpret_cast(&_followNodeRotation) + sizeof(_followNodeRotation));
+
+ int nodeNameLength = _focusNode.size();
+
+ // Add focus node
+ buffer.insert(buffer.end(), reinterpret_cast(&nodeNameLength), reinterpret_cast(&nodeNameLength) + sizeof(nodeNameLength));
+ buffer.insert(buffer.end(), _focusNode.data(), _focusNode.data() + nodeNameLength);
+
+ // Add timestamp
buffer.insert(buffer.end(), reinterpret_cast(&_timestamp), reinterpret_cast(&_timestamp) + sizeof(_timestamp));
};
@@ -68,17 +80,31 @@ struct CameraKeyframe {
int offset = 0;
int size = 0;
- //position
+ // Position
size = sizeof(_position);
memcpy(&_position, buffer.data() + offset, size);
offset += size;
-
- //orientation
+
+ // Orientation
size = sizeof(_rotation);
memcpy(&_rotation, buffer.data() + offset, size);
offset += size;
+
+ // Follow focus node rotation?
+ size = sizeof(_followNodeRotation);
+ memcpy(&_followNodeRotation, buffer.data() + offset, size);
+ offset += size;
+
+ // Focus node
+ int nodeNameLength;
+ size = sizeof(int);
+ memcpy(&nodeNameLength, buffer.data() + offset, size);
+ offset += size;
+ size = nodeNameLength;
+ _focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size);
+ offset += size;
- //timestamp
+ // Timestamp
size = sizeof(_timestamp);
memcpy(&_timestamp, buffer.data() + offset, size);
};
@@ -97,19 +123,19 @@ struct TimeKeyframe {
double _timestamp;
void serialize(std::vector &buffer){
- //add current time
+ // Add current time
buffer.insert(buffer.end(), reinterpret_cast(&_time), reinterpret_cast(&_time) + sizeof(_time));
- //add delta time
+ // Add delta time
buffer.insert(buffer.end(), reinterpret_cast(&_dt), reinterpret_cast(&_dt) + sizeof(_dt));
- //add wether time is paused or not
+ // Add whether time is paused or not
buffer.insert(buffer.end(), reinterpret_cast(&_paused), reinterpret_cast(&_paused) + sizeof(_paused));
- //add wether a time jump is necessary (recompute paths etc)
+ // Add whether a time jump is necessary (recompute paths etc)
buffer.insert(buffer.end(), reinterpret_cast(&_requiresTimeJump), reinterpret_cast(&_requiresTimeJump) + sizeof(_requiresTimeJump));
- //add timestamp
+ // Add timestamp
buffer.insert(buffer.end(), reinterpret_cast(&_timestamp), reinterpret_cast(&_timestamp) + sizeof(_timestamp));
};
@@ -117,27 +143,27 @@ struct TimeKeyframe {
int offset = 0;
int size = 0;
- //current time
+ // Current time
size = sizeof(_time);
memcpy(&_time, buffer.data() + offset, size);
offset += size;
- //delta time
+ // Delta time
size = sizeof(_dt);
memcpy(&_dt, buffer.data() + offset, size);
offset += size;
- //is time paused?
+ // Is time paused?
size = sizeof(_paused);
memcpy(&_paused, buffer.data() + offset, size);
offset += sizeof(_paused);
- //is a time jump required?
+ // Is a time jump required?
size = sizeof(_requiresTimeJump);
memcpy(&_requiresTimeJump, buffer.data() + offset, size);
offset += size;
- // timestamp
+ // Timestamp
size = sizeof(_timestamp);
memcpy(&_timestamp, buffer.data() + offset, size);
offset += size;
diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h
index d95060d7c0..db3d000413 100644
--- a/include/openspace/network/parallelconnection.h
+++ b/include/openspace/network/parallelconnection.h
@@ -27,6 +27,9 @@
//openspace includes
#include
+#include
+#include
+#include
//glm includes
#include
@@ -57,7 +60,7 @@ struct addrinfo;
namespace openspace {
-class ParallelConnection {
+class ParallelConnection : public properties::PropertyOwner {
public:
enum class Status : uint32_t {
Disconnected = 0,
@@ -99,17 +102,21 @@ class ParallelConnection {
ParallelConnection();
~ParallelConnection();
void clientConnect();
- void setPort(const std::string &port);
- void setAddress(const std::string &address);
- void setName(const std::string& name);
+ void setPort(std::string port);
+ void setAddress(std::string address);
+ void setName(std::string name);
bool isHost();
const std::string& hostName();
- void requestHostship(const std::string &password);
+ void requestHostship();
void resignHostship();
- void setPassword(const std::string &password);
+ void setPassword(std::string password);
+ void setHostPassword(std::string hostPassword);
void signalDisconnect();
void preSynchronization();
- void sendScript(const std::string& script);
+ void sendScript(std::string script);
+ void resetTimeOffset();
+ double latencyStandardDeviation() const;
+ double timeTolerance() const;
/**
* Returns the Lua library that contains all Lua functions available to affect the
@@ -120,7 +127,7 @@ class ParallelConnection {
*/
static scripting::LuaLibrary luaLibrary();
Status status();
- size_t nConnections();
+ int nConnections();
std::shared_ptr> connectionEvent();
@@ -145,7 +152,6 @@ private:
void connectionStatusMessageReceived(const std::vector& messageContent);
void nConnectionsMessageReceived(const std::vector& messageContent);
- void broadcast();
void sendCameraKeyframe();
void sendTimeKeyframe();
@@ -158,10 +164,18 @@ private:
double calculateBufferedKeyframeTime(double originalTime);
- uint32_t _passCode;
- std::string _port;
- std::string _address;
- std::string _name;
+ properties::StringProperty _password;
+ properties::StringProperty _hostPassword;
+ properties::StringProperty _port;
+ properties::StringProperty _address;
+ properties::StringProperty _name;
+ properties::FloatProperty _bufferTime;
+ properties::FloatProperty _timeKeyframeInterval;
+ properties::FloatProperty _cameraKeyframeInterval;
+ properties::FloatProperty _timeTolerance;
+
+ double _lastTimeKeyframeTimestamp;
+ double _lastCameraKeyframeTimestamp;
_SOCKET _clientSocket;
@@ -191,7 +205,6 @@ private:
double _initialTimeDiff;
std::unique_ptr _connectionThread;
- std::unique_ptr _broadcastThread;
std::unique_ptr _sendThread;
std::unique_ptr _listenThread;
std::unique_ptr _handlerThread;
diff --git a/include/openspace/openspace.h b/include/openspace/openspace.h
index 199359475a..58ba149440 100644
--- a/include/openspace/openspace.h
+++ b/include/openspace/openspace.h
@@ -32,10 +32,10 @@ namespace openspace {
std::string licenseText();
const int OPENSPACE_VERSION_MAJOR = 0;
-const int OPENSPACE_VERSION_MINOR = 7;
+const int OPENSPACE_VERSION_MINOR = 8;
const int OPENSPACE_VERSION_PATCH = 0;
-const std::string OPENSPACE_VERSION_STRING = "prerelease-12 (NAOJ)";
+const std::string OPENSPACE_VERSION_STRING = "prerelease-13 (Earth Day)";
} // namespace openspace
diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h
index 80b224bf76..54e7a07532 100644
--- a/include/openspace/properties/property.h
+++ b/include/openspace/properties/property.h
@@ -64,13 +64,13 @@ class Property {
public:
/**
* The visibility classes for Property%s. The classes are strictly ordered as
- * All > Developer > User > None
+ * All > Developer > User > Hidden
*/
enum class Visibility {
All = 3, ///< Visible for all types, no matter what
Developer = 2, ///< Visible in Developer mode
User = 1, ///< Visible in User mode
- None = 0 ///< Never visible
+ Hidden = 0 ///< Never visible
};
/**
@@ -314,10 +314,10 @@ public:
* Property::ViewOptions::PowerScaledCoordinate = powerScaledCoordinate.
*/
struct ViewOptions {
- static const std::string Color;
- static const std::string LightPosition;
- static const std::string PowerScaledScalar;
- static const std::string PowerScaledCoordinate;
+ static const char* Color;
+ static const char* LightPosition;
+ static const char* PowerScaledScalar;
+ static const char* PowerScaledCoordinate;
};
/**
@@ -329,10 +329,10 @@ public:
const ghoul::Dictionary& metaData() const;
protected:
- static const std::string IdentifierKey;
- static const std::string NameKey;
- static const std::string TypeKey;
- static const std::string MetaDataKey;
+ static const char* IdentifierKey;
+ static const char* NameKey;
+ static const char* TypeKey;
+ static const char* MetaDataKey;
/**
* Creates the information that is general to every Property and adds the
diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h
index 09f6f0cc0b..4fdec7bb12 100644
--- a/include/openspace/properties/propertyowner.h
+++ b/include/openspace/properties/propertyowner.h
@@ -25,7 +25,6 @@
#ifndef __OPENSPACE_CORE___PROPERTYOWNER___H__
#define __OPENSPACE_CORE___PROPERTYOWNER___H__
-#include
#include