Merged master into atm.

This commit is contained in:
Jonathas Costa
2017-08-16 12:00:28 -04:00
702 changed files with 6580 additions and 6798 deletions

16
.gitignore vendored
View File

@@ -55,8 +55,8 @@ data/scene/lodglobes/uranus/textures
data/scene/lodglobes/venus/textures
data/scene/mars/textures
data/scene/mercury/textures
data/scene/milkyway/textures
data/scene/milkyway-eso/textures
data/scene/milkyway/digitaluniverse/textures
data/scene/milkyway/eso/textures
data/scene/missions/dawn/ceres/textures
data/scene/missions/dawn/dawn/obj
data/scene/missions/dawn/dawn/textures
@@ -98,12 +98,12 @@ data/scene/saturn/rhea/textures
data/scene/saturn/saturn/textures
data/scene/saturn/tethys/textures
data/scene/saturn/titan/textures
data/scene/stars/colorbv.cmap
data/scene/stars/speck
data/scene/stars/textures
data/scene/stars-denver/denver_colorbv.cmap
data/scene/stars-denver/speck
data/scene/stars-denver/textures
data/scene/stars/digitaluniverse/colorbv.cmap
data/scene/stars/digitaluniverse/speck
data/scene/stars/digitaluniverse/textures
data/scene/stars/denver/denver_colorbv.cmap
data/scene/stars/denver/speck
data/scene/stars/denver/textures
data/scene/sun/textures
data/scene/uranus/textures
data/scene/venus/textures

View File

@@ -22,9 +22,9 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
cmake_minimum_required (VERSION 3.4 FATAL_ERROR)
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project (OpenSpace)
project(OpenSpace)
message(STATUS "Generating OpenSpace project")
set(OPENSPACE_VERSION_MAJOR 0)
@@ -35,34 +35,210 @@ set(OPENSPACE_VERSION_STRING "prerelease-14 (Astronomy Live)")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps")
set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext")
set(OPENSPACE_MODULE_DIR "${OPENSPACE_BASE_DIR}/modules")
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul")
include(${OPENSPACE_CMAKE_EXT_DIR}/support_macros.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/module_common.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/CopySharedLibraries.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/handle_applications.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/handle_modules.cmake)
test_compiler_compatibility()
cleanup_project()
set_build_output_directories()
##########################################################################################
# Cleanup project #
##########################################################################################
set_property(GLOBAL PROPERTY USE_FOLDERS On)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER CMake)
# Test compiler
if (MSVC AND (MSVC_VERSION LESS 1910))
message(FATAL_ERROR "OpenSpace requires at least Visual Studio 2017.2")
endif ()
# Set build output directories
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BASE_DIR}/bin)
option(OPENSPACE_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
include(src/CMakeLists.txt)
create_openspace_target()
add_external_dependencies()
handle_applications()
##########################################################################################
# Add external dependencies #
##########################################################################################
# System libraries
if (APPLE)
target_include_directories(libOpenSpace PUBLIC "/Developer/Headers/FlatCarbon")
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(CARBON_LIBRARY Carbon)
find_library(COCOA_LIBRARY Carbon)
find_library(APP_SERVICES_LIBRARY ApplicationServices)
mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY)
target_link_libraries(libOpenSpace
${CARBON_LIBRARY}
${COREFOUNDATION_LIBRARY}
${COCOA_LIBRARY}
${APP_SERVICES_LIBRARY}
)
endif()
# Ghoul
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul)
target_link_libraries(libOpenSpace Ghoul)
set_property(TARGET Lua PROPERTY FOLDER "External")
set_property(TARGET lz4 PROPERTY FOLDER "External")
# SGCT
set(SGCT_TEXT OFF CACHE BOOL "" FORCE)
set(SGCT_BUILD_CSHARP_PROJECTS OFF CACHE BOOL "" FORCE)
set(SGCT_LIGHT_ONLY ON CACHE BOOL "" FORCE)
set(SGCT_CUSTOMOUTPUTDIRS OFF CACHE BOOL "" FORCE)
set(JPEG_TURBO_WITH_SIMD OFF CACHE BOOL "" FORCE)
add_subdirectory(${OPENSPACE_EXT_DIR}/sgct)
target_include_directories(libOpenSpace SYSTEM PUBLIC ${OPENSPACE_EXT_DIR}/sgct/include)
target_link_libraries(
libOpenSpace
sgct_light glew glfw png16_static quat tinyxml2static turbojpeg-static
vrpn
${GLFW_LIBRARIES}
)
set_property(TARGET sgct_light PROPERTY FOLDER "External")
if (TARGET glew)
set_property(TARGET glew PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET glfw)
set_property(TARGET glfw PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET png16_static)
set_property(TARGET png16_static PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET quat)
set_property(TARGET quat PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET simd)
set_property(TARGET simd PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET tinyxml2static)
set_property(TARGET tinyxml2static PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET turbojpeg-static)
set_property(TARGET turbojpeg-static PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET vrpn)
set_property(TARGET vrpn PROPERTY FOLDER "External/SGCT")
endif ()
if (TARGET zlibstatic)
set_property(TARGET zlibstatic PROPERTY FOLDER "External/SGCT")
endif ()
if (UNIX AND (NOT APPLE))
target_link_libraries(libOpenSpace Xcursor Xinerama X11)
endif ()
# Spice
add_subdirectory(${OPENSPACE_EXT_DIR}/spice)
target_link_libraries(libOpenSpace Spice)
set_property(TARGET Spice PROPERTY FOLDER "External")
# Curl
if (WIN32)
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl")
target_include_directories(libOpenSpace SYSTEM PUBLIC ${CURL_ROOT_DIR}/include)
target_link_libraries(libOpenSpace ${CURL_ROOT_DIR}/lib/libcurl_imp.lib)
target_compile_definitions(libOpenSpace PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB")
else ()
find_package(CURL)
if (CURL_FOUND)
target_include_directories(libOpenSpace SYSTEM PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(libOpenSpace ${CURL_LIBRARIES})
target_compile_definitions(libOpenSpace PUBLIC "OPENSPACE_CURL_ENABLED")
endif ()
endif()
# Qt
# Unfortunately, we have to set this value manually; sigh
# In the future, if the Qt version is updated, just add to this variable ---abock
if (APPLE)
set(CMAKE_PREFIX_PATH
"~/Qt/5.6/clang_64/lib/cmake"
"~/Qt/5.7/clang_64/lib/cmake"
"~/Qt/5.8/clang_64/lib/cmake"
PARENT_SCOPE
)
endif ()
if (MSVC)
option(OPENSPACE_ENABLE_VLD "Enable the Visual Leak Detector" OFF)
handle_option_vld()
if (OPENSPACE_ENABLE_VLD)
target_compile_definitions(libOpenSpace PUBLIC "OPENSPACE_ENABLE_VLD")
target_link_libraries(libOpenSpace ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib)
target_include_directories(libOpenSpace PUBLIC ${OPENSPACE_EXT_DIR}/vld)
endif ()
endif ()
##########################################################################################
# Tests #
##########################################################################################
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
handle_option_tests()
if (OPENSPACE_HAVE_TESTS)
if (NOT TARGET gtest)
set(BUILD_GTEST ON CACHE BOOL "")
set(BUILD_GMOCK OFF CACHE BOOL "")
set(gtest_force_shared_crt ON CACHE BOOL "")
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul/ext/googletest)
set_property(TARGET gtest PROPERTY FOLDER "External")
set_property(TARGET gtest_main PROPERTY FOLDER "External")
endif ()
handle_internal_modules()
copy_dynamic_libraries()
file(GLOB_RECURSE OPENSPACE_TEST_FILES ${OPENSPACE_BASE_DIR}/tests/*.inl)
add_executable(OpenSpaceTest ${OPENSPACE_BASE_DIR}/tests/main.cpp ${OPENSPACE_TEST_FILES})
target_include_directories(OpenSpaceTest PUBLIC
"${OPENSPACE_BASE_DIR}/include"
"${OPENSPACE_BASE_DIR}/tests"
"${OPENSPACE_EXT_DIR}/ghoul/ext/googletest/googletest/include"
)
target_compile_definitions(OpenSpaceTest PUBLIC
"GHL_THROW_ON_ASSERT"
"GTEST_HAS_TR1_TUPLE=0"
)
target_link_libraries(OpenSpaceTest gtest libOpenSpace)
if (MSVC)
set_target_properties(OpenSpaceTest PROPERTIES LINK_FLAGS
"/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib"
)
endif ()
set_openspace_compile_settings(OpenSpaceTest)
endif (OPENSPACE_HAVE_TESTS)
if (TARGET GhoulTest)
if (NOT TARGET gtest)
set(BUILD_GTEST ON CACHE BOOL "")
set(BUILD_GMOCK OFF CACHE BOOL "")
set(gtest_force_shared_crt ON CACHE BOOL "")
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul/ext/googletest)
endif ()
set_property(TARGET gtest PROPERTY FOLDER "External")
set_property(TARGET GhoulTest PROPERTY FOLDER "Unit Tests")
endif ()
set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules")
handle_modules("${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_EXTERNAL_MODULES_PATHS}")
handle_applications()
##########################################################################################
# Misc settings #
##########################################################################################
# Just in case, create the bin directory
add_custom_command(
TARGET libOpenSpace
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
)
# Manage the CPack packaging
include(${OPENSPACE_CMAKE_EXT_DIR}/packaging.cmake)

31
Jenkinsfile vendored
View File

@@ -26,7 +26,9 @@ echo flags
stage('Build') {
parallel linux: {
node('linux') {
timeout(time: 30, unit: 'MINUTES') {
timeout(time: 45, unit: 'MINUTES') {
deleteDir()
checkout scm
sh 'git submodule update --init --recursive'
sh '''
@@ -41,22 +43,27 @@ stage('Build') {
},
windows: {
node('windows') {
timeout(time: 30, unit: 'MINUTES') {
checkout scm
bat '''
git submodule update --init --recursive
if not exist "build" mkdir "build"
cd build
cmake -G "Visual Studio 15 2017 Win64" .. ''' +
flags + ''' ..
msbuild.exe OpenSpace.sln /nologo /verbosity:minimal /m:2 /p:Configuration=Debug
'''
timeout(time: 45, unit: 'MINUTES') {
// We specify the workspace directory manually to reduce the path length and thus try to avoid MSB3491 on Visual Studio
ws("C:/J/O/${env.BRANCH_NAME}") {
deleteDir()
checkout scm
bat '''
git submodule update --init --recursive
if not exist "build" mkdir "build"
cd build
cmake -G "Visual Studio 15 2017 Win64" .. ''' +
flags + ''' ..
msbuild.exe OpenSpace.sln /nologo /verbosity:minimal /m:2 /p:Configuration=Debug
'''
}
}
}
},
osx: {
node('osx') {
timeout(time: 30, unit: 'MINUTES') {
timeout(time: 45, unit: 'MINUTES') {
deleteDir()
checkout scm
sh 'git submodule update --init --recursive'
sh '''

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2015 #
# 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 #
@@ -22,64 +22,56 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
#########################################################################################
set(APPLICATION_NAME Launcher)
set(APPLICATION_LINK_TO_OPENSPACE ON)
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/Launcher/openspace.rc)
endif ()
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/support_macros.cmake)
set(application_path ${OPENSPACE_APPS_DIR}/Launcher)
set(SOURCE_FILES
${application_path}/main.cpp
${application_path}/infowidget.cpp
${application_path}/mainwindow.cpp
${application_path}/shortcutwidget.cpp
${application_path}/syncwidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/infowidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp
${CMAKE_CURRENT_SOURCE_DIR}/shortcutwidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/syncwidget.cpp
)
set(HEADER_FILES
${application_path}/infowidget.h
${application_path}/mainwindow.h
${application_path}/shortcutwidget.h
${application_path}/syncwidget.h
)
${CMAKE_CURRENT_SOURCE_DIR}/infowidget.h
${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.h
${CMAKE_CURRENT_SOURCE_DIR}/shortcutwidget.h
${CMAKE_CURRENT_SOURCE_DIR}/syncwidget.h
)
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets Network REQUIRED)
set(MOC_FILES "")
qt5_wrap_cpp(MOC_FILES ${HEADER_FILES})
set(RESOURCE_FILES "")
qt5_add_resources(RESOURCE_FILES ${application_path}/files.qrc)
qt5_add_resources(RESOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/files.qrc)
add_executable(${APPLICATION_NAME} MACOSX_BUNDLE
create_new_application(
Launcher
MACOSX_BUNDLE
${SOURCE_FILES}
${HEADER_FILES}
${OPENSPACE_APPS_DIR}/Launcher/openspace.rc
${MOC_FILES}
${RESOURCE_FILE}
${RESOURCE_FILES}
)
set_compile_settings(${APPLICATION_NAME})
target_link_libraries(${APPLICATION_NAME}
target_link_libraries(
Launcher
libOpenSpace
Qt5::Widgets
Qt5::Network
)
#if (APPLE)
# INSTALL(CODE "
# include(BundleUtilities)
# fixup_bundle(\"${application_path}/bin/openspace/Debug/Launcher.app/Contents/MacOS/Launcher\" \"${application_path}/bin/openspace/Debug/TimelineView.app/Contents/plugins/platforms/libqcocoa.dylib\" \"\")
# " COMPONENT Runtime)
#endif ()
#####
# Libtorrent
include_external_library(${APPLICATION_NAME} libtorrent ${application_path}/ext/libtorrent)
target_include_directories(${APPLICATION_NAME} SYSTEM PUBLIC ${application_path}/ext/libtorrent/include)
#####
include_external_library(
Launcher
libtorrent
${CMAKE_CURRENT_SOURCE_DIR}/ext/libtorrent
)
target_include_directories(
Launcher
SYSTEM PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/ext/libtorrent/include
)

View File

@@ -0,0 +1 @@
set(DEFAULT_APPLICATION ON)

View File

@@ -22,20 +22,14 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${GHOUL_BASE_DIR}/support/cmake/CopySharedLibraries.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/support_macros.cmake)
set(APPLICATION_NAME OpenSpace)
set(APPLICATION_LINK_TO_OPENSPACE ON)
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
########################
# OpenVR section start #
########################
#####
# OpenVR
#####
option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support" OFF)
if (OPENSPACE_OPENVR_SUPPORT)
@@ -45,91 +39,79 @@ if (OPENSPACE_OPENVR_SUPPORT)
set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT)
if(NOT SGCT_OPENVR_INCLUDE_DIRECTORY)
if( WIN32 )
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()
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()
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)
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 #
########################
#####
# Spout
#####
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_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/ext/spout)
set(SPOUT_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/ext/spout/SpoutLibrary.lib)
set(SPOUT_DEFINITIONS "OPENSPACE_HAS_SPOUT")
set(SGCT_SPOUT_SUPPORT ON CACHE BOOL "" FORCE)
endif ()
########################
# Spout section end #
########################
add_executable(${APPLICATION_NAME}
${SGCT_OPENVR_FILES}
${OPENSPACE_APPS_DIR}/OpenSpace/main.cpp
${RESOURCE_FILE}
)
if (OPENSPACE_SPOUT_SUPPORT)
ghl_copy_files(
${APPLICATION_NAME}
${OPENSPACE_APPS_DIR}/OpenSpace/ext/spout/SpoutLibrary.dll
)
add_external_library_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/ext/spout/SpoutLibrary.dll)
endif ()
create_new_application(OpenSpace
${SGCT_OPENVR_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
)
target_include_directories(
${APPLICATION_NAME} PUBLIC
${OPENSPACE_BASE_DIR}/include
OpenSpace PRIVATE
${OPENVR_INCLUDE_DIRS}
${SGCT_OPENVR_INCLUDE_DIRECTORY}
${SPOUT_INCLUDE_DIRS}
)
target_link_libraries(${APPLICATION_NAME}
target_link_libraries(OpenSpace
libOpenSpace
${OPENVR_LIBRARY}
${SPOUT_LIBRARY}
)
target_compile_definitions(${APPLICATION_NAME} PUBLIC
target_compile_definitions(OpenSpace PRIVATE
${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"
)
# This library is used for being able to output the callstack if an exception escapes
target_link_libraries(OpenSpace Dbghelp.lib)
endif()
set_compile_settings(${APPLICATION_NAME})

View File

@@ -0,0 +1 @@
set(DEFAULT_APPLICATION ON)

View File

@@ -1,41 +1,36 @@
#########################################################################################
# #
# 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-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. #
##########################################################################################
set(APPLICATION_NAME TaskRunner)
set(APPLICATION_LINK_TO_OPENSPACE ON)
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
include (${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
include(${OPENSPACE_CMAKE_EXT_DIR}/support_macros.cmake)
set(application_path ${OPENSPACE_APPS_DIR}/TaskRunner)
set(SOURCE_FILES
${application_path}/main.cpp
create_new_application(
TaskRunner
MACOSX_BUNDLE
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
)
add_executable(${APPLICATION_NAME} MACOSX_BUNDLE
${SOURCE_FILES}
target_link_libraries(
TaskRunner
libOpenSpace
)
set_compile_settings(${APPLICATION_NAME})

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2015 #
# 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 #
@@ -22,6 +22,8 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
#########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
set(APPLICATION_NAME TimelineView)
set(APPLICATION_LINK_TO_OPENSPACE OFF)
@@ -48,7 +50,7 @@ find_package(Qt5Network)
set(MOC_FILES "")
qt5_wrap_cpp(MOC_FILES ${HEADER_FILES})
add_executable(${APPLICATION_NAME} MACOSX_BUNDLE ${SOURCE_FILES} ${HEADER_FILES} ${MOC_FILES})
create_new_application(${APPLICATION_NAME} MACOSX_BUNDLE ${SOURCE_FILES} ${HEADER_FILES} ${MOC_FILES})
target_link_libraries(${APPLICATION_NAME}
Qt5::Widgets

View File

@@ -0,0 +1,55 @@
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
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()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("Sun.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", true)
openspace.setPropertyValue("EarthMarker.renderable.enabled", true)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
openspace.printInfo("Done setting default values")
if openspace.modules.isLoaded("ISWA") then
openspace.iswa.addCdfFiles("${OPENSPACE_DATA}/cdflist.json");
end
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {1, 0, 0},
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
},
Modules = {
"sun",
"earth",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
}
}

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,3 +1,8 @@
local zodiacs = {
"Cancer", "Taurus", "Pisces", "Aries", "Libra", "Aquarius", "Capricornus", "Scorpius",
"Virgo", "Sagittarius", "Gemini", "Leo"
}
return {
-- Stars module
{
@@ -6,7 +11,8 @@ return {
Renderable = {
Type = "RenderableConstellationBounds",
File = "${OPENSPACE_DATA}/scene/constellationbounds/data/bound_20.dat",
ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat"
ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat",
-- ConstellationSelection = zodiacs
},
Transform = {
Rotation = {

View File

@@ -51,8 +51,10 @@ return {
"uranus",
"neptune",
"pluto",
"stars",
"milkyway",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
"missions/dawn"
}
}

View File

@@ -1,3 +1,8 @@
-- Add folders to this list that contain .info files describing HiRISE patches
local mars_folders = {
-- Add a folder here whose contents will be automatically added to the Mars globe
}
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
@@ -11,35 +16,76 @@ function preInitialization()
openspace.time.setTime(openspace.time.currentWallTime())
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
-- Toggle night texture, shading, atmosphere and water
openspace.bindKey("s",
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled'),
"Toggle night texture, shading, atmosphere, and water for Earth."
)
-- Toggle background
openspace.bindKey("b",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled'),
"Toggle background (Stars and Milkyway)."
)
openspace.bindKey("g",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Mars.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled') ..
helper.property.invert('Moon.RenderableGlobe.Enabled') ..
helper.property.invert('Sun.renderable.Enabled'),
"Toogles background and shading mode on the Earth and Mars alongside visibility of the Moon and the Sun"
)
openspace.bindKey("h",
"openspace.setPropertyValue('*Trail.renderable.Enabled', false)",
"Disables visibility of the trails"
)
end
function postInitialization()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.Enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.renderable.enabled",
"*Trail.renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.resetCameraDirection()
openspace.printInfo("Setting default values")
openspace.setPropertyValue("SunGlare.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Debug.LevelByProjectedAreaElseDistance", false)
openspace.setPropertyValue("Ecliptic Grid.renderable.Enabled", false)
openspace.setPropertyValue("Equatorial Grid.renderable.Enabled", false)
openspace.setPropertyValue("Galactic Grid.renderable.Enabled", false)
openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
openspace.printInfo("Done setting default values")
-- Add the HiRISE patches described at the top of this file
for _, file in pairs(mars_folders) do
openspace.globebrowsing.addBlendingLayersFromDirectory(file, "Mars")
end
end
@@ -48,23 +94,27 @@ return {
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {505370268486.696167, 1089706179272.719116, -890259148524.319458},
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
Position = {0, 0, 0},
Rotation = {0.758797, 0.221490, -0.605693, -0.091135},
},
Modules = {
"sun",
"mercury",
"venus",
"earth",
"moon",
"mars",
"jupiter",
"saturn",
"uranus",
"neptune",
"stars",
-- "stars-denver",
"milkyway",
--"milkyway-eso",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
-- "satellites"
"constellationbounds",
"grids"
}
}

View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

View File

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 565 B

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

View File

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

View File

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 799 B

View File

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 772 B

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "earth_textures", Destination = "textures", Version = 2 }
},
}

View File

@@ -1,3 +1,6 @@
--earthEllipsoid = {6378137.0, 6378137.0, 6356752.314245} -- Earth's radii
earthEllipsoid = {6378137.0, 6378137.0, 6378137.0} -- Earth's radii
return {
-- Earth barycenter module
{
@@ -6,7 +9,7 @@ return {
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "EARTH",
Target = "EARTH",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
}
@@ -20,43 +23,9 @@ return {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "J2000",
DestinationFrame = "GALACTIC",
DestinationFrame = "GALACTIC"
}
},
},
-- Earth module
{
Name = "Earth",
Parent = "EarthBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_EARTH",
Body = "EARTH",
Geometry = {
Type = "SimpleSphere",
Radius = 6.3781365E6,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/earth_bluemarble.jpg",
Night = "textures/earth_night.jpg",
Height = "textures/earth_bluemarble_height.jpg"
},
},
Tag = {"planet_solarSystem", "planet_terrestrial"},
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC",
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
},
GuiName = "/Solar/Planets/Earth"
}
},
-- Earth Atmosphere
{
@@ -65,66 +34,85 @@ return {
Renderable = {
Type = "RenderableAtmosphere",
Atmosphere = {
Type = "RenderablePlanet",
Type = "RenderableGlobe",
-- Atmosphere radius in Km
AtmosphereRadius = 6447.0,
PlanetRadius = 6356.752,
PlanetRadius = 6377.0,
PlanetAverageGroundReflectance = 0.1,
Rayleigh = {
Coefficients = {
-- Wavelengths are given in 10^-9m
Wavelengths = {680, 550, 440},
-- Reflection coefficients are given in km^-1
Scattering = {5.8E-3, 13.5E-3, 33.1E-3},
-- In Rayleigh scattering, the coefficients of absorption and scattering are the same.
},
-- Thichkness of atmosphere if its density were uniform, in Km
H_R = 8.0,
Coefficients = {
-- Wavelengths are given in 10^-9m
Wavelengths = {680, 550, 440},
-- Reflection coefficients are given in km^-1
Scattering = {5.8E-3, 13.5E-3, 33.1E-3},
-- In Rayleigh scattering, the coefficients of absorption and scattering are the same.
},
-- Thichkness of atmosphere if its density were uniform, in Km
H_R = 8.0,
},
--[[
Ozone = {
Coefficients = {
-- Extinction coefficients
Extinction = {3.426E-5, 8.298E-5, 0.356E-5}
},
H_O = 8.0,
},
]]--
-- Default
Mie = {
Ozone = {
Coefficients = {
-- Reflection coefficients are given in km^-1
Scattering = {4.0e-3, 4.0e-3, 4.0e-3},
-- Extinction coefficients are a fraction of the Mie coefficients
Extinction = {4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9}
-- Extinction coefficients
Extinction = {3.426, 8.298, 0.356}
},
-- Height scale (atmosphere thickness for constant density) in Km
H_M = 1.2,
-- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function)
G = 0.85
},
Image = {
ToneMapping = jToneMapping,
Exposure = 0.4,
Gamma = 1.85,
},
Debug = {
-- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....)
PreCalculatedTextureScale = 1.0,
SaveCalculatedTextures = false,
},
H_O = 8.0,
},
]]
-- Default
Mie = {
Coefficients = {
-- Reflection coefficients are given in km^-1
Scattering = {4.0e-3, 4.0e-3, 4.0e-3},
-- Extinction coefficients are a fraction of the Mie coefficients
Extinction = {4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9}
},
-- Height scale (atmosphere thickness for constant density) in Km
H_M = 1.2,
-- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function)
G = 0.85
},
-- Clear Sky
-- Mie = {
-- Coefficients = {
-- Scattering = {20e-3, 20e-3, 20e-3},
-- Extinction = 1.0/0.9,
-- }
-- H_M = 1.2,
-- G = 0.76,
-- },
-- Cloudy
-- Mie = {
-- Coefficients = {
-- Scattering = {3e-3, 3e-3, 3e-3},
-- Extinction = 1.0/0.9,
-- }
-- H_M = 3.0,
-- G = 0.65,
-- },
Image = {
ToneMapping = jToneMapping,
Exposure = 0.4,
Background = 1.8,
Gamma = 1.85,
},
Debug = {
-- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....)
PreCalculatedTextureScale = 1.0,
SaveCalculatedTextures = false,
},
},
},
},
},
-- EarthTrail module
{
{
Name = "EarthTrail",
Parent = "SolarSystemBarycenter",
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "EARTH",
Target = "EARTH",
Observer = "SUN"
},
Color = { 0.5, 0.8, 1.0 },
@@ -132,27 +120,177 @@ return {
-- EndTime = "2017 JAN 01 12:00:00.000",
-- SampleInterval = 3600
Period = 365.242,
Resolution = 1000,
Tag = {"planetTrail_solarSystem", "planetTrail_terrestrial"}
Resolution = 1000
},
GuiName = "/Solar/EarthTrail",
Tag = { "planetTrail_solarSystem", "planetTrail_terrestrial" },
GuiName = "/Solar/EarthTrail"
},
--[[
-- RenderableGlobe module
{
Name = "EarthMarker",
Parent = "Earth",
Renderable = {
Type = "RenderablePlane",
Size = 3.0E11,
Origin = "Center",
Billboard = true,
Texture = "textures/marker.png",
BlendMode = "Additive"
Name = "Earth",
Parent = "EarthBarycenter",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC",
}
},
Ephemeris = {
Type = "Static",
Position = {0, 0, 0, 5}
Tag = { "planet_solarSystem", "planet_terrestrial" },
Renderable = {
Type = "RenderableGlobe",
Radii = earthEllipsoid,
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "ESRI VIIRS Combo",
Type = "ByLevelTileLayer",
LevelTileProviders = {
{
MaxLevel = 3,
TileProvider = {
Name = "Temporal VIIRS SNPP",
Type = "TemporalTileLayer",
FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml",
PadTiles = false,
}
},
{
MaxLevel = 22,
TileProvider = {
Name = "ESRI Imagery World 2D",
FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms",
PadTiles = false,
}
},
},
Enabled = true,
PadTiles = false,
Fallback = {
Name = "Blue Marble",
FilePath = "textures/earth_bluemarble.jpg",
Enabled = true,
}
},
{
Name = "ESRI Imagery World 2D",
FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms",
},
{
Name = "Temporal VIIRS SNPP",
Type = "TemporalTileLayer",
FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml",
},
{
Name = "BMNG",
FilePath = "map_service_configs/Utah/Bmng.wms"
},
{
Name = "Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration",
Type = "TemporalTileLayer",
FilePath = "map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml",
},
{
Name = "MODIS_Terra_Chlorophyll_A",
Type = "TemporalTileLayer",
FilePath = openspace.globebrowsing.createTemporalGibsGdalXml(
"MODIS_Terra_Chlorophyll_A",
"2013-07-02",
"Yesterday",
"1d",
"1km",
"png"
)
},
{
Name = "GHRSST_L4_G1SST_Sea_Surface_Temperature",
Type = "TemporalTileLayer",
FilePath = openspace.globebrowsing.createTemporalGibsGdalXml(
"GHRSST_L4_G1SST_Sea_Surface_Temperature",
"2010-06-21",
"Yesterday",
"1d",
"1km",
"png"
)
},
},
NightLayers = {
{
Name = "Earth at Night 2012",
FilePath = "map_service_configs/GIBS/VIIRS_CityLights_2012.xml",
Enabled = true,
Settings = {
Opacity = 1.0,
Gamma = 1.5,
Multiplier = 15.0,
},
Fallback = {
Name = "Earth Night",
FilePath = "textures/earth_night.jpg",
Enabled = true,
Settings = {
Opacity = 1.0,
Gamma = 1.5,
Multiplier = 15.0,
},
}
},
{
Name = "Temporal Earth at Night",
Type = "TemporalTileLayer",
FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_DayNightBand_ENCC.xml"
}
},
WaterMasks = {
{
Name = "MODIS_Water_Mask",
FilePath = "map_service_configs/GIBS/MODIS_Water_Mask.xml",
Enabled = true,
},
{
Name = "GEBCO",
FilePath = "map_service_configs/Utah/Gebco.wms",
}
},
Overlays = {
{
Name = "Coastlines",
FilePath = "map_service_configs/GIBS/Coastlines.xml",
},
{
Name = "Reference_Features",
FilePath = "map_service_configs/GIBS/Reference_Features.xml",
},
{
Name = "Reference_Labels",
FilePath = "map_service_configs/GIBS/Reference_Labels.xml",
},
{
Name = "Tile Indices",
Type = "TileIndexTileLayer",
},
{
Name = "Size Reference",
Type = "SizeReferenceTileLayer",
Radii = earthEllipsoid,
},
},
HeightLayers = {
{
Name = "Terrain tileset",
FilePath = "map_service_configs/ESRI/TERRAIN.wms",
Enabled = true,
TilePixelSize = 64,
Fallback = {
Name = "Earth Bluemarble Height",
FilePath = "textures/earth_bluemarble_height.jpg",
Enabled = true,
}
}
}
}
}
}
]]
}

View File

@@ -49,11 +49,11 @@ return {
"saturn",
"uranus",
"neptune",
"stars",
"fieldlines",
-- "stars-denver",
"milkyway",
-- "milkyway-eso",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
"constellationbounds",
}
}

View File

@@ -1,93 +0,0 @@
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
-- For unit test
--openspace.time.setTime("2016 SEP 8 23:00:00.500")
--openspace.time.togglePause()
openspace.time.setTime(openspace.time.currentWallTime())
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
-- Toggle night texture, shading, atmosphere and water
openspace.bindKey("s",
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled'),
"Toggle night texture, shading, atmosphere, and water for Earth."
)
-- Toggle background
openspace.bindKey("b",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled'),
"Toggle background (Stars and Milkyway)."
)
openspace.bindKey("g",
"openspace.setInteractionMode('GlobeBrowsing')" ..
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Mars.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled') ..
helper.property.invert('Moon.RenderableGlobe.Enabled') ..
helper.property.invert('Sun.renderable.Enabled'),
"Toogles background and shading mode on the Earth and Mars alongside visibility of the Moon and the Sun"
)
openspace.bindKey("h",
"openspace.setPropertyValue('*Trail.renderable.Enabled', false)",
"Disables visibility of the trails"
)
end
function postInitialization()
openspace.printInfo("Setting default values")
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
openspace.setPropertyValue("Sun.renderable.Enabled", true)
openspace.setPropertyValue("SunGlare.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true)
openspace.setPropertyValue("Earth.RenderableGlobe.Debug.LevelByProjectedAreaElseDistance", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Layers.ColorLayers.BlendTileLevels", true)
openspace.globebrowsing.goToGeo(0, 0, 20000000)
openspace.printInfo("Done setting default values")
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {0, 0, 0},
Rotation = {0.758797, 0.221490, -0.605693, -0.091135},
},
Modules = {
"lodglobes",
"sun",
"stars",
"milkyway",
-- "satellites"
}
}

View File

@@ -1,17 +0,0 @@
return {
-- SphericalGrid module
{
Name = "SphericalGrid",
Parent = "Root",
Renderable = {
Type = "RenderableSphericalGrid",
GridType = "ECLIPJ2000",
GridColor = { 0.4, 0.0, 0.0, 1},
GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
-0.09647644, 0.8622859, 0.4971472 , 0.0,
0.0 , 0.0 , 0.0 , 1.0 },
GridSegments = 36,
}
}
}

View File

@@ -1,17 +0,0 @@
return {
-- SphericalGrid module
{
Name = "SphericalGrid",
Parent = "Root",
Renderable = {
Type = "RenderableSphericalGrid",
GridType = "ICRF",
GridColor = { 0.0, 0.0, 0.4, 1},
GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0,
-0.8734371 , -0.4448296, -0.1980764, 0.0,
-0.483835 , 0.7469823, 0.4559838, 0.0,
0.0 , 0.0 , 0.0 , 1.0 },
GridSegments = 36,
}
}
}

View File

@@ -1,17 +0,0 @@
return {
-- gridGalactic module
{
Name = "gridGalactic",
Parent = "SolarSystem",
Renderable = {
Type = "RenderableSphericalGrid",
GridType = "GALACTIC",
GridColor = { 0.0, 0.4, 0.4, 1},
GridMatrix = { 1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0 },
GridSegments = 36,
}
}
}

View File

@@ -0,0 +1,38 @@
return {
-- SphericalGrid module
{
Name = "Ecliptic Grid",
Parent = "Root",
Renderable = {
Type = "RenderableSphericalGrid",
GridColor = { 0.75, 0.0, 0.0, 1.0},
LineWidth = 0.75,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0,
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
-0.09647644, 0.8622859, 0.4971472 , 0.0,
0.0 , 0.0 , 0.0 , 1.0 }
}
},
{
Name = "Equatorial Grid",
Parent = "Root",
Renderable = {
Type = "RenderableSphericalGrid",
GridColor = { 0.0, 0.0, 0.75, 1.0},
LineWidth = 0.75,
GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0,
-0.8734371 , -0.4448296, -0.1980764, 0.0,
-0.483835 , 0.7469823, 0.4559838, 0.0,
0.0 , 0.0 , 0.0 , 1.0 }
}
},
{
Name = "Galactic Grid",
Parent = "SolarSystem",
Renderable = {
Type = "RenderableSphericalGrid",
LineWidth = 0.75,
GridColor = { 0.0, 0.75, 0.75, 1.0}
}
}
}

View File

@@ -55,8 +55,10 @@ return {
"saturn/saturn",
"uranus",
"neptune",
"stars",
"milkyway",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
"missions/juno"
}
}

View File

@@ -1,46 +1,38 @@
return {
-- Callisto module
{
-- RenderableGlobe module
{
Name = "Callisto",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_CALLISTO", -- should exist.
Body = "CALLISTO",
Geometry = {
Type = "SimpleSphere",
Radius = 2.631E6,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/callisto.jpg",
},
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
MieFactor = 1.0,
MieColor = {1.0, 1.0, 1.0}
}
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_CALLISTO",
DestinationFrame = "IAU_JUPITER",
},
Scale = {
Type = "StaticScale",
Scale = 1,
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Target = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = 2410000,
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Callisto Texture",
FilePath = "textures/callisto.jpg",
Enabled = true
}
}
}
}
},
-- CallistoTrail module
-- Trail module
{
Name = "CallistoTrail",
Parent = "JupiterBarycenter",
@@ -48,11 +40,11 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Target = "CALLISTO",
Observer = "JUPITER BARYCENTER"
},
Color = { 0.4, 0.3, 0.01 },
Period = 17,
Period = 17,
Resolution = 1000
}
}

View File

@@ -1,42 +1,38 @@
return {
-- Europa module
{
-- RenderableGlobe module
{
Name = "Europa",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_EUROPA", -- should exist.
Body = "EUROPA",
Geometry = {
Type = "SimpleSphere",
Radius = 1.561E6,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/europa.jpg",
},
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
MieFactor = 1.0,
MieColor = {1.0, 1.0, 1.0}
}
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "EUROPA",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EUROPA",
DestinationFrame = "IAU_JUPITER",
}
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Target = "EUROPA",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = 1560800,
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Europa Texture",
FilePath = "textures/europa.jpg",
Enabled = true,
},
},
},
}
},
-- EuropaTrail module
-- Trail module
{
Name = "EuropaTrail",
Parent = "JupiterBarycenter",
@@ -44,7 +40,7 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "EUROPA",
Target = "EUROPA",
Observer = "JUPITER BARYCENTER",
},
Color = { 0.5, 0.3, 0.3 },

View File

@@ -1,46 +1,37 @@
return {
-- Ganymede module
{
-- RenderableGlobe module
{
Name = "Ganymede",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_GANYMEDE", -- should exist.
Body = "JUPITER BARYCENTER",
Geometry = {
Type = "SimpleSphere",
Radius = 2.631E6,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/ganymede.jpg",
},
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
MieFactor = 1.0,
MieColor = {1.0, 1.0, 1.0}
}
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_GANYMEDE",
DestinationFrame = "IAU_JUPITER",
},
Scale = {
Type = "StaticScale",
Scale = 1,
DestinationFrame = "GALACTIC"
},
Translation = {
Type = "SpiceTranslation",
Target = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = 2631000,
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Ganymede Texture",
FilePath = "textures/ganymede.jpg",
Enabled = true
}
}
}
}
},
-- GanymedeTrail module
-- Trail module
{
Name = "GanymedeTrail",
Parent = "JupiterBarycenter",
@@ -48,8 +39,8 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Target = "GANYMEDE",
Observer = "JUPITER BARYCENTER"
},
Color = { 0.4, 0.3, 0.3 },
Period = 172 / 24,

View File

@@ -1,46 +1,37 @@
return {
-- Io module
{
-- RenderableGlobe module
{
Name = "Io",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_IO", -- should exist.
Body = "IO",
Geometry = {
Type = "SimpleSphere",
Radius = 1.8213E6,
Segments = 100
},
Textures = {
Type = "simple",
Color = "textures/io.jpg",
},
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
MieFactor = 1.0,
MieColor = {1.0, 1.0, 1.0}
}
},
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_IO",
DestinationFrame = "IAU_JUPITER",
DestinationFrame = "GALACTIC"
},
Scale = {
Type = "StaticScale",
Scale = 1,
Translation = {
Type = "SpiceTranslation",
Target = "IO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = 1821600,
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Io Texture",
FilePath = "textures/io.jpg",
Enabled = true
}
}
}
}
},
-- IoTrail module
-- Trail module
{
Name = "IoTrail",
Parent = "JupiterBarycenter",
@@ -48,8 +39,8 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
Target = "IO",
Observer = "JUPITER BARYCENTER"
},
Color = { 0.4, 0.4, 0.2 },
Period = 42 / 24,

View File

@@ -1,58 +1,45 @@
return {
-- Jupiter barycenter module
-- Barycenter module
{
Name = "JupiterBarycenter",
Parent = "SolarSystemBarycenter",
Transform = {
Translation = {
Type = "SpiceTranslation",
Body = "JUPITER BARYCENTER",
Target = "JUPITER BARYCENTER",
Observer = "SUN",
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
},
},
}
}
},
-- Jupiter module
{
-- RenderableGlobe module
{
Name = "Jupiter",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderablePlanet",
Frame = "IAU_JUPITER",
Body = "JUPITER BARYCENTER",
Geometry = {
Type = "SimpleSphere",
Radius = 0.71492E8,
Segments = 200
},
Textures = {
Type = "simple",
Color = "textures/jupiter.jpg",
},
Atmosphere = {
Type = "Nishita", -- for example, values missing etc etc
MieFactor = 1.0,
MieColor = {1.0, 1.0, 1.0}
}
},
Tag = "planet_solarSystem",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = {0, 0, 0}, -- jupiter is at its barycenter
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_JUPITER",
DestinationFrame = "ECLIPJ2000",
DestinationFrame = "GALACTIC"
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 71492000, 71492000, 66854000 },
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Jupiter Texture",
FilePath = "textures/jupiter.jpg",
Enabled = true
}
}
}
},
Tag = { "planet_solarSystem", "planet_giants" },
},
-- JupiterTrail module
-- Trail module
{
Name = "JupiterTrail",
Parent = "SolarSystemBarycenter",
@@ -60,13 +47,13 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "JUPITER BARYCENTER",
Observer = "SUN",
Target = "JUPITER BARYCENTER",
Observer = "SUN"
},
Color = { 0.8, 0.7, 0.7 },
Period = 4330.595,
Resolution = 1000,
Resolution = 1000
},
Tag = "planetTrail_solarSystem"
Tag = { "planetTrail_solarSystem", "planetTrail_giants" }
}
}
}

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "earth_textures", Destination = "textures", Version = 2 }
},
}

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "callisto_textures", Destination = "textures", Version = 1 }
},
}

View File

@@ -1,54 +0,0 @@
return {
-- RenderableGlobe module
{
Name = "Callisto",
Parent = "JupiterBarycenter",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_CALLISTO",
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = {2631000, 2631000, 2631000},
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Callisto Texture",
FilePath = "textures/callisto.jpg",
Enabled = true,
},
},
},
}
},
-- Trail module
{
Name = "CallistoTrail",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "CALLISTO",
Observer = "JUPITER BARYCENTER",
},
Color = { 0.4, 0.3, 0.01 },
Period = 17,
Resolution = 1000
}
}
}

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "europa_textures", Destination = "textures", Version = 1 }
},
}

View File

@@ -1,55 +0,0 @@
return {
-- RenderableGlobe module
{
Name = "Europa",
Parent = "JupiterBarycenter",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EUROPA",
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Body = "EUROPA",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = {1561000, 1561000, 1561000},
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Europa Texture",
FilePath = "textures/europa.jpg",
Enabled = true,
},
},
},
}
},
-- Trail module
{
Name = "EuropaTrail",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "EUROPA",
Observer = "JUPITER BARYCENTER",
},
Color = { 0.5, 0.3, 0.3 },
Period = 85 / 24,
Resolution = 1000
}
}
}

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "ganymede_textures", Destination = "textures", Version = 1 }
},
}

View File

@@ -1,54 +0,0 @@
return {
-- RenderableGlobe module
{
Name = "Ganymede",
Parent = "JupiterBarycenter",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_GANYMEDE",
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = {2631000, 2631000, 2631000},
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Ganymede Texture",
FilePath = "textures/ganymede.jpg",
Enabled = true,
},
},
},
}
},
-- Trail module
{
Name = "GanymedeTrail",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "GANYMEDE",
Observer = "JUPITER BARYCENTER",
},
Color = { 0.4, 0.3, 0.3 },
Period = 172 / 24,
Resolution = 1000
}
}
}

View File

@@ -1,5 +0,0 @@
return {
FileRequest = {
{ Identifier = "io_textures", Destination = "textures", Version = 1 }
},
}

View File

@@ -1,54 +0,0 @@
return {
-- RenderableGlobe module
{
Name = "Io",
Parent = "JupiterBarycenter",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_IO",
DestinationFrame = "GALACTIC",
},
Translation = {
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
Kernels = "${OPENSPACE_DATA}/spice/jup260.bsp"
},
Scale = {
Type = "StaticScale",
Scale = 1,
},
},
Renderable = {
Type = "RenderableGlobe",
Radii = {1821300, 1821300, 1821300},
SegmentsPerPatch = 64,
Layers = {
ColorLayers = {
{
Name = "Io Texture",
FilePath = "textures/io.jpg",
Enabled = true,
},
},
},
}
},
-- Trail module
{
Name = "IoTrail",
Parent = "JupiterBarycenter",
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "IO",
Observer = "JUPITER BARYCENTER",
},
Color = { 0.4, 0.4, 0.2 },
Period = 42 / 24,
Resolution = 1000
}
}
}

Some files were not shown because too many files have changed in this diff Show More