mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-03 10:09:40 -06:00
Merge remote-tracking branch 'origin/master' into feature/video-on-globe
# Conflicts: # modules/globebrowsing/src/layergroupid.h # modules/globebrowsing/src/tileprovider/tileprovider.cpp
This commit is contained in:
73
CITATION.cff
Normal file
73
CITATION.cff
Normal file
@@ -0,0 +1,73 @@
|
||||
cff-version: 1.2.0
|
||||
message: "If you use this software, please cite it as below."
|
||||
authors:
|
||||
- family-names: "Bock"
|
||||
given-names: "Alexander"
|
||||
orcid: "https://orcid.org/0000-0002-2849-6146"
|
||||
- family-names: "Axelsson"
|
||||
given-names: "Emil"
|
||||
- family-names: "Costa"
|
||||
given-names: "Jonathas"
|
||||
orcid: "https://orcid.org/0000-0002-5008-5685"
|
||||
- family-names: "Payne"
|
||||
given-names: "Gene"
|
||||
orcid: "https://orcid.org/0000-0001-8022-4781"
|
||||
- family-names: "Acinapura"
|
||||
given-names: "Micah"
|
||||
- family-names: "Trakinski"
|
||||
given-names: "Vivian"
|
||||
- family-names: "Emmart"
|
||||
given-names: "Carter"
|
||||
- family-names: "Silva"
|
||||
given-names: "Claudio"
|
||||
orcid: "https://orcid.org/0000-0003-2452-2295"
|
||||
- family-names: "Hansen"
|
||||
given-names: "Charles"
|
||||
orcid: "https://orcid.org/0000-0002-8480-2152"
|
||||
- family-names: "Ynnerman"
|
||||
given-names: "Anders"
|
||||
orcid: "https://orcid.org/0000-0002-9466-9826"
|
||||
title: "OpenSpace"
|
||||
version: 0.18.2
|
||||
doi: 10.1109/TVCG.2019.2934259
|
||||
date-released: 2022-12-24
|
||||
url: "https://github.com/OpenSpace/OpenSpace"
|
||||
preferred-citation:
|
||||
scope: "If you use this software, please cite it as below"
|
||||
type: article
|
||||
authors:
|
||||
- family-names: "Bock"
|
||||
given-names: "Alexander"
|
||||
orcid: "https://orcid.org/0000-0002-2849-6146"
|
||||
- family-names: "Axelsson"
|
||||
given-names: "Emil"
|
||||
- family-names: "Costa"
|
||||
given-names: "Jonathas"
|
||||
orcid: "https://orcid.org/0000-0002-5008-5685"
|
||||
- family-names: "Payne"
|
||||
given-names: "Gene"
|
||||
orcid: "https://orcid.org/0000-0001-8022-4781"
|
||||
- family-names: "Acinapura"
|
||||
given-names: "Micah"
|
||||
- family-names: "Trakinski"
|
||||
given-names: "Vivian"
|
||||
- family-names: "Emmart"
|
||||
given-names: "Carter"
|
||||
- family-names: "Silva"
|
||||
given-names: "Claudio"
|
||||
orcid: "https://orcid.org/0000-0003-2452-2295"
|
||||
- family-names: "Hansen"
|
||||
given-names: "Charles"
|
||||
orcid: "https://orcid.org/0000-0002-8480-2152"
|
||||
- family-names: "Ynnerman"
|
||||
given-names: "Anders"
|
||||
orcid: "https://orcid.org/0000-0002-9466-9826"
|
||||
doi: 10.1109/TVCG.2019.2934259
|
||||
journal: "IEEE Transactions on Visualization and Computer Graphics"
|
||||
month: 1
|
||||
start: 633
|
||||
end: 642
|
||||
title: "OpenSpace: A System for Astrographics"
|
||||
issue: 1
|
||||
volume: 26
|
||||
year: 2020
|
||||
103
CMakeLists.txt
103
CMakeLists.txt
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# 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,28 +22,22 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
cmake_policy(SET CMP0120 NEW)
|
||||
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
|
||||
cmake_policy(VERSION 3.25)
|
||||
|
||||
project(OpenSpace)
|
||||
|
||||
set(OPENSPACE_VERSION_MAJOR 0)
|
||||
set(OPENSPACE_VERSION_MINOR 18)
|
||||
set(OPENSPACE_VERSION_MINOR 19)
|
||||
set(OPENSPACE_VERSION_PATCH 0)
|
||||
set(OPENSPACE_VERSION_STRING "Beta-11")
|
||||
set(OPENSPACE_VERSION_STRING "<dev>")
|
||||
|
||||
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
|
||||
set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul")
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/module_common.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(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
|
||||
|
||||
begin_header("Configuring OpenSpace project")
|
||||
|
||||
# Bail out if the user tries to generate a 32 bit project.
|
||||
# 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 ()
|
||||
@@ -51,9 +45,7 @@ endif ()
|
||||
##########################################################################################
|
||||
# Cleanup project #
|
||||
##########################################################################################
|
||||
set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps")
|
||||
|
||||
if (NOT EXISTS "${OPENSPACE_BASE_DIR}/ext/ghoul/CMakeLists.txt")
|
||||
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/ext/ghoul/CMakeLists.txt")
|
||||
message(FATAL_ERROR "Git submodules are missing. Please run "
|
||||
"git submodule update --init --recursive to download the missing dependencies."
|
||||
)
|
||||
@@ -68,11 +60,13 @@ mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POST
|
||||
)
|
||||
|
||||
# Set build output directories
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BASE_DIR}/bin)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/support/cmake)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
|
||||
|
||||
# "OpenSpace Helper" is not a valid CMake target name under OLD
|
||||
cmake_policy(SET CMP0037 NEW)
|
||||
if (MSVC)
|
||||
# Force all builds to be multi-threaded and increase number of sections in obj files
|
||||
add_definitions(/MP /bigobj)
|
||||
endif ()
|
||||
|
||||
##########################################################################################
|
||||
# Main #
|
||||
@@ -106,8 +100,6 @@ else ()
|
||||
set(OPENSPACE_GIT_STATUS "")
|
||||
endif ()
|
||||
|
||||
option(OPENSPACE_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF)
|
||||
|
||||
if (MSVC)
|
||||
option(OPENSPACE_BREAK_ON_FLOATING_POINT_EXCEPTION "Raise exceptions when encountering Inf's or Nan's in floating point numbers" OFF)
|
||||
|
||||
@@ -134,31 +126,26 @@ if (MSVC)
|
||||
set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
if (UNIX)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi")
|
||||
else ()
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
#Can set to "RelWithDebInfo" or "Debug" also, but problems occur if this is blank by default
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Default build type" FORCE)
|
||||
endif ()
|
||||
if (NOT DEFINED CMAKE_CXX_FLAGS OR CMAKE_CXX_FLAGS MATCHES "")
|
||||
set(CMAKE_CXX_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_CXX_FLAGS} "GLM_ENABLE_EXPERIMENTAL" GLM_FLAG_POS)
|
||||
if (${GLM_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_ENABLE_EXPERIMENTAL" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
set(OpenGL_GL_PREFERENCE "GLVND" CACHE STRING "OpenGL Preference setting necessary for linux" FORCE)
|
||||
#Fix for gcc tolerating space in target name
|
||||
if (NOT DEFINED CMAKE_C_FLAGS OR CMAKE_C_FLAGS MATCHES "")
|
||||
set(CMAKE_C_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_C_FLAGS} "_GNU_SOURCE" GNUSOURCE_FLAG_POS)
|
||||
if (${GNUSOURCE_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
if (UNIX AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
# Can set to "RelWithDebInfo" or "Debug" also, but problems occur if this is blank by default
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Default build type" FORCE)
|
||||
endif ()
|
||||
if (NOT DEFINED CMAKE_CXX_FLAGS OR CMAKE_CXX_FLAGS MATCHES "")
|
||||
set(CMAKE_CXX_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_CXX_FLAGS} "GLM_ENABLE_EXPERIMENTAL" GLM_FLAG_POS)
|
||||
if (${GLM_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_ENABLE_EXPERIMENTAL" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
set(OpenGL_GL_PREFERENCE "GLVND" CACHE STRING "OpenGL Preference setting necessary for linux" FORCE)
|
||||
# Fix for GCC tolerating space in target name
|
||||
if (NOT DEFINED CMAKE_C_FLAGS OR CMAKE_C_FLAGS MATCHES "")
|
||||
set(CMAKE_C_FLAGS " ")
|
||||
endif ()
|
||||
STRING(FIND ${CMAKE_C_FLAGS} "_GNU_SOURCE" GNUSOURCE_FLAG_POS)
|
||||
if (${GNUSOURCE_FLAG_POS} EQUAL -1)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -176,12 +163,12 @@ add_custom_target(
|
||||
add_dependencies(run_codegen codegen)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/__codegen.h"
|
||||
COMMAND codegen ARGS "${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_BASE_DIR}/src"
|
||||
COMMAND codegen ARGS "${PROJECT_SOURCE_DIR}/modules" "${PROJECT_SOURCE_DIR}/src"
|
||||
VERBATIM
|
||||
)
|
||||
set_folder_location(codegen-lib "support")
|
||||
set_folder_location(codegen "support")
|
||||
set_folder_location(run_codegen "support")
|
||||
set_target_properties(codegen-lib PROPERTIES FOLDER "support")
|
||||
set_target_properties(codegen PROPERTIES FOLDER "support")
|
||||
set_target_properties(run_codegen PROPERTIES FOLDER "support")
|
||||
|
||||
|
||||
# Qt
|
||||
@@ -218,12 +205,12 @@ end_header("End: Configuring Modules")
|
||||
|
||||
|
||||
add_subdirectory(support/coding/codegen/tests)
|
||||
set_folder_location(run_test_codegen "Unit Tests/support")
|
||||
set_folder_location(codegentest "Unit Tests")
|
||||
set_target_properties(run_test_codegen PROPERTIES FOLDER "Unit Tests/support")
|
||||
set_target_properties(codegentest PROPERTIES FOLDER "Unit Tests")
|
||||
|
||||
|
||||
begin_header("Configuring Applications")
|
||||
add_subdirectory("${OPENSPACE_APPS_DIR}")
|
||||
add_subdirectory(apps)
|
||||
end_header("End: Configuring Applications")
|
||||
|
||||
|
||||
@@ -235,7 +222,7 @@ endif ()
|
||||
option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON)
|
||||
if (OPENSPACE_HAVE_TESTS)
|
||||
begin_header("Generating OpenSpace unit test")
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests")
|
||||
add_subdirectory(tests)
|
||||
end_header()
|
||||
endif (OPENSPACE_HAVE_TESTS)
|
||||
|
||||
@@ -250,7 +237,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
@@ -266,6 +253,6 @@ endif ()
|
||||
##########################################################################################
|
||||
|
||||
# Manage the CPack packaging
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/packaging.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/packaging.cmake)
|
||||
|
||||
end_header("End: Configuring OpenSpace project")
|
||||
|
||||
@@ -27,7 +27,7 @@ Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at alexander.bock@me.com or vivian@amnh.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at alex@openspaceproject.com or vivian@amnh.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2022
|
||||
Copyright (c) 2014-2023
|
||||
|
||||
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
|
||||
@@ -15,4 +15,4 @@ 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.
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@@ -37,7 +37,7 @@ OpenSpace requires at least support for [OpenGL](https://www.opengl.org/) versio
|
||||
This repository contains the source code and example profiles for OpenSpace, but does not contain any data. To build and install the application, please check out the [GitHub Wiki](https://github.com/OpenSpace/OpenSpace/wiki). Here, you will find two pages, a [build instruction](https://github.com/OpenSpace/OpenSpace/wiki/Compiling) for all operating systems and then additional instructions for [Windows](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-Windows), [Linux (Ubuntu)](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-Ubuntu), and [MacOS](https://github.com/OpenSpace/OpenSpace/wiki/Compiling-MacOS). Please note that the Apple Silicon series of chips do not support OpenGL natively and Metal 2 does not support `double` precision accuracy (see [here](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf) Section 2.1), therefore only the Intel processors for MacOS are supported and maintained.
|
||||
|
||||
Requirements for compiling are:
|
||||
- CMake version 3.10 or above
|
||||
- CMake version 3.25 or above
|
||||
- C++ compiler supporting C++20 (MSVC 19.31, GCC11, Clang14, AppleClang 13.1.6)
|
||||
- [Boost](http://www.boost.org/)
|
||||
- [Qt](http://www.qt.io/download)
|
||||
@@ -45,3 +45,6 @@ Requirements for compiling are:
|
||||
Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:openspace@amnh.org?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/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw).
|
||||
|
||||

|
||||
|
||||
# License
|
||||
The contents of this repository is under an [MIT license](https://github.com/OpenSpace/OpenSpace/blob/master/LICENSE.md).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# 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,9 +22,9 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/global_variables.cmake)
|
||||
|
||||
set(MACOSX_BUNDLE_ICON_FILE openspace.icns)
|
||||
|
||||
@@ -57,7 +57,7 @@ target_link_libraries(OpenSpace-MinVR PUBLIC openspace-core MinVR)
|
||||
# target as of July 2017, which is needed.
|
||||
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# 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,9 +22,8 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake)
|
||||
include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake)
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
# We are getting all_enabled_modules from the handle_applications.cmake file which gets
|
||||
# it from the main CMakeLists file
|
||||
@@ -43,14 +42,14 @@ if (OPENSPACE_OPENVR_SUPPORT)
|
||||
if (WIN32)
|
||||
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
|
||||
NAMES SGCTOpenVR.h
|
||||
PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr NO_DEFAULT_PATH
|
||||
PATHS ${PROJECT_SOURCE_DIR}/ext/sgct/additional_includes/openvr NO_DEFAULT_PATH
|
||||
REQUIRED
|
||||
)
|
||||
else ()
|
||||
find_path(SGCT_OPENVR_INCLUDE_DIRECTORY
|
||||
NAMES SGCTOpenVR.h
|
||||
PATH_SUFFIXES SGCTOpenVR
|
||||
PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr
|
||||
PATHS ${PROJECT_SOURCE_DIR}/ext/sgct/additional_includes/openvr
|
||||
REQUIRED
|
||||
)
|
||||
endif ()
|
||||
@@ -115,19 +114,14 @@ set(SGCT_TEXT OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_SCN OFF CACHE BOOL "" FORCE)
|
||||
set(SGCT_DEP_INCLUDE_CATCH2 OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct)
|
||||
target_link_libraries(OpenSpace PRIVATE sgct)
|
||||
|
||||
set_folder_location(sgct "External")
|
||||
set_folder_location(glfw "External")
|
||||
set_folder_location(miniziplibstatic "External")
|
||||
set_folder_location(png16_static "External")
|
||||
set_folder_location(quat "External")
|
||||
set_folder_location(tinyxml2static "External")
|
||||
set_folder_location(vrpn "External")
|
||||
set_folder_location(zlibstatic "External")
|
||||
set_folder_location(SGCTTest "Unit Tests")
|
||||
set_target_properties(sgct PROPERTIES FOLDER "External")
|
||||
set_target_properties(glfw PROPERTIES FOLDER "External")
|
||||
set_target_properties(SGCTTest PROPERTIES FOLDER "External")
|
||||
|
||||
if (UNIX AND (NOT APPLE))
|
||||
target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11)
|
||||
@@ -161,7 +155,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2022 #
|
||||
# Copyright (c) 2014-2023 #
|
||||
# #
|
||||
# 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,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/set_openspace_compile_settings.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/set_openspace_compile_settings.cmake)
|
||||
|
||||
set(HEADER_FILES
|
||||
include/filesystemaccess.h
|
||||
@@ -113,8 +113,9 @@ target_include_directories(
|
||||
openspace-ui-launcher
|
||||
PUBLIC
|
||||
include
|
||||
${OPENSPACE_APPS_DIR}/OpenSpace/ext/sgct/include
|
||||
${OPENSPACE_APPS_DIR}/OpenSpace/ext/sgct/sgct/ext/glm
|
||||
# @TODO: This should be handled in a better way
|
||||
../sgct/include
|
||||
../sgct/sgct/ext/glm
|
||||
)
|
||||
target_link_libraries(
|
||||
openspace-ui-launcher
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -100,6 +100,8 @@ private:
|
||||
QPushButton* removeButton = nullptr;
|
||||
QDialogButtonBox* saveButtons = nullptr;
|
||||
} _keybindingWidgets;
|
||||
|
||||
QDialogButtonBox* _mainButtons = nullptr;
|
||||
};
|
||||
|
||||
#endif // __OPENSPACE_UI_LAUNCHER___ACTIONDIALOG___H__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
QListWidget* _scriptlogList = nullptr;
|
||||
QLineEdit* _filter = nullptr;
|
||||
QPushButton* _reloadFile = nullptr;
|
||||
std::string _scriptLogFile;
|
||||
std::vector<std::string> _scripts;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -81,10 +81,10 @@ private:
|
||||
|
||||
std::vector<QRectF> _monitorDimensionsScaled;
|
||||
std::array<QRectF, 4> _windowRendering = {
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f },
|
||||
QRectF{ 0.f, 0.f, 0.f, 0.f }
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f),
|
||||
QRectF(0.f, 0.f, 0.f, 0.f)
|
||||
};
|
||||
int _nWindows = 1;
|
||||
const std::array<QColor, 4> _colorsForWindows;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
bool showUiOnFirstWindow() const;
|
||||
|
||||
private:
|
||||
sgct::quat _orientationValue = { 0.f, 0.f, 0.f, 0.f };
|
||||
sgct::quat _orientationValue = sgct::quat(0.f, 0.f, 0.f, 0.f);
|
||||
QCheckBox* _checkBoxVsync = nullptr;
|
||||
QCheckBox* _showUiOnFirstWindow = nullptr;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -158,7 +158,7 @@ namespace {
|
||||
std::ofstream outFile;
|
||||
try {
|
||||
outFile.open(path, std::ofstream::out);
|
||||
sgct::config::GeneratorVersion genEntry = {
|
||||
sgct::config::GeneratorVersion genEntry = sgct::config::GeneratorVersion{
|
||||
"OpenSpace",
|
||||
OPENSPACE_VERSION_MAJOR,
|
||||
OPENSPACE_VERSION_MINOR
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -97,9 +97,9 @@ void ActionDialog::createWidgets() {
|
||||
// *----------------------*---------------*----------------*
|
||||
// | [+] [-] | | <Save> <Cancel>| Row 14
|
||||
// *----------------------*---------------*----------------*
|
||||
// |=======================================================| Row 14
|
||||
// |=======================================================| Row 16
|
||||
// *----------------------*---------------*----------------*
|
||||
// | | <Save> <Cancel>| Row 15
|
||||
// | | <Save> <Cancel>| Row 17
|
||||
// *----------------------*---------------*----------------*
|
||||
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
@@ -113,18 +113,18 @@ void ActionDialog::createWidgets() {
|
||||
clearKeybindingFields();
|
||||
|
||||
layout->addWidget(new Line, 16, 0, 1, 3);
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox;
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
|
||||
|
||||
_mainButtons = new QDialogButtonBox;
|
||||
_mainButtons->setStandardButtons(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
|
||||
QObject::connect(
|
||||
buttonBox, &QDialogButtonBox::accepted,
|
||||
_mainButtons, &QDialogButtonBox::accepted,
|
||||
this, &ActionDialog::applyChanges
|
||||
);
|
||||
QObject::connect(
|
||||
buttonBox, &QDialogButtonBox::rejected,
|
||||
_mainButtons, &QDialogButtonBox::rejected,
|
||||
this, &ActionDialog::reject
|
||||
);
|
||||
layout->addWidget(buttonBox, 17, 2, Qt::AlignRight);
|
||||
layout->addWidget(_mainButtons, 17, 2, Qt::AlignRight);
|
||||
}
|
||||
|
||||
void ActionDialog::createActionWidgets(QGridLayout* layout) {
|
||||
@@ -523,12 +523,19 @@ void ActionDialog::actionSelected() {
|
||||
_actionWidgets.addButton->setEnabled(false);
|
||||
_actionWidgets.removeButton->setEnabled(true);
|
||||
_actionWidgets.saveButtons->setEnabled(true);
|
||||
if (_mainButtons) {
|
||||
_mainButtons->setEnabled(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// No action selected
|
||||
_actionWidgets.addButton->setEnabled(true);
|
||||
_actionWidgets.removeButton->setEnabled(false);
|
||||
_actionWidgets.saveButtons->setEnabled(false);
|
||||
//Keybinding panel must also be in valid state to re-enable main start button
|
||||
if (_mainButtons && !_keybindingWidgets.saveButtons->isEnabled()) {
|
||||
_mainButtons->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +594,11 @@ void ActionDialog::actionSaved() {
|
||||
|
||||
|
||||
action->name = _actionWidgets.name->text().toStdString();
|
||||
action->guiPath = _actionWidgets.guiPath->text().toStdString();
|
||||
std::string guiPath = _actionWidgets.guiPath->text().toStdString();
|
||||
if (!guiPath.starts_with('/')) {
|
||||
guiPath = "/" + guiPath;
|
||||
}
|
||||
action->guiPath = guiPath;
|
||||
action->documentation = _actionWidgets.documentation->text().toStdString();
|
||||
action->isLocal = _actionWidgets.isLocal->isChecked();
|
||||
action->script = _actionWidgets.script->toPlainText().toStdString();
|
||||
@@ -705,12 +716,19 @@ void ActionDialog::keybindingSelected() {
|
||||
_keybindingWidgets.saveButtons->button(QDialogButtonBox::Save)->setEnabled(
|
||||
_keybindingWidgets.key->currentIndex() > 0
|
||||
);
|
||||
if (_mainButtons) {
|
||||
_mainButtons->setEnabled(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// No keybinding selected
|
||||
_keybindingWidgets.addButton->setEnabled(true);
|
||||
_keybindingWidgets.removeButton->setEnabled(false);
|
||||
_keybindingWidgets.saveButtons->setEnabled(false);
|
||||
//Action panel must also be in valid state to re-enable main start button
|
||||
if (_mainButtons && !_actionWidgets.saveButtons->isEnabled()) {
|
||||
_mainButtons->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,6 +737,16 @@ void ActionDialog::keybindingActionSelected(int) {
|
||||
}
|
||||
|
||||
void ActionDialog::keybindingSaved() {
|
||||
if (_keybindingWidgets.key->currentIndex() == -1) {
|
||||
QMessageBox::critical(this, "Missing key", "Key must have an assignment");
|
||||
return;
|
||||
}
|
||||
//A selection can be made from the combo box without typing text, but selecting from
|
||||
//the combo will fill the text, so using the text box as criteria covers both cases.
|
||||
if (_keybindingWidgets.actionText->text().isEmpty()) {
|
||||
QMessageBox::critical(this, "Missing action", "Key action must not be empty");
|
||||
return;
|
||||
}
|
||||
Profile::Keybinding* keybinding = selectedKeybinding();
|
||||
ghoul_assert(keybinding, "There must be a selected keybinding at this point");
|
||||
|
||||
@@ -758,5 +786,11 @@ void ActionDialog::clearKeybindingFields() {
|
||||
}
|
||||
|
||||
void ActionDialog::keybindingRejected() {
|
||||
bool isKeyEmpty = (_keybindingsData.back().key.key == Key::Unknown);
|
||||
bool isActionEmpty = _keybindingsData.back().action.empty();
|
||||
if (isKeyEmpty || isActionEmpty) {
|
||||
delete _keybindingWidgets.list->takeItem(_keybindingWidgets.list->count() - 1);
|
||||
_keybindingsData.erase(_keybindingsData.begin() + _keybindingsData.size() - 1);
|
||||
}
|
||||
clearKeybindingFields();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -156,7 +156,10 @@ void AssetTreeModel::importModelData(const std::string& assetBasePath,
|
||||
std::string assetList = assets.useQtFileSystemModelToTraverseDir(assetBasePath);
|
||||
assetList += assets.useQtFileSystemModelToTraverseDir(userAssetBasePath, true);
|
||||
std::istringstream iss(assetList);
|
||||
ImportElement rootElem = { "", 0, false };
|
||||
ImportElement rootElem = {
|
||||
.line = "",
|
||||
.level = 0,
|
||||
};
|
||||
|
||||
if (importGetNextLine(rootElem, iss)) {
|
||||
importInsertItem(iss, _rootItem.get(), rootElem, 0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -384,11 +384,11 @@ void CameraDialog::approved() {
|
||||
!_navState.upY->text().isEmpty() &&
|
||||
!_navState.upZ->text().isEmpty())
|
||||
{
|
||||
glm::dvec3 u = {
|
||||
glm::dvec3 u = glm::dvec3(
|
||||
_navState.upX->text().toDouble(),
|
||||
_navState.upY->text().toDouble(),
|
||||
_navState.upZ->text().toDouble()
|
||||
};
|
||||
);
|
||||
nav.up = u;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -457,8 +457,8 @@ bool HorizonsDialog::isValidInput() {
|
||||
// Range 1 to 2147483647 (max of 32 bit int).
|
||||
// Horizons read the step size into a 32 bit int, but verifies the input on their
|
||||
// website as a uint32_t. If step size over 32 bit int is sent, this error message is
|
||||
// recived: Cannot read numeric value -- re-enter
|
||||
if (step < 1 || step > std::numeric_limits<int32_t>::max()) {
|
||||
// received: Cannot read numeric value -- re-enter
|
||||
if (step < 1) {
|
||||
_errorMsg->setText(QString::fromStdString(fmt::format(
|
||||
"Step size is outside valid range 1 to '{}'",
|
||||
std::numeric_limits<int32_t>::max()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -37,7 +37,11 @@
|
||||
using namespace openspace;
|
||||
|
||||
namespace {
|
||||
const Profile::Module Blank = { "", "", "" };
|
||||
const Profile::Module Blank = {
|
||||
.name = "",
|
||||
.loadedInstruction = std::nullopt,
|
||||
.notLoadedInstruction = std::nullopt
|
||||
};
|
||||
} // namespace
|
||||
|
||||
ModulesDialog::ModulesDialog(QWidget* parent,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -184,9 +184,8 @@ void ProfileEdit::createWidgets(const std::string& profileName) {
|
||||
QGridLayout* container = new QGridLayout;
|
||||
container->setColumnStretch(1, 1);
|
||||
|
||||
_keybindingsLabel = new QLabel("Keybindings");
|
||||
_keybindingsLabel = new QLabel("Actions & Keybindings");
|
||||
_keybindingsLabel->setObjectName("heading");
|
||||
_keybindingsLabel->setWordWrap(true);
|
||||
container->addWidget(_keybindingsLabel, 0, 0);
|
||||
|
||||
QPushButton* keybindingsProperties = new QPushButton("Edit");
|
||||
@@ -345,7 +344,9 @@ void ProfileEdit::initSummaryTextForEachCategory() {
|
||||
QString::fromStdString(summarizeProperties(_profile.properties))
|
||||
);
|
||||
|
||||
_keybindingsLabel->setText(labelText(_profile.keybindings.size(), "Keybindings"));
|
||||
_keybindingsLabel->setText(
|
||||
labelText(_profile.keybindings.size(), "Actions & Keybindings")
|
||||
);
|
||||
_keybindingsEdit->setText(QString::fromStdString(
|
||||
summarizeKeybindings(_profile.keybindings, _profile.actions)
|
||||
));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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,6 +32,7 @@
|
||||
#include <ghoul/fmt.h>
|
||||
#include <QGridLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFileDialog>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
@@ -41,6 +42,7 @@
|
||||
|
||||
ScriptlogDialog::ScriptlogDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, _scriptLogFile(openspace::global::configuration->scriptLog)
|
||||
{
|
||||
setWindowTitle("Scriptlog");
|
||||
createWidgets();
|
||||
@@ -63,10 +65,31 @@ void ScriptlogDialog::createWidgets() {
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
{
|
||||
QLabel* heading = new QLabel(QString::fromStdString(fmt::format(
|
||||
"Choose commands from \"{}\"", openspace::global::configuration->scriptLog
|
||||
"Choose commands from \"{}\"", _scriptLogFile
|
||||
)));
|
||||
heading->setObjectName("heading");
|
||||
layout->addWidget(heading, 0, 0, 1, 2);
|
||||
|
||||
QPushButton* open = new QPushButton;
|
||||
open->setIcon(open->style()->standardIcon(QStyle::SP_FileIcon));
|
||||
connect(
|
||||
open, &QPushButton::clicked,
|
||||
[this, heading]() {
|
||||
QString file = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
"Select log file",
|
||||
"",
|
||||
"*.txt"
|
||||
);
|
||||
_scriptLogFile = file.toStdString();
|
||||
|
||||
heading->setText(QString::fromStdString(fmt::format(
|
||||
"Choose commands from \"{}\"", _scriptLogFile
|
||||
)));
|
||||
loadScriptFile();
|
||||
}
|
||||
);
|
||||
layout->addWidget(open, 0, 1, Qt::AlignRight);
|
||||
}
|
||||
|
||||
_filter = new QLineEdit;
|
||||
@@ -100,7 +123,9 @@ void ScriptlogDialog::createWidgets() {
|
||||
}
|
||||
|
||||
void ScriptlogDialog::loadScriptFile() {
|
||||
std::string log = absPath(openspace::global::configuration->scriptLog).string();
|
||||
_scripts.clear();
|
||||
|
||||
std::string log = absPath(_scriptLogFile).string();
|
||||
QFile file(QString::fromStdString(log));
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&file);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -52,7 +52,8 @@ TimeDialog::TimeDialog(QWidget* parent, std::optional<openspace::Profile::Time>*
|
||||
if (_timeData.value.empty()) {
|
||||
_timeData.value = "0d";
|
||||
}
|
||||
_relativeEdit->setSelection(0, _relativeEdit->text().length());
|
||||
int len = static_cast<int>(_relativeEdit->text().length());
|
||||
_relativeEdit->setSelection(0, len);
|
||||
}
|
||||
else {
|
||||
_absoluteEdit->setSelectedSection(QDateTimeEdit::YearSection);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -49,7 +49,8 @@ void DisplayWindowUnion::createWidgets(int nMaxWindows,
|
||||
{
|
||||
// Add all window controls (some will be hidden from GUI initially)
|
||||
for (int i = 0; i < nMaxWindows; ++i) {
|
||||
const int monitorNumForThisWindow = (nMaxWindows > 3 && i >= 2) ? 1 : 0;
|
||||
const int monitorNumForThisWindow =
|
||||
(monitorResolutions.size() > 1 && i >= 2) ? 1 : 0;
|
||||
|
||||
WindowControl* ctrl = new WindowControl(
|
||||
monitorNumForThisWindow,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -31,7 +31,7 @@ namespace {
|
||||
constexpr int WindowOpacity = 170;
|
||||
|
||||
QRectF computeUnion(const std::vector<QRect>& monitorResolutions) {
|
||||
QRectF res = { 0.f, 0.f, 0.f, 0.f };
|
||||
QRectF res = QRectF(0.f, 0.f, 0.f, 0.f);
|
||||
for (const QRect& m : monitorResolutions) {
|
||||
res |= m;
|
||||
}
|
||||
@@ -145,12 +145,12 @@ void MonitorBox::paintEvent(QPaintEvent*) {
|
||||
void MonitorBox::windowDimensionsChanged(unsigned int mIdx, unsigned int wIdx,
|
||||
const QRectF& newDimensions)
|
||||
{
|
||||
_windowRendering[wIdx] = {
|
||||
_windowRendering[wIdx] = QRectF(
|
||||
_monitorDimensionsScaled[mIdx].x() + newDimensions.left() * _monitorScaleFactor,
|
||||
_monitorDimensionsScaled[mIdx].y() + newDimensions.top() * _monitorScaleFactor,
|
||||
newDimensions.width() * _monitorScaleFactor,
|
||||
newDimensions.height() * _monitorScaleFactor
|
||||
};
|
||||
);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <filesystem>
|
||||
|
||||
namespace {
|
||||
constexpr QRect MonitorWidgetSize = { 0, 0, 500, 500 };
|
||||
constexpr QRect MonitorWidgetSize = QRect(0, 0, 500, 500);
|
||||
constexpr int MaxNumberWindows = 4;
|
||||
|
||||
// Returns true if the windows are not ordered correctly. 'Correct' in this means that
|
||||
@@ -48,10 +48,10 @@ namespace {
|
||||
// https://github.com/OpenSpace/OpenSpace/issues/507
|
||||
// is fixed
|
||||
bool hasWindowIssues(const sgct::config::Cluster& cluster) {
|
||||
sgct::ivec2 size = {
|
||||
sgct::ivec2 size = sgct::ivec2(
|
||||
std::numeric_limits<int>::max(),
|
||||
std::numeric_limits<int>::max()
|
||||
};
|
||||
);
|
||||
for (const sgct::config::Window& window : cluster.nodes.front().windows) {
|
||||
if (window.size.x <= size.x && window.size.y <= size.y) {
|
||||
size = window.size;
|
||||
@@ -96,7 +96,7 @@ void SgctEdit::createWidgets(const std::vector<QRect>& monitorSizes) {
|
||||
QBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
sgct::quat orientation = { 0.f, 0.f, 0.f, 0.f };
|
||||
sgct::quat orientation = sgct::quat(0.f, 0.f, 0.f, 0.f);
|
||||
if (_cluster.scene.has_value() && _cluster.scene->orientation.has_value()) {
|
||||
orientation = *_cluster.scene->orientation;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ sgct::config::Cluster SgctEdit::generateConfiguration() const {
|
||||
|
||||
sgct::config::User user;
|
||||
user.eyeSeparation = 0.065f;
|
||||
user.position = { 0.f, 0.f, 4.f };
|
||||
user.position = sgct::vec3(0.f, 0.f, 4.f);
|
||||
cluster.users = { user };
|
||||
|
||||
return cluster;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
@@ -52,10 +52,10 @@ namespace {
|
||||
};
|
||||
|
||||
constexpr std::array<QRectF, 4> DefaultWindowSizes = {
|
||||
QRectF{ 50.f, 50.f, 1280.f, 720.f },
|
||||
QRectF{ 150.f, 150.f, 1280.f, 720.f },
|
||||
QRectF{ 50.f, 50.f, 1280.f, 720.f },
|
||||
QRectF{ 150.f, 150.f, 1280.f, 720.f }
|
||||
QRectF(50.f, 50.f, 1280.f, 720.f),
|
||||
QRectF(150.f, 150.f, 1280.f, 720.f),
|
||||
QRectF(50.f, 50.f, 1280.f, 720.f),
|
||||
QRectF(150.f, 150.f, 1280.f, 720.f)
|
||||
};
|
||||
|
||||
constexpr int LineEditWidthFixedWindowSize = 50;
|
||||
@@ -707,17 +707,17 @@ sgct::config::Projections WindowControl::generateProjectionInformation() const {
|
||||
|
||||
sgct::config::Window WindowControl::generateWindowInformation() const {
|
||||
sgct::config::Window window;
|
||||
window.size = { _sizeX->text().toInt(), _sizeY->text().toInt() };
|
||||
window.size = sgct::ivec2(_sizeX->text().toInt(), _sizeY->text().toInt());
|
||||
QRect resolution = _monitorResolutions[_monitor->currentIndex()];
|
||||
window.pos = {
|
||||
window.pos = sgct::ivec2(
|
||||
resolution.x() + _offsetX->text().toInt(),
|
||||
resolution.y() + _offsetY->text().toInt()
|
||||
};
|
||||
);
|
||||
|
||||
sgct::config::Viewport vp;
|
||||
vp.isTracked = true;
|
||||
vp.position = { 0.f, 0.f };
|
||||
vp.size = { 1.f, 1.f };
|
||||
vp.position = sgct::vec2(0.f, 0.f);
|
||||
vp.size = sgct::vec2(1.f, 1.f);
|
||||
vp.projection = generateProjectionInformation();
|
||||
window.viewports.push_back(vp);
|
||||
|
||||
|
||||
Submodule apps/OpenSpace/ext/sgct updated: f48a48307f...4a555d7922
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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,6 +33,7 @@
|
||||
#include <ghoul/fmt.h>
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/cmdparser/commandlineparser.h>
|
||||
#include <ghoul/cmdparser/multiplecommand.h>
|
||||
#include <ghoul/cmdparser/singlecommand.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/logging/visualstudiooutputlog.h>
|
||||
@@ -912,7 +913,9 @@ void setSgctDelegateFunctions() {
|
||||
sgctDelegate.setHorizFieldOfView = [](float hFovDeg) {
|
||||
ZoneScoped
|
||||
|
||||
Engine::instance().windows().front()->setHorizFieldOfView(hFovDeg);
|
||||
for (std::unique_ptr<sgct::Window> const& w : Engine::instance().windows()) {
|
||||
w->setHorizFieldOfView(hFovDeg);
|
||||
}
|
||||
};
|
||||
#ifdef WIN32
|
||||
sgctDelegate.getNativeWindowHandle = [](size_t windowIndex) -> void* {
|
||||
@@ -1106,7 +1109,7 @@ int main(int argc, char* argv[]) {
|
||||
"current working directory"
|
||||
));
|
||||
|
||||
parser.addCommand(std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
|
||||
parser.addCommand(std::make_unique<ghoul::cmdparser::MultipleCommand<std::string>>(
|
||||
commandlineArguments.configurationOverride, "--config", "-c",
|
||||
"Provides the ability to pass arbitrary Lua code to the application that will be "
|
||||
"evaluated after the configuration file has been loaded but before the other "
|
||||
@@ -1179,10 +1182,14 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
// Loading configuration from disk
|
||||
LDEBUG("Loading configuration from disk");
|
||||
std::string override;
|
||||
for (const std::string& arg : commandlineArguments.configurationOverride) {
|
||||
override += arg + ";";
|
||||
}
|
||||
*global::configuration = configuration::loadConfigurationFromFile(
|
||||
configurationFilePath.string(),
|
||||
size,
|
||||
commandlineArguments.configurationOverride
|
||||
override
|
||||
);
|
||||
|
||||
// Determining SGCT configuration file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
|
||||
@@ -47,7 +47,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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,7 +22,7 @@
|
||||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
|
||||
##########################################################################################
|
||||
|
||||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/support/cmake/application_definition.cmake)
|
||||
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns
|
||||
@@ -47,7 +47,7 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE")
|
||||
|
||||
if (WIN32)
|
||||
set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc)
|
||||
set(RESOURCE_FILE openspace.rc)
|
||||
endif ()
|
||||
|
||||
# Add the CEF binary distribution's cmake/ directory to the module path and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
asset.require("./base_blank")
|
||||
|
||||
-- Modules and component settings
|
||||
asset.require("modules/exoplanets/exoplanets")
|
||||
asset.require("modules/skybrowser/skybrowser")
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
asset.require("scene/solarsystem/sun/sun")
|
||||
asset.require("scene/solarsystem/sun/glare")
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
-- This is a blank scene that that just sets up the default menus/dasboard/keys, etc.
|
||||
|
||||
local propertyHelper = asset.require("util/property_helper")
|
||||
|
||||
-- Specifying which other assets should be loaded in this scene
|
||||
asset.require("spice/base")
|
||||
|
||||
@@ -18,6 +16,11 @@ asset.require("util/dpiscaling")
|
||||
-- Load the images required for the launcher to show up
|
||||
asset.require("util/launcher_images")
|
||||
|
||||
-- Modules and component settings
|
||||
asset.require("modules/exoplanets/exoplanets")
|
||||
asset.require("modules/skybrowser/skybrowser")
|
||||
|
||||
|
||||
asset.onInitialize(function ()
|
||||
webGui.setCefRoute("onscreen")
|
||||
openspace.setDefaultGuiSorting()
|
||||
|
||||
@@ -1,2 +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,,,,,,
|
||||
NASA,Kennedy Space Center,Earth,28.6658276,-80.70282839,,,,,,
|
||||
|
||||
|
@@ -65,12 +65,36 @@ local updatePositionAction = {
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
local resetPositionAction = {
|
||||
Identifier = "os.reset_eiffel_tower",
|
||||
Name = "Reset Eiffel Tower position",
|
||||
Command = [[
|
||||
-- same position as above
|
||||
local lat = 48.85824
|
||||
local lon = 2.29448
|
||||
local globe = ']] .. earthAsset.Earth.Identifier .. [['
|
||||
openspace.setParent('eiffelTower', globe)
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Globe', globe);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Latitude', lat);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Translation.Longitude', lon);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Globe', globe);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Latitude', lat);
|
||||
openspace.setPropertyValueSingle('Scene.eiffelTower.Rotation.Longitude', lon);
|
||||
]],
|
||||
Documentation = "Updates the Eiffel Tower position based on the globe location of the camera",
|
||||
GuiPath = "/Scale Objects",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(eiffelTower)
|
||||
openspace.action.registerAction(updatePositionAction)
|
||||
openspace.action.registerAction(resetPositionAction)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(resetPositionAction)
|
||||
openspace.action.removeAction(updatePositionAction)
|
||||
openspace.removeSceneGraphNode(eiffelTower)
|
||||
end)
|
||||
|
||||
@@ -58,6 +58,11 @@ local elapsed_time = {
|
||||
ReferenceTime = "2022-10-12 12:00:00"
|
||||
}
|
||||
|
||||
local input_state = {
|
||||
Type = "DashboardItemInputState",
|
||||
Identifier = "InputState"
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.dashboard.addDashboardItem(angle)
|
||||
openspace.dashboard.addDashboardItem(date)
|
||||
@@ -68,9 +73,11 @@ asset.onInitialize(function()
|
||||
openspace.dashboard.addDashboardItem(mission)
|
||||
openspace.dashboard.addDashboardItem(property_value)
|
||||
openspace.dashboard.addDashboardItem(elapsed_time)
|
||||
openspace.dashboard.addDashboardItem(input_state)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.dashboard.removeDashboardItem(input_state)
|
||||
openspace.dashboard.removeDashboardItem(elapsed_time)
|
||||
openspace.dashboard.removeDashboardItem(property_value)
|
||||
openspace.dashboard.removeDashboardItem(mission)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2022 *
|
||||
* Copyright (c) 2014-2023 *
|
||||
* *
|
||||
* 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 *
|
||||
|
||||
@@ -5,13 +5,15 @@ local nodes = bookmarkHelper.getBookmarks("Local Bookmarks", "${ASSETS}/customiz
|
||||
|
||||
asset.onInitialize(function()
|
||||
for _, n in ipairs(nodes) do
|
||||
openspace.addSceneGraphNode(n)
|
||||
pcall(openspace.addSceneGraphNode, n)
|
||||
end
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
for _, n in ipairs(nodes) do
|
||||
openspace.removeSceneGraphNode(n)
|
||||
if openspace.hasSceneGraphNode(n.Identifier) then
|
||||
openspace.removeSceneGraphNode(n)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -17,9 +17,10 @@ local speck = asset.syncedResource({
|
||||
Name = "Grids Speck Files",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "digitaluniverse_grids_speck",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
local lightHour = 1.0792528488E12
|
||||
local lightDay = 2.59020684E13
|
||||
local lightMonth = 7.771E14
|
||||
local lightYear = 9.4605284E15
|
||||
@@ -236,6 +237,37 @@ local galacticLabels = {
|
||||
}
|
||||
}
|
||||
|
||||
local plane1lh = {
|
||||
Identifier = "1lhGrid",
|
||||
Parent = transforms.SolarSystemBarycenter.Name,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = eclipticRotationMatrix
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGrid",
|
||||
Enabled = false,
|
||||
Labels = {
|
||||
File = speck .. "1lh.label",
|
||||
Color = { 0.0, 0.2, 0.5 },
|
||||
Size = 9.5,
|
||||
MinMaxSize = { 0, 30 },
|
||||
Unit = "Km"
|
||||
},
|
||||
Opacity = 0.4,
|
||||
Color = { 0.1, 0.5, 0.6 },
|
||||
LineWidth = 2.0,
|
||||
Segments = { 20, 20 },
|
||||
Size = { 2*lightHour, 2*lightHour }
|
||||
},
|
||||
GUI = {
|
||||
Name = "1lh Grid",
|
||||
Path = "/Other/Grids"
|
||||
}
|
||||
}
|
||||
|
||||
local plane1ld = {
|
||||
Identifier = "1ldGrid",
|
||||
Parent = transforms.SolarSystemBarycenter.Name,
|
||||
@@ -585,7 +617,7 @@ local plane20Gly = {
|
||||
|
||||
local nodes = {
|
||||
radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels,
|
||||
galactic, galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly,
|
||||
galactic, galacticLabels, plane1lh, plane1ld, plane1lm, plane1ly, plane10ly,
|
||||
plane100ly, plane1kly, plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly,
|
||||
plane20Gly
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ local plane = {
|
||||
},
|
||||
GUI = {
|
||||
Name = "Milky Way Galaxy Image",
|
||||
Path = "/Universe/Galaxies",
|
||||
Path = "/Milky Way",
|
||||
Description = [[Census: 1 image. DU Version 2.2. <br> The exterior view of the
|
||||
Milky Way is simply a two-dimensional image. The image is that of NGC 1232, a
|
||||
galaxy thought to resemble our Milky Way. The image has been properly sized
|
||||
|
||||
@@ -31,7 +31,7 @@ local plane = {
|
||||
},
|
||||
GUI = {
|
||||
Name = "Milky Way Arms Labels",
|
||||
Path = "/Universe/Galaxies",
|
||||
Path = "/Milky Way",
|
||||
Description = [[Census: 1 image. DU Version: 1.2. This image contains labels for
|
||||
the Milky Way's spiral arms. We label them in this manner ("hard coding" the
|
||||
labels into an image rather than having native labels) so that they can retain
|
||||
|
||||
@@ -34,7 +34,7 @@ local gaia_abundance_apogee = {
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
-- ShapeTexture = textures .. "disc.png",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
OtherDataColorMap = colormaps .. "rainbowgradient.cmap",
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
DataMapping = {
|
||||
|
||||
@@ -5,12 +5,16 @@ local gaia618Destination = asset.syncedResource({
|
||||
Name = "Gaia DR2 618M Octree",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "gaia_stars_618M_octree",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
Unzip = {
|
||||
UnzipFiles = true,
|
||||
Destination = "data"
|
||||
}
|
||||
})
|
||||
local gaia618DestinationExtracted = gaia618Destination .. "data";
|
||||
|
||||
-- Download the full DR2 dataset with 24 values per star (preprocessed with theReadFitsTask (gaia_read.task) into 8 binary files).
|
||||
-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task).
|
||||
-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task).
|
||||
-- Total size of download is 151 GB.
|
||||
local gaiaFull = asset.syncedResource({
|
||||
Name = "Gaia DR2 Full Raw",
|
||||
@@ -19,13 +23,6 @@ local gaiaFull = asset.syncedResource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
asset.onInitialize(function()
|
||||
if not openspace.directoryExists(gaia618DestinationExtracted) then
|
||||
openspace.printInfo("Extracted Gaia dataset")
|
||||
openspace.unzipFile(gaia618Destination .. "DR2_full_Octree[50kSPN,500dist]_50,50.zip", gaia618DestinationExtracted, true)
|
||||
end
|
||||
end)
|
||||
|
||||
asset.export("GaiaDR2_618M", gaia618DestinationExtracted)
|
||||
asset.export("GaiaFullDataset", gaiaFull)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ local gaia_abundance_galah = {
|
||||
ColorOption = "Other Data",
|
||||
OtherData = "FeH",
|
||||
ColorMap = colormaps .. "colorbv.cmap",
|
||||
OtherDataColorMap = colormaps .. "RainbowGradient.cmap",
|
||||
OtherDataColorMap = colormaps .. "rainbowgradient.cmap",
|
||||
ColorRange = { { -0.8, 0.6 } },
|
||||
StaticFilter = -9999,
|
||||
StaticFilterReplacement = 0.0,
|
||||
|
||||
@@ -50,11 +50,38 @@ local Charon = {
|
||||
}
|
||||
}
|
||||
|
||||
local CharonLabel = {
|
||||
Identifier = "CharonLabel",
|
||||
Parent = Charon.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Charon",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 500.0 },
|
||||
FadeWidths = { 150.0, 250.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "major_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Charon Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Charon"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Charon)
|
||||
openspace.addSceneGraphNode(CharonLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(CharonLabel)
|
||||
openspace.removeSceneGraphNode(Charon)
|
||||
end)
|
||||
|
||||
|
||||
@@ -52,12 +52,39 @@ local HydraTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local HydraLabel = {
|
||||
Identifier = "HydraLabel",
|
||||
Parent = Hydra.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Hydra",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Hydra"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Hydra)
|
||||
openspace.addSceneGraphNode(HydraTrail)
|
||||
openspace.addSceneGraphNode(HydraLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(HydraLabel)
|
||||
openspace.removeSceneGraphNode(HydraTrail)
|
||||
openspace.removeSceneGraphNode(Hydra)
|
||||
end)
|
||||
|
||||
@@ -51,12 +51,39 @@ local KerberosTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local KerberosLabel = {
|
||||
Identifier = "KerberosLabel",
|
||||
Parent = Kerberos.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Kerberos",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Kerberos"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Kerberos)
|
||||
openspace.addSceneGraphNode(KerberosTrail)
|
||||
openspace.addSceneGraphNode(KerberosLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(KerberosLabel)
|
||||
openspace.removeSceneGraphNode(KerberosTrail)
|
||||
openspace.removeSceneGraphNode(Kerberos)
|
||||
end)
|
||||
|
||||
@@ -51,12 +51,39 @@ local NixTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local NixLabel = {
|
||||
Identifier = "NixLabel",
|
||||
Parent = Nix.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Nix",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Nix"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Nix)
|
||||
openspace.addSceneGraphNode(NixTrail)
|
||||
openspace.addSceneGraphNode(NixLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(NixLabel)
|
||||
openspace.removeSceneGraphNode(NixTrail)
|
||||
openspace.removeSceneGraphNode(Nix)
|
||||
end)
|
||||
|
||||
@@ -50,12 +50,39 @@ local StyxTrail = {
|
||||
}
|
||||
}
|
||||
|
||||
local StyxLabel = {
|
||||
Identifier = "StyxLabel",
|
||||
Parent = Styx.Identifier,
|
||||
Renderable = {
|
||||
Enabled = false,
|
||||
Type = "RenderableLabel",
|
||||
Text = "Styx",
|
||||
FontSize = 70.0,
|
||||
Size = 6.0,
|
||||
MinMaxSize = { 1, 25 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Normal",
|
||||
EnableFading = true,
|
||||
FadeUnit = "Mm",
|
||||
FadeDistances = { 250.0, 1000.0 },
|
||||
FadeWidths = { 150.0, 500.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels", "moon_labels", "minor_moon_labels" },
|
||||
GUI = {
|
||||
Name = "Cheron Label",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto/Moons",
|
||||
Description = "Label for Pluto's moon Styx"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Styx)
|
||||
openspace.addSceneGraphNode(StyxTrail)
|
||||
openspace.addSceneGraphNode(StyxLabel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(StyxLabel)
|
||||
openspace.removeSceneGraphNode(StyxTrail)
|
||||
openspace.removeSceneGraphNode(Styx)
|
||||
end)
|
||||
|
||||
@@ -57,10 +57,14 @@ local PlutoLabel = {
|
||||
Type = "RenderableLabel",
|
||||
Text = "Pluto",
|
||||
FontSize = 70.0,
|
||||
Size = 9.05,
|
||||
Size = 9.10,
|
||||
MinMaxSize = { 1, 100 },
|
||||
BlendMode = "Additive",
|
||||
OrientationOption = "Camera View Direction"
|
||||
OrientationOption = "Camera View Direction",
|
||||
EnableFading = true,
|
||||
FadeUnit = "au",
|
||||
FadeDistances = { 2.0, 120.0 },
|
||||
FadeWidths = { 1.0, 150.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels" },
|
||||
GUI = {
|
||||
|
||||
@@ -12,9 +12,16 @@ local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data BATSRUS",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-batsrus",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local unzippedDataDestination = {
|
||||
openClosed = fieldlineData .. "magnetic_fieldlines-open_closed",
|
||||
velocityFlow = fieldlineData .. "velocity_flowlines-upstream",
|
||||
asherStatic = fieldlineData .. "ashers_static_seeds"
|
||||
}
|
||||
|
||||
local loop = {
|
||||
Documentation = "Sets time to start of data, sets higher delta time and loops back from start, when at end of data",
|
||||
GuiPath = "2012July",
|
||||
@@ -30,12 +37,6 @@ local batsrusCurrentColorTable = transferFunctions .. "batsrus_current2.txt"
|
||||
local batsrusVelocityColorTable = transferFunctions .. "batsrus_velocity.txt"
|
||||
local batsrusTopologyColorTable = transferFunctions .. "batsrus_topology.txt"
|
||||
|
||||
local unzippedDataDestination = {
|
||||
openClosed = fieldlineData .. "magnetic_fieldlines-open_closed",
|
||||
velocityFlow = fieldlineData .. "velocity_flowlines-upstream",
|
||||
asherStatic = fieldlineData .. "ashers_static_seeds"
|
||||
}
|
||||
|
||||
local colorRanges = {
|
||||
{ 0, 100000000 },
|
||||
{ 0, 60 },
|
||||
@@ -131,19 +132,6 @@ local BatsrusAsherStaticSeedsFlowLines = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(loop)
|
||||
|
||||
if not openspace.directoryExists(unzippedDataDestination.openClosed) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "magnetic_fieldlines-open_closed.zip", unzippedDataDestination.openClosed, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.velocityFlow) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "velocity_flowlines-upstream.zip", unzippedDataDestination.velocityFlow, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.asherStatic) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "ashers_static_seeds.zip", unzippedDataDestination.asherStatic, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(BatsrusJ12OpenClosed)
|
||||
openspace.addSceneGraphNode(BatsrusJ12FlowLines)
|
||||
openspace.addSceneGraphNode(BatsrusAsherStaticSeedsFlowLines)
|
||||
|
||||
@@ -8,11 +8,12 @@ local transferFunctions = asset.syncedResource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local fieldlineData = asset.syncedResource({
|
||||
local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data ENLIL",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-enlil",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local loop = {
|
||||
@@ -187,31 +188,6 @@ local ENLILStereoA = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(loop)
|
||||
|
||||
if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU1) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_eq_plane_1.zip", unzippedDataDestination.EqPlane011AU1, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU2) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_eq_plane_2.zip", unzippedDataDestination.EqPlane011AU2, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Lat4011AU1) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_lat4_1.zip", unzippedDataDestination.Lat4011AU1, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Lat4011AU2) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "011AU_lat4_2.zip", unzippedDataDestination.Lat4011AU2, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.Earth) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "earth.zip", unzippedDataDestination.Earth, true)
|
||||
end
|
||||
if not openspace.directoryExists(unzippedDataDestination.StereoA) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "stereoa.zip", unzippedDataDestination.StereoA, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(ENLILSliceEqPlane11AU1)
|
||||
openspace.addSceneGraphNode(ENLILSliceEqPlane11AU2)
|
||||
openspace.addSceneGraphNode(ENLILSliceLat411AU1)
|
||||
|
||||
@@ -11,7 +11,8 @@ local fieldlineData = asset.syncedResource({
|
||||
Name = "Fieldlines Data PFSS",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "sun_earth_event_july_2012-pfss",
|
||||
Version = 1
|
||||
Version = 1,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local darkenSun = {
|
||||
@@ -64,11 +65,6 @@ local PFSS = {
|
||||
asset.onInitialize(function ()
|
||||
openspace.action.registerAction(darkenSun)
|
||||
|
||||
if not openspace.directoryExists(PFSSPaths.SolarSoft) then
|
||||
openspace.printInfo("Extracting " .. "Fieldlines from PFSS model of 2012 event")
|
||||
openspace.unzipFile(fieldlineData .. "leilas_solar_soft.zip", PFSSPaths.SolarSoft, true)
|
||||
end
|
||||
|
||||
openspace.addSceneGraphNode(PFSS)
|
||||
|
||||
-- openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.FlowEnabled", true)
|
||||
|
||||
@@ -2,6 +2,8 @@ local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
local transforms = asset.require("./transforms")
|
||||
asset.require("spice/base")
|
||||
asset.require("scene/solarsystem/planets/earth/layers/colorlayers/terra_modis_temporal")
|
||||
asset.require("scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo")
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "JWST Model",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
asset.require("./jwst")
|
||||
|
||||
local point_jwst = {
|
||||
Identifier = "event.jwst.point",
|
||||
Name = "Point JWST",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
asset.require("spice/base") -- openspace.time.advancedTime depends on SPICE
|
||||
asset.require("scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_2012")
|
||||
asset.require("scene/solarsystem/planets/earth/atmosphere")
|
||||
|
||||
-- Function to advance a time stamp in the given number of days, hours, minutes and
|
||||
-- seconds. returns the new time stamp
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
|
||||
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
|
||||
asset.require("spice/base")
|
||||
asset.require("scene/solarsystem/planets/earth/lagrange_points/L2")
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "JWST Kernel",
|
||||
@@ -78,8 +79,12 @@ local JWSTRotation = {
|
||||
}
|
||||
}
|
||||
|
||||
-- Reparent the JWSTPosition node when the data changes at 25 Jan 2022
|
||||
-- Reparent the JWSTPosition node when the data changes
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(JWSTPosition)
|
||||
openspace.addSceneGraphNode(JWSTRotation)
|
||||
|
||||
-- Set correct parent during run-time
|
||||
openspace.scriptScheduler.loadScheduledScript(
|
||||
detachTime,
|
||||
[[openspace.setParent("JWSTPosition", "EarthCenter")]],
|
||||
@@ -95,8 +100,15 @@ asset.onInitialize(function()
|
||||
1 -- Not default group, never clear this script
|
||||
)
|
||||
|
||||
openspace.addSceneGraphNode(JWSTPosition)
|
||||
openspace.addSceneGraphNode(JWSTRotation)
|
||||
-- Set correct parent at the start
|
||||
local now = openspace.time.currentTime();
|
||||
if now < openspace.time.convertTime(detachTime) then
|
||||
openspace.setParent("JWSTPosition", "EarthIAU")
|
||||
elseif now > openspace.time.convertTime(L2orbitInsertionTime) then
|
||||
openspace.setParent("JWSTPosition", "L2")
|
||||
else
|
||||
openspace.setParent("JWSTPosition", "EarthCenter")
|
||||
end
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
|
||||
@@ -20,10 +20,11 @@ local images = asset.syncedResource({
|
||||
Name = "Rosetta Images",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "rosettaimages",
|
||||
Version = 2
|
||||
Version = 2,
|
||||
UnzipFiles = true
|
||||
})
|
||||
|
||||
local imagesDestination = images .. "images"
|
||||
local imagesDestination = images .. "images_v1_v2"
|
||||
|
||||
local Barycenter = {
|
||||
Identifier = "67PBarycenter",
|
||||
@@ -70,7 +71,7 @@ local Comet67P = {
|
||||
Spice = { "ROS_NAVCAM-A" }
|
||||
}
|
||||
},
|
||||
Target = {
|
||||
Target = {
|
||||
Read = {
|
||||
"TARGET_NAME",
|
||||
"INSTRUMENT_HOST_NAME",
|
||||
@@ -130,15 +131,6 @@ local Trail67P = {
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
if not openspace.directoryExists(imagesDestination) then
|
||||
openspace.printInfo("Extracting Rosetta images")
|
||||
openspace.unzipFile(images .. "images_v1_v2.zip", imagesDestination, true)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Barycenter)
|
||||
openspace.addSceneGraphNode(Comet67P)
|
||||
|
||||
@@ -211,8 +211,8 @@ local VoyagerTrailCruiseSaturnInf = {
|
||||
EnableFade = false,
|
||||
Color = { 0.70, 0.50, 0.20 },
|
||||
StartTime = "1980 NOV 16",
|
||||
EndTime = "2021 JAN 01",
|
||||
SampleInterval = 14656 * 2 -- 14656 is the number of days between the Start and End time
|
||||
EndTime = "2300 JAN 01",
|
||||
SampleInterval = 116558 * 2 -- 116558 is the number of days between the Start and End time
|
||||
},
|
||||
GUI = {
|
||||
Name = "Voyager 1 Trail Cruise Saturn-Inf",
|
||||
|
||||
@@ -307,8 +307,8 @@ local VoyagerTrailCruiseNeptuneInf = {
|
||||
EnableFade = false,
|
||||
Color = { 0.70, 0.50, 0.20 },
|
||||
StartTime = "1989 AUG 26",
|
||||
EndTime = "2021 JAN 01",
|
||||
SampleInterval = 11451 * 2 -- 11451 is the number of days between the Start and End time
|
||||
EndTime = "2300 JAN 01",
|
||||
SampleInterval = 113353 * 2 -- 113353 is the number of days between the Start and End time
|
||||
},
|
||||
GUI = {
|
||||
Name = "Voyager 2 Trail Cruise Neptune-Inf",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
local transforms = asset.require("./earth")
|
||||
|
||||
asset.require("scene/solarsystem/sun/sun")
|
||||
asset.require("./moon/moon")
|
||||
|
||||
|
||||
-- local earthEllipsoid = { 6378137.0, 6378137.0, 6356752.314245 }
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
asset.require("./layers/colorlayers/blue_marble", false)
|
||||
asset.require("./layers/colorlayers/esri_viirs_combo", true)
|
||||
asset.require("./layers/colorlayers/esri_world_imagery", false)
|
||||
asset.require("./layers/colorlayers/esri_imagery_world_2D", false)
|
||||
asset.require("./layers/colorlayers/viirs_snpp_temporal", false)
|
||||
asset.require("./layers/colorlayers/aqua_modis_temporal", false)
|
||||
asset.require("./layers/colorlayers/terra_modis_temporal", false)
|
||||
@@ -10,7 +9,6 @@ asset.require("./layers/colorlayers/bmng_utah", false)
|
||||
asset.require("./layers/colorlayers/bmng_sweden", false)
|
||||
asset.require("./layers/colorlayers/amsr2_gcom_w1_sea_ice_concentration_temporal", false)
|
||||
asset.require("./layers/colorlayers/modis_terra_chlorophyll_a_temporal", false)
|
||||
asset.require("./layers/colorlayers/ghrsst_l4_g1sst_sea_surface_temperature_temporal", false)
|
||||
asset.require("./layers/colorlayers/ghrsst_l4_mur_sea_surface_temperature_temporal", false)
|
||||
|
||||
-- Height layers
|
||||
|
||||
@@ -56,14 +56,14 @@ local EarthLabel = {
|
||||
Type = "RenderableLabel",
|
||||
Text = "Earth",
|
||||
FontSize = 70.0,
|
||||
Size = 8.77,
|
||||
MinMaxSize = { 1, 100 },
|
||||
Size = 8.50,
|
||||
MinMaxSize = { 1, 50 },
|
||||
OrientationOption = "Camera View Direction",
|
||||
BlendMode = "Additive",
|
||||
EnableFading = true,
|
||||
FadeUnit = "au",
|
||||
FadeDistances = { 1.5, 15.0 },
|
||||
FadeWidths = { 1.0, 25.0 }
|
||||
FadeDistances = { 1.5, 30.0 },
|
||||
FadeWidths = { 1.0, 40.0 }
|
||||
},
|
||||
Tag = { "solarsystem_labels" },
|
||||
GUI = {
|
||||
|
||||
88
data/assets/scene/solarsystem/planets/earth/grids.asset
Normal file
88
data/assets/scene/solarsystem/planets/earth/grids.asset
Normal file
@@ -0,0 +1,88 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
local eclipticRotationMatrix = {
|
||||
-0.05487554, 0.4941095, -0.8676661,
|
||||
-0.9938214 , -0.1109906, -0.0003515167,
|
||||
-0.09647644, 0.8622859, 0.4971472
|
||||
}
|
||||
|
||||
local lightSecond = 299792458
|
||||
local lightMinute = 1.798754748E10
|
||||
|
||||
local plane1lsec = {
|
||||
Identifier = "1lsecGrid",
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = eclipticRotationMatrix
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "EARTH BARYCENTER",
|
||||
Observer = "SSB"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGrid",
|
||||
Enabled = false,
|
||||
Opacity = 0.4,
|
||||
Color = { 0.1, 0.5, 0.6 },
|
||||
LineWidth = 2.0,
|
||||
Segments = { 20, 20 },
|
||||
Size = { 2*lightSecond, 2*lightSecond }
|
||||
},
|
||||
GUI = {
|
||||
Name = "1lsec Grid",
|
||||
Path = "/Solar System/Planets/Earth"
|
||||
}
|
||||
}
|
||||
|
||||
local plane1lmin = {
|
||||
Identifier = "1lminGrid",
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = eclipticRotationMatrix
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "EARTH BARYCENTER",
|
||||
Observer = "SSB"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGrid",
|
||||
Enabled = false,
|
||||
Opacity = 0.4,
|
||||
Color = { 0.1, 0.5, 0.6 },
|
||||
LineWidth = 2.0,
|
||||
Segments = { 20, 20 },
|
||||
Size = { 2*lightMinute, 2*lightMinute }
|
||||
},
|
||||
GUI = {
|
||||
Name = "1lmin Grid",
|
||||
Path = "/Solar System/Planets/Earth"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(plane1lsec)
|
||||
openspace.addSceneGraphNode(plane1lmin)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(plane1lmin)
|
||||
openspace.removeSceneGraphNode(plane1lsec)
|
||||
end)
|
||||
|
||||
asset.export(plane1lsec)
|
||||
asset.export(plane1lmin)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Earth Grid",
|
||||
Version = "1.0",
|
||||
Description = [[Grids that are useful to show distances around Earth]],
|
||||
Author = "OpenSpace Team",
|
||||
License = "MIT license"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user