Merge branch 'master' into thesis/2018/exoplanets

This commit is contained in:
Emma Broman
2020-08-25 13:40:33 +02:00
1921 changed files with 76425 additions and 41608 deletions

View File

@@ -6,7 +6,6 @@ root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true

View File

@@ -1,4 +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).
For more information we refer to the [Wiki](https://openspace.github.io). If there are any questions, feel free to contact us via [email](mailto:mail@alexanderbock.eu?subject=OpenSpace: Contributing).

7
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,7 @@
<< Description of the problem >>
<< What did you expect to happen >>
<< What did happen? >>
<< Attach screenshots, if possible >>

62
.gitignore vendored
View File

@@ -1,38 +1,40 @@
.DS_Store
.vscode
/bin/
# Build and editor thing
/build/
/cache/
/doc
/documentation
/ext/SGCT
/logs
/sync/
tmp/
Thumbs.db
/build-ninja/
/build-xcode/
/build-make/
*~
*.swp
*.gglsl
*.GhoulGenerated.glsl
*.OpenSpaceGenerated.glsl
shaders/generated/*
# CMake stuff
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
# Eclipse stuff
*.dir
*.idea/
.build-vs/
.cproject
.project
shaders/ABuffer/constants.hglsl
*.idea/
.vs/
.build-vs/
*.dir
.vscode
CMakeCache.txt
CMakeFiles
CMakeLists.txt.user
cmake-build-*
x64/
cmake_install.cmake
install_manifest.txt
Makefile
# OS specific things
.DS_Store
Thumbs.db
# OpenSpace-generated folders and files
/bin/
/cache/
/cache-*/
/cache_gdal/
/documentation/
/logs/
/screenshots/
/recordings/
/sync/
/temp/
# Customization is not supposed to be committed
customization.lua
# The COMMIT info is generated everytime CMake is run
COMMIT.md
screenshots
cache_gdal/

8
.gitmodules vendored
View File

@@ -10,19 +10,19 @@
[submodule "modules/touch/ext/libTUIO11"]
path = modules/touch/ext/libTUIO11
url = https://github.com/mkalten/TUIO11_CPP
[submodule "modules/sync/ext/libtorrent"]
path = modules/sync/ext/libtorrent
url = https://github.com/OpenSpace/libtorrent.git
[submodule "apps/OpenSpace-MinVR/ext/minvr"]
path = apps/OpenSpace-MinVR/ext/minvr
url = https://github.com/OpenSpace/minvr
branch = OpenSpace
[submodule "apps/OpenSpace/ext/sgct"]
path = apps/OpenSpace/ext/sgct
url = https://github.com/opensgct/sgct
url = https://github.com/sgct/sgct
[submodule "modules/fitsfilereader/ext/CCfits"]
path = modules/fitsfilereader/ext/CCfits
url = https://github.com/OpenSpace/CCfits.git
[submodule "modules/fitsfilereader/ext/cfitsio"]
path = modules/fitsfilereader/ext/cfitsio
url = https://github.com/OpenSpace/cfitsio.git
[submodule "apps/OpenSpace-MinVR/ext/glfw"]
path = apps/OpenSpace-MinVR/ext/glfw
url = https://github.com/opensgct/glfw

3
ACKNOWLEDGMENTS.md Normal file
View File

@@ -0,0 +1,3 @@
OpenSpace is funded in part by NASA under award No NNX16AB93A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration.
OpenSpace is also funded in part by the Knut & Alice Wallenberg Foundation in Sweden and the Swedish e-Science Research Centre.

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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,14 +22,14 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(OpenSpace)
set(OPENSPACE_VERSION_MAJOR 0)
set(OPENSPACE_VERSION_MINOR 13)
set(OPENSPACE_VERSION_PATCH 0)
set(OPENSPACE_VERSION_STRING "Beta-3")
set(OPENSPACE_VERSION_MINOR 15)
set(OPENSPACE_VERSION_PATCH 2)
set(OPENSPACE_VERSION_STRING "Beta-7")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
@@ -43,21 +43,34 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/handle_modules.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/include_gtest.cmake)
begin_header("Configuring OpenSpace project")
message(STATUS "CMake version: ${CMAKE_VERSION}")
# Bail out if the user tries to generate a 32 bit project.
if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
message(FATAL_ERROR "OpenSpace can only be generated for 64 bit architectures.")
endif ()
##########################################################################################
# Cleanup project #
##########################################################################################
set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps")
set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext")
if (NOT EXISTS ${OPENSPACE_EXT_DIR}/ghoul/CMakeLists.txt)
message(FATAL_ERROR "Git submodules are missing. Please run \n"
"git submodule update --init --recursive \n"
"to download the missing dependencies."
)
endif ()
set_property(GLOBAL PROPERTY USE_FOLDERS On)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER CMake)
mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POSTFIX
CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX)
CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX)
# Set build output directories
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR})
@@ -89,14 +102,38 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE OPENSPACE_GIT_STATUS_RETURN
)
if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0)
set(OPENSPACE_GIT_STATUS "uncomitted changes")
if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0)
set(OPENSPACE_GIT_STATUS "uncommitted changes")
else()
set(OPENSPACE_GIT_STATUS "")
endif()
set(OPENSPACE_GIT_STATUS "")
endif ()
option(OPENSPACE_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
if (MSVC)
option(OPENSPACE_OPTIMIZATION_ENABLE_AVX "Enable AVX instruction set for compilation" OFF)
option(OPENSPACE_OPTIMIZATION_ENABLE_AVX2 "Enable AVX2 instruction set for compilation" OFF)
option(OPENSPACE_OPTIMIZATION_ENABLE_AVX512 "Enable AVX2 instruction set for compilation" OFF)
option(OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS "Enable other optimizations, like LTCG, intrinsics, etc")
if (OPENSPACE_OPTIMIZATION_ENABLE_AVX AND OPENSPACE_OPTIMIZATION_ENABLE_AVX2)
message(FATAL_ERROR "Cannot enable AVX and AVX2 instructions simultaneously")
endif ()
if (OPENSPACE_OPTIMIZATION_ENABLE_AVX AND OPENSPACE_OPTIMIZATION_ENABLE_AVX512)
message(FATAL_ERROR "Cannot enable AVX and AVX512 instructions simultaneously")
endif ()
if (OPENSPACE_OPTIMIZATION_ENABLE_AVX2 AND OPENSPACE_OPTIMIZATION_ENABLE_AVX512)
message(FATAL_ERROR "Cannot enable AVX2 and AVX512 instructions simultaneously")
endif ()
set(GHOUL_OPTIMIZATION_ENABLE_AVX ${OPENSPACE_OPTIMIZATION_ENABLE_AVX} CACHE BOOL "" FORCE)
set(GHOUL_OPTIMIZATION_ENABLE_AVX2 ${OPENSPACE_OPTIMIZATION_ENABLE_AVX2} CACHE BOOL "" FORCE)
set(GHOUL_OPTIMIZATION_ENABLE_AVX512 ${OPENSPACE_OPTIMIZATION_ENABLE_AVX512} CACHE BOOL "" FORCE)
set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE)
endif ()
include(src/CMakeLists.txt)
##########################################################################################
@@ -104,21 +141,22 @@ include(src/CMakeLists.txt)
##########################################################################################
# System libraries
if (APPLE)
begin_dependency("Core Libraries")
target_include_directories(openspace-core 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(openspace-core ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY}
${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY})
end_dependency()
endif()
begin_dependency("Core Libraries")
target_include_directories(openspace-core 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(openspace-core ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY}
${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY})
end_dependency()
endif ()
# Ghoul
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul)
target_link_libraries(openspace-core Ghoul)
target_link_libraries(openspace-core PUBLIC Ghoul)
set_openspace_compile_settings(Ghoul)
set_folder_location(Lua "External")
set_folder_location(lz4 "External")
set_folder_location(GhoulTest "Unit Tests")
@@ -127,82 +165,53 @@ link_directories("${GHOUL_LIBRARY_DIRS}")
# Spice
begin_dependency("Spice")
add_subdirectory(${OPENSPACE_EXT_DIR}/spice)
target_link_libraries(openspace-core Spice)
target_link_libraries(openspace-core PUBLIC Spice)
set_folder_location(Spice "External")
end_dependency()
# Curl
begin_dependency("CURL")
if (WIN32)
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl")
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include)
target_link_libraries(openspace-core ${CURL_ROOT_DIR}/lib/libcurl.lib)
target_compile_definitions(openspace-core PUBLIC
"OPENSPACE_CURL_ENABLED" "CURL_STATICLIB")
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl")
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include)
target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib)
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB")
else ()
find_package(CURL)
if (CURL_FOUND)
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(openspace-core ${CURL_LIBRARIES})
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED")
endif ()
endif()
find_package(CURL)
if (CURL_FOUND)
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES})
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED")
endif ()
endif ()
end_dependency()
# 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"
)
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"
"~/Qt/5.9/clang_64/lib/cmake"
"~/Qt/5.10/clang_64/lib/cmake"
"~/Qt/5.11/clang_64/lib/cmake"
"~/Qt/5.12/clang_64/lib/cmake"
)
endif ()
if (MSVC)
option(OPENSPACE_ENABLE_VLD "Enable the Visual Leak Detector" OFF)
if (OPENSPACE_ENABLE_VLD)
begin_dependency("Visual Leak Detector")
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_ENABLE_VLD")
target_link_libraries(openspace-core ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib)
target_include_directories(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld)
end_dependency()
endif ()
option(OPENSPACE_NVTOOLS_ENABLED "Include support for Nvidia Tools Extensions" OFF)
set(OPENSPACE_NVTOOLS_PATH "C:/Program Files/NVIDIA Corporation/NvToolsExt")
if (OPENSPACE_NVTOOLS_ENABLED)
begin_dependency("Nvidia Tools Extension")
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_HAS_NVTOOLS")
target_include_directories(openspace-core PUBLIC "${OPENSPACE_NVTOOLS_PATH}/include")
end_dependency()
endif ()
endif ()
##########################################################################################
# Tests #
##########################################################################################
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
if (OPENSPACE_HAVE_TESTS)
include_gtest("${GHOUL_BASE_DIR}/ext/googletest")
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 openspace-core)
set_folder_location(OpenSpaceTest "Unit Tests")
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)
begin_header("Configuring Modules")
set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules")
handle_modules("${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_EXTERNAL_MODULES_PATHS}")
@@ -214,29 +223,33 @@ handle_applications()
end_header("End: Configuring Applications")
message(STATUS "")
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
if (OPENSPACE_HAVE_TESTS)
begin_header("Generating OpenSpace unit test")
add_subdirectory("${OPENSPACE_BASE_DIR}/tests")
end_header()
endif (OPENSPACE_HAVE_TESTS)
# Web Browser and Web gui
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
set(PROJECT_ARCH "x86_64")
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
if (TARGET OpenSpaceTest)
set_cef_targets("${CEF_ROOT}" OpenSpaceTest)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
endif ()
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()
##########################################################################################
@@ -244,14 +257,19 @@ endif ()
##########################################################################################
option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF)
if (OPENSPACE_WITH_ABUFFER_RENDERER)
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER")
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER")
endif ()
option(OPENSPACE_WITH_INSTRUMENTATION "Add instrumentation options" OFF)
if (OPENSPACE_WITH_INSTRUMENTATION)
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_INSTRUMENTATION")
endif ()
# Just in case, create the bin directory
add_custom_command(
TARGET openspace-core
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
TARGET openspace-core
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
)
# Manage the CPack packaging

View File

@@ -1,30 +1,42 @@
# Core Team
Alexander Bock
Joakim Kilby
Emil Axelsson
Eric Myers
Jonathas Costa
Matthew Territo
Gene Payne
Kalle Bladin
Erik Sundén
Micah Acinapura
Jonathas Costa
Jonas Strandstedt
Hans-Christian Helltegen
Michal Marcinkowski
Anton Arbring
Tomas Forsyth Rosin
Erik Broberg
Michael Nilsson
Joakim Kilby
Gene Payne
Micah Acinapura
Erik Sundén
Eric Myers
Sebastian Piwell
Erik Broberg
Jonathan Bosson
Michael Nilsson
Elon Olsson
Jonathan Franzen
Hans-Christian Helltegen
Anton Arbring
Oskar Carlbaum
Matthew Territo
Jonathan Grangien
Klas Eskilson
Tomas Forsyth Rosin
Niclas Hultberg
Rickard Lindtstedt
Michael Sjöström
Michael Novén
Oskar Carlbaum
Jonathan Bosson
Klas Eskilson
Christoffer Särevall
# Community Support
Anteige
arfon
DavidLaidlaw
mik3caprio
mingenuity
nbartzokas
nealmcb
noahdasanaike

241
Jenkinsfile vendored
View File

@@ -1,87 +1,166 @@
def modules = [
"base",
"debugging",
"fieldlines",
"galaxy",
"globebrowsing",
"imgui",
"iswa",
"kameleon",
"kameleonvolume",
"multiresvolume",
"spacecraftinstruments",
"space",
"toyvolume",
"volume"
];
import groovy.io.FileType
def flags = "-DGHOUL_USE_DEVIL=OFF "
library('sharedSpace'); // jenkins-pipeline-lib
for (module in modules) {
flags += "-DOPENSPACE_MODULE_" + module.toUpperCase() + "=ON "
}
echo flags
def url = 'https://github.com/OpenSpace/OpenSpace';
def branch = env.BRANCH_NAME;
stage('Build') {
parallel linux: {
node('linux') {
timeout(time: 90, unit: 'MINUTES') {
deleteDir()
checkout scm
sh 'git submodule update --init --recursive'
sh '''
mkdir -p build
cd build
cmake .. ''' +
flags + ''' ..
make -j4 OpenSpace
'''
}
}
},
windows: {
node('windows') {
timeout(time: 90, unit: 'MINUTES') {
// We specify the workspace directory manually to reduce the path length and thus try to avoid MSB3491 on Visual Studio
ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") {
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 /p:Configuration=Debug /target:OpenSpace
'''
}
}
}
},
osx: {
node('osx') {
timeout(time: 90, unit: 'MINUTES') {
deleteDir()
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 ${srcDir} .. ''' +
flags + '''
xcodebuild -parallelizeTargets -jobs 4 -target OpenSpace
'''
}
}
@NonCPS
def readDir() {
def dirsl = [];
new File("${workspace}").eachDir() {
dirs -> println dirs.getName()
if (!dirs.getName().startsWith('.')) {
dirsl.add(dirs.getName());
}
}
return dirs;
}
def moduleCMakeFlags() {
def modules = [];
// using new File doesn't work as it is not allowed in the sandbox
if (isUnix()) {
modules = sh(returnStdout: true, script: 'ls -d modules/*').trim().split('\n');
};
else {
modules = bat(returnStdout: true, script: '@dir modules /b /ad /on').trim().split('\r\n');
}
// def dirs = readDir();
// def currentDir = new File('.')
// def dirs = []
// currentDir.eachFile FileType.DIRECTORIES, {
// dirs << it.name
// }
// def moduleFlags = [
// 'atmosphere',
// 'base',
// // 'cefwebgui',
// 'debugging',
// 'digitaluniverse',
// 'fieldlines',
// 'fieldlinessequence',
// 'fitsfilereader',
// 'gaia',
// 'galaxy',
// 'globebrowsing',
// 'imgui',
// 'iswa',
// 'kameleon',
// 'kameleonvolume',
// 'multiresvolume',
// 'server',
// 'space',
// 'spacecraftinstruments',
// 'space',
// 'spout',
// 'sync',
// 'touch',
// 'toyvolume',
// 'volume',
// // 'webbrowser',
// // 'webgui'
// ];
def flags = '';
for (module in modules) {
flags += "-D OPENSPACE_MODULE_${module.toUpperCase()}=ON "
}
return flags;
}
// echo flags
//
// Pipeline start
//
parallel master: {
node('master') {
stage('master/scm') {
deleteDir();
gitHelper.checkoutGit(url, branch);
helper.createDirectory('build');
}
stage('master/cppcheck/create') {
sh 'cppcheck --enable=all --xml --xml-version=2 -i ext --suppressions-list=support/cppcheck/suppressions.txt include modules src tests 2> build/cppcheck.xml';
}
stage('master/cloc/create') {
sh 'cloc --by-file --exclude-dir=build,data,ext --xml --out=build/cloc.xml --force-lang-def=support/cloc/langDef --quiet .';
}
}
},
linux: {
node('linux') {
stage('linux/scm') {
deleteDir()
gitHelper.checkoutGit(url, branch);
}
stage('linux/build') {
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), moduleCMakeFlags(), 'OpenSpace', 'build-all');
}
stage('linux/warnings') {
// compileHelper.recordCompileIssues(compileHelper.Gcc());
}
stage('linux/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
}
} // node('linux')
},
windows: {
node('windows') {
ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") {
stage('windows/scm') {
deleteDir();
gitHelper.checkoutGit(url, branch);
}
stage('windows/build') {
compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-all');
}
stage('windows/warnings') {
// compileHelper.recordCompileIssues(compileHelper.VisualStudio());
}
stage('windows/test') {
// Currently, the unit tests are failing on Windows
// testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest')
}
} // node('windows')
}
},
osx: {
node('osx') {
stage('osx/scm') {
deleteDir();
gitHelper.checkoutGit(url, branch);
}
stage('osx/build') {
compileHelper.build(compileHelper.Xcode(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-all');
}
stage('osx/warnings') {
// compileHelper.recordCompileIssues(compileHelper.Clang());
}
stage('osx/test') {
// Currently, the unit tests are crashing on OS X
// testHelper.runUnitTests('build/Debug/OpenSpaceTest')
}
} // node('osx')
}
//
// Post-build actions
//
node('master') {
stage('master/cppcheck/publish') {
// publishCppcheck(pattern: 'build/cppcheck.xml');
}
stage('master/cloc/publish') {
sloccountPublish(encoding: '', pattern: 'build/cloc.xml');
}
stage('master/notifications') {
slackHelper.sendChangeSetSlackMessage(currentBuild);
}
}

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014-2018
Copyright (c) 2014-2020
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

View File

@@ -6,6 +6,8 @@ The project stems from the same academic collaboration between Swedens [Link
- Utilization of NASAs 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-macOS). Required preexisting dependencies are: [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:).
OpenSpace requires graphics support for [OpenGL](https://www.opengl.org/) version 3.3.
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 [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [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:).
Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/enQtMjUxNzUyMTQ1ODQxLTI4YjNmMTY3ZDI1N2Q1NWM1ZjQ1NTQyNzAxM2YyMGQ5Y2NmYWJiNjI1NjU4YTkyNTc5ZDE5NzdhNGM2YmUzYTk).

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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 #
@@ -32,14 +32,14 @@ set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ON CACHE BOOL "" FORCE)
add_subdirectory(ext/minvr)
create_new_application(OpenSpace-MinVR
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
)
target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/minvr/src)
@@ -50,40 +50,37 @@ target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ex
target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/minvr/external/GLFW/src/include)
target_link_libraries(OpenSpace-MinVR libOpenSpace MinVR)
target_link_libraries(OpenSpace-MinVR openspace-core MinVR)
# Web Browser and Web gui
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc)
endif ()
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc)
endif ()
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" OpenSpace-MinVR)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
set_cef_targets("${CEF_ROOT}" OpenSpace-MinVR)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()
if (OPENSPACE_MODULE_WEBGUI AND WEBGUI_MODULE_PATH)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBGUI_MODULE_PATH}/cmake")
include(webgui_helpers)
build_webgui_source(OpenSpace-MinVR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBGUI_MODULE_PATH}/cmake")
include(webgui_helpers)
build_webgui_source(OpenSpace-MinVR)
elseif(OPENSPACE_MODULE_WEBGUI)
message(WARNING "WebGui is configured to be included, but the web source could not be found. Try configuring CMake again.")
message(WARNING "WebGui is configured to be included, but the web source could not be found. Try configuring CMake again.")
endif()
# End Web Browser and Web gui
if (MSVC)
# This library is used for being able to output the callstack if an exception escapes
target_link_libraries(OpenSpace-MinVR Dbghelp.lib)
# This library is used for being able to output the callstack if an exception escapes
target_link_libraries(OpenSpace-MinVR Dbghelp.lib)
endif()

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2020 *
* *
* 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 *
@@ -200,7 +200,14 @@ void Handler::onVREvent(const VRDataIndex& eventData) {
if (button == MouseButton::Right && action == MouseAction::Press) {
windowingGlobals.mouseButtons |= 1 << 2;
}
global::openSpaceEngine.mouseButtonCallback(button, action);
using KM = KeyModifier;
KM mod = KM::NoModifier;
mod |= keyboardState.modifierShift ? KM::Shift : KM::NoModifier;
mod |= keyboardState.modifierCtrl ? KM::Control : KM::NoModifier;
mod |= keyboardState.modifierAlt ? KM::Alt : KM::NoModifier;
global::openSpaceEngine.mouseButtonCallback(button, action, mod);
}
}
@@ -341,6 +348,14 @@ int main(int argc, char** argv) {
ghoul::initialize();
// Register the path of the executable,
// to make it possible to find other files in the same directory.
FileSys.registerPathToken(
"${BIN}",
ghoul::filesystem::File(absPath(argv[0])).directoryName(),
ghoul::filesystem::FileSystem::Override::Yes
);
// Create the OpenSpace engine and get arguments for the SGCT engine
std::string windowConfiguration;
try {

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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 #
@@ -33,115 +33,102 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support" OFF)
if (OPENSPACE_OPENVR_SUPPORT)
begin_header("Dependency: OpenVR")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/")
begin_header("Dependency: OpenVR")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/")
find_package(OpenVR REQUIRED)
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 ${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 ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr
REQUIRED
)
endif ()
set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT)
if (NOT SGCT_OPENVR_INCLUDE_DIRECTORY)
if (WIN32)
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
NAMES SGCTOpenVR.h
PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH
REQUIRED
)
else ()
set(SGCT_OPENVR_FILES
${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.h
${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.cpp
)
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
NAMES SGCTOpenVR.h
PATH_SUFFIXES SGCTOpenVR
PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr
REQUIRED
)
endif ()
end_header("Dependency: OpenVR")
endif()
else ()
set(SGCT_OPENVR_FILES
${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.h
${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.cpp
)
endif ()
end_header("Dependency: OpenVR")
endif ()
#####
# Spout
#####
if (SGCT_SPOUT_SUPPORT AND NOT OPENSPACE_MODULE_SPOUT)
message(WARNING "Spout support from SGCT was requested, but OpenSpace Spout module was disabled")
message(STATUS "Enabling module as dependency")
set(OPENSPACE_MODULE_SPOUT ON CACHE BOOL "Build OPENSPACE_MODULE_SPOUTModule" FORCE)
message(WARNING "Spout support from SGCT was requested, but OpenSpace Spout module was disabled")
message(STATUS "Enabling module as dependency")
set(OPENSPACE_MODULE_SPOUT ON CACHE BOOL "Build OPENSPACE_MODULE_SPOUTModule" FORCE)
endif ()
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
#####
# macos
#####
if (APPLE)
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep" CACHE STRING "Other Code Signing Flags" FORCE)
endif ()
create_new_application(OpenSpace
${SGCT_OPENVR_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
${SGCT_OPENVR_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
)
target_include_directories(
OpenSpace PRIVATE
${OPENVR_INCLUDE_DIRS}
${SGCT_OPENVR_INCLUDE_DIRECTORY}
${SPOUT_INCLUDE_DIRS}
OpenSpace PRIVATE
${OPENVR_INCLUDE_DIRS}
${SGCT_OPENVR_INCLUDE_DIRECTORY}
${SPOUT_INCLUDE_DIRS}
)
target_link_libraries(OpenSpace openspace-core ${OPENVR_LIBRARY} ${SPOUT_LIBRARY})
target_compile_definitions(OpenSpace PRIVATE
${SGCT_OPENVR_DEFINITIONS}
${SPOUT_DEFINITIONS}
${SGCT_OPENVR_DEFINITIONS}
${SPOUT_DEFINITIONS}
)
begin_header("Dependency: 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)
set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE)
set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct)
target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct/include)
target_link_libraries(
OpenSpace
sgct_light glew glfw png16_static quat tinyxml2static turbojpeg-static
vrpn
${GLFW_LIBRARIES}
)
target_link_libraries(OpenSpace sgct)
mark_as_advanced(EXECUTABLE_OUTPUT_PATH GLFW_BUILD_DOCS GLFW_BUILD_EXAMPLES
GLFW_BUILD_TESTS GLFW_INSTALL GLFW_USE_HYBRID_HPG GLFW_USE_OSMESA GLFW_VULKAN_STATIC
INSTALL_BIN_DIR INSTALL_INC_DIR INSTALL_LIB_DIR INSTALL_MAN_DIR INSTALL_PKGCONFIG_DIR
IOKIT_LIBRARY JPEG_TURBO_FORCE32bit JPEG_TURBO_WITH_12BIT JPEG_TURBO_WITH_ARITH_DEC
JPEG_TURBO_WITH_ARITH_ENC JPEG_TURBO_WITH_JPEG7 JPEG_TURBO_WITH_JPEG8
JPEG_TURBO_WITH_MEM_SRCDST JPEG_TURBO_WITH_SIMD JPEG_TURBO_WITH_TURBOJPEG LIB_SUFFIX
LIBRARY_OUTPUT_PATH M_LIBRARY SGCT_BUILD_ALUT SGCT_BUILD_CSHARP_PROJECTS
SGCT_CUSTOMOUTPUTDIRS SGCT_DOXYGEN SGCT_DOXYGEN_QUIET SGCT_EXAMPLES SGCT_INSTALL
SGCT_LIGHT_ONLY SGCT_NO_EXTERNAL_LIBRARIES SGCT_SPOUT_SUPPORT SGCT_TEXT
SGCT_USE_MSVC_RUNTIMES USE_MSVC_RUNTIME_LIBRARY_DLL)
set_folder_location(sgct_light "External")
set_folder_location(glew "External/SGCT")
set_folder_location(sgct "External")
set_folder_location(glfw "External/SGCT")
set_folder_location(miniziplibstatic "External/SGCT")
set_folder_location(png16_static "External/SGCT")
set_folder_location(quat "External/SGCT")
set_folder_location(simd "External/SGCT")
set_folder_location(tinyxml2static "External/SGCT")
set_folder_location(turbojpeg-static "External/SGCT")
set_folder_location(vrpn "External/SGCT")
set_folder_location(zlibstatic "External/SGCT")
set_folder_location(miniziplibstatic "External/SGCT")
if (UNIX AND (NOT APPLE))
target_link_libraries(OpenSpace Xcursor Xinerama X11)
target_link_libraries(OpenSpace Xcursor Xinerama X11)
endif ()
end_header("Dependency: SGCT")
@@ -151,27 +138,31 @@ end_header("Dependency: SGCT")
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
# wanted by CEF
set(PROJECT_ARCH "x86_64")
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
set_cef_targets("${CEF_ROOT}" OpenSpace)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" OpenSpace)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()
if (MSVC)
begin_header("Dependency: Dbghelp")
# This library is used for being able to output the callstack if an exception escapes
target_link_libraries(OpenSpace Dbghelp.lib)
end_header()
begin_header("Dependency: Dbghelp")
# This library is used for being able to output the callstack if an exception escapes
target_link_libraries(OpenSpace Dbghelp.lib)
end_header()
endif ()
if (OPENSPACE_NVTOOLS_ENABLED)
target_link_libraries(OpenSpace "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib")
endif ()

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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 #
@@ -25,16 +25,16 @@
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
)
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
create_new_application(Sync MACOSX_BUNDLE
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
)
target_link_libraries(Sync openspace-core)
@@ -43,20 +43,20 @@ target_link_libraries(Sync openspace-core)
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" Sync)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
set_cef_targets("${CEF_ROOT}" Sync)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2020 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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 #
@@ -25,16 +25,16 @@
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
)
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
create_new_application(TaskRunner MACOSX_BUNDLE
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
)
target_link_libraries(TaskRunner openspace-core)
@@ -43,20 +43,20 @@ target_link_libraries(TaskRunner openspace-core)
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" TaskRunner)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
set_cef_targets("${CEF_ROOT}" TaskRunner)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2020 *
* *
* 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 *
@@ -26,6 +26,7 @@
#include <string>
#include <ghoul/glm.h>
#include <ghoul/ghoul.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/io/texture/texturereader.h>
#include <ghoul/io/texture/texturereaderdevil.h>
@@ -34,7 +35,8 @@
#include <ghoul/filesystem/directory.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/logging/consolelog.h>
#include <ghoul/ghoul.h>
#include <ghoul/filesystem/file.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/cmdparser/commandlineparser.h>
#include <ghoul/cmdparser/singlecommand.h>
@@ -106,6 +108,14 @@ int main(int argc, char** argv) {
ghoul::initialize();
// Register the path of the executable,
// to make it possible to find other files in the same directory.
FileSys.registerPathToken(
"${BIN}",
ghoul::filesystem::File(absPath(argv[0])).directoryName(),
ghoul::filesystem::FileSystem::Override::Yes
);
std::string configFile = configuration::findConfiguration();
global::configuration = configuration::loadConfigurationFromFile(configFile);
openspace::global::openSpaceEngine.registerPathTokens();

View File

@@ -1,86 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 "configurationwidget.h"
#include <QGridLayout>
#include <QGroupBox>
#include <QLabel>
#include <QTimer>
ConfigurationWidget::ConfigurationWidget(QWidget* parent)
: QWidget(parent)
, _ipAddress(new QLineEdit("localhost"))
, _port(new QLineEdit("20500"))
, _connect(new QPushButton("Connect"))
{
_connect->setObjectName("connection");
QGroupBox* box = new QGroupBox("Connection", this);
QGridLayout* layout = new QGridLayout;
layout->setVerticalSpacing(0);
{
QLabel* t = new QLabel("IP Address");
t->setObjectName("label");
layout->addWidget(t, 0, 0);
}
layout->addWidget(_ipAddress, 1, 0);
{
QLabel* t = new QLabel("Port");
t->setObjectName("label");
layout->addWidget(t, 0, 1);
}
layout->addWidget(_port, 1, 1);
layout->addWidget(_connect, 1, 2, 1, 1);
box->setLayout(layout);
QHBoxLayout* l = new QHBoxLayout;
l->addWidget(box);
setLayout(l);
QObject::connect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton()));
QTimer::singleShot(100, this, SLOT(onConnectButton()));
}
void ConfigurationWidget::onConnectButton() {
emit connect(_ipAddress->text(), _port->text());
}
void ConfigurationWidget::socketConnected() {
_ipAddress->setEnabled(false);
_port->setEnabled(false);
_connect->setText("Disconnect");
QObject::disconnect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton()));
QObject::connect(_connect, SIGNAL(clicked()), this, SIGNAL(disconnect()));
}
void ConfigurationWidget::socketDisconnected() {
_ipAddress->setEnabled(true);
_port->setEnabled(true);
_connect->setText("Connect");
QObject::disconnect(_connect, SIGNAL(clicked()), this, SIGNAL(disconnect()));
QObject::connect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton()));
}

View File

@@ -1,319 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 "controlwidget.h"
#include "mainwindow.h"
#include <QComboBox>
#include <QGridLayout>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QSlider>
#include <math.h>
namespace {
struct ImportantDate {
QString date;
QString focus;
QString coordinateSystem;
};
const ImportantDate ImportantDates[] = {
{ "", "", "" },
{ "2007-02-27T16:40:00.00", "JupiterProjection", "Jupiter" },
{ "2015-07-14T10:10:00.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T10:50:00.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T11:22:00.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T11:36:40.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T11:48:43.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T12:04:35.00", "PlutoProjection", "Pluto" },
{ "2015-07-14T15:02:46.00", "PlutoProjection", "Pluto" }
};
struct FocusNode {
QString guiName;
QString name;
QString coordinateSystem;
};
const FocusNode FocusNodes[] = {
{ "Earth", "Earth", "Sun" },
{ "Sun", "Sun", "Sun" },
{ "Pluto", "PlutoProjection", "Pluto" },
{ "Charon", "Charon", "Pluto" },
{ "Jupiter", "JupiterProjection", "Jupiter" },
{ "Nix", "Nix", "Pluto" },
{ "Kerberos", "Kerberos", "Pluto" },
{ "Hydra", "Hydra", "Pluto" },
};
}
ControlWidget::ControlWidget(QWidget* parent)
: QWidget(parent)
, _currentTime(new QLabel(""))
, _setTime(new QComboBox)
, _currentDelta(new QLabel(""))
, _setDelta(new QSlider(Qt::Horizontal))
, _pause(new QPushButton("Pause"))
, _play(new QPushButton("Play"))
, _focusNode(new QComboBox)
, _setFocusToNextTarget(new QPushButton("Set Focus to the next Target"))
, _setFocusToNewHorizons(new QPushButton("Set Focus to New Horizons"))
{
_pause->setObjectName("pause");
_play->setObjectName("play");
_currentTime->setObjectName("value");
_currentDelta->setObjectName("value");
for (const ImportantDate& d : ImportantDates)
_setTime->addItem(d.date);
QObject::connect(
_setTime,
SIGNAL(currentIndexChanged(int)),
this,
SLOT(onDateChange())
);
for (const FocusNode& f : FocusNodes)
_focusNode->addItem(f.guiName);
QObject::connect(
_focusNode,
SIGNAL(currentIndexChanged(int)),
this,
SLOT(onFocusChange())
);
_setDelta->setMinimum(-100);
_setDelta->setMaximum(100);
_setDelta->setValue(0);
QObject::connect(
_setDelta,
SIGNAL(valueChanged(int)),
this,
SLOT(onValueChange())
);
QObject::connect(
_pause,
SIGNAL(clicked()),
this,
SLOT(onPauseButton())
);
QObject::connect(
_play,
SIGNAL(clicked()),
this,
SLOT(onPlayButton())
);
QObject::connect(
_setFocusToNextTarget,
SIGNAL(clicked()),
this,
SLOT(onFocusToTargetButton())
);
QObject::connect(
_setFocusToNewHorizons,
SIGNAL(clicked()),
this,
SLOT(onFocusToNewHorizonsButton())
);
QVBoxLayout* mainLayout = new QVBoxLayout;
{
QGroupBox* box = new QGroupBox("Time", this);
QGridLayout* layout = new QGridLayout;
//layout->setRowStretch(1, 5);
box->setLayout(layout);
{
QLabel* l = new QLabel("Current Time (UTC):");
l->setObjectName("label");
layout->addWidget(l, 0, 0, Qt::AlignLeft);
layout->addWidget(_currentTime, 0, 1, Qt::AlignRight);
}
{
QLabel* l = new QLabel("Bookmarked Times:");
l->setObjectName("label");
layout->addWidget(l, 1, 0, Qt::AlignLeft);
layout->addWidget(_setTime, 1, 1, Qt::AlignRight);
}
layout->addItem(new QSpacerItem(0, 7), 2, 0, 1, 2);
{
QLabel* l = new QLabel("Current Time Increment\n(seconds per second):");
l->setObjectName("label");
layout->addWidget(l, 3, 0, Qt::AlignLeft);
layout->addWidget(_currentDelta, 3, 1, Qt::AlignRight);
}
_setDelta->setObjectName("background");
layout->addWidget(_setDelta, 4, 0, 1, 2);
QWidget* controlContainer = new QWidget;
controlContainer->setObjectName("background");
QHBoxLayout* controlContainerLayout = new QHBoxLayout;
controlContainerLayout->addWidget(_pause);
controlContainerLayout->addWidget(_play);
controlContainer->setLayout(controlContainerLayout);
layout->addWidget(controlContainer, 5, 0, 1, 2);
mainLayout->addWidget(box);
}
{
QGroupBox* box = new QGroupBox("Focus");
QGridLayout* layout = new QGridLayout;
box->setLayout(layout);
{
QLabel* l = new QLabel("Set Focus:");
l->setObjectName("label");
layout->addWidget(l, 0, 0, Qt::AlignLeft);
_focusNode->setMinimumWidth(200);
layout->addWidget(_focusNode, 0, 1, Qt::AlignRight);
}
layout->addWidget(_setFocusToNextTarget, 1, 0, 1, 2);
layout->addWidget(_setFocusToNewHorizons, 2, 0, 1, 2);
mainLayout->addWidget(box);
}
setLayout(mainLayout);
}
void ControlWidget::update(QString currentTime, QString currentDelta) {
currentTime.replace("T", " ");
_currentTime->setText(currentTime);
_currentDelta->setText(currentDelta);
}
void ControlWidget::onValueChange() {
float value = static_cast<float>(_setDelta->value());
float delta;
if (value < 0.f) {
value = -value;
float d = pow(3, value / 10) - 1.f;
delta = -d;
}
else {
float d = pow(3, value / 10) - 1.f;
delta = d;
}
QString script = "openspace.time.setDeltaTime(" + QString::number(delta) + ");";
emit scriptActivity(script);
}
void ControlWidget::onPauseButton() {
QString script = "openspace.time.setPause(true);";
emit scriptActivity(script);
}
void ControlWidget::onPlayButton() {
QString script = "openspace.time.setPause(false);";
emit scriptActivity(script);
}
void ControlWidget::onDateChange() {
int index = _setTime->currentIndex();
if (index != 0) {
QString date = ImportantDates[index].date;
QString focus = ImportantDates[index].focus;
QString coordinateSystem = ImportantDates[index].coordinateSystem;
QString script =
"openspace.time.setTime('" + date + "');\
openspace.setPropertyValue('Interaction.origin', '" + focus + "');\
openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "')";
emit scriptActivity(script);
}
_setTime->blockSignals(true);
_setTime->setCurrentIndex(0);
_setTime->blockSignals(false);
}
void ControlWidget::onFocusChange() {
int index = _focusNode->currentIndex();
QString name = FocusNodes[index].name;
QString coordinateSystem = FocusNodes[index].coordinateSystem;
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name +
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "');";
emit scriptActivity(script);
}
void ControlWidget::onFocusToTargetButton() {
std::string target = reinterpret_cast<MainWindow*>(parent())->nextTarget();
if (!target.empty()) {
auto it = std::find_if(
std::begin(FocusNodes),
std::end(FocusNodes),
[target](const FocusNode& n) {
return n.guiName.toLower() == QString::fromStdString(target).toLower();
});
if (it != std::end(FocusNodes)) {
QString name = it->name;
QString coordinateSystem = it->coordinateSystem;
QString script =
"openspace.setPropertyValue('Interaction.origin', '" + name +
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "');";
emit scriptActivity(script);
}
}
}
void ControlWidget::onFocusToNewHorizonsButton() {
QString coordinateSystem;
int date = _currentTime->text().left(4).toInt();
if (date < 2008)
coordinateSystem = "Jupiter";
else if (date < 2014)
coordinateSystem = "Sun";
else
coordinateSystem = "Pluto";
QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');\
openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem +
"');";
emit scriptActivity(script);
}
void ControlWidget::socketConnected() {
setDisabled(false);
}
void ControlWidget::socketDisconnected() {
setDisabled(true);
}

View File

@@ -1,69 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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_APP_TIMELINEVIEW___CONTROLWIDGET___H__
#define __OPENSPACE_APP_TIMELINEVIEW___CONTROLWIDGET___H__
#include <QWidget>
class QComboBox;
class QLabel;
class QPushButton;
class QSlider;
class ControlWidget : public QWidget {
Q_OBJECT
public:
ControlWidget(QWidget* parent);
void update(QString currentTime, QString currentDelta);
void socketConnected();
void socketDisconnected();
signals:
void scriptActivity(QString script);
private slots:
void onValueChange();
void onDateChange();
void onFocusChange();
void onPauseButton();
void onPlayButton();
void onFocusToTargetButton();
void onFocusToNewHorizonsButton();
private:
QLabel* _currentTime;
QComboBox* _setTime;
QLabel* _currentDelta;
QSlider* _setDelta;
QPushButton* _pause;
QPushButton* _play;
QComboBox* _focusNode;
QPushButton* _setFocusToNextTarget;
QPushButton* _setFocusToNewHorizons;
};
#endif // __OPENSPACE_APP_TIMELINEVIEW___CONTROLWIDGET___H__

View File

@@ -1,160 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 <QApplication>
#include "mainwindow.h"
static const QString style = R"style(
QWidget {
background-color: rgb(80, 80, 80);
font-family: Helvetica;
}
QGroupBox {
background-color: qlineargradient(
x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #858585,
stop: 1 #959595);
border: 2px solid gray;
border-radius: 5px;
margin-top: 4ex;
font-size: bold 12px;
}
QGroupBox::title {
background-color: #E0E0E0;
border: 2px solid gray;
border-radius: 5px;
subcontrol-origin: margin;
subcontrol-position: top center;
padding: 0 10px;
}
QLineEdit {
color: lightgray;
}
QSlider::groove:horizontal {
border: 1px solid #999999;
/* the groove expands to the size of the slider by default. by giving it a height,
it has a fixed size */
height: 8px;
background: qlineargradient(
x1:0, y1:0, x2:1, y2:0,
stop:0 #c4c4c4,
stop:0.5 #555555,
stop:1 #c4c4c4
);
margin: 2px 0;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid #5c5c5c;
width: 18px;
/* handle is placed by default on the contents rect of the groove.
Expand outside the groove */
margin: -2px 0;
border-radius: 3px;
}
QPushButton {
background-color: lightgray;
border-style: outset;
border-width: 0.5px;
border-radius: 5px;
border-color: black;
font: bold 12px;
min-width: 10em;
}
QPushButton#connection {
background-color: lightgreen;
}
QPushButton#connection:pressed {
background-color: green;
}
QPushButton#pause, QPushButton#play {
padding: 5px;
}
QPushButton#pause:pressed, QPushButton#play:pressed, QPushButton:pressed {
background-color: darkgray;
border-style: inset;
}
QCombobox {
border: 1px solid gray;
border-radius: 3px;
padding: 1px 18px 1px 3px;
min-width: 6em;
}
QComboBox:editable {
background: lightgrey;
}
QComboBox QAbstractItemView {
border: 2px solid darkgray;
border-radius: 5px;
background-color: #a8a8a8;
selection-background-color: #a8a8a8;
}
QLabel#label {
font-size: 13px;
background-color: transparent;
font-variant: small-caps;
}
QLabel#value {
font-family: monospace;
font-weight: bold;
font-size: 14px;
background-color: transparent;
}
QWidget#background {
background-color: transparent;
}
QTextEdit {
font-family: monospace;
}
)style";
int main(int argc, char** argv) {
QApplication app(argc, argv);
app.setStyleSheet(style);
MainWindow window;
window.show();
return app.exec();
}

View File

@@ -1,398 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 "mainwindow.h"
#include "configurationwidget.h"
#include "controlwidget.h"
#include "informationwidget.h"
#include "timelinewidget.h"
#include <QGridLayout>
#include <QPushButton>
#include <QTextEdit>
#include <QThread>
#include <array>
#include <cstdint>
namespace {
QByteArray continuousData;
}
template <typename T>
T readFromBuffer(char* buffer, size_t& currentReadLocation) {
union {
T value;
std::array<char, sizeof(T)> data;
} b;
std::memmove(b.data.data(), buffer + currentReadLocation, sizeof(T));
currentReadLocation += sizeof(T);
return b.value;
}
template <>
std::string readFromBuffer(char* buffer, size_t& currentReadLocation) {
uint8_t size = readFromBuffer<uint8_t>(buffer, currentReadLocation);
std::string result(buffer + currentReadLocation, buffer + currentReadLocation + size);
currentReadLocation += size;
return result;
}
MainWindow::MainWindow()
: QWidget(nullptr)
, _configurationWidget(nullptr)
, _timeControlWidget(nullptr)
, _informationWidget(nullptr)
, _timelineWidget(nullptr)
, _socket(nullptr)
{
setWindowTitle("OpenSpace Timeline");
_configurationWidget = new ConfigurationWidget(this);
_configurationWidget->setMinimumWidth(350);
_timeControlWidget = new ControlWidget(this);
_timeControlWidget->setMinimumWidth(350);
_informationWidget = new InformationWidget(this);
_informationWidget->setMinimumWidth(350);
_timelineWidget = new TimelineWidget(this);
QGridLayout* layout = new QGridLayout;
layout->addWidget(_configurationWidget, 0, 0);
layout->addWidget(_timeControlWidget, 1, 0);
layout->addWidget(_informationWidget, 2, 0);
layout->addWidget(_timelineWidget, 0, 1, 3, 1);
layout->setColumnStretch(1, 5);
QObject::connect(
_configurationWidget, SIGNAL(connect(QString, QString)),
this, SLOT(onConnect(QString, QString))
);
QObject::connect(
_configurationWidget, SIGNAL(disconnect()),
this, SLOT(onDisconnect())
);
QObject::connect(
_timeControlWidget, SIGNAL(scriptActivity(QString)),
this, SLOT(sendScript(QString))
);
setLayout(layout);
_configurationWidget->socketDisconnected();
_timeControlWidget->socketDisconnected();
_informationWidget->socketDisconnected();
_timelineWidget->socketDisconnected();
}
MainWindow::~MainWindow() {
delete _socket;
}
void MainWindow::onConnect(QString host, QString port) {
delete _socket;
_socket = new QTcpSocket(this);
QObject::connect(_socket, SIGNAL(readyRead()), SLOT(readTcpData()));
QObject::connect(_socket, SIGNAL(connected()), SLOT(onSocketConnected()));
QObject::connect(_socket, SIGNAL(disconnected()), SLOT(onSocketDisconnected()));
_socket->connectToHost(host, port.toUInt());
}
void MainWindow::onDisconnect() {
delete _socket;
_socket = nullptr;
}
void MainWindow::readTcpData() {
static const uint16_t MessageTypeStatus = 0;
static const uint16_t MessageTypeMappingIdentifier = 1;
static const uint16_t MessageTypeInitialMessageFinished = 2;
static const uint16_t MessageTypePlayBookLabel = 3;
static const uint16_t MessageTypePlayBookHongKang = 4;
QByteArray data = continuousData.append(_socket->readAll());
// int d = data.size();
if (QString(data) == "Connected to SGCT!\r\n") {
continuousData.clear();
return;
}
if (QString(data) == "OK\r\n") {
continuousData.clear();
return;
}
if (data.size() != 42)
qDebug() << QString(data);
QByteArray messageTypeData = data.left(2);
union {
uint16_t value;
std::array<char, 2> data;
} messageType;
std::memcpy(messageType.data.data(), messageTypeData.data(), sizeof(uint16_t));
switch (messageType.value) {
case MessageTypeStatus:
break;
case MessageTypeMappingIdentifier:
qDebug() << "Mapping Identifier received";
printMapping(data.mid(2));
continuousData.clear();
break;
case MessageTypeInitialMessageFinished:
qDebug() << "InitialMessageFinished received";
break;
case MessageTypePlayBookHongKang:
qDebug() << "Hong Kang Playbook received";
break;
case MessageTypePlayBookLabel:
qDebug() << "Label Playbook received";
break;
default:
qDebug() << "Unknown message of type '" << messageType.value << "'";
}
switch (messageType.value) {
case MessageTypeStatus:
{
if (_isConnected)
handleStatusMessage(data.mid(2));
continuousData.clear();
break;
}
case MessageTypePlayBookHongKang:
case MessageTypePlayBookLabel:
{
// const char* payloadDebug = data.mid(2).data();
size_t beginning = 0;
uint32_t size = readFromBuffer<uint32_t>(data.mid(2).data(), beginning);
//qDebug() << "Begin reading data";
while (_socket->waitForReadyRead() && data.size() < int(size)) {
//qDebug() << ".";
//_socket->read
//data = data.append(_socket->re)
data = data.append(_socket->readAll());
//data = data.append(_socket->read(int(size) - data.size()));
//QThread::msleep(50);
}
//qDebug() << "Finished reading data. Handling playbook";
continuousData = handlePlaybook(data.mid(2));
//qDebug() << "Finished handling playbook";
//if (messageType.value == MessageTypePlayBookHongKang)
// _hasHongKangTimeline = true;
//if (messageType.value == MessageTypePlayBookLabel)
// _hasLabelTimeline = true;
//if (_hasHongKangTimeline && _hasLabelTimeline) {
// fullyConnected();
//}
break;
}
case MessageTypeInitialMessageFinished:
_isConnected = true;
fullyConnected();
continuousData.clear();
break;
default:
qDebug() << QString(data);
}
}
void MainWindow::handleStatusMessage(QByteArray data) {
const char* buffer = data.data();
union {
double value;
std::array<char, 8> buffer;
} et;
std::memmove(et.buffer.data(), buffer, sizeof(double));
std::vector<char> timeString(24);
std::memmove(timeString.data(), buffer + sizeof(double), 24);
union {
double value;
std::array<char, 8> buffer;
} delta;
std::memmove(delta.buffer.data(), buffer + sizeof(double) + 24, sizeof(double));
_timeControlWidget->update(
QString::fromStdString(std::string(timeString.begin(), timeString.end())),
QString::number(delta.value)
);
_timelineWidget->setCurrentTime(
std::string(timeString.begin(), timeString.end()),
et.value
);
}
std::vector<std::string> instrumentsFromId(uint16_t instrumentId,
std::map<uint16_t, std::string> instrumentMap)
{
std::vector<std::string> results;
for (int i = 0; i < 16; ++i) {
uint16_t testValue = 1 << i;
if ((testValue & instrumentId) != 0) {
std::string t = instrumentMap.at(testValue);
if (t.empty()) {
qDebug() << "Empty instrument";
}
results.push_back(t);
}
}
return results;
}
QByteArray MainWindow::handlePlaybook(QByteArray data) {
char* buffer = data.data();
size_t currentReadLocation = 0;
uint32_t totalData = readFromBuffer<uint32_t>(buffer, currentReadLocation);
uint8_t nTargets = readFromBuffer<uint8_t>(buffer, currentReadLocation);
qDebug() << "Targets: " << nTargets;
std::map<uint8_t, std::string> targetMap;
for (uint8_t i = 0; i < nTargets; ++i) {
uint8_t id = readFromBuffer<uint8_t>(buffer, currentReadLocation);
std::string value = readFromBuffer<std::string>(buffer, currentReadLocation);
qDebug() << QString::fromStdString(value);
targetMap[id] = value;
}
uint8_t nInstruments = readFromBuffer<uint8_t>(buffer, currentReadLocation);
qDebug() << "Instruments: " << nInstruments;
std::map<uint16_t, std::string> instrumentMap;
for (uint8_t i = 0; i < nInstruments; ++i) {
uint16_t id = readFromBuffer<uint16_t>(buffer, currentReadLocation);
std::string value = readFromBuffer<std::string>(buffer, currentReadLocation);
qDebug() << QString::fromStdString(value);
instrumentMap[id] = value;
}
uint32_t nImages = readFromBuffer<uint32_t>(buffer, currentReadLocation);
std::vector<Image> images;
for (uint32_t i = 0; i < nImages; ++i) {
Image image;
image.beginning = readFromBuffer<double>(buffer, currentReadLocation);
image.ending = readFromBuffer<double>(buffer, currentReadLocation);
image.beginningString = readFromBuffer<std::string>(buffer, currentReadLocation);
image.endingString = readFromBuffer<std::string>(buffer, currentReadLocation);
uint8_t targetId = readFromBuffer<uint8_t>(buffer, currentReadLocation);
uint16_t instrumentId = readFromBuffer<uint16_t>(buffer, currentReadLocation);
image.target = targetMap[targetId];
image.instruments = instrumentsFromId(instrumentId, instrumentMap);
if (image.instruments.empty())
qDebug() << "Instruments were empty";
images.push_back(image);
}
_timelineWidget->setData(
std::move(images),
std::move(targetMap),
std::move(instrumentMap)
);
auto dataSize = data.size();
auto readSize = currentReadLocation;
auto extraBytes = dataSize - readSize;
if (extraBytes > 0) {
return data.mid(currentReadLocation);
}
else {
return QByteArray();
}
}
void MainWindow::sendScript(QString script) {
if (_socket) {
_socket->write(("0" + script + "\r\n").toLatin1());
//QByteArray data = (QString("0") + script).toLocal8Bit();
//qDebug() << data;
//_socket->write(data);
//QThread::msleep(25);
}
//_socket->write(("0" + script + "\r\n").toLatin1());
//_socket->write(("0" + script + "\0").toLatin1());
}
void MainWindow::onSocketConnected() {
_socket->write(QString("1\r\n").toLatin1());
//_socket->write(QString("1").toLatin1());
}
void MainWindow::onSocketDisconnected() {
_configurationWidget->socketDisconnected();
_timeControlWidget->socketDisconnected();
_informationWidget->socketDisconnected();
_timelineWidget->socketDisconnected();
_informationWidget->logInformation("Disconnected.");
}
std::string MainWindow::nextTarget() const {
return _timelineWidget->nextTarget();
}
void MainWindow::fullyConnected() {
_informationWidget->logInformation(
"Connected to " + _socket->peerName() + " on port " +
QString::number(_socket->peerPort()) + "."
);
_configurationWidget->socketConnected();
_timeControlWidget->socketConnected();
_informationWidget->socketConnected();
_timelineWidget->socketConnected();
}
void MainWindow::printMapping(QByteArray data) {
char* buffer = data.data();
size_t currentReadPosition = 0;
uint16_t size = readFromBuffer<uint16_t>(buffer, currentReadPosition);
for (uint16_t i = 0; i < size; ++i) {
uint16_t identifier = readFromBuffer<uint16_t>(buffer, currentReadPosition);
std::string mapping = readFromBuffer<std::string>(buffer, currentReadPosition);
qDebug() << identifier << ": " << QString::fromStdString(mapping);
}
}

View File

@@ -1,74 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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_APP_TIMELINEVIEW___MAINWINDOW___H__
#define __OPENSPACE_APP_TIMELINEVIEW___MAINWINDOW___H__
#include <QWidget>
#include <QTcpSocket>
#include "common.h"
class ConfigurationWidget;
class ControlWidget;
class InformationWidget;
class TimelineWidget;
class MainWindow : public QWidget {
Q_OBJECT
public:
MainWindow();
~MainWindow();
std::string nextTarget() const;
public slots:
void sendScript(QString script);
private slots:
void onConnect(QString host, QString port);
void onDisconnect();
void onSocketConnected();
void onSocketDisconnected();
void readTcpData();
void handleStatusMessage(QByteArray data);
QByteArray handlePlaybook(QByteArray data);
void printMapping(QByteArray data);
void fullyConnected();
private:
ConfigurationWidget* _configurationWidget;
ControlWidget* _timeControlWidget;
InformationWidget* _informationWidget;
TimelineWidget* _timelineWidget;
QTcpSocket* _socket;
bool _isConnected = false;
};
#endif // __OPENSPACE_APP_TIMELINEVIEW___MAINWINDOW___H__

View File

@@ -1,304 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 "timelinewidget.h"
#include <QDebug>
#include <QMap>
#include <QPainter>
#include <QPaintEvent>
#include <iostream>
#include <set>
namespace {
static const int LegendHeight = 105;
static const int TimeWidth = 200;
static const int TextOffset = 5;
QMap<QString, QColor> InstrumentColors = {
{ "NH_ALICE_AIRGLOW", QColor(40, 130, 200) },
{ "NH_ALICE_SOC", QColor(49, 234, 219) },
{ "NH_RALPH_LEISA", QColor(139, 86, 152) },
{ "NH_RALPH_MVIC_NIR", QColor(100, 14, 14) },
{ "NH_RALPH_MVIC_METHANE", QColor(211, 154, 31) },
{ "NH_RALPH_MVIC_RED", QColor(175, 18, 18) },
{ "NH_RALPH_MVIC_BLUE", QColor(84, 79, 149) },
{ "NH_LORRI", QColor(149, 219, 32) },
{ "NH_REX", QColor(35, 185, 125) },
{ "NH_RALPH_MVIC_PAN1", QColor(203, 153, 200) },
{ "NH_RALPH_MVIC_FT", QColor(242, 101, 74) },
{ "NH_RALPH_MVIC_PAN2", QColor(180, 180, 140) }
};
//{ "NH_ALICE_AIRGLOW", QColor(82, 145, 57) },
//{ "NH_ALICE_SOC", QColor(241, 231, 48) },
QMap<QString, QString> InstrumentConversion = {
{ "NH_ALICE_AIRGLOW", "ALICE Airglow" },
{ "NH_RALPH_LEISA", "RALPH LEISA" },
{ "NH_RALPH_MVIC_NIR", "RALPH MVIC NIR" },
{ "NH_ALICE_SOC", "ALICE SOC" },
{ "NH_RALPH_MVIC_BLUE", "RALPH MVIC Blue" },
{ "NH_RALPH_MVIC_PAN1" , "RALPH MVIC Pan1" },
{ "NH_LORRI", "LORRI" },
{ "NH_RALPH_MVIC_FT", "RALPH MVIC FT" },
{ "NH_RALPH_MVIC_PAN2", "RALPH MVIC Pan2" },
{ "NH_RALPH_MVIC_METHANE", "RALPH MVIC Methane" },
{ "NH_RALPH_MVIC_RED", "RALPH MVIC Red" },
{ "NH_REX", "REX" }
};
const double etSpread = 100.0;
}
TimelineWidget::TimelineWidget(QWidget* parent)
: QWidget(parent)
, _currentTime{"", 0.0}
{
setMinimumWidth(600);
setMinimumHeight(600);
}
void TimelineWidget::paintEvent(QPaintEvent* event) {
QPainter painter(this);
QRectF fullRect = contentsRect();
QRectF contentRect(0, 0, fullRect.width() - 1, fullRect.height() - LegendHeight);
QRectF legendRect(
0,
fullRect.bottom() - LegendHeight,
fullRect.right(),
fullRect.bottom()
);
painter.save();
drawContent(painter, contentRect);
painter.restore();
painter.save();
painter.translate(0, fullRect.height() - LegendHeight);
drawLegend(painter, QRectF(legendRect));
painter.restore();
}
void TimelineWidget::setData(std::vector<Image> images,
std::map<uint8_t, std::string> targetMap,
std::map<uint16_t, std::string> instrumentMap)
{
_images.insert(_images.end(), images.begin(), images.end());
std::sort(
_images.begin(),
_images.end(),
[](const Image& a, const Image& b) { return a.beginning < b.beginning; }
);
_targetMap.insert(targetMap.begin(), targetMap.end());
_instrumentMap.insert(instrumentMap.begin(), instrumentMap.end());
_instruments.clear();
std::set<std::string> instruments;
for (auto p : _instrumentMap)
instruments.insert(p.second);
std::copy(instruments.begin(), instruments.end(), std::back_inserter(_instruments));
_targets.clear();
std::set<std::string> targets;
for (auto p : _targetMap)
targets.insert(p.second);
std::copy(targets.begin(), targets.end(), std::back_inserter(_targets));
repaint();
}
void TimelineWidget::drawContent(QPainter& painter, QRectF rect) {
QRectF timelineRect(0, 0, rect.width() - TimeWidth, rect.height());
QRectF dateRect(rect.width() - TimeWidth, 0, TimeWidth, rect.height());
// Draw background
//painter.setBrush(QBrush(Qt::lightGray)); painter.drawRect(timelineRect);
painter.setBrush(QBrush(QColor(85, 85, 85))); painter.drawRect(timelineRect);
painter.setBrush(QBrush(QColor(165, 165, 165))); painter.drawRect(dateRect);
const double lowerTime = _currentTime.et - etSpread;
const double upperTime = _currentTime.et + etSpread;
std::vector<Image*> images;
for (Image& i : _images) {
if (i.beginning <= upperTime && i.ending >= lowerTime)
images.push_back(&i);
}
drawImages(painter, timelineRect, images, lowerTime, upperTime);
// Draw current time
painter.setBrush(QBrush(Qt::black));
painter.setPen(QPen(Qt::black, 2));
painter.drawLine(
QPointF(0, timelineRect.height() / 2),
QPointF(timelineRect.width(), timelineRect.height() / 2)
);
painter.drawText(
timelineRect.width(),
timelineRect.height() / 2 + TextOffset,
QString::fromStdString(_currentTime.time)
);
}
void TimelineWidget::drawLegend(QPainter& painter, QRectF rect) {
static const int Padding = 5;
static const int BoxSize = 20;
int currentHorizontalPosition = Padding;
int currentVerticalPosition = Padding + BoxSize + Padding;
// Draw Targets
// Draw Instruments
for (int i = 0; i < _instruments.size(); ++i) {
if (i == _instruments.size() / 3 || i == _instruments.size() * 2 / 3) {
currentVerticalPosition += BoxSize + Padding;
currentHorizontalPosition = Padding;
}
const std::string& instrument = _instruments[i];
;
painter.setBrush(QBrush(InstrumentColors[QString::fromStdString(instrument)]));
painter.setPen(QPen(InstrumentColors[QString::fromStdString(instrument)]));
painter.drawRect(
currentHorizontalPosition,
currentVerticalPosition,
BoxSize,
BoxSize
);
currentHorizontalPosition += BoxSize + Padding;
painter.setPen(QPen(QColor(200, 200, 200)));
//painter.setPen(QPen(Qt::black));
painter.drawText(
currentHorizontalPosition,
currentVerticalPosition + BoxSize / 2 + TextOffset,
InstrumentConversion[QString::fromStdString(instrument)]
);
currentHorizontalPosition += 125;
}
}
void TimelineWidget::setCurrentTime(std::string currentTime, double et) {
_currentTime.time = std::move(currentTime);
_currentTime.et = std::move(et);
repaint();
}
void TimelineWidget::drawImages(
QPainter& painter,
QRectF timelineRect,
std::vector<Image*> images,
double minimumTime, double maximumTime)
{
std::set<std::string> instrumentSet;
for (Image* i : images) {
for (std::string instrument : i->instruments) {
instrumentSet.insert(instrument);
}
}
std::map<std::string, int> instruments;
for (auto it = instrumentSet.begin(); it != instrumentSet.end(); ++it)
instruments[*it] = std::distance(instrumentSet.begin(), it);
for (Image* i : images) {
double tBeg = (i->beginning - minimumTime) / (maximumTime - minimumTime);
tBeg = std::max(tBeg, 0.0);
double tEnd = (i->ending - minimumTime) / (maximumTime - minimumTime);
tEnd = std::min(tEnd, 1.0);
int loc = timelineRect.top() + timelineRect.height() * tBeg;
int height = (timelineRect.top() + timelineRect.height() * tEnd) - loc;
height = std::max(height, 5);
if (loc + height > timelineRect.height()) {
height = timelineRect.height() - loc;
}
std::string target = i->target;
auto it = std::find(_targets.begin(), _targets.end(), target);
// int iTarget = std::distance(_targets.begin(), it);
for (std::string instrument : i->instruments) {
auto it = std::find(_instruments.begin(), _instruments.end(), instrument);
if (it == _instruments.end()) {
qDebug() << "Instrument not found";
}
painter.setBrush(
QBrush(InstrumentColors[QString::fromStdString(instrument)])
);
double width = timelineRect.width() / instruments.size();
double pos = instruments[instrument] * width;
painter.drawRect(pos, loc, width, height);
}
if (height >= 5) {
painter.setBrush(QBrush(Qt::black));
painter.setPen(QPen(Qt::black));
QString line = QString::fromStdString(i->beginningString) + QString(" (") +
QString::fromStdString(i->target) + QString(")");
painter.drawText(timelineRect.width(), loc + height / 2 + TextOffset, line);
}
}
}
void TimelineWidget::socketConnected() {
setDisabled(false);
}
void TimelineWidget::socketDisconnected() {
setDisabled(true);
_images.clear();
_instruments.clear();
_targets.clear();
}
std::string TimelineWidget::nextTarget() const {
auto it = std::lower_bound(
_images.begin(),
_images.end(),
_currentTime.et,
[](const Image& i, double et) { return i.beginning < et; }
);
if (it != _images.end()) {
return it->target;
}
else {
return "";
}
}

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2018 #
# Copyright (c) 2014-2020 #
# #
# 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 #
@@ -25,18 +25,17 @@
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
)
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
create_new_application(
Wormhole
MACOSX_BUNDLE
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
Wormhole MACOSX_BUNDLE
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
)
target_link_libraries(Wormhole openspace-core)
@@ -45,20 +44,21 @@ target_link_libraries(Wormhole openspace-core)
# Why not put these in the module's path? Because they do not have access to the
# target as of July 2017, which is needed.
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE")
# wanted by CEF
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
set(PROJECT_ARCH "x86_64")
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
if (WIN32)
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
endif ()
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" Wormhole)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
set_cef_targets("${CEF_ROOT}" Wormhole)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
elseif (OPENSPACE_MODULE_WEBBROWSER)
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2020 *
* *
* 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,43 +22,26 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/filesystem/directory.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/logging/consolelog.h>
#include <ghoul/ghoul.h>
#include <openspace/network/parallelserver.h>
#include <ghoul/fmt.h>
#include <ghoul/cmdparser/commandlineparser.h>
#include <ghoul/cmdparser/singlecommand.h>
#include <openspace/engine/windowdelegate.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/rendering/renderable.h>
#include <openspace/network/parallelserver.h>
#include <iostream>
#include <string>
#include <ghoul/glm.h>
#include <functional>
#include <sstream>
#include <ghoul/logging/logmanager.h>
#include <iomanip>
#include <ios>
namespace {
const std::string _loggerCat = "Wormhole";
}
constexpr const char*_loggerCat = "Wormhole";
} // namespace
int main(int argc, char** argv) {
using namespace openspace;
using namespace ghoul::cmdparser;
std::vector<std::string> arguments(argv, argv + argc);
ghoul::cmdparser::CommandlineParser commandlineParser(
CommandlineParser commandlineParser(
"Wormhole",
ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes
CommandlineParser::AllowUnknownCommands::Yes
);
std::stringstream defaultPassword;
@@ -73,43 +56,43 @@ int main(int argc, char** argv) {
std::chrono::system_clock::now().time_since_epoch().count() + 1
) % 0xffffff);
std::string portString = "";
std::string portString;
commandlineParser.addCommand(
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
portString,
"--port",
"-p",
"Sets the port to listen on"
)
)
);
std::string password = "";
std::string password;
commandlineParser.addCommand(
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
password,
"--password",
"-l",
"Sets the password to use"
)
)
);
std::string changeHostPassword = "";
std::string changeHostPassword;
commandlineParser.addCommand(
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
changeHostPassword,
"--hostpassword",
"-h",
"Sets the host password to use"
)
)
);
commandlineParser.setCommandLine(arguments);
commandlineParser.execute();
if (password == "") {
if (password.empty()) {
password = defaultPassword.str();
}
if (changeHostPassword == "") {
if (changeHostPassword.empty()) {
changeHostPassword = defaultChangeHostPassword.str();
}
@@ -118,11 +101,11 @@ int main(int argc, char** argv) {
int port = 25001;
if (portString != "") {
if (!portString.empty()) {
try {
port = std::stoi(portString);
}
catch (...) {
catch (const std::invalid_argument&) {
LERROR(fmt::format("Invalid port: {}", portString));
}
}
@@ -132,7 +115,9 @@ int main(int argc, char** argv) {
server.setDefaultHostAddress("127.0.0.1");
LINFO(fmt::format("Server listening to port {}", port));
while (std::cin.get() != 'q') {}
while (std::cin.get() != 'q') {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
server.stop();
LINFO("Server stopped");

24
config/fullscreen1080.xml Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost" externalControlPort="20500">
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="true" numberOfSamples="4" name="OpenSpace">
<Stereo type="none" />
<Size x="1920" y="1080" />
<Pos x="0" y="0" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

33
config/gui_projector.xml Normal file
View File

@@ -0,0 +1,33 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost" externalControlPort="20500">
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="true" monitor="1" name="OpenSpace" draw2d="false">
<Stereo type="none" />
<Size x="1920" y="1080" />
<Pos x="0" y="0" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
<Window fullScreen="false" border="false" name="GUI" tags="GUI" draw3D="false">
<Stereo type="none" />
<Size x="1920" y="1080" />
<Pos x="0" y="0" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,23 +1,23 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<Node address="localhost" port="20401">
<Window tags="OpenVR" fullScreen="false" numberOfSamples="8" name="OpenSpace">
<Stereo type="side_by_side" />
<!-- Res is equal to the Recommend target size -->
<Size x="1332" y="840" />
<Res x="3024" y="1680" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Projectionplane>
<!-- Lower left -->
<Pos x="-1.7156" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-1.7156" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="1.7156" y="0.965" z="0.0" />
</Projectionplane>
</Viewport>
</Window>
</Node>
<Node address="localhost" port="20401">
<Window tags="OpenVR" fullScreen="false" name="OpenSpace">
<Stereo type="side_by_side" />
<!-- Res is equal to the Recommend target size -->
<Size x="1332" y="840" />
<Res x="3024" y="1680" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Projectionplane>
<!-- Lower left -->
<Pos x="-1.7156" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-1.7156" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="1.7156" y="0.965" z="0.0" />
</Projectionplane>
</Viewport>
</Window>
</Node>
</Cluster>

View File

@@ -1,23 +1,23 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<Node address="localhost" port="20401">
<Window tags="OpenVR" fullScreen="false" numberOfSamples="8" name="OpenSpace">
<Stereo type="side_by_side" />
<!-- Res is equal to the Recommend target size -->
<Size x="1332" y="793" />
<Res x="2664" y="1586" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Projectionplane>
<!-- Lower left -->
<Pos x="-1.7156" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-1.7156" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="1.7156" y="0.965" z="0.0" />
</Projectionplane>
</Viewport>
</Window>
</Node>
<Node address="localhost" port="20401">
<Window tags="OpenVR" fullScreen="false" name="OpenSpace">
<Stereo type="side_by_side" />
<!-- Res is equal to the Recommend target size -->
<Size x="1332" y="793" />
<Res x="2664" y="1586" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<Projectionplane>
<!-- Lower left -->
<Pos x="-1.7156" y="-0.965" z="0.0" />
<!-- Upper left -->
<Pos x="-1.7156" y="0.965" z="0.0" />
<!-- Upper right -->
<Pos x="1.7156" y="0.965" z="0.0" />
</Projectionplane>
</Viewport>
</Window>
</Node>
</Cluster>

View File

@@ -1,24 +1,24 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost" externalControlPort="20500">
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="false" fxaa="false" numberOfSamples="8" name="OpenSpace">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="false" name="OpenSpace">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,37 +1,37 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<!-- <Scene>
<Orientation yaw="0.0" pitch="-27.0" roll="0.0" />
<Offset x="0.0" y="0.0" z="0.0" />
<Scale value="1.0" />
</Scene> -->
<Node address="localhost" port="20401">
<Window fullScreen="false" numberOfSamples="8" name="OpenSpace">
<Stereo type="none" />
<!-- 16:9 aspect ratio -->
<Size x="1024" y="1024" />
<!-- Frame buffer resolution
<Res x="4096" y="4096" /> -->
<!--
quality options (cubemap size):
- low (256)
- medium (512)
- high/1k (1024)
- 2k (2048)
- 4k (4096)
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<Viewport name="fisheye">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="1k" tilt="27.0">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</FisheyeProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
<Orientation yaw="0.0" pitch="-27.0" roll="0.0" />
<Offset x="0.0" y="0.0" z="0.0" />
<Scale value="1.0" />
</Scene> -->
<Node address="localhost" port="20401">
<Window fullScreen="false" name="OpenSpace">
<Stereo type="none" />
<!-- 16:9 aspect ratio -->
<Size x="1024" y="1024" />
<!-- Frame buffer resolution
<Res x="4096" y="4096" /> -->
<!--
quality options (cubemap size):
- low (256)
- medium (512)
- high/1k (1024)
- 2k (2048)
- 4k (4096)
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<Viewport name="fisheye">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="1k" tilt="27.0">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</FisheyeProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<!-- <Scene>
<Orientation yaw="0.0" pitch="-27.0" roll="0.0" />
<Offset x="0.0" y="0.0" z="0.0" />
<Scale value="1.0" />
</Scene> -->
<Node address="localhost" port="20401">
<Window fullScreen="false" name="OpenSpace" draw2d="false">
<Stereo type="none" />
<!-- 16:9 aspect ratio -->
<Size x="1024" y="1024" />
<!-- Frame buffer resolution
<Res x="4096" y="4096" /> -->
<!--
quality options (cubemap size):
- low (256)
- medium (512)
- high/1k (1024)
- 2k (2048)
- 4k (4096)
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<Viewport name="fisheye">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="1k" tilt="27.0">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</FisheyeProjection>
</Viewport>
</Window>
<Window fullScreen="false" name="GUI" tags="GUI" draw3d="false">
<Stereo type="none" />
<Size x="1024" y="1024" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,37 +1,37 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost" externalControlPort="20500">
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="false" numberOfSamples="8" name="OpenSpace">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
<Window fullScreen="false" numberOfSamples="8" name="GUI" tags="GUI">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
<Settings>
<Display swapInterval="0" />
</Settings>
<Node address="localhost" port="20401">
<Window fullScreen="false" name="OpenSpace" draw2d="false">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
<Window fullScreen="false" name="GUI" tags="GUI" draw3d="false">
<Stereo type="none" />
<Size x="1280" y="720" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<Node address="localhost" port="20401">
<Window fullScreen="false">
<Stereo type="none" />
<Pos x="200" y="300" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="360" />
<Viewport eye="left">
<Pos x="0.0" y="0.0" />
<Size x="0.5" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
<Viewport eye="right">
<Pos x="0.5" y="0.0" />
<Size x="0.5" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,32 +1,32 @@
<?xml version="1.0" ?>
<Cluster masterAddress="127.0.0.1">
<Node address="127.0.0.1" port="20401">
<Window fullScreen="false" numberOfSamples="8" border="true">
<Pos x="10" y="100" />
<Size x="1280" y="720" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
<Window fullScreen="false" numberOfSamples="8" border="true">
<Pos x="340" y="100" />
<Size x="1280" y="720" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="4.0" />
</User>
<Node address="127.0.0.1" port="20401">
<Window fullScreen="false" border="true">
<Pos x="10" y="100" />
<Size x="1280" y="720" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
<Window fullScreen="false" border="true">
<Pos x="340" y="100" />
<Size x="1280" y="720" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="4.0" />
</User>
</Cluster>

View File

@@ -1,32 +1,34 @@
<?xml version="1.0" ?>
<Cluster masterAddress="127.0.0.1">
<Node ip="127.0.0.1" port="20401">
<Window fullscreen="false" fxaa="false" msaa="1" name="Spherical Projection">
<Stereo type="none" />
<Pos x="0" y="100" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Res x="2048" y="2048" />
<!--
quality options (cubemap size):
- low (256)
- medium (512)
- high/1k (1024)
- 2k (2048)
- 4k (4096)
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<Viewport name="warped fisheye" mesh="mesh/standard_16x9.data">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="2k" tilt="30.0">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</FisheyeProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>
<Node address="127.0.0.1" port="20401">
<Window fullscreen="false" name="Spherical Projection">
<Stereo type="none" />
<Pos x="0" y="100" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Res x="2048" y="2048" />
<!--
quality options (cubemap size):
- low (256)
- medium (512)
- high/1k (1024)
- 2k (2048)
- 4k (4096)
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<!-- mesh path is relative to working directory-->
<!-- NOTE, if no working directory is set, mesh must be absolute path -->
<Viewport name="warped fisheye" mesh="config/mesh/standard_16x9.data">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="2k" tilt="30.0">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</FisheyeProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<Cluster masterAddress="127.0.0.1">
<Node ip="127.0.0.1" port="20401">
<Window fullscreen="false" fxaa="false" msaa="1" name="Spherical Projection">
<Node address="127.0.0.1" port="20401">
<Window fullscreen="false" name="Spherical Projection">
<Stereo type="none" />
<Pos x="0" y="100" />
<!-- 16:9 aspect ratio -->
@@ -17,7 +17,9 @@
- 8k (8192)
tilt specifies the dome tilt angle in degrees from the horizontal
-->
<Viewport name="warped fisheye" mesh="mesh/standard_16x9.data">
<!-- mesh path is relative to working directory-->
<!-- NOTE, if no working directory is set, mesh must be absolute path -->
<Viewport name="warped fisheye" mesh="mesh/standard_16x9.data" draw2d="false">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<FisheyeProjection fov="180" quality="2k" tilt="30.0">
@@ -25,15 +27,16 @@
</FisheyeProjection>
</Viewport>
</Window>
<Window fullScreen="false" msaa="1" name="GUI" tags="GUI">
<Window fullscreen="false" name="GUI" tags="GUI" draw3d="false">
<Stereo type="none" />
<Size x="1280" y="720" />
<Res x="2048" y="2048" />
<Pos x="50" y="50" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>

View File

@@ -1,29 +1,19 @@
<?xml version="1.0" ?>
<Cluster masterAddress="localhost">
<!-- <Settings>
<Display swapInterval="0" />
</Settings>
-->
<!-- <Scene>
<Orientation yaw="0.0" pitch="-27.0" roll="0.0" />
<Offset x="0.0" y="0.0" z="0.0" />
<Scale value="1.0" />
</Scene>
-->
<Node address="localhost" port="20401">
<Window fullScreen="false" numberOfSamples="4" name="OpenSpace">
<Stereo type="none" />
<Size x="1024" y="1024" />
<Viewport name="Spout">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<SpoutOutputProjection quality="1.5k">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</SpoutOutputProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
<Node address="localhost" port="20401">
<Window fullscreen="false" name="OpenSpace">
<Stereo type="none" />
<Size x="1024" y="1024" />
<Viewport name="Spout">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<SpoutOutputProjection quality="1.5k">
<Background r="0.1" g="0.1" b="0.1" a="1.0" />
</SpoutOutputProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.06">
<Pos x="0.0" y="0.0" z="0.0" />
</User>
</Cluster>

View File

@@ -1,36 +1,36 @@
<?xml version="1.0" ?>
<Cluster masterAddress="127.0.0.1">
<Node address="127.0.0.1" port="20401">
<Window fullScreen="false">
<Pos x="0" y="300" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<Node address="127.0.0.2" port="20402">
<Window fullScreen="false">
<Pos x="640" y="300" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Viewport>
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="16.875" left="30.0" right="30.0" up="16.875" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="4.0" />
</User>
</Cluster>
<Node address="127.0.0.1" port="20401">
<Window fullscreen="false">
<Pos x="0" y="300" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<Node address="127.0.0.2" port="20402">
<Window fullscreen="false">
<Pos x="640" y="300" />
<!-- 16:9 aspect ratio -->
<Size x="1280" y="720" />
<Viewport tracked="true">
<Pos x="0.0" y="0.0" />
<Size x="1.0" y="1.0" />
<PlanarProjection>
<FOV down="25.267007923362" left="40.0" right="40.0" up="25.267007923362" />
<Orientation heading="0.0" pitch="0.0" roll="0.0" />
</PlanarProjection>
</Viewport>
</Window>
</Node>
<User eyeSeparation="0.065">
<Pos x="0.0" y="0.0" z="4.0" />
</User>
</Cluster>

View File

@@ -1,37 +1,42 @@
-- This is a base scene that is included in most other scenes to set up defaults
-- loading this scene directly without any other elements added on top of it will
-- probably not work
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
asset.require('scene/solarsystem/sun/sun')
asset.require('scene/solarsystem/sun/glare')
asset.require('scene/solarsystem/sun/default_layers')
asset.require('scene/solarsystem/planets/planets')
asset.require('scene/solarsystem/planets/default_layers')
asset.require('scene/solarsystem/planets/mars/moons/phobos')
asset.require('scene/solarsystem/planets/mars/moons/deimos')
asset.require('scene/solarsystem/dwarf_planets/pluto/system')
assetHelper.requestAll(asset, 'scene/digitaluniverse')
asset.require('scene/solarsystem/dwarf_planets/pluto/default_layers')
asset.require('scene/solarsystem/dwarf_planets/pluto/charon/default_layers')
asset.require('scene/milkyway/milkyway/volume')
asset.require('scene/milkyway/constellations/constellation_art')
asset.require('scene/milkyway/constellations/constellation_keybinds')
assetHelper.requireAll(asset, 'scene/digitaluniverse')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
-- Load web gui
local webGui = asset.require('util/webgui')
asset.request('customization/globebrowsing')
asset.require('customization/globebrowsing')
-- Keybindings that are specific for this scene
local Keybindings = {
{
Key = "s",
Command = propertyHelper.invert('Scene.Earth.Renderable.Layers.NightLayers.Earth at Night 2012.Enabled') ..
propertyHelper.invert('Scene.Earth.Renderable.PerformShading') ..
propertyHelper.invert('Scene.Earth.Renderable.Atmosphere') ..
propertyHelper.invert('Scene.Earth.Renderable.Layers.WaterMasks.MODIS_Water_Mask.Enabled'),
Name = "Night for earth",
Documentation = "Toggle night texture, shading, atmosphere, and water for Earth.",
GuiPath = "/Rendering",
Local = false
},
{
Key = "b",
Name = "Toggle background",
@@ -58,54 +63,36 @@ local Keybindings = {
},
{
Key = "h",
Name="Hide Trails",
Command = "openspace.setPropertyValue('Scene.*Trail.Renderable.Enabled', false)",
Documentation = "Disables visibility of the trails",
Name="Toggle Trails",
Command = "local list = openspace.getProperty('{planetTrail_solarSystem}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end\n" ..
"local moonlist = openspace.getProperty('{moonTrail_solarSystem}.Renderable.Enabled'); for _,v in pairs(moonlist) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end",
Documentation = "Toggles the visibility of planet and moon trails",
GuiPath = "/Rendering",
Local = false
},
{
Key = "l",
Name = "Toggle planet labels",
Command = "local list = openspace.getProperty('{solarsystem_labels}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end",
Documentation = "Turns on visibility for all solar system labels",
GuiPath = "/Rendering",
Local = false
}
}
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
assetHelper.registerInterestingNodes(asset, {
"Earth", "Mars", "Moon", "Sun"
})
asset.onInitialize(function ()
local now = openspace.time.currentWallTime()
-- Jump back one day to show a complete planet
openspace.time.setTime(openspace.time.advancedTime(now, "-1d"))
webGui.setCefRoute("onscreen")
sceneHelper.bindKeys(Keybindings)
openspace.setDefaultGuiSorting()
openspace.setPropertyValueSingle("RenderEngine.VerticalLogOffset", 0.100000)
openspace.globebrowsing.loadWMSServersFromFile(
openspace.absPath("${DATA}/globebrowsing_servers.lua")
)
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"Scene.*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = earthAsset.Earth.Identifier,
Position = { 0, 0, 0 },
Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 },
})
openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
end)
asset.onDeinitialize(function ()
sceneHelper.unbindKeys(Keybindings)
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
end)

View File

@@ -1,10 +1,9 @@
-- Add require statements for assets exporting the neccessary globes
-- example:
-- here we add Mars, Moon and Mercury:
asset.require('../scene/solarsystem/planets/mars/mars')
asset.require('../scene/solarsystem/planets/earth/moon/moon')
asset.require('../scene/solarsystem/planets/mercury/mercury')
local CreateFocusNodes = false
-- Add folders to this list that contain .info files describing patches
@@ -21,8 +20,17 @@ local vrt_folders = {
-- tl;dr: Specify CTX folders first, then HiRISE
-- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX'
-- We recommend using this folder for CTX
openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'),
-- if not and you have a custom path for CTX layers, enter it below
'',
-- Our provided HiRISE layer
openspace.absPath('${ASSETS}/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE'),
-- We recommend using this folder for HiRISE
openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'),
-- if not and you have a custom path for HiRISE layers, enter it below
'',
},
Moon = {
@@ -32,6 +40,7 @@ local vrt_folders = {
-- results
-- example: 'C:/OpenSpace/GlobeBrowsingData/Moon'
openspace.absPath('${BASE}/../OpenSpaceData/Moon'),
openspace.absPath('${BASE}/../OpenSpaceData/Apollo'),
''
},
Mercury = {
@@ -49,10 +58,12 @@ asset.onInitialize(function ()
-- Add local patches described at the top of this file
for obj, list in pairs(vrt_folders) do
for _, dir in pairs(list) do
openspace.globebrowsing.addBlendingLayersFromDirectory(dir, obj)
if (dir ~= '') then
openspace.globebrowsing.addBlendingLayersFromDirectory(dir, obj)
if CreateFocusNodes then
openspace.globebrowsing.addFocusNodesFromDirectory(dir, obj)
if CreateFocusNodes then
openspace.globebrowsing.addFocusNodesFromDirectory(dir, obj)
end
end
end
end

View File

@@ -5,4 +5,4 @@ asset.export("webguiDevelopmentMode", false)
-- 1) Set the above `webguiDevelopmentMode` to true
-- 2) Clone the repository: https://github.com/OpenSpace/OpenSpace-WebGuiFrontend
-- 3) Install nodejs (including npm)
-- 4) Within the repository, run `npm install` and `npm start`
-- 4) Within the repository, run `npm install` and `npm start`

View File

@@ -0,0 +1,2 @@
Group (optional),Name (required),Globe (optional),Lat (required if globe),Lon (required if globe),Altitude (optional if globe),x (required if not globe),y (required if not globe),z (required if not globe),Scale (optional),LineWidth (optional)
NASA,Kenedy Space Center,Earth,28.6658276,-80.70282839,,,,,,
1 Group (optional) Name (required) Globe (optional) Lat (required if globe) Lon (required if globe) Altitude (optional if globe) x (required if not globe) y (required if not globe) z (required if not globe) Scale (optional) LineWidth (optional)
2 NASA Kenedy Space Center Earth 28.6658276 -80.70282839

View File

@@ -1,53 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.request('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
asset.require('scene/solarsystem/missions/dawn/ceres')
asset.require('scene/solarsystem/missions/dawn/dawn')
asset.require('scene/solarsystem/missions/dawn/vesta')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/webgui')
local DawnAsset = asset.require('scene/solarsystem/missions/dawn/dawn')
asset.onInitialize(function ()
openspace.time.setTime("2011 AUG 06 00:00:00")
openspace.setDefaultGuiSorting()
openspace.markInterestingNodes({
"Dawn", "Ceres", "Vesta"
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = DawnAsset.Dawn.Identifier,
Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 },
Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 },
})
end)
asset.onDeinitialize(function ()
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
openspace.removeInterestingNodes({
"Dawn", "Ceres", "Vesta"
})
end)

View File

@@ -1,7 +0,0 @@
asset.require('./default')
asset.require('scene/solarsystem/planets/jupiter/minor_moons')
asset.require('scene/solarsystem/planets/saturn/minor_moons')
asset.require('scene/solarsystem/planets/uranus/minor_moons')
asset.require('scene/solarsystem/planets/neptune/inner_moons')
asset.require('scene/solarsystem/planets/neptune/irregular_prograde_moons')
asset.require('scene/solarsystem/planets/neptune/irregular_retrograde_moons')

View File

@@ -0,0 +1,27 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
local debugHelper = asset.require('util/debug_helper')
-- At this point, a scene needs basic spice data to load.
asset.require('spice/base')
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
local spheres = asset.require('examples/spheres')
debugHelper.registerCartesianAxes(asset, {
Parent = "Root",
Scale = 10
})
asset.onInitialize(function ()
openspace.navigation.setNavigationState({
Anchor = "Root",
Position = { 20, 20, 20 },
Up = {0, 1, 0},
})
end)

View File

@@ -0,0 +1,54 @@
local assetHelper = asset.require('util/asset_helper')
local scale = 3E11
local radialGrid = {
Identifier = "ExampleRadialGrid",
Parent = "Root",
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale
}
},
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
GridColor = {0.6, 1.0, 0.7},
LineWidth = 3.0,
GridSegments = {3, 4},
InnerRadius = 0.2,
Enabled = false
},
GUI = {
Name = "Example Radial Grid",
Path = "/Examples/Grids"
}
}
local planarGrid = {
Identifier = "ExampleGrid",
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale
}
},
Renderable = {
Type = "RenderableGrid",
GridColor = {0.0, 1.0, 0.8},
LineWidth = 2.0,
Segments = {5, 10},
Size = {1, 2},
Enabled = false
},
GUI = {
Name = "Example Grid",
Path = "/Examples/Grids"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radialGrid,
planarGrid
})

View File

@@ -0,0 +1,10 @@
local assetHelper = asset.require('util/asset_helper')
local spec = {
Type = "ScreenSpaceBrowser",
Identifier = "ScreenSpaceBrowserExample",
Name = "Screen Space Browser Example",
Url = "https://www.openspaceproject.com/"
};
assetHelper.registerScreenSpaceRenderables(asset, { spec })

View File

@@ -3,8 +3,10 @@ local deck = nil
asset.onInitialize(function ()
deck = helper.createDeck("example", {
FlatScreen = false,
SphericalPosition = {0.0, 3.1415 / 2},
UseRadiusAzimuthElevation = true,
RadiusAzimuthElevation = {1.0, 0.0, 0.0}, -- use for dome
UsePerspectiveProjection = true,
FaceCamera = true,
Scale = 0.7
})

View File

@@ -0,0 +1,34 @@
local assetHelper = asset.require('util/asset_helper')
local i = 1
for z=1,3 do
for y=1,3 do
for x=1,3 do
local sphere = {
Identifier = "ExampleSphere" .. i,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = {x, y, z}
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = true,
Size = 0.20 + i * 0.01,
Segments = 80,
Opacity = 1,
Texture = "${DATA}/test2.jpg",
Orientation = "Both",
},
GUI = {
Name = "Test Sphere " .. i,
Path = "/Other/Spheres"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { sphere })
i = i + 1
end
end
end

View File

@@ -35,4 +35,4 @@ local volume = {
}
local objects = { volume }
assetHelper.registerSceneGraphNodes(asset, objects)
assetHelper.registerSceneGraphNodes(asset, objects)

View File

@@ -8,10 +8,10 @@ local ToyVolume = {
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableToyVolume",
Size = {5, 5, 5},
Size = { 5, 5, 5 },
ScalingExponent = 11,
StepSize = 0.01,
Color = {1, 0, 0, 1}
Color = { 1, 0, 0 }
},
GUI = {
Path = "/Examples"

View File

@@ -1,40 +0,0 @@
local has_gaia = openspace.modules.isLoaded('gaia')
if not has_gaia then
openspace.printFatal('Could not load scene "' .. asset.filePath .. '" due to missing module "gaia"')
do return end
end
local assetHelper = asset.require('util/asset_helper')
asset.require('default')
-- Augment default scene with gaia data, 3D model and trail
asset.require('scene/milkyway/gaia/gaiastars')
asset.require('scene/milkyway/gaia/apogee')
asset.require('scene/milkyway/gaia/galah')
asset.require('scene/solarsystem/missions/gaia/gaia')
asset.require('scene/solarsystem/missions/gaia/trail')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemDistance",
Identifier = "GaiaEarthDistance",
GuiName = "Gaia Earth Distance",
SourceType = "Node",
SourceNodeName = "Gaia",
DestinationType = "Node Surface",
DestinationNodeName = "Earth"
}
})
assetHelper.registerInterestingNodes(asset, { "Gaia" })
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Stars.Renderable.Enabled', false);
openspace.navigation.setCameraState({
Focus = "Gaia",
Position = { 1000000000000.0, 1000000000000.0, 1000000000000.0 },
Rotation = { 0.683224, -0.765934, -0.601234, -0.418073 },
})
end)

View File

@@ -0,0 +1,5 @@
local assetHelper = asset.require('util/asset_helper')
local bookmarkHelper = asset.require('util/generate_bookmarks')
local nodes = bookmarkHelper.getBookmarks('Local Bookmarks', '${ASSETS}/customization/localbookmarks.csv')
assetHelper.registerSceneGraphNodesAndExport(asset, nodes);

View File

@@ -0,0 +1,28 @@
local assetHelper = asset.require('util/asset_helper')
local bookmarkHelper = asset.require('util/generate_bookmarks')
local dataProvider = 'http://data.openspaceproject.com/files/bookmarks/v1/bookmarks.csv'
local bookmarksCSV = asset.syncedResource({
Identifier = 'openspace_bookmarks',
Name = 'OpenSpace Bookmarks',
Type = 'UrlSynchronization',
UseHash = false,
Override = true,
Url = dataProvider
})
local nodes = {}
asset.onInitialize(function ()
nodes = bookmarkHelper.getBookmarks('OpenSpace Bookmarks', bookmarksCSV .. '/bookmarks.csv.txt')
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n);
end
end)
asset.onDeinitialize(function ()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n.Identifier);
end
end)

View File

@@ -0,0 +1,48 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SYNC enabled
local assetHelper = asset.require("util/asset_helper")
asset.syncedResource({
Type = "UrlSynchronization",
Name = "Icons",
Identifier = "planet_icons",
Url = {
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/earth.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/moon.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/jupiter.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/mars.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/mercury.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/neptune.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/saturn.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/uranus.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/venus.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/callisto.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/europa.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/ganymede.png",
"http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/io.png",
},
UseHash = false
})
asset.syncedResource({
Type = "UrlSynchronization",
Name = "Stories",
Identifier = "story_images",
Url = {
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_solarsystem.png",
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_jupitermoons.png",
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_earthweather.png",
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_mars.png",
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_galaxies.png",
"http://data.openspaceproject.com/files/webgui/assets/images/stories/story_example.png",
},
UseHash = false
})
asset.syncedResource({
Type = "UrlSynchronization",
Name = "Instructions",
Identifier = "images",
Url = "http://data.openspaceproject.com/files/webgui/assets/images/instructions.png",
UseHash = false
})

View File

@@ -1,54 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.request('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
assetHelper.requireAll(asset, 'scene/solarsystem/missions/juno')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
local junoAsset = asset.require('scene/solarsystem/missions/juno/juno')
assetHelper.registerInterestingNodes(asset, {
"Jupiter", "Juno"
})
asset.onInitialize(function ()
openspace.time.setTime("2016-07-01T10:05:00.00")
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400,
28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = junoAsset.Juno.Identifier,
Position = { 1837386367.601345, -389860693812.834839, 714830404470.398926 },
Rotation = { -0.336540, 0.711402, -0.099212, 0.608937 },
})
end)
asset.onDeinitialize(function ()
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
end)

View File

@@ -1,70 +0,0 @@
--messenger.scene
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/webgui')
local MessengerAsset = asset.require('scene/solarsystem/missions/messenger/messengerSC')
if not openspace.modules.isLoaded("Volume") then
openspace.printError("Volume module is not loaded, skipping asset: mercurymagnetosphere")
else
asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere')
end
asset.request('customization/globebrowsing')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemDistance",
Identifier = "MessengerDistance",
GuiName = "Messenger - Mercury Distance",
SourceType = "Node",
SourceNodeName = "Messenger",
DestinationType = "Node",
DestinationNodeName = "Mercury"
}
})
assetHelper.registerInterestingNodes(asset, {
"Mercury", "Messenger", "Earth", "Sun"
})
asset.onInitialize(function ()
openspace.time.setTime("2011 MAY 13 00:05:18")
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400,
28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"Scene.*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = "Mercury",
Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 },
Rotation = {0.180662, 0.021334, 0.979084, 0.091111},
})
end)

View File

@@ -1,238 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
local renderableHelper = asset.require('util/renderable_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
asset.require('scene/solarsystem/missions/newhorizons/newhorizons')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
asset.request('customization/globebrowsing')
-- Custom Keybindings
local Keybindings = {
{
Key = "a",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'NewHorizons')",
Documentation = "Sets the focus of the camera on 'NewHorizons'.",
Name = "Focus on New Horizons",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "s",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Pluto')",
Documentation = "Sets the focus of the camera on 'Pluto'",
Name = "Focus on Pluto",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "d",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Charon')",
Documentation = "Sets the focus of the camera on 'Charon'.",
Name = "Focus on New Charon",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "F7",
Command =
[[local enabled = openspace.getPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.PerformProjection')
openspace.setPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.PerformProjection', not enabled)
openspace.setPropertyValue('Scene.Charon.Renderable.ProjectionComponent.PerformProjection', not enabled)
openspace.setPropertyValueSingle("Dashboard.NewHorizonsInstruments.Enabled", not enabled)]],
Documentation = "Toggles New Horizons image projection.",
Name = "Toggle NH Image Projection",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "F8",
Command = "openspace.setPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.ClearAllProjections', true);" ..
"openspace.setPropertyValue('Scene.Charon.Renderable.ProjectionComponent.ClearAllProjections', true);",
Documentation = "Removes all image projections from Pluto and Charon.",
Name = "Clear image projections",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "F9",
Command = "openspace.time.setTime('2015-07-14T09:00:00.00');" ..
"openspace.setPropertyValue('Scene.Pluto.Renderable.ClearAllProjections', true);" ..
"openspace.setPropertyValue('Scene.Charon.Renderable.ClearAllProjections', true);",
Documentation = "Jumps to the 14th of July 2015 at 0900 UTC and clears all projections.",
Name = "Reset time and projections",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "KP_8",
Command = propertyHelper.increment('Scene.Pluto.Renderable.HeightExaggeration', 5000),
Documentation = "Increases the height map exaggeration on Pluto.",
Name = "Pluto HeightExaggeration +",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "KP_2",
Command = propertyHelper.decrement('Scene.Pluto.Renderable.HeightExaggeration', 5000),
Documentation = "Decreases the height map exaggeration on Pluto.",
Name = "Pluto HeightExaggeration -",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "KP_9",
Command = propertyHelper.increment('Scene.Charon.Renderable.HeightExaggeration', 5000),
Documentation = "Increases the height map exaggeration on Charon.",
Name = "Charon HeightExaggeration +",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "KP_3",
Command = propertyHelper.decrement('Scene.Charon.Renderable.HeightExaggeration', 5000),
Documentation = "Decreases the height map exaggeration on Charon.",
Name = "Charon HeightExaggeration -",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "o",
Command = propertyHelper.invert('Scene.PlutoTrail.Renderable.Enabled'),
Documentation = "Toggles the visibility of the trail behind Pluto.",
Name = "Toggle Pluto Trail",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "j",
Command = renderableHelper.toggle('Scene.PlutoText') .. renderableHelper.toggle('Scene.CharonText') ..
renderableHelper.toggle('Scene.HydraText') .. renderableHelper.toggle('Scene.NixText') ..
renderableHelper.toggle('Scene.KerberosText') .. renderableHelper.toggle('Scene.StyxText'),
Documentation = "Toggles the visibility of the text labels of Pluto, Charon, Hydra, Nix, Kerberos, and Styx.",
Name = "Toggle Pluto Labels",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "l",
Command = propertyHelper.fadeInOut('Scene.Labels.Renderable.Opacity', 2.0),
Documentation = "Toggles the visibility of the labels for the New Horizons instruments.",
Name = "Toggle New Horizons Labels",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "m",
Command = propertyHelper.invert('Scene.NH_LORRI.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_LEISA.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN1.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN2.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_RED.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_BLUE.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_FT.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_METHANE.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_RALPH_MVIC_NIR.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_ALICE_AIRGLOW.Renderable.SolidDraw') ..
propertyHelper.invert('Scene.NH_ALICE_SOC.Renderable.SolidDraw'),
Documentation = "Draws the instrument field of views in a solid color or as lines.",
Name = "Toggle instrument FOVs",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "Shift+t",
Command = renderableHelper.toggle('Scene.PlutoShadow') .. renderableHelper.toggle('Scene.CharonShadow'),
Documentation = "Toggles the visibility of the shadow visualization of Pluto and Charon.",
Name = "Toggle Shadows",
GuiPath = "/New Horizons",
Local = false
},
{
Key = "t",
Command = renderableHelper.toggle('Scene.NewHorizonsTrailPluto'),
Documentation = "Toggles the trail of New Horizons.",
Name = "Toggle NH Trail",
GuiPath = "/New Horizons",
Local = false
}
}
local NewHorizonsAsset = asset.require('scene/solarsystem/missions/newhorizons/model')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemSpacing",
Identifier = "NewHorizonsSpacing",
GuiName = "New Horizons Spacing",
Spacing = 25
},
{
Type = "DashboardItemDistance",
Identifier = "NewHorizonsPlutoDistance",
GuiName = "New Horizons Pluto Distance",
SourceType = "Node",
SourceNodeName = "NewHorizons",
DestinationType = "Node Surface",
DestinationNodeName = "Pluto"
},
{
Type = "DashboardItemInstruments",
Identifier = "NewHorizonsInstruments",
GuiName = "NewHorizons Instruments",
}
})
assetHelper.registerInterestingNodes(asset, {
"Pluto", "NewHorizons", "Charon"
})
asset.onInitialize(function ()
openspace.time.setTime("2015-07-14T08:00:00.00")
sceneHelper.bindKeys(Keybindings)
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 60, 120, 360, 540, 1080,
2160, 4320, 8640
})
openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.FollowFocusNodeRotationDistance', 20.000000);
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = NewHorizonsAsset.NewHorizons.Identifier,
Position = { 4662120063743.592773, 1263245003503.724854, -955413856565.788086 },
Rotation = { 0.683224, -0.165934, 0.701234, 0.118073 },
})
end)
asset.onDeinitialize(function ()
sceneHelper.unbindKeys(Keybindings)
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
end)

View File

@@ -1,149 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
asset.require('scene/solarsystem/missions/osirisrex/osirisrex')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
-- Custom Keybindings
local Keybindings = {
{
Key = "a",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'OsirisRex')",
Documentation = "Sets the focus of the camera on 'OsirisRex'.",
Local = false
},
{
Key = "s",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'BennuBarycenter')",
Documentation = "Sets the focus of the camera on 'Bennu'",
Local = false
},
{
Key = "F6",
Command = "openspace.printInfo('Set time: Launch');openspace.time.setTime('2016 SEP 08 23:05:00');",
Documentation = "Sets the time to the launch.",
Local = false
},
{
Key = "F7",
Command = "openspace.printInfo('Set time: Gravity Assist');openspace.time.setTime('2017 SEP 22 15:00:00');",
Documentation = "Sets the time to the Earth gravity assist.",
Local = false
},
{
Key = "F8",
Command = "openspace.printInfo('Set time: Approach');openspace.time.setTime('2018-SEP-11 21:31:01.183');",
Documentation = "Sets the time to the approach at Bennu.",
Local = false
},
{
Key = "F9",
Command = "openspace.printInfo('Set time: Preliminary Survey');openspace.time.setTime('2018-NOV-20 01:13:12.183');",
Documentation = "Sets the time to the preliminary survey of Bennu.",
Local = false
},
{
Key = "F10",
Command = "openspace.printInfo('Set time: Orbital B');openspace.time.setTime('2019-APR-08 10:35:27.186');",
Documentation = "Sets the time to the orbital B event.",
Local = false
},
{
Key = "F11",
Command = "openspace.printInfo('Set time: Recon');openspace.time.setTime('2019-MAY-25 03:50:31.195');",
Documentation = "Sets the time to the recon event.",
Local = false
},
{
Key = "q",
Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'),
Documentation = "Toggles the visibility of the text marking the location of the Sun.",
Local = false
},
{
Key = "e",
Command = propertyHelper.invert('Scene.EarthMarker.Renderable.Enabled'),
Documentation = "Toggles the visibility of the text marking the location of the Earth.",
Local = false
}
}
local OsirisRexAsset = asset.require('scene/solarsystem/missions/osirisrex/model')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemSpacing",
Identifier = "OsirisRexSpacing",
GuiName = "OSIRIS-REx Spacing",
Spacing = 25
},
{
Type = "DashboardItemDistance",
Identifier = "OsirisRexBennuDistance",
GuiName = "OSIRIS-REx Bennu Distance",
SourceType = "Node",
SourceNodeName = "OsirisRex",
DestinationType = "Node",
DestinationNodeName = "BennuBarycenter"
},
{
Type = "DashboardItemInstruments",
Identifier = "OsirisRexInstruments",
GuiName = "OSIRIS-REx Instruments",
}
})
asset.onInitialize(function ()
-- openspace.time.setTime("2019 APR 16 12:03:00.00")
openspace.time.setTime("2016 SEP 8 23:00:00.500")
sceneHelper.bindKeys(Keybindings)
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 60, 120, 360, 540, 1080,
2160, 4320, 8640
})
openspace.markInterestingNodes({
"OsirisRex", "BennuBarycenter", "Earth"
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = OsirisRexAsset.OsirisRex.Identifier,
Position = { 26974590199.661884, 76314608558.908020, -127086452897.101791 },
Rotation = { 0.729548, -0.126024, 0.416827, 0.527382 },
})
end)
asset.onDeinitialize(function ()
sceneHelper.unbindKeys(Keybindings)
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
openspace.removeInterestingNodes({
"OsirisRex", "BennuBarycenter", "Earth"
})
end)

View File

@@ -1,152 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local sceneHelper = asset.require('util/scene_helper')
local propertyHelper = asset.require('util/property_helper')
local renderableHelper = asset.require('util/renderable_helper')
-- Specifying which other assets should be loaded in this scene
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
asset.request('scene/digitaluniverse/stars')
asset.request('scene/digitaluniverse/milkyway')
asset.require('scene/solarsystem/missions/rosetta/67p')
asset.require('scene/solarsystem/missions/rosetta/rosetta')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
asset.request('customization/globebrowsing')
-- Custom Keybindings
local Keybindings = {
{
Key = "a",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', '67P')",
Documentation = "Sets the focus of the camera on '67P'.",
Local = false
},
{
Key = "s",
Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Rosetta')",
Documentation = "Sets the focus of the camera on 'Rosetta'",
Local = false
},
{
Key = "F5",
Command = "openspace.time.setTime('2014-08-01T03:05:18.101')",
Documentation = "Jumps to the time of initial approach of Rosetta to 67P.",
Local = false
},
{
Key = "F6",
Command = "openspace.time.setTime('2014-11-12T08:20:00.00')",
Documentation = "Jumps to the time when the Philae lander is released.",
Local = false
},
{
Key = "F8",
Command = "openspace.setPropertyValue('Scene.67P.Renderable.ProjectionComponent.clearAllProjections', true)",
Documentation = "Removes all image projections from 67P.",
Local = false
},
{
Key = "q",
Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'),
Documentation = "Toggles the visibility of the text marking the location of the Sun.",
Local = false
},
{
Key = "e",
Command = renderableHelper.toggle('Scene.JupiterTrail') .. renderableHelper.toggle('Scene.SaturnTrail') ..
renderableHelper.toggle('Scene.UranusTrail') .. renderableHelper.toggle('Scene.NeptuneTrail'),
Documentation = "Toggles the visibility of all trails further from the Sun than 67P.",
Local = false
},
{
Key = "i",
Command = renderableHelper.toggle('Scene.ImagePlaneRosetta'),
Documentation = "Toggles the visibility of the free floating image plane.",
Local = false
},
{
Key = "f",
Command = renderableHelper.toggle('Scene.PhilaeTrail'),
Documentation = "Toggles the visibility of Philae's trail.",
Local = false
},
{
Key = "p",
Command = propertyHelper.invert('Scene.67P.Renderable.ProjectionComponent.performProjection'),
Documentation = "Enables or disables the image projection on 67P.",
Local = false
}
}
local Comet67PAsset = asset.require('scene/solarsystem/missions/rosetta/67p')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemSpacing",
Identifier = "RosettaSpacing",
GuiName = "Rosetta Spacing",
Spacing = 25
},
{
Type = "DashboardItemDistance",
Identifier = "Rosetta67PDistance",
GuiName = "Rosetta 67P Distance",
SourceType = "Node",
SourceNodeName = "Rosetta",
DestinationType = "Node",
DestinationNodeName = "67P"
},
{
Type = "DashboardItemInstruments",
Identifier = "RosettaInstruments",
GuiName = "Rosetta Instruments",
}
})
assetHelper.registerInterestingNodes(asset, {
"67P", "Rosetta", "Philae"
})
asset.onInitialize(function ()
openspace.time.setTime("2014-08-01T03:05:00.000")
sceneHelper.bindKeys(Keybindings)
openspace.setDefaultGuiSorting()
sceneHelper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400,
28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600
})
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.Renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.setCameraState({
Focus = Comet67PAsset.Comet67P.Identifier,
Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 },
Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 },
})
openspace.setPropertyValue('Scene.67P.Renderable.PerformShading', false);
end)
asset.onDeinitialize(function ()
sceneHelper.unbindKeys(Keybindings)
openspace.removeVirtualProperty("*Trail.Renderable.Enabled")
end)

View File

@@ -6,14 +6,14 @@ local textures = asset.syncedResource({
Name = "2dF Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_2dF_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "2dF Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_2dF_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,14 +22,16 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 1.0,
Opacity = 1.0,
File = speck .. "/2dF.speck",
Texture = textures .. "/point3.png",
ColorMap = speck .. "/lss.cmap",
ColorOption = { "redshift", "prox5Mpc" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/2dF.cmap",
ColorOption = { "redshift", "proximity" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 25.0 } },
Unit = "Mpc",
ScaleFactor = 508.0
ScaleFactor = 520.0,
BillboardMaxSize = 4.7,
EnablePixelSizeControl = true
},
GUI = {
Name = "2dF Galaxies",

View File

@@ -6,7 +6,7 @@ local textures = asset.syncedResource({
Name = "2MASS Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_2mass_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
@@ -22,16 +22,18 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 0.4, 0.2 },
Transparency = 1.0,
Opacity = 1.0,
File = speck .. "/2MASS.speck",
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/lss.cmap",
ColorOption = { "redshift", "prox5Mpc" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
Unit = "Mpc",
CorrectionSizeEndDistance = 20.6,
CorrectionSizeFactor = 15.0,
ScaleFactor = 508.0
ScaleFactor = 510.78,
BillboardMaxSize = 11.15,
EnablePixelSizeControl = true
},
GUI = {
Name = "2MASS Galaxies",

View File

@@ -6,14 +6,14 @@ local textures = asset.syncedResource({
Name = "6dF Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_6dF_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "6dF Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_6dF_speck",
Version = 1
Version = 2
})
local object = {
@@ -21,15 +21,17 @@ local object = {
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 1.0,
Color = { 1.0, 1.0, 0.0 },
Opacity = 1.0,
File = speck .. "/6dF.speck",
Texture = textures .. "/point3.png",
ColorMap = speck .. "/lss.cmap",
ColorOption = { "redshift", "prox5Mpc" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
Texture = textures .. "/point3A.png",
ColorMap = speck .. "/6dF.cmap",
ColorOption = { "redshift", "proximity" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 10.0 } },
Unit = "Mpc",
ScaleFactor = 508.0
ScaleFactor = 534.0,
BillboardMaxSize = 7.0,
EnablePixelSizeControl = true,
},
GUI = {
Name = "6dF Galaxies",

View File

@@ -6,14 +6,14 @@ local textures = asset.syncedResource({
Name = "Abell Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_abell_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "Abell Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_abell_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,12 +22,12 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 0.4, 0.2 },
Transparency = 1.0,
ScaleFactor = 525.0,
Opacity = 1.0,
--ColorMap = speck .. "/abell.cmap",
File = speck .. "/abell.speck",
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
LabelFile = speck .. "/abell.label",
TextColor = { 0.0, 0.8, 0.0, 1.0 },
TextColor = { 0.0, 0.8, 0.0 },
TextSize = 22,
TextMinSize = 10.0,
Unit = "Mpc",
@@ -36,7 +36,10 @@ local object = {
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
},
ScaleFactor = 520.0,
BillboardMaxSize = 7.0,
EnablePixelSizeControl = true
},
GUI = {
Name = "Abell Galaxy Clusters",

View File

@@ -15,9 +15,9 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/stars-altlbl.label",
TextColor = { 0.4, 0.4, 0.4, 1.0 },
TextColor = { 0.4, 0.4, 0.4 },
DrawLabels = true,
TextSize = 14.7,
TextMinSize = 6.0,

View File

@@ -6,7 +6,7 @@ local textures = asset.syncedResource({
Name = "Background Radiation Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_backgroundradiation_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
@@ -18,6 +18,12 @@ local speck = asset.syncedResource({
local wmap = {
Identifier = "WMAP",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
@@ -25,9 +31,10 @@ local wmap = {
Segments = 80,
Opacity = 0.5,
Texture = textures .. "/wmap_ilc_7yr_v4_200uK_RGB_sos.png",
Orientation = "Inside/Outside",
FadeInThreshould = 8E26
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Wilkinson Microwave Anisotropy Probe (WMAP)",
@@ -37,6 +44,12 @@ local wmap = {
local cbe = {
Identifier = "CBE",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
@@ -44,8 +57,10 @@ local cbe = {
Segments = 80,
Opacity = 0.5,
Texture = textures .. "/COBErect.png",
Orientation = "Inside/Outside",
FadeInThreshould = 8E26
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Cosmic Background Explorer",
@@ -55,6 +70,41 @@ local cbe = {
local planck = {
Identifier = "Planck",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = true,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.3,
Texture = textures .. "/cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Path = "/Universe/Cosmic Microwave Background"
}
}
local multiverse_planck_1 = {
Identifier = "PlanckMultiverse1",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 2000E23}
},
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
@@ -62,14 +112,137 @@ local planck = {
Segments = 80,
Opacity = 0.3,
Texture = textures .. "/cmb4k.jpg",
Orientation = "Inside/Outside",
FadeInThreshould = 8E26
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Planck Multiverse 1",
Path = "/Universe/Cosmic Microwave Background"
}
}
local multiverse_planck_2 = {
Identifier = "PlanckMultiverse2",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 2500E23, 0.0, 2000E23}
},
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.3,
Texture = textures .. "/cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Planck Multiverse 2",
Path = "/Universe/Cosmic Microwave Background"
}
}
local multiverse_planck_3 = {
Identifier = "PlanckMultiverse3",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 2500E23, 5000E23, 2000E23}
},
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.3,
Texture = textures .. "/cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Planck Multiverse 3",
Path = "/Universe/Cosmic Microwave Background"
}
}
local multiverse_planck_4 = {
Identifier = "PlanckMultiverse4",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 10000E23, 0.0 }
},
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.3,
Texture = textures .. "/cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Planck Multiverse 4",
Path = "/Universe/Cosmic Microwave Background"
}
}
local Halpha = {
Identifier = "HAlpha",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = {0, 0, 3.14159265359}
}
},
Renderable = {
Type = "RenderableSphere",
Enabled = false,
Size = 9.2E21,
Segments = 40,
Opacity = 0.4,
Texture = textures .. "/mwHalpha-f.png",
Orientation = "Inside",
UseAdditiveBlending = true,
MirrorTexture = true,
FadeOutThreshold = 0.025,
Background = true
},
GUI = {
Name = "H Alpha",
Path = "/Milky Way/All Sky Images"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { wmap, cbe, planck })
assetHelper.registerSceneGraphNodesAndExport(asset, {
wmap, cbe, planck, multiverse_planck_1, multiverse_planck_2, multiverse_planck_3,
multiverse_planck_4, Halpha
})

View File

@@ -6,7 +6,7 @@ local speck = asset.syncedResource({
Name = "Clusters Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_clusters_speck",
Version = 1
Version = 2
})
local object = {
@@ -15,13 +15,19 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/galclust.label",
TextColor = { 0.7, 0.3, 0.0, 1.0 },
TextColor = { 1.0, 0.44, 0.0 },
DrawLabels = true,
TextSize = 22,
TextMinSize = 8.0,
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
},
GUI = {
Name = "Galaxy Cluster Labels",

View File

@@ -6,7 +6,7 @@ local speck = asset.syncedResource({
Name = "Constellation Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_constellations_speck",
Version = 1
Version = 2
})
local constellationsExtragalactic = {
@@ -14,12 +14,11 @@ local constellationsExtragalactic = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 0.4, 0.2 },
Transparency = 1.0,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/constellationsEXGAL.speck",
LabelFile = speck .. "/constellationsEXGAL.label",
TextColor = { 0.8, 0.8, 0.8, 1.0 },
TextColor = { 0.8, 0.8, 0.8 },
TextOpacity = 0.4,
TextSize = 20.0,
TextMinSize = 20.0,
TextMaxSize = 30.0,
@@ -37,12 +36,11 @@ local constellations = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 0.4, 0.2 },
Transparency = 1.0,
ScaleFactor = 1.0,
Opacity = 0.3,
File = speck .. "/constellations.speck",
LabelFile = speck .. "/constellations.label",
TextColor = { 0.8, 0.8, 0.8, 1.0 },
TextColor = { 0.8, 0.8, 0.8 },
TextOpacity = 0.3,
TextSize = 14.5,
TextMaxSize = 170.0,
TextMinSize = 8.0,

View File

@@ -0,0 +1,87 @@
local assetHelper = asset.require('util/asset_helper')
local textures = asset.syncedResource({
Name = "Deep Sky Objects Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_deepsky_textures",
Version = 1
})
local speck = asset.syncedResource({
Name = "Deep Sky Objects Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_deepsky_speck",
Version = 1
})
local deepSkyPoints = {
Identifier = "DeepSkyObjects",
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 0.0 },
Opacity = 0.99,
ScaleFactor = 500.0,
File = speck .. "/dso.speck",
Texture = textures .. "/point3.png",
--ColorMap = speck .. "/tully.cmap",
--ColorMap = speck .. "/lss.cmap",
--ColorOption = { "proximity" },
--ColorOption = { "prox5Mpc" },
--ColorRange = { { 1.0, 30.0 } },
LabelFile = speck .. "/dso.label",
TextColor = { 0.1, 0.4, 0.6 },
TextSize = 20.50,
TextMinSize = 16.0,
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
--FadeInDistances = { 0.05, 1.0 },
-- Max size in pixels
BillboardMaxSize = 8.22,
BillboardMinSize = 0.0,
--CorrectionSizeEndDistance = 22.0,
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
},
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, 3.14159265359 }
}
},
GUI = {
Name = "Deep Sky Objects Points",
Path = "/Universe/Galaxies"
}
}
local deepSkyImages = {
Identifier = "DeepSkyObjectsImages",
Renderable = {
Type = "RenderablePlanesCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.99,
ScaleFactor = 1.0,
File = speck .. "/dso.speck",
TexturePath = textures,
Luminosity = "radius",
ScaleLuminosity = 0.001,
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
--FadeInDistances = {0.001, 0.05010},
PlaneMinSize = 5.0
},
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = {3.14159265359, 3.14159265359, 0 }
}
},
GUI = {
Name = "Deep Sky Objects Images",
Path = "/Universe/Galaxies"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { deepSkyPoints, deepSkyImages })

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Brown Dwarf Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_dwarfs_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,20 +22,26 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.4, 0.0, 0.1 },
Transparency = 0.999,
Opacity = 1.0,
File = speck .. "/dwarfs.speck",
Texture = textures .. "/point3.png",
LabelFile = speck .. "/dwarfs.label",
TextColor = { 0.5, 0.1, 0.2, 1.0 },
ColorMap = speck .. "/dwarfs.cmap",
ColorOption = { "typeindex" },
--ColorRange = { { 1.0, 4.0} },
TextColor = { 0.5, 0.1, 0.2 },
TextSize = 14.6,
TextMinSize = 10.0,
ScaleFactor = 360,
CorrectionSizeEndDistance = 16.1,
CorrectionSizeFactor = 7.75,
ScaleFactor = 370,
--CorrectionSizeEndDistance = 16.1,
--CorrectionSizeFactor = 7.75,
BillboardMaxSize = 18.0,
EnablePixelSizeControl = true,
Unit = "pc"
},
GUI = {
Path = "/Milky Way/Brown Dwarfs"
Name = "Brown Dwarfs",
Path = "/Milky Way"
}
}

View File

@@ -22,19 +22,21 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 1.0,
ScaleFactor = 10.0,
Texture = textures .. "/target-blue.png",
File = speck .. "/expl.speck",
LabelFile = speck .. "/expl.label",
ScaleFactor = 380.0,
TextColor = { 0.3, 0.3, 0.8, 1.0 },
ScaleFactor = 392.5,
TextColor = { 0.3, 0.3, 0.8 },
TextSize = 14.8,
TextMaxSize = 200.0,
TextMinSize = 10.0,
CorrectionSizeEndDistance = 15.23,
CorrectionSizeFactor = 13.3,
Unit = "pc"
Unit = "pc",
BillboardMaxSize = 52.0,
EnablePixelSizeControl = true,
},
GUI = {
Path = "/Milky Way/Exoplanets"

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Globular Clusters Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_globularclusters_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,21 +22,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.8, 0.8, 0.0 },
Transparency = 0.35,
Opacity = 0.4,
File = speck .. "/gc.speck",
Texture = textures .. "/point4.png",
PolygonSides = 5,
LabelFile = speck .. "/gc.label",
TextColor = { 0.5, 0.5, 0.0, 1.0 },
ScaleFactor = 440.0,
TextSize = 17.5,
TextMinSize = 10.0,
TextMaxSize = 30.0,
Unit = "pc"
TextColor = { 0.5, 0.5, 0.0 },
ScaleFactor = 431.0,
TextSize = 16.7,
TextMinSize = 4.0,
TextMaxSize = 20,
Unit = "pc",
BillboardMaxSize = 500,
EnablePixelSizeControl = true,
},
GUI = {
Name = "Globular Clusters",
Path = "/Milky Way/Globular Clusters"
Path = "/Milky Way"
}
}

View File

@@ -2,12 +2,23 @@ local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('scene/solarsystem/sun/transforms')
local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local equatorialRotationMatrix = {
-0.05487554, 0.4941095, -0.8676661,
-0.8734371 , -0.4448296, -0.1980764,
-0.483835 , 0.7469823, 0.4559838
}
local eclipticRotationMatrix = {
-0.05487554, 0.4941095, -0.8676661,
-0.9938214 , -0.1109906, -0.0003515167,
-0.09647644, 0.8622859, 0.4971472
}
local speck = asset.syncedResource({
Name = "Grids Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_grids_speck",
Version = 1
Version = 2
})
local radio = {
@@ -19,17 +30,18 @@ local radio = {
-- First TV signals strong enough to leave the ionosphere
ReferenceDate = "1936 AUG 01 12:00:00",
Speed = 299792458 -- c
},
Rotation = {
Type = "StaticRotation",
Rotation = equatorialRotationMatrix
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 1.0, 1.0, 0.3, 0.75},
LineWidth = 2.0,
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 }
Opacity = 1.0,
GridColor = { 0.3, 0.84, 1.0 },
LineWidth = 2.0
},
GUI = {
Name = "Radio Sphere",
@@ -37,24 +49,51 @@ local radio = {
}
}
local oort = {
Identifier = "OortSphere",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 7.47989845E15
},
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
Opacity = 0.8,
GridColor = { 0.8, 0.4, 0.4 },
LineWidth = 2.0
},
GUI = {
Name = "Oort Sphere",
Path = "/Other/Grids"
}
}
local ecliptic = {
Identifier = "EclipticSphere",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 9.46377307652E17;
Scale = 9.46377307652E17
},
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.7, 0.0, 0.0, 0.5},
LineWidth = 2.0,
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 }
Opacity = 1.0,
GridColor = { 0.74, 0.26, 0.26 },
LineWidth = 2.0
},
GUI = {
Name = "Ecliptic Sphere",
@@ -65,24 +104,24 @@ local ecliptic = {
local eclipticLabels = {
Identifier = "EclipticSphereLabels",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/eclip.label",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5, 1.0 },
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 14.75,
TextMinSize = 1.3,
TextMaxSize = 50.0,
Unit = "pc",
TransformationMatrix = {
-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
}
},
GUI = {
Name = "Ecliptic Sphere Labels",
@@ -96,18 +135,19 @@ local equatorial = {
Transform = {
Scale = {
Type = "StaticScale",
Scale = 6.2440846E17;
Scale = 4.28601E17;
},
Rotation = {
Type = "StaticRotation",
Rotation = equatorialRotationMatrix
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = false,
GridColor = { 0.0, 0.0, 1.0, 0.8},
LineWidth = 2.0,
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 },
Opacity = 0.8,
GridColor = { 0.69, 0.68, 0.29 },
LineWidth = 2.0
},
GUI = {
Name = "Equatorial Sphere",
@@ -118,24 +158,24 @@ local equatorial = {
local equatorialLabels = {
Identifier = "EquatorialSphereLabels",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = equatorialRotationMatrix
}
},
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/radec.label",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5, 1.0 },
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 14.5,
TextMinSize = 1.7,
TextMaxSize = 70.0,
Unit = "pc",
TransformationMatrix = {
-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
}
},
GUI = {
Name = "Equatorial Sphere Labels",
@@ -156,7 +196,8 @@ local galactic = {
Type = "RenderableSphericalGrid",
Enabled = false,
LineWidth = 2.0,
GridColor = { 0.0, 0.6, 0.6, 0.6}
Opacity = 1.0,
GridColor = { 0.0, 0.6, 0.6 }
},
GUI = {
Name = "Galactic Sphere",
@@ -171,10 +212,10 @@ local galacticLabels = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/galac.label",
DrawLabels = true,
TextColor = { 0.5, 0.5, 0.5, 1.0 },
TextColor = { 0.5, 0.5, 0.5 },
TextSize = 15.8,
TextMinSize = 0.5,
TextMaxSize = 100.0,
@@ -186,18 +227,212 @@ local galacticLabels = {
}
}
local plane1ld = {
Identifier = "1ldGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/1ld.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "Km"
},
GUI = {
Name = "1ld Grid",
Path = "/Other/Grids"
}
}
local plane1lm = {
Identifier = "1lmGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/1lm.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/1lm.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 11.8,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "1lm Grid",
Path = "/Other/Grids"
}
}
local plane1ly = {
Identifier = "1lyGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/1ly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/1ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 13.0,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "1ly Grid",
Path = "/Other/Grids"
}
}
local plane10ly = {
Identifier = "10lyGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/10ly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/10ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 14.17,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "10ly Grid",
Path = "/Other/Grids"
}
}
local plane100ly = {
Identifier = "100lyGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/100ly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/100ly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 15.0,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "100ly Grid",
Path = "/Other/Grids"
}
}
local plane1kly = {
Identifier = "1klyGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/1kly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/1kly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 16.0,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "1kly Grid",
Path = "/Other/Grids"
}
}
local plane10kly = {
Identifier = "10klyGrid",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = eclipticRotationMatrix
}
},
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 0.4,
File = speck .. "/10kly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/10kly.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 17.25,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "10kly Grid",
Path = "/Other/Grids"
}
}
local plane100kly = {
Identifier = "100klyGrid",
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.4,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/100kly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/100kly.label",
TextColor = { 0.0, 0.2, 0.5, 1.0 },
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 18.6,
TextMinSize = 0.5,
TextMaxSize = 30.0,
@@ -214,13 +449,11 @@ local plane1Mly = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.4,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/1Mly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/1Mly.label",
TextColor = { 0.0, 0.2, 0.5, 1.0 },
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 19.6,
TextMinSize = 0.5,
TextMaxSize = 30.0,
@@ -237,13 +470,11 @@ local plane10Mly = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.4,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/10Mly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/10Mly.label",
TextColor = { 0.0, 0.2, 0.5, 1.0 },
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 20.6,
TextMinSize = 0.5,
TextMaxSize = 30.0,
@@ -260,13 +491,11 @@ local plane100Mly = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.4,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/100Mly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/100Mly.label",
TextColor = { 0.0, 0.2, 0.5, 1.0 },
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 21.6,
TextMinSize = 0.5,
TextMaxSize = 30.0,
@@ -283,13 +512,11 @@ local plane20Gly = {
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.4,
ScaleFactor = 1.0,
Opacity = 0.4,
File = speck .. "/20Gly.speck",
MeshColor = {{ 0.1, 0.5, 0.6 }},
LabelFile = speck .. "/20Gly.label",
TextColor = { 0.0, 0.2, 0.5, 1.0 },
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 23.6,
TextMinSize = 0.5,
TextMaxSize = 30.0,
@@ -302,6 +529,7 @@ local plane20Gly = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radio, ecliptic, eclipticLabels, equatorial, equatorialLabels, galactic,
galacticLabels, plane100kly, plane1Mly, plane10Mly, plane100Mly, plane20Gly
radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels, galactic,
galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly, plane100ly, plane1kly,
plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly, plane20Gly
})

View File

@@ -15,16 +15,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
--ScaleFactor = 10.0,
LabelFile = speck .. "/groups.label",
TextColor = { 0.1, 0.6, 0.2, 1.0 },
TextColor = { 0.1, 0.6, 0.2 },
TextSize = 21.5,
TextMinSize = 8.0,
Unit = "Mpc"
Unit = "Mpc",
DrawLabels = true,
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
},
GUI = {
Name = "Nearby Galaxy Groups",
Name = "Galaxy Group Labels",
Path = "/Universe/Galaxies"
}
}

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "HII Regions Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_h2regions_speck",
Version = 2
Version = 3
})
local object = {
@@ -22,21 +22,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.0, 0.5, 1.0 },
Transparency = 0.35,
Opacity = 0.70,
File = speck .. "/h2.speck",
Texture = textures .."/point4.png",
PolygonSides = 6,
LabelFile = speck .. "/h2.label",
TextColor = { 0.5, 0.5, 0.5, 1.0 },
TextColor = { 0.5, 0.5, 0.5 },
ScaleFactor = 420,
TextSize = 17.25,
TextMinSize = 10.0,
TextMinSize = 30.0,
Unit = "pc"
TextSize = 16.24,
TextMinSize = 4.0,
TextMaxSize = 20.0,
Unit = "pc",
BillboardMaxSize = 300.0,
EnablePixelSizeControl = false
},
GUI = {
Name = "HII Regions",
Path = "/Milky Way/HII"
Path = "/Milky Way"
}
}

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Kepler Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_kepler_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,13 +22,15 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 0.0 },
Transparency = 0.99,
ScaleFactor = 395.0,
Opacity = 0.99,
ScaleFactor = 410.0,
File = speck .. "/kepler.speck",
Texture = textures .. "/halo.png",
CorrectionSizeEndDistance = 15.86,
CorrectionSizeFactor = 8.59,
Unit = "pc"
Unit = "pc",
BillboardMaxSize = 23.0,
EnablePixelSizeControl = true
},
GUI = {
Name = "Kepler Planetary Candidates",

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Local Dwarfs Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_localdwarfs_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,19 +22,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.5, 1.0, 0.2 },
Transparency = 0.3,
File = speck .. "/localdwarfs.speck",
ColorMap = speck .. "/localgroup.cmap",
ColorOption = { "association" },
Opacity = 0.3,
File = speck .. "/localgroup.speck",
Texture = textures .. "/point4.png",
PolygonSides = 12,
LabelFile = speck .. "/localdwarfs.label",
TextColor = { 0.3, 0.3, 1.0, 1.0 },
ScaleFactor = 478,
LabelFile = speck .. "/localgroup.label",
TextColor = { 0.3, 0.3, 1.0 },
ScaleFactor = 465,
TextSize = 18.3,
TextMinSize = 7.3,
Unit = "Mpc"
Unit = "Mpc",
BillboardMaxSize = 20.0,
EnablePixelSizeControl = true
},
GUI = {
Name = "Local Dwarf Galaxies",
Name = "Local Group",
Path = "/Universe/Galaxies"
}
}

View File

@@ -23,20 +23,36 @@ local planeSpeck = asset.syncedResource({
Version = 1
})
local homespeck = asset.syncedResource({
Name = "Home Speck File",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_home_speck",
Version = 1
})
local sphere = {
Identifier = "MilkyWay",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = {0, 0, 3.14159265359}
}
},
Renderable = {
Type = "RenderableSphere",
Size = 9.2E20,
Size = 9.2E21,
Segments = 40,
Opacity = 0.4,
Opacity = 0.35,
Texture = sphereTextures .. "/DarkUniverse_mellinger_4k.jpg",
Orientation = "Inside/Outside",
FadeOutThreshould = 0.25
Orientation = "Inside",
UseAdditiveBlending = true,
MirrorTexture = true,
FadeOutThreshold = 0.0015,
Background = true
},
GUI = {
Name = "Milky Way",
Path = "/Milky Way/Milky Way"
Name = "Milky Way Sphere",
Path = "/Milky Way"
}
}
@@ -47,15 +63,14 @@ local plane = {
Type = "RenderablePlanesCloud",
Enabled = true,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.90,
Opacity = 0.99,
ScaleFactor = 2.8,
File = planeSpeck .. "/galaxy.speck",
TexturePath = planeTextures,
Luminosity = "size",
ScaleLuminosity = 1.0,
-- Fade in value in the same unit as "Unit"
FadeInThreshould = 119441,
FadeInDistances = { 1400.0, 119441.0 },
FadeInDistances = { 3000.0, 50000.0 },
PlaneMinSize = 5.0,
Unit = "pc"
},
@@ -65,6 +80,43 @@ local plane = {
}
}
local homeLabel = {
Identifier = "HomeLabel",
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 0.4, 0.2 },
Opacity = 0.99,
ScaleFactor = 500.0,
--File = homespeck .. "/home.speck",
-- Texture = textures .. "/point3.png",
DrawLabels = true,
LabelFile = homespeck .. "/home.label",
TextColor = { 0.8, 0.8, 0.8 },
TextSize = 20.50,
TextMinSize = 16.0,
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = { 0.05, 1.0 },
-- Max size in pixels
BillboardMaxSize = 8.22,
BillboardMinSize = 0.0,
--CorrectionSizeEndDistance = 22.0,
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
},
GUI = {
Name = "Home Label",
Path = "/Universe/Galaxies"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { sphere, plane })
assetHelper.registerSceneGraphNodesAndExport(asset, { sphere, plane, homeLabel })

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "OB Associations Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_obassociations_speck",
Version = 1
Version = 3
})
local object = {
@@ -21,22 +21,28 @@ local object = {
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.0, 0.0, 1.0 },
Transparency = 0.5,
Color = { 1.0, 1.0, 1.0 },
ColorMap = speck .. "/ob.cmap",
ColorOption = { "arm" },
SizeOption = {"diameter"},
ExactColorMap = true,
Opacity = 0.7,
File = speck .. "/ob.speck",
Texture = textures .. "/point4.png",
PolygonSides = 7,
LabelFile = speck .. "/ob.label",
TextColor = { 0.4, 0.5, 1.0, 1.0 },
ScaleFactor = 428.0,
TextSize = 17.0,
TextMinSize = 5.76,
TextMaxSize = 30.0,
Unit = "pc"
TextColor = { 0.4, 0.5, 1.0 },
ScaleFactor = 390.0,
TextSize = 16.24,
TextMinSize = 4.50,
TextMaxSize = 25,
Unit = "pc",
BillboardMaxSize = 450.0,
EnablePixelSizeControl = true
},
GUI = {
Name = "OB Associations",
Path = "/Milky Way/OB Associations"
Path = "/Milky Way"
}
}

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Open Clusters Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_openclusters_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,21 +22,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.1, 0.8, 0.4 },
Transparency = 0.5,
Opacity = 0.5,
File = speck .. "/oc.speck",
Texture = textures .. "/point4.png",
PolygonSides = 12,
TextColor = { 0.05, 0.4, 0.2, 1.0 },
TextColor = { 0.05, 0.4, 0.2 },
LabelFile = speck .. "/oc.label",
ScaleFactor = 418.33,
TextSize = 16.68,
ScaleFactor = 405.75,
TextSize = 15.5,
TextMinSize = 4.5,
TextMaxSize = 30.0,
Unit = "pc"
Unit = "pc",
BillboardMaxSize = 604,
EnablePixelSizeControl = true
},
GUI = {
Name = "Open Star Clusters",
Path = "/Milky Way/Open Clusters"
Path = "/Milky Way"
}
}

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Planetary Nebulae Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_planetarynebulae_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,21 +22,23 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.4, 0.4, 0.9 },
Transparency = 0.35,
Opacity = 0.65,
File = speck .. "/pn.speck",
Texture = textures .. "/point4.png",
PolygonSides = 3,
LabelFile = speck .. "/pn.label",
TextColor = { 0.25, 0.25, 0.65, 1.0 },
ScaleFactor = 418.33,
TextSize = 16.68,
TextColor = { 0.25, 0.25, 0.65 },
ScaleFactor = 425.0,
TextSize = 16.24,
TextMinSize = 4.5,
TextMaxSize = 30.0,
Unit = "pc"
TextMaxSize = 25.0,
Unit = "pc",
BillboardMaxSize = 500,
EnablePixelSizeControl = true
},
GUI = {
Name = "Planetary Nebulae",
Path = "/Milky Way/Planetary Nebulae"
Path = "/Milky Way"
}
}

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Pulsars Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_pulsars_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,20 +22,22 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 0.7, 0.0, 0.0 },
Transparency = 0.5,
Opacity = 1.0,
File = speck .. "/pulsar.speck",
Texture = textures .. "/point4.png",
PolygonSides = 4,
LabelFile = speck .. "/pulsar.label",
TextColor = { 0.7, 0.0, 0.0, 1.0 },
ScaleFactor = 418.33,
TextSize = 16.68,
TextMinSize = 7.5,
TextMaxSize = 30.0,
Unit = "pc"
TextColor = { 0.7, 0.2, 0.2 },
ScaleFactor = 424,
TextSize = 15.77,
TextMinSize = 4,
TextMaxSize = 20.0,
Unit = "pc",
BillboardMaxSize = 500,
EnablePixelSizeControl = false
},
GUI = {
Path = "/Milky Way/Pulsars"
Path = "/Milky Way"
}
}

View File

@@ -6,34 +6,36 @@ local textures = asset.syncedResource({
Name = "Quasars Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_quasars_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "Quasars Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_quasars_speck",
Version = 1
Version = 2
})
local object = {
Identifier = "Quasars",
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Enabled = true,
Color = { 1.0, 0.4, 0.2 },
Transparency = 1.0,
Opacity = 0.95,
File = speck .. "/quasars.speck",
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
Unit = "Mpc",
ScaleFactor = 537.31,
ScaleFactor = 540.9,
-- Fade in value in the same unit as "Unit"
FadeInDistances = { 1000.0, 10000.0 },
BillboardMaxSize = 30.0,
BillboardMinSize = 0.0,
BillboardMaxSize = 11.1,
EnablePixelSizeControl = true
},
GUI = {
Path = "/Universe/Quasars"
Path = "/Universe"
}
}

View File

@@ -6,29 +6,29 @@ local textures = asset.syncedResource({
Name = "Sloan Digital Sky Survey Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_sloandss_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "Sloan Digital Sky Survey Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_sloandss_speck",
Version = 1
Version = 2
})
local object = {
Identifier = "SloanDigitalSkySurvey",
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Enabled = true,
Color = { 0.8, 0.8, 1.0 },
Transparency = 1.0,
ScaleFactor = 507.88,
Opacity = 0.8,
ScaleFactor = 520.0,
File = speck .. "/SDSSgals.speck",
ColorMap = speck .. "/lss.cmap",
ColorOption = { "redshift", "prox5Mpc" },
ColorMap = speck .. "/SDSSgals.cmap",
ColorOption = { "redshift", "proximity" },
ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } },
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = { 220.0, 650.0 },
@@ -38,7 +38,9 @@ local object = {
CorrectionSizeFactor = 10.41,
TextSize = 14.8,
TextMinSize = 10.0,
TextMaxSize = 50.0
TextMaxSize = 50.0,
BillboardMaxSize = 5.5,
EnablePixelSizeControl = true
},
GUI = {
Name = "Sloan Digital Sky Survey",

View File

@@ -15,9 +15,9 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/stars.label",
TextColor = { 0.4, 0.4, 0.4, 1.0 },
TextColor = { 0.4, 0.4, 0.4 },
DrawLabels = true,
TextSize = 14.7,
TextMinSize = 6.0,

View File

@@ -0,0 +1,170 @@
local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('scene/solarsystem/sun/transforms')
local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local speck = asset.syncedResource({
Name = "Grids Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_starorbits_speck",
Version = 1
})
local sunOrbit = {
Identifier = "SunOrbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-Sun.speck",
MeshColor = {{ 1.0, 0.65, 0.0 }},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "Sun Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local barnardsOrbit = {
Identifier = "BarnardsOrbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-BarnardsStar.speck",
MeshColor = {{0.39, 0.58, 0.93}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "Barnards Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local kapteynsOrbit = {
Identifier = "KapteynsOrbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-KapteynsStar.speck",
MeshColor = {{0.6, 0.6, 0.6}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "Kapteyns Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local lacaille9352Orbit = {
Identifier = "Lacaille9352Orbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-Lacaille9352.speck",
MeshColor = {{0.58, 0.0, 0.83}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "Lacaille 9352 Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local lSR1826Orbit = {
Identifier = "LSR1826Orbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-LSR1826+3014.speck",
MeshColor = {{0.0, 0.39, 0.0}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "LSR1826+3014 Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local lSRJ0822Orbit = {
Identifier = "LSRJ0822Orbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-LSRJ0822+1700.speck",
MeshColor = {{0.5, 1.0, 0.0}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "LSRJ0822+1700 Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
local pM_J13420Orbit = {
Identifier = "PM_J13420Orbit",
--Parent = transforms.SolarSystemBarycenter.Name,
Renderable = {
Type = "RenderableDUMeshes",
Enabled = false,
Opacity = 1.0,
File = speck .. "/starorbits-PM_J13420-3415.speck",
MeshColor = {{0.70, 0.13, 0.13}},
--LabelFile = speck .. "/1ld.label",
TextColor = { 0.0, 0.2, 0.5 },
TextSize = 10.3,
TextMinSize = 0.5,
TextMaxSize = 30.0,
Unit = "pc"
},
GUI = {
Name = "PM_J13420-3415 Orbit",
Path = "/Milky Way/Stars/Stars Orbits"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
sunOrbit, barnardsOrbit, pM_J13420Orbit, lSRJ0822Orbit, lSR1826Orbit,
lacaille9352Orbit, kapteynsOrbit
})

View File

@@ -13,6 +13,13 @@ local speck = asset.syncedResource({
Name = "Stars Speck Files",
Type = "HttpSynchronization",
Identifier = "stars_du",
Version = 4
})
local sunspeck = asset.syncedResource({
Name = "Stars Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_sunstar_speck",
Version = 1
})
@@ -29,11 +36,34 @@ local stars = {
Type = "RenderableStars",
File = speck .. "/stars.speck",
Texture = textures .. "/halo.png",
ColorMap = colorLUT .. "/colorbv.cmap"
--ShapeTexture = textures .. "/disc.png",
ColorMap = colorLUT .. "/colorbv.cmap",
MagnitudeExponent = 6.2,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based" -- or PSF
},
GUI = {
Path = "/Milky Way/Stars"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { stars })
local sunstar = {
Identifier = "SunStar",
Renderable = {
Type = "RenderableStars",
File = sunspeck .. "/sunstar.speck",
Texture = textures .. "/halo.png",
--ShapeTexture = textures .. "/disc.png",
ColorMap = colorLUT .. "/colorbv.cmap",
MagnitudeExponent = 6.2,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based", -- or PSF
FadeInDistances = { 0.0001, 0.1 }
},
GUI = {
Name = "Sun",
Path = "/Milky Way/Stars"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { stars, sunstar })

View File

@@ -6,14 +6,14 @@ local textures = asset.syncedResource({
Name = "Galaxy Superclusters Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_superclusters_textures",
Version = 1
Version = 2
})
local speck = asset.syncedResource({
Name = "Galaxy Superclusters Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_superclusters_speck",
Version = 1
Version = 2
})
local object = {
@@ -21,16 +21,20 @@ local object = {
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
DrawElements = false,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
File = speck .. "/superclust.speck",
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
LabelFile = speck .. "/superclust.label",
TextColor = { 0.6, 0.6, 0.6, 1.0 },
TextColor = { 0.9, 0.9, 0.9 },
ScaleFactor = 531.0,
TextSize = 22.44,
TextMinSize = 8.0,
Unit = "Mpc"
Unit = "Mpc",
DrawLabels = true,
--BillboardMaxSize = 7.2,
EnablePixelSizeControl = true
},
GUI = {
Name = "Galaxy Superclusters",

View File

@@ -13,7 +13,7 @@ local speck = asset.syncedResource({
Name = "Supernova Remnants Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_supernovaremnants_speck",
Version = 1
Version = 2
})
local object = {
@@ -22,23 +22,25 @@ local object = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Color = { 1.0, 0.5, 0.0 },
Transparency = 0.5,
Opacity = 0.32,
File = speck .. "/snr.speck",
Texture = textures .. "/point4.png",
PolygonSides = 7,
LabelFile = speck .. "/snr.label",
TextColor = { 0.6, 0.3, 0.0, 1.0 },
ScaleFactor = 440.08,
TextSize = 17.5,
TextMinSize = 8.0,
TextMaxSize = 30.0,
CorrectionSizeEndDistance = 17.5,
CorrectionSizeFactor = 13.96,
Unit = "pc"
TextColor = { 0.6, 0.46, 0.0 },
ScaleFactor = 424,
TextSize = 16.44,
TextMinSize = 4.0,
TextMaxSize = 200.0,
--CorrectionSizeEndDistance = 17.5,
--CorrectionSizeFactor = 13.96,
Unit = "pc",
BillboardMaxSize = 500,
EnablePixelSizeControl = true
},
GUI = {
Name = "Supernova Remnants",
Path = "/Milky Way/Supernova Remnants"
Path = "/Milky Way"
}
}

View File

@@ -6,33 +6,36 @@ local textures = asset.syncedResource({
Name = "Tully Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_tully_textures",
Version = 2
Version = 3
})
local speck = asset.syncedResource({
Name = "Tully Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_tully_speck",
Version = 1
Version = 2
})
local tullyPoints = {
Identifier = "TullyGalaxies",
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
Enabled = true,
Color = { 1.0, 0.4, 0.2 },
Transparency = 0.99,
ScaleFactor = 502.77,
Opacity = 0.99,
ScaleFactor = 500.0,
File = speck .. "/tully.speck",
Texture = textures .. "/point3.png",
Texture = textures .. "/point3A.png",
--ColorMap = speck .. "/tully.cmap",
ColorMap = speck .. "/lss.cmap",
--ColorOption = { "proximity" },
ColorOption = { "prox5Mpc" },
ColorRange = { { 1.0, 80.0 } },
ColorRange = { { 1.0, 30.0 } },
LabelFile = speck .. "/tully.label",
TextColor = { 0.7, 0.7, 0.7, 1.0 },
TextSize = 20.50,
TextMinSize = 16.0,
DrawLabels = true,
TextColor = { 0.7, 0.7, 0.7 },
TextSize = 19.36,
TextMinSize = 8.2,
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
@@ -41,12 +44,13 @@ local tullyPoints = {
},
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = { 0.05, 1.0 },
FadeInDistances = { 0.001, 1.0 },
-- Max size in pixels
BillboardMaxSize = 50.0,
BillboardMinSize = 0.0,
CorrectionSizeEndDistance = 20.55,
CorrectionSizeFactor = 10.45,
BillboardMaxSize = 5,
BillboardMinSize = 0,
--CorrectionSizeEndDistance = 22.0,
--CorrectionSizeFactor = 10.45
EnablePixelSizeControl = true
},
GUI = {
Name = "Tully Galaxies",
@@ -58,9 +62,9 @@ local tullyImages = {
Identifier = "TullyGalaxiesImages",
Renderable = {
Type = "RenderablePlanesCloud",
Enabled = false,
Enabled = true,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.99,
Opacity = 0.99,
ScaleFactor = 1.0,
File = speck .. "/tully.speck",
TexturePath = textures,
@@ -74,8 +78,8 @@ local tullyImages = {
},
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = {0.05, 0.1},
PlaneMinSize = 5.0
FadeInDistances = {0.0005, 0.003},
PlaneMinSize = 1.0
},
GUI = {
Name = "Tully Galaxies Images",
@@ -84,5 +88,4 @@ local tullyImages = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { tullyPoints, tullyImages })

View File

@@ -6,7 +6,7 @@ local speck = asset.syncedResource({
Name = "Voids Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_voids_speck",
Version = 1
Version = 2
})
local object = {
@@ -14,11 +14,12 @@ local object = {
Renderable = {
Type = "RenderableBillboardsCloud",
Enabled = false,
DrawElements = false,
DrawLabels = true,
Color = { 1.0, 1.0, 1.0 },
Transparency = 0.65,
Opacity = 0.65,
LabelFile = speck .. "/voids.label",
TextColor = { 0.0, 0.4, 0.7, 1.0 },
TextColor = { 0.296, 0.629, 1.0 },
TextSize = 20.9,
TextMinSize = 8.0,
Unit = "Mpc"

View File

@@ -0,0 +1,106 @@
local constellationsCSV = asset.localResource('constellation_data.csv')
local transforms = asset.require("scene/solarsystem/sun/transforms")
local images = asset.syncedResource({
Name = "Constellation Images",
Type = "HttpSynchronization",
Identifier = "constellation_images",
Version = 1
})
--function that reads the file
local createConstellations = function (guiPath, constellationfile)
local genConstellations = {};
--skip the first line
local notFirstLine = false;
-- define parsec to meters
local PARSEC_CONSTANT = 3.0856776E16;
-- how many parsecs away do you want the images to be?
-- this setting puts the billboards at the location of the constellation bounds grid from DU.
-- but they can really be anywhere since the billboard size will scale with distance.
local distanceMultiplier = 3.2;
local baseScale = 1e17;
for line in io.lines(openspace.absPath(constellationfile)) do
if (notFirstLine) then
-- describes the data
local matchstring = '(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)$'
local group, abbreviation, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar = line:match(matchstring)
local magVec = math.sqrt(x*x + y*y + z*z)
local normx = x/magVec
local normy = y/magVec
local normz = z/magVec
group = (group == '' and globe or group)
local aconstellation = {
Identifier = guiPath .. '-' .. name,
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
-- position is in parsecs from the SolarSystemBarycenter, so convert to meters
Position = {
normx * PARSEC_CONSTANT * distanceMultiplier,
normy * PARSEC_CONSTANT * distanceMultiplier,
normz * PARSEC_CONSTANT * distanceMultiplier
}
},
Rotation = {
Type = "StaticRotation",
Rotation = { tonumber(rotX), tonumber(rotY), tonumber(rotZ) }
}
},
Renderable = {
Type = "RenderablePlaneImageLocal",
Size = tonumber(baseScale * scale * distanceMultiplier / 10),
Enabled = false,
Origin = "Center",
Billboard = false,
LazyLoading = true,
Texture = images .. "/" .. imageName,
BlendMode = "Additive",
Opacity = 0.1
},
Tag = { "ConstellationArtImage", group },
GUI = {
Name = name .. ' Image',
Path = '/Milky Way/' .. guiPath
}
}
table.insert(genConstellations, aconstellation);
else
notFirstLine = true
end
end
return genConstellations
end
local nodes = {}
asset.onInitialize(function ()
local constellationsCSV = images .. "/constellation_data.csv"
nodes = createConstellations('Constellation Art', constellationsCSV)
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n);
end
end)
asset.onDeinitialize(function ()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n.Identifier);
end
end)
asset.meta = {
Name = "Constellation Images",
Version = "1.0",
Description = "Artistic images depicting the constellations",
Author = "James Hedberg",
URL = "jameshedberg.com",
License = "CC-BY"
}

View File

@@ -0,0 +1,85 @@
Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523
1 Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar
2 normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128
3 zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran
4 zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal
5 zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda
6 zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442
7 zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484
8 zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658
9 zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819
10 zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478
11 zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191
12 zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761
13 zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593
14 zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656
15 northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418
16 northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759
17 southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610
18 southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767
19 southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353
20 southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305
21 northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910
22 equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640
23 southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324
24 northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272
25 southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595
26 northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093
27 southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304
28 northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029
29 northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045
30 southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813
31 southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846
32 southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686
33 southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668
34 southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151
35 northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558
36 equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673
37 southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056
38 southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834
39 southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951
40 equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185
41 southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248
42 southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700
43 northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537
44 northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167
45 northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164
46 southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952
47 southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430
48 northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524
49 southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262
50 northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447
51 southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720
52 southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652
53 southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920
54 southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575
55 southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256
56 northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319
57 southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429
58 southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443
59 southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416
60 northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161
61 southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798
62 southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467
63 southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244
64 southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875
65 southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915
66 northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421
67 southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520
68 northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873
69 northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860
70 northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722
71 northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873
72 northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413
73 southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898
74 northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378
75 southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345
76 northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107
77 northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712
78 northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280
79 southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129
80 northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425
81 northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928
82 northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757
83 southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748
84 southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248
85 southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523

View File

@@ -0,0 +1,38 @@
local scene_helper = asset.require('util/scene_helper')
local Keybindings = {
{
Key = "c",
Name = "Show Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" ..
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);",
Documentation = "Enables and fades up constellation art work",
GuiPath = "/Rendering",
Local = false
},
{
Key = "SHIFT+c",
Name = "Hide Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);",
Documentation = "Fades out constellation artwork",
GuiPath = "/Rendering",
Local = false
},
{
Key = "CTRL+c",
Name = "Disable Constellation Art",
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);",
Documentation = "Disable constellation artwork",
GuiPath = "/Rendering",
Local = false
}
}
asset.onInitialize(function ()
scene_helper.bindKeys(Keybindings)
end)
asset.onDeinitialize(function ()
scene_helper.unbindKeys(Keybindings)
end)

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