Merge remote-tracking branch 'origin/master' into issue/2403

# Conflicts:
#	modules/skybrowser/include/wwtcommunicator.h
#	modules/skybrowser/src/wwtcommunicator.cpp
This commit is contained in:
Ylva Selling
2023-02-09 16:20:42 -05:00
105 changed files with 729 additions and 6100 deletions
+5 -5
View File
@@ -22,8 +22,8 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/global_variables.cmake)
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
# This function takes a list of module paths and returns the list of include paths that
@@ -164,7 +164,7 @@ endfunction ()
set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules")
set(internal_module_path "${OPENSPACE_BASE_DIR}/modules")
set(internal_module_path "${PROJECT_SOURCE_DIR}/modules")
set(all_enabled_modules "")
@@ -378,12 +378,12 @@ if (NOT "${MODULE_PATHS}" STREQUAL "")
endif ()
configure_file(
${OPENSPACE_CMAKE_EXT_DIR}/module_registration.template
${PROJECT_SOURCE_DIR}/support/cmake/module_registration.template
${CMAKE_BINARY_DIR}/_generated/include/openspace/moduleregistration.h
)
configure_file(
${OPENSPACE_CMAKE_EXT_DIR}/module_path.template
${PROJECT_SOURCE_DIR}/support/cmake/module_path.template
${CMAKE_BINARY_DIR}/_generated/include/openspace/modulepath.h
)
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/atmospheredeferredcaster.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
dashboard/dashboarditemangle.h
+2 -2
View File
@@ -732,7 +732,7 @@ void RenderableModel::update(const UpdateData& data) {
// starts again
// s/\/\/\/\ ...
relativeTime =
duration - abs(fmod(now - startTime, 2 * duration) - duration);
duration - std::abs(fmod(now - startTime, 2 * duration) - duration);
break;
case AnimationMode::BounceInfinitely: {
// Bounce both before and after the start time where the model is
@@ -742,7 +742,7 @@ void RenderableModel::update(const UpdateData& data) {
if (modulo < 0.0) {
modulo += 2 * duration;
}
relativeTime = duration - abs(modulo - duration);
relativeTime = duration - std::abs(modulo - duration);
break;
}
case AnimationMode::Once:
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
include(../webbrowser/cmake/webbrowser_helpers.cmake)
set(CEFWEBGUI_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "CEFWEBGUI_MODULE_PATH")
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
debuggingmodule.h
+2 -2
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/renderablepoints.h
@@ -34,7 +34,7 @@ source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
rendering/renderablepoints.cpp
rendering/renderabledumeshes.cpp
rendering/renderabledumeshes.cpp
rendering/renderablebillboardscloud.cpp
rendering/renderableplanescloud.cpp
)
@@ -87,7 +87,6 @@ private:
bool _hasSpeckFile = false;
bool _dataIsDirty = true;
bool _textColorIsDirty = true;
bool _hasLabels = false;
properties::FloatProperty _scaleFactor;
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
exoplanetshelper.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/renderablefieldlines.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/renderablefieldlinessequence.h
+18 -16
View File
@@ -22,8 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
fitsfilereadermodule.h
@@ -31,7 +30,7 @@ set(HEADER_FILES
)
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
set(SOURCE_FILES
fitsfilereadermodule.cpp
src/fitsfilereader.cpp
)
@@ -44,25 +43,28 @@ create_new_module(
${SOURCE_FILES}
)
# Set root directories for external libraries.
set(CFITSIO_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/cfitsio/")
set(CCFITS_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/CCfits/")
set(INCLUDES_FOR_TARGET ${CCFITS_ROOT_DIR} "${CCFITS_ROOT_DIR}/../" ${CFITSIO_ROOT_DIR})
set(MODULE_NAME openspace-module-fitsfilereader)
# CCfits is dependent on cfitsio, let it handle the internal linking
add_subdirectory(${CFITSIO_ROOT_DIR})
set_folder_location(cfitsio "External")
add_subdirectory(ext/cfitsio SYSTEM)
set_target_properties(cfitsio PROPERTIES FOLDER "External")
set(cfitsio_BUILD_SHARED_LIBS OFF)
add_subdirectory(${CCFITS_ROOT_DIR})
set_folder_location(CCfits "External")
add_subdirectory(ext/CCfits SYSTEM)
set_target_properties(CCfits PROPERTIES FOLDER "External")
set(CCfits_BUILD_SHARED_LIBS OFF)
disable_external_warnings(cfitsio)
disable_external_warnings(CCfits)
if (MSVC)
target_compile_options(cfitsio PRIVATE "/W0")
target_compile_definitions(cfitsio PRIVATE "_SCL_SECURE_NO_WARNINGS")
target_include_directories(openspace-module-fitsfilereader SYSTEM PRIVATE ${INCLUDES_FOR_TARGET})
target_compile_options(CCfits PRIVATE "/W0")
target_compile_definitions(CCfits PRIVATE "_SCL_SECURE_NO_WARNINGS")
else ()
target_compile_options(cfitsio PRIVATE "-w")
target_compile_options(CCfits PRIVATE "-w")
endif ()
target_include_directories(openspace-module-fitsfilereader SYSTEM PRIVATE ext ext/CCfits ext/cfitsio)
target_link_libraries(openspace-module-fitsfilereader PRIVATE cfitsio CCfits)
target_precompile_headers(CCfits PRIVATE
+4 -4
View File
@@ -22,17 +22,17 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
gaiamodule.h
rendering/renderablegaiastars.h
rendering/octreemanager.h
rendering/octreeculler.h
tasks/readfilejob.h
tasks/readfitstask.h
tasks/readfilejob.h
tasks/readfitstask.h
tasks/readspecktask.h
tasks/constructoctreetask.h
tasks/constructoctreetask.h
rendering/gaiaoptions.h
)
source_group("Header Files" FILES ${HEADER_FILES})
@@ -928,7 +928,7 @@ void RenderableGaiaStars::render(const RenderData& data, RendererTasks&) {
glm::vec2 screenSize = glm::vec2(global::renderEngine->renderingResolution());
// Wait until camera has stabilized before we traverse the Octree/stream from files.
const double rotationDiff = abs(length(_previousCameraRotation) -
const double rotationDiff = std::abs(length(_previousCameraRotation) -
length(data.camera.rotationQuaternion()));
if (_firstDrawCalls && rotationDiff > 1e-10) {
_previousCameraRotation = data.camera.rotationQuaternion();
+3 -3
View File
@@ -22,10 +22,10 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
galaxymodule.h
galaxymodule.h
rendering/galaxyraycaster.h
rendering/renderablegalaxy.h
tasks/milkywayconversiontask.h
@@ -34,7 +34,7 @@ set(HEADER_FILES
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
galaxymodule.cpp
galaxymodule.cpp
rendering/galaxyraycaster.cpp
rendering/renderablegalaxy.cpp
tasks/milkywayconversiontask.cpp
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
globebrowsingmodule.h
@@ -146,7 +146,7 @@ namespace {
std::fill(IdentifierBuffer.begin(), IdentifierBuffer.end(), '\0');
int ret = sscanf(
subDatasets[i],
"SUBDATASET_%i_%256[^=]",
"SUBDATASET_%i_%255[^=]",
&iDataset,
IdentifierBuffer.data()
);
+11 -10
View File
@@ -10,7 +10,7 @@ openspace.globebrowsing.documentation = {
{
Name = "createGibsGdalXml",
Arguments = { layerName = "String", date = "String", resolution = "String", format = "String" },
Documentation =
Documentation =
"Creates an XML configuration for a GIBS dataset." ..
"Arguments are: layerName, date, resolution, format." ..
"For all specifications, see " ..
@@ -94,7 +94,7 @@ openspace.globebrowsing.addGibsLayer = function(layer, resolution, format, start
end
local layer = {
Identifier = layerName,
Identifier = layerName,
Type = "TemporalTileLayer",
Mode = "Prototyped",
Prototyped = {
@@ -207,7 +207,7 @@ openspace.globebrowsing.parseInfoFile = function (file)
file_func()
else
openspace.printError('Error loading file "' .. file .. '": '.. error)
return nil, nil, nil, nil
return nil
end
-- Hoist the global variables into local space
@@ -220,11 +220,11 @@ openspace.globebrowsing.parseInfoFile = function (file)
-- Now we can start
local name = Name or Identifier
local identifier = Identifier or Name
local identifier = Identifier
if name == nil and identifier == nil then
openspace.printError('Error loading file "' .. file .. '": No "Name" or "Identifier" found')
return nil, nil, nil, nil
if identifier == "" then
openspace.printError('Error loading file "' .. file .. '": No "Identifier" found')
return nil
end
local color = nil
@@ -287,11 +287,12 @@ openspace.globebrowsing.addBlendingLayersFromDirectory = function (dir, node_nam
for _, file in pairs(files) do
if file and file:find('.info') and ends_with(file, '.info') then
local t = openspace.globebrowsing.parseInfoFile(file)
if t.Color then
if t and t.Color then
openspace.printInfo("Adding color layer '" .. t.Color["Identifier"] .. "'")
openspace.globebrowsing.addLayer(node_name, "ColorLayers", t.Color)
end
if t.Height then
if t and t.Height then
openspace.printInfo("Adding height layer '" .. t.Height["Identifier"] .. "'")
openspace.globebrowsing.addLayer(node_name, "HeightLayers", t.Height)
end
@@ -306,7 +307,7 @@ openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name)
if file and file:find('.info') then
local t = openspace.globebrowsing.parseInfoFile(file)
if node_name and t.Location then
if node_name and t and t.Location then
openspace.printInfo("Creating focus node for '" .. node_name .. "'")
local lat = t.Location.Center[1]
+1 -1
View File
@@ -145,7 +145,7 @@ std::array<LayerGroup*, LayerManager::NumLayerGroups> LayerManager::layerGroups(
ZoneScoped
std::array<LayerGroup*, NumLayerGroups> res = {};
for (int i = 0; i < NumLayerGroups; ++i) {
for (size_t i = 0; i < NumLayerGroups; ++i) {
res[i] = _layerGroups[i].get();
}
return res;
@@ -1713,7 +1713,7 @@ void RenderableGlobe::recompileShaders() {
}
ghoul::Dictionary layerGroupNames;
for (int i = 0; i < layers::Groups.size(); ++i) {
for (size_t i = 0; i < layers::Groups.size(); ++i) {
layerGroupNames.setValue(
std::to_string(i),
std::string(layers::Groups[i].identifier)
+4 -2
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
include/guiactioncomponent.h
@@ -74,4 +74,6 @@ create_new_module(
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)
include_external_library(${imgui_module} PUBLIC Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui)
add_subdirectory(ext/imgui SYSTEM)
target_link_libraries(${imgui_module} PUBLIC Imgui)
set_target_properties(Imgui PROPERTIES FOLDER "External")
@@ -53,14 +53,6 @@ namespace {
"elements not listed"
};
constexpr openspace::properties::Property::PropertyInfo IgnoreHiddenInfo = {
"IgnoreHidden",
"Ignore Hidden Hint",
"If this value is 'true', all 'Hidden' hints passed into the SceneGraphNodes are "
"ignored and thus all SceneGraphNodes are displayed. If this value is 'false', "
"the hidden hints are followed"
};
int nVisibleProperties(const std::vector<openspace::properties::Property*>& props)
{
using Visibility = openspace::properties::Property::Visibility;
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/datacygnet.h
+11 -18
View File
@@ -22,12 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
# Use <PackageName>_ROOT variables
# https://cmake.org/cmake/help/git-stage/policy/CMP0074.html
cmake_policy(SET CMP0074 NEW)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
include/kameleonwrapper.h
@@ -58,17 +53,22 @@ mark_as_advanced(BUILD_SHARED_LIBS) # Change to set instead of option
option(KAMELEON_USE_HDF5 "Kameleon use HDF5" OFF)
set(KAMELEON_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/kameleon)
set(KAMELEON_INCLUDES ${KAMELEON_ROOT_DIR}/src)
add_subdirectory(${KAMELEON_ROOT_DIR})
add_subdirectory(${KAMELEON_ROOT_DIR} SYSTEM)
target_include_directories(${kameleon_module} SYSTEM PUBLIC ${KAMELEON_INCLUDES})
target_link_libraries(${kameleon_module} PRIVATE ccmc)
mark_as_advanced(CDF_BUILD_ZLIB CDF_INCLUDES CDF_LIBRARY CDF_USE_STATIC_LIBS
CDF_USE_ZLIB HDF5_DIR HDF5_USE_STATIC_LIBRARIES KAMELEON_LIBRARY_ONLY KAMELEON_USE_HDF5
)
disable_external_warnings(ccmc)
set_folder_location(ccmc "External")
set_target_properties(ccmc PROPERTIES FOLDER "External")
if (TARGET cdf)
disable_external_warnings(cdf)
set_folder_location(cdf "External")
if (MSVC)
target_compile_options(cdf PRIVATE "/W0")
target_compile_definitions(cdf PRIVATE "_SCL_SECURE_NO_WARNINGS")
else ()
target_compile_options(cdf PRIVATE "-w")
endif ()
set_target_properties(cdf PROPERTIES FOLDER "External")
endif ()
target_precompile_headers(cdf PRIVATE
@@ -84,10 +84,3 @@ target_precompile_headers(ccmc PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:vector>"
"$<$<COMPILE_LANGUAGE:CXX>:boost/unordered_map.hpp>"
)
if (WIN32)
target_compile_options(ccmc PRIVATE /MP)
if (TARGET cdf)
target_compile_options(cdf PRIVATE /MP)
endif ()
endif ()
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
kameleonvolumereader.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/atlasmanager.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(HEADER_FILES
+1 -1
View File
@@ -56,7 +56,7 @@ ServerModule::ServerModule()
// Trigger callbacks
using K = CallbackHandle;
using V = CallbackFunction;
for (const std::pair<const K, V>& it : _preSyncCallbacks) {
for (const std::pair<K, V>& it : _preSyncCallbacks) {
it.second(); // call function
}
});
@@ -37,7 +37,6 @@
namespace {
constexpr std::string_view SubscribeEvent = "start_subscription";
constexpr std::string_view UnsubscribeEvent = "stop_subscription";
} // namespace
using nlohmann::json;
@@ -28,6 +28,7 @@
#include <openspace/engine/globals.h>
#include <openspace/interaction/actionmanager.h>
#include <openspace/interaction/keybindingmanager.h>
#include <ghoul/logging/logmanager.h>
using nlohmann::json;
@@ -69,6 +70,13 @@ std::vector<nlohmann::json> ShortcutTopic::shortcutsJson() const {
global::keybindingManager->keyBindings();
for (const std::pair<const KeyWithModifier, std::string>& keyBinding : keyBindings) {
if (!global::actionManager->hasAction(keyBinding.second)) {
// We don't warn here as we don't know if the user didn't expect the action
// to be there or not. They might have defined a keybind to do multiple things
// only one of which is actually defined
continue;
}
const KeyWithModifier& k = keyBinding.first;
// @TODO (abock, 2021-08-05) Probably this should be rewritten to better account
// for the new action mechanism
+6 -3
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
skybrowsermodule.h
@@ -33,7 +33,6 @@ set(HEADER_FILES
include/wwtcommunicator.h
include/browser.h
include/screenspaceskybrowser.h
ext/tinyxml2/tinyxml2.h
)
source_group("Header Files" FILES ${HEADER_FILES})
@@ -47,7 +46,6 @@ set(SOURCE_FILES
src/wwtcommunicator.cpp
src/browser.cpp
src/screenspaceskybrowser.cpp
ext/tinyxml2/tinyxml2.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
@@ -67,3 +65,8 @@ target_precompile_headers(${skybrowser_module} PRIVATE
[["include/cef_accessibility_handler.h"]]
[["include/cef_render_handler.h"]]
)
# This introduces a dependency into SGCT, but the way it is handled is not great right now
# This will break when we remove tinyxml2 from SGCT and then we can move the submodule
# over into this ext folder and fix it well
target_link_libraries(${skybrowser_module} PRIVATE tinyxml2)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -75,7 +75,6 @@ private:
void bindTexture() override;
// Flags
bool _isSyncedWithWwt = false;
bool _isInitialized = false;
bool _radiusIsDirty = false;
int _borderRadiusTimer = -1;
+1 -1
View File
@@ -182,7 +182,7 @@ SkyBrowserModule::SkyBrowserModule()
// Set callback functions
global::callback::mouseButton->emplace(
global::callback::mouseButton->begin(),
[&](MouseButton button, MouseAction action, KeyModifier, IsGuiWindow) -> bool {
[&](MouseButton, MouseAction action, KeyModifier, IsGuiWindow) -> bool {
if (action == MouseAction::Press) {
_cameraRotation.stop();
}
@@ -187,7 +187,7 @@ void ScreenSpaceSkyBrowser::setIsInitialized(bool isInitialized) {
void ScreenSpaceSkyBrowser::updateTextureResolution() {
// Check if texture quality has changed. If it has, adjust accordingly
if (abs(_textureQuality.value() - _lastTextureQuality) > glm::epsilon<float>()) {
if (std::abs(_textureQuality.value() - _lastTextureQuality) > glm::epsilon<float>()) {
float diffTextureQuality = _textureQuality / _lastTextureQuality;
glm::vec2 newRes = glm::vec2(_browserDimensions.value()) * diffTextureQuality;
_browserDimensions = glm::ivec2(newRes);
+1 -1
View File
@@ -329,7 +329,7 @@ void TargetBrowserPair::startAnimation(glm::dvec3 galacticCoords, double fovEnd)
SkyBrowserModule* module = global::moduleEngine->module<SkyBrowserModule>();
double fovSpeed = module->browserAnimationSpeed();
// The speed is given degrees /sec
double fovTime = abs(_browser->verticalFov() - fovEnd) / fovSpeed;
double fovTime = std::abs(_browser->verticalFov() - fovEnd) / fovSpeed;
// Fov animation
_fovAnimation = skybrowser::Animation(_browser->verticalFov(), fovEnd, fovTime);
+3 -1
View File
@@ -170,7 +170,9 @@ bool isCoordinateInView(const glm::dvec3& equatorial) {
double r = windowRatio();
bool isCoordInView =
abs(coordsScreen.x) < r && abs(coordsScreen.y) < 1.f && coordsScreen.z < 0.f;
std::abs(coordsScreen.x) < r &&
std::abs(coordsScreen.y) < 1.f &&
coordsScreen.z < 0.f;
return isCoordInView;
}
+1 -2
View File
@@ -297,8 +297,7 @@ glm::dvec2 WwtCommunicator::equatorialAim() const {
void WwtCommunicator::setImageOrder(const std::string& imageUrl, int order) {
// Find in selected images list
auto current = findSelectedImage(imageUrl);
auto target = _selectedImages.begin() + order;
int currentIndex = std::distance(_selectedImages.begin(), current);
int currentIndex = static_cast<int>(std::distance(_selectedImages.begin(), current));
std::deque<std::pair<std::string, double>> newDeque;
+1 -12
View File
@@ -28,18 +28,7 @@
#include <openspace/util/httprequest.h>
#include <ghoul/logging/logmanager.h>
#include <string_view>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#include <modules/skybrowser/ext/tinyxml2/tinyxml2.h>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
#include <tinyxml2.h>
namespace {
constexpr std::string_view _loggerCat = "WwtDataHandler";
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
horizonsfile.h
-6
View File
@@ -45,12 +45,6 @@ namespace {
"The speck label file with the data for the labels"
};
constexpr openspace::properties::Property::PropertyInfo UnitInfo = {
"Unit",
"Unit",
"Distance unit for the label data"
};
constexpr openspace::properties::Property::PropertyInfo OpacityInfo = {
"Opacity",
"Opacity",
@@ -103,8 +103,8 @@ documentation::Documentation RenderableConstellationLines::Documentation() {
RenderableConstellationLines::RenderableConstellationLines(
const ghoul::Dictionary& dictionary)
: RenderableConstellationsBase(dictionary)
, _speckFile(SpeckInfo)
, _drawElements(DrawElementsInfo, true)
, _speckFile(SpeckInfo)
{
const Parameters p = codegen::bake<Parameters>(dictionary);
@@ -382,7 +382,6 @@ bool RenderableConstellationLines::readSpeckFile() {
// Try to read three values for the position
glm::vec3 pos;
bool success = true;
auto reading = scn::scan(line, "{} {} {}", pos.x, pos.y, pos.z);
if (reading) {
pos *= scale;
@@ -391,7 +390,6 @@ bool RenderableConstellationLines::readSpeckFile() {
constellationLine.vertices.push_back(pos.z);
}
else {
success = false;
LERROR(fmt::format(
"Failed reading position on line {} of mesh {} in file: '{}'. "
"Stopped reading constellation data", l, lineIndex, fileName
@@ -98,10 +98,10 @@ documentation::Documentation RenderableConstellationsBase::Documentation() {
RenderableConstellationsBase::RenderableConstellationsBase(
const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _drawLabels(DrawLabelInfo, false)
, _lineWidth(LineWidthInfo, 2.f, 1.f, 16.f)
, _namesFilename(NamesFileInfo)
, _selection(SelectionInfo)
, _drawLabels(DrawLabelInfo, false)
, _namesFilename(NamesFileInfo)
{
const Parameters p = codegen::bake<Parameters>(dictionary);
@@ -188,7 +188,7 @@ void RenderableConstellationsBase::loadConstellationFile() {
}
void RenderableConstellationsBase::fillSelectionProperty() {
for (const std::pair<std::string, std::string>& pair : _namesTranslation) {
for (const std::pair<const std::string, std::string>& pair : _namesTranslation) {
_selection.addOption(pair.second);
}
}
@@ -304,7 +304,7 @@ void RenderableOrbitalKepler::updateBuffers() {
_numObjects = parameters.size();
if (_startRenderIdx < 0 || _startRenderIdx >= _numObjects) {
if (_startRenderIdx >= _numObjects) {
throw ghoul::RuntimeError(fmt::format(
"Start index {} out of range [0, {}]", _startRenderIdx, _numObjects
));
@@ -57,7 +57,6 @@ private:
void updateBuffers();
bool _updateDataBuffersAtNextRender = false;
bool _isFileReadinitialized = false;
std::streamoff _numObjects;
std::vector<size_t> _segmentSize;
properties::UIntProperty _segmentQuality;
+2 -1
View File
@@ -70,7 +70,8 @@ GPTranslation::GPTranslation(const ghoul::Dictionary& dictionary) {
p.file,
codegen::map<kepler::Format>(p.format)
);
if (parameters.size() < element) {
if (element > static_cast<int>(parameters.size())) {
throw ghoul::RuntimeError(fmt::format(
"Requested element {} but only {} are available", element, parameters.size()
));
+2 -2
View File
@@ -22,9 +22,9 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
set(HEADER_FILES
dashboard/dashboarditeminstruments.h
rendering/renderablecrawlingline.h
rendering/renderablefov.h
@@ -39,8 +39,6 @@
#include <ghoul/opengl/textureunit.h>
namespace {
constexpr std::string_view _loggerCat = "RenderablePlanetProjection";
constexpr std::array<const char*, 12> MainUniformNames = {
"sun_pos", "modelTransform", "modelViewProjectionTransform", "hasBaseMap",
"hasHeightMap", "heightExaggeration", "meridianShift", "ambientBrightness",
@@ -52,7 +50,6 @@ namespace {
"boresight", "radius", "segments"
};
constexpr std::string_view KeyRadius = "Geometry.Radius";
constexpr std::string_view NoImageText = "No Image";
constexpr openspace::properties::Property::PropertyInfo ColorTexturePathsInfo = {
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
renderableplanespout.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/state.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
syncmodule.h
+4 -3
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
ext/levmarq.h
@@ -57,5 +57,6 @@ create_new_module(
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)
include_external_library(${touch_module} PRIVATE libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext)
disable_external_warnings_for_file(${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp)
add_subdirectory(ext SYSTEM)
target_link_libraries(${touch_module} PRIVATE libTUIO11)
set_target_properties(libTUIO11 PROPERTIES FOLDER "External")
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/renderabletoyvolume.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
rendering/renderabledistancelabel.h
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
set(HEADER_FILES
envelope.h
+4 -11
View File
@@ -22,10 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
include(cmake/webbrowser_helpers.cmake)
set(WEBBROWSER_MODULE_NAME WebBrowser)
@@ -90,14 +87,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
find_package(CEF REQUIRED)
# Include the libcef_dll_wrapper target (executes libcef_dll/CMakeLists.txt).
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper SYSTEM)
mark_as_advanced(CEF_DEBUG_INFO_FLAG USE_ATL USE_OFFICIAL_BUILD_SANDBOX USE_SANDBOX)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# The CEF DLL wrapper is raising a lot of warnings on GCC
target_compile_options(libcef_dll_wrapper PRIVATE "-w")
endif ()
target_compile_options(libcef_dll_wrapper PRIVATE "-w")
target_precompile_headers(libcef_dll_wrapper PRIVATE
[["include/cef_client.h"]]
@@ -266,8 +260,7 @@ target_precompile_headers(${webbrowser_module} PRIVATE
<include/wrapper/cef_helpers.h>
)
set_folder_location(libcef_dll_wrapper "Helper")
set_folder_location(openspace_web_helper "Helper")
set_target_properties(libcef_dll_wrapper PROPERTIES FOLDER "Helper")
# Display CEF configuration settings.
# PRINT_CEF_CONFIG()
+2 -2
View File
@@ -373,8 +373,8 @@ bool EventHandler::isDoubleClick(const MouseButtonState& button) const {
// check position
const float maxDist = maxDoubleClickDistance() / 2.f;
const bool x = abs(_mousePosition.x - button.lastClickPosition.x) < maxDist;
const bool y = abs(_mousePosition.y - button.lastClickPosition.y) < maxDist;
const bool x = std::abs(_mousePosition.x - button.lastClickPosition.x) < maxDist;
const bool y = std::abs(_mousePosition.y - button.lastClickPosition.y) < maxDist;
return x && y;
}
+1 -1
View File
@@ -22,7 +22,7 @@
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_definition.cmake)
include(../webbrowser/cmake/webbrowser_helpers.cmake)
set(WEBGUI_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "WEBGUI_MODULE_PATH")