From 6b9170f5c0cb806fee8e97c8e68be4a02f482179 Mon Sep 17 00:00:00 2001 From: Malin Ejdbo Date: Fri, 9 Oct 2020 12:11:14 +0200 Subject: [PATCH 001/147] Add caching of horizons files to optimize reading * Remove line 104 in horizonstranslation.cpp to prevent double reading * Add reading and writing of cached horizons files --- .../space/translation/horizonstranslation.cpp | 123 +++++++++++++++++- .../space/translation/horizonstranslation.h | 5 +- 2 files changed, 120 insertions(+), 8 deletions(-) diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index e8cf08330f..1bac1a179b 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -83,7 +84,7 @@ HorizonsTranslation::HorizonsTranslation() requireUpdate(); notifyObservers(); }); - readHorizonsTextFile(_horizonsTextFile); + loadData(); }); } @@ -99,9 +100,6 @@ HorizonsTranslation::HorizonsTranslation(const ghoul::Dictionary& dictionary) _horizonsTextFile = absPath( dictionary.value(HorizonsTextFileInfo.identifier) ); - - // Read specified file and store it in memory. - readHorizonsTextFile(_horizonsTextFile); } glm::dvec3 HorizonsTranslation::position(const UpdateData& data) const { @@ -130,12 +128,50 @@ glm::dvec3 HorizonsTranslation::position(const UpdateData& data) const { return interpolatedPos; } -void HorizonsTranslation::readHorizonsTextFile(const std::string& horizonsTextFilePath) { - std::ifstream fileStream(horizonsTextFilePath); +void HorizonsTranslation::loadData() { + std::string _file = _horizonsTextFile; + if (!FileSys.fileExists(absPath(_file))) { + return; + } + + std::string cachedFile = FileSys.cacheManager()->cachedFilename( + _file, + ghoul::filesystem::CacheManager::Persistent::Yes + ); + + bool hasCachedFile = FileSys.fileExists(cachedFile); + if (hasCachedFile) { + LINFO(fmt::format("Cached file '{}' used for Horizon file '{}'", + cachedFile, _file + )); + + bool success = loadCachedFile(cachedFile); + if (success) { + return; + } + else { + FileSys.cacheManager()->removeCacheFile(_file); + // Intentional fall-through to the 'else' computation to generate the cache + // file for the next run + } + } + else { + LINFO(fmt::format("Cache for Horizon file '{}' not found", _file)); + } + LINFO(fmt::format("Loading Horizon file '{}'", _file)); + + readHorizonsTextFile(); + + LINFO("Saving cache"); + saveCachedFile(cachedFile); +} + +void HorizonsTranslation::readHorizonsTextFile() { + std::ifstream fileStream(_horizonsTextFile); if (!fileStream.good()) { LERROR(fmt::format( - "Failed to open Horizons text file '{}'", horizonsTextFilePath + "Failed to open Horizons text file '{}'", _horizonsTextFile )); return; } @@ -186,4 +222,77 @@ void HorizonsTranslation::readHorizonsTextFile(const std::string& horizonsTextFi fileStream.close(); } +bool HorizonsTranslation::loadCachedFile(const std::string& file) { + std::ifstream fileStream(file, std::ifstream::binary); + if (fileStream.good()) { + + // Read how many values to read + int32_t nKeyframes = 0; + fileStream.read(reinterpret_cast(&nKeyframes), sizeof(int32_t)); + if (nKeyframes == 0) { + throw ghoul::RuntimeError("Error reading cache: No values were loaded"); + } + + // Read the values in same order as they were written + double timestamp, x, y, z; + glm::dvec3 gPos; + for (int i = 0; i < nKeyframes; ++i) { + // Timestamp + fileStream.read(reinterpret_cast(×tamp), sizeof(double)); + + // Position vector components + fileStream.read(reinterpret_cast(&x), sizeof(glm::f64)); + fileStream.read(reinterpret_cast(&y), sizeof(glm::f64)); + fileStream.read(reinterpret_cast(&z), sizeof(glm::f64)); + + // Recreate the position vector + gPos = glm::dvec3(x, y, z); + + // Add keyframe in timeline + _timeline.addKeyframe(timestamp, std::move(gPos)); + } + + bool success = fileStream.good(); + return success; + } + else { + LERROR(fmt::format("Error opening file '{}' for loading cache file", file)); + return false; + } +} + +void HorizonsTranslation::saveCachedFile(const std::string& file) const { + std::ofstream fileStream(file, std::ofstream::binary); + if (!fileStream.good()) { + LERROR(fmt::format("Error opening file '{}' for save cache file", file)); + return; + } + + // Write how many values are to be written + int32_t nKeyframes = static_cast(_timeline.nKeyframes()); + if (nKeyframes == 0) { + throw ghoul::RuntimeError("Error writing cache: No values were loaded"); + } + fileStream.write(reinterpret_cast(&nKeyframes), sizeof(int32_t)); + + // Write data + std::deque> keyframes = _timeline.keyframes(); + for (int i = 0; i < nKeyframes; i++) { + // First write timestamp + fileStream.write(reinterpret_cast(&keyframes[i].timestamp), + sizeof(double) + ); + + // and then the components of the position vector one by one + fileStream.write(reinterpret_cast(&keyframes[i].data.x), + sizeof(glm::f64) + ); + fileStream.write(reinterpret_cast(&keyframes[i].data.y), + sizeof(glm::f64) + ); + fileStream.write(reinterpret_cast(&keyframes[i].data.z), + sizeof(glm::f64) + ); + } +} } // namespace openspace diff --git a/modules/space/translation/horizonstranslation.h b/modules/space/translation/horizonstranslation.h index a0c2a9fea8..f996373083 100644 --- a/modules/space/translation/horizonstranslation.h +++ b/modules/space/translation/horizonstranslation.h @@ -59,7 +59,10 @@ public: static documentation::Documentation Documentation(); private: - void readHorizonsTextFile(const std::string& _horizonsTextFilePath); + void loadData(); + void readHorizonsTextFile(); + bool loadCachedFile(const std::string& file); + void saveCachedFile(const std::string& file) const; properties::StringProperty _horizonsTextFile; std::unique_ptr _fileHandle; From b5df4fcb37ff5b75c18bb778123ec162ad13050b Mon Sep 17 00:00:00 2001 From: Malin Ejdbo Date: Wed, 4 Nov 2020 08:35:02 +0100 Subject: [PATCH 002/147] General cleanup --- .../space/translation/horizonstranslation.cpp | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index 1bac1a179b..ee0171c866 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -129,36 +129,34 @@ glm::dvec3 HorizonsTranslation::position(const UpdateData& data) const { } void HorizonsTranslation::loadData() { - std::string _file = _horizonsTextFile; - if (!FileSys.fileExists(absPath(_file))) { + std::string file = _horizonsTextFile; + if (!FileSys.fileExists(absPath(file))) { return; } std::string cachedFile = FileSys.cacheManager()->cachedFilename( - _file, + file, ghoul::filesystem::CacheManager::Persistent::Yes ); bool hasCachedFile = FileSys.fileExists(cachedFile); if (hasCachedFile) { - LINFO(fmt::format("Cached file '{}' used for Horizon file '{}'", - cachedFile, _file - )); + LINFO(fmt::format("Cached file '{}' used for Horizon file '{}'", cachedFile, file)); bool success = loadCachedFile(cachedFile); if (success) { return; } else { - FileSys.cacheManager()->removeCacheFile(_file); + FileSys.cacheManager()->removeCacheFile(file); // Intentional fall-through to the 'else' computation to generate the cache // file for the next run } } else { - LINFO(fmt::format("Cache for Horizon file '{}' not found", _file)); + LINFO(fmt::format("Cache for Horizon file '{}' not found", file)); } - LINFO(fmt::format("Loading Horizon file '{}'", _file)); + LINFO(fmt::format("Loading Horizon file '{}'", file)); readHorizonsTextFile(); @@ -171,8 +169,7 @@ void HorizonsTranslation::readHorizonsTextFile() { if (!fileStream.good()) { LERROR(fmt::format( - "Failed to open Horizons text file '{}'", _horizonsTextFile - )); + "Failed to open Horizons text file '{}'", _horizonsTextFile)); return; } @@ -224,41 +221,41 @@ void HorizonsTranslation::readHorizonsTextFile() { bool HorizonsTranslation::loadCachedFile(const std::string& file) { std::ifstream fileStream(file, std::ifstream::binary); - if (fileStream.good()) { - // Read how many values to read - int32_t nKeyframes = 0; - fileStream.read(reinterpret_cast(&nKeyframes), sizeof(int32_t)); - if (nKeyframes == 0) { - throw ghoul::RuntimeError("Error reading cache: No values were loaded"); - } - - // Read the values in same order as they were written - double timestamp, x, y, z; - glm::dvec3 gPos; - for (int i = 0; i < nKeyframes; ++i) { - // Timestamp - fileStream.read(reinterpret_cast(×tamp), sizeof(double)); - - // Position vector components - fileStream.read(reinterpret_cast(&x), sizeof(glm::f64)); - fileStream.read(reinterpret_cast(&y), sizeof(glm::f64)); - fileStream.read(reinterpret_cast(&z), sizeof(glm::f64)); - - // Recreate the position vector - gPos = glm::dvec3(x, y, z); - - // Add keyframe in timeline - _timeline.addKeyframe(timestamp, std::move(gPos)); - } - - bool success = fileStream.good(); - return success; - } - else { + if (!fileStream.good()) { LERROR(fmt::format("Error opening file '{}' for loading cache file", file)); return false; } + + // Read how many values to read + int32_t nKeyframes = 0; + + fileStream.read(reinterpret_cast(&nKeyframes), sizeof(int32_t)); + if (nKeyframes == 0) { + throw ghoul::RuntimeError("Error reading cache: No values were loaded"); + } + + // Read the values in same order as they were written + for (int i = 0; i < nKeyframes; ++i) { + double timestamp, x, y, z; + glm::dvec3 gPos; + + // Timestamp + fileStream.read(reinterpret_cast(×tamp), sizeof(double)); + + // Position vector components + fileStream.read(reinterpret_cast(&x), sizeof(double)); + fileStream.read(reinterpret_cast(&y), sizeof(double)); + fileStream.read(reinterpret_cast(&z), sizeof(double)); + + // Recreate the position vector + gPos = glm::dvec3(x, y, z); + + // Add keyframe in timeline + _timeline.addKeyframe(timestamp, std::move(gPos)); + } + + return fileStream.good(); } void HorizonsTranslation::saveCachedFile(const std::string& file) const { @@ -285,13 +282,13 @@ void HorizonsTranslation::saveCachedFile(const std::string& file) const { // and then the components of the position vector one by one fileStream.write(reinterpret_cast(&keyframes[i].data.x), - sizeof(glm::f64) + sizeof(double) ); fileStream.write(reinterpret_cast(&keyframes[i].data.y), - sizeof(glm::f64) + sizeof(double) ); fileStream.write(reinterpret_cast(&keyframes[i].data.z), - sizeof(glm::f64) + sizeof(double) ); } } From db4f16f75f069061a147c3196cc504cdd80744b8 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 4 Nov 2020 06:59:42 -0500 Subject: [PATCH 003/147] Issue/1223 (#1358) --- modules/base/lightsource/scenegraphlightsource.cpp | 7 +++---- modules/base/rendering/renderablemodel.cpp | 10 ++++------ modules/base/rendering/renderablemodel.h | 2 +- modules/base/shaders/model_fs.glsl | 2 +- modules/base/shaders/model_vs.glsl | 5 ++--- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/modules/base/lightsource/scenegraphlightsource.cpp b/modules/base/lightsource/scenegraphlightsource.cpp index 50f6695d5b..ef59e739e7 100644 --- a/modules/base/lightsource/scenegraphlightsource.cpp +++ b/modules/base/lightsource/scenegraphlightsource.cpp @@ -137,11 +137,10 @@ glm::vec3 SceneGraphLightSource::directionViewSpace(const RenderData& renderData const glm::dvec3 renderNodePosition = renderData.modelTransform.translation; - const glm::dvec3 lightDirectionViewSpace = renderData.camera.viewRotationMatrix() * - glm::dvec4((lightPosition - renderNodePosition), 1.0); + const glm::dvec3 viewSpace = glm::dvec3(renderData.camera.combinedViewMatrix() * + glm::dvec4((lightPosition - renderNodePosition), 1.0)); - return glm::normalize(lightDirectionViewSpace); + return glm::normalize(viewSpace); } - } // namespace openspace diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 0aa9bb2273..ab58a5a148 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -48,7 +48,7 @@ namespace { constexpr const std::array UniformNames = { "opacity", "nLightSources", "lightDirectionsViewSpace", "lightIntensities", - "modelViewTransform", "crippedModelViewTransform", "projectionTransform", + "modelViewTransform", "normalTransform", "projectionTransform", "performShading", "texture1", "ambientIntensity", "diffuseIntensity", "specularIntensity" }; @@ -369,13 +369,11 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { glm::mat4(modelViewTransform) ); - glm::dmat4 crippedModelViewTransform = glm::transpose(glm::inverse( - glm::dmat4(glm::inverse(data.camera.sgctInternal.viewMatrix())) * modelViewTransform - )); + glm::dmat4 normalTransform = glm::transpose(glm::inverse(modelViewTransform)); _program->setUniform( - _uniformCache.crippedModelViewTransform, - glm::mat4(crippedModelViewTransform) + _uniformCache.normalTransform, + glm::mat4(normalTransform) ); _program->setUniform( diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index 721de33f44..ff382e5ecc 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -81,7 +81,7 @@ private: ghoul::opengl::ProgramObject* _program = nullptr; UniformCache(opacity, nLightSources, lightDirectionsViewSpace, lightIntensities, - modelViewTransform, crippedModelViewTransform, projectionTransform, + modelViewTransform, normalTransform, projectionTransform, performShading, texture, ambientIntensity, diffuseIntensity, specularIntensity) _uniformCache; diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index 628c87b2d4..8ea1340660 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -92,4 +92,4 @@ Fragment getFragment() { return frag; -} +} \ No newline at end of file diff --git a/modules/base/shaders/model_vs.glsl b/modules/base/shaders/model_vs.glsl index 8b55a1a7ba..51350b218d 100644 --- a/modules/base/shaders/model_vs.glsl +++ b/modules/base/shaders/model_vs.glsl @@ -37,7 +37,7 @@ out vec4 vs_positionCameraSpace; uniform mat4 modelViewTransform; uniform mat4 projectionTransform; -uniform mat4 crippedModelViewTransform; +uniform mat4 normalTransform; void main() { vs_positionCameraSpace = modelViewTransform * in_position; @@ -48,6 +48,5 @@ void main() { vs_st = in_st; vs_screenSpaceDepth = positionScreenSpace.w; - //vs_normalViewSpace = normalize(transpose(inverse(mat3(crippedModelViewTransform))) * in_normal); - vs_normalViewSpace = normalize(mat3(crippedModelViewTransform) * in_normal); + vs_normalViewSpace = normalize(mat3(normalTransform) * in_normal); } From 3fbefa5324962c3bf7166d1d364da87c8fd2591d Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 4 Nov 2020 07:11:25 -0500 Subject: [PATCH 004/147] Feature/orion changes (#1359) * Changed RenderableModel to allow user-control depth and blending. * Updated RenderableModel to correctly handle the Orion Nebula model. Co-authored-by: Alexander Bock --- data/assets/base.asset | 1 + .../objects/orionnebula/cluster.asset | 2 +- .../milkyway/objects/orionnebula/nebula.asset | 13 +- modules/base/rendering/renderablemodel.cpp | 124 +++++++++++++++++- modules/base/rendering/renderablemodel.h | 9 +- modules/base/shaders/model_fs.glsl | 19 ++- 6 files changed, 152 insertions(+), 16 deletions(-) diff --git a/data/assets/base.asset b/data/assets/base.asset index ee94a61231..d857183682 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -18,6 +18,7 @@ asset.require('scene/solarsystem/dwarf_planets/pluto/charon/default_layers') asset.require('scene/milkyway/milkyway/volume') asset.require('scene/milkyway/constellations/constellation_art') asset.require('scene/milkyway/constellations/constellation_keybinds') +asset.require('scene/milkyway/objects/orionnebula/orionnebula') asset.require('util/launcher_images') local assetHelper = asset.require('util/asset_helper') diff --git a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset index 910aca0673..8a49c4bc33 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset @@ -16,7 +16,7 @@ local OrionClusterStars = { Type = "RenderableStars", File = sync .. "/oricluster.speck", Texture = sync .. "/halo.png", - Texture = sync .. "/colorbv.cmap", + ColorMap = sync .. "/colorbv.cmap", MagnitudeExponent = 5.02, SizeComposition = "Distance Modulus", RenderMethod = "Texture Based" diff --git a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset index dc99a09a4f..46a2303a5f 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset @@ -54,8 +54,9 @@ local OrionNebulaModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 0.45, - DiffuseIntensity = 0.0, + AmbientIntensity = 0.0, + DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, @@ -85,8 +86,9 @@ local OrionNebulaShocksModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 0.19, - DiffuseIntensity = 0.4, + AmbientIntensity = 0.0, + DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, @@ -116,8 +118,9 @@ local OrionNebulaProplydsModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 1.0, + AmbientIntensity = 0.0, DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index ab58a5a148..39c920ded5 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -34,11 +34,11 @@ #include #include #include - #include #include #include #include +#include #include #include @@ -46,11 +46,25 @@ namespace { constexpr const char* ProgramName = "ModelProgram"; constexpr const char* KeyGeometry = "Geometry"; - constexpr const std::array UniformNames = { + constexpr const int DefaultBlending = 0; + constexpr const int AdditiveBlending = 1; + constexpr const int PointsAndLinesBlending = 2; + constexpr const int PolygonBlending = 3; + constexpr const int ColorAddingBlending = 4; + + std::map BlendingMapping = { + { "Default", DefaultBlending }, + { "Additive", AdditiveBlending }, + { "Points and Lines", PointsAndLinesBlending }, + { "Polygon", PolygonBlending }, + { "Color Adding", ColorAddingBlending } + }; + + constexpr const std::array UniformNames = { "opacity", "nLightSources", "lightDirectionsViewSpace", "lightIntensities", "modelViewTransform", "normalTransform", "projectionTransform", "performShading", "texture1", "ambientIntensity", "diffuseIntensity", - "specularIntensity" + "specularIntensity", "opacityBlending" }; constexpr openspace::properties::Property::PropertyInfo AmbientIntensityInfo = { @@ -102,6 +116,24 @@ namespace { "Light Sources", "A list of light sources that this model should accept light from." }; + + constexpr openspace::properties::Property::PropertyInfo DisableDepthTestInfo = { + "DisableDepthTest", + "Disable Depth Test", + "Disable Depth Testing for the Model." + }; + + constexpr openspace::properties::Property::PropertyInfo BlendingOptionInfo = { + "BledingOption", + "Blending Options", + "Debug option for blending colors." + }; + + constexpr openspace::properties::Property::PropertyInfo EnableOpacityBlendingInfo = { + "EnableOpacityBlending", + "Enable Opacity Blending", + "Enable Opacity Blending." + }; } // namespace namespace openspace { @@ -177,7 +209,25 @@ documentation::Documentation RenderableModel::Documentation() { }), Optional::Yes, LightSourcesInfo.description - } + }, + { + DisableDepthTestInfo.identifier, + new BoolVerifier, + Optional::Yes, + DisableDepthTestInfo.description + }, + { + BlendingOptionInfo.identifier, + new StringVerifier, + Optional::Yes, + BlendingOptionInfo.description + }, + { + EnableOpacityBlendingInfo.identifier, + new BoolVerifier, + Optional::Yes, + EnableOpacityBlendingInfo.description + }, } }; } @@ -196,6 +246,12 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) glm::dmat3(1.0) ) , _rotationVec(RotationVecInfo, glm::dvec3(0.0), glm::dvec3(0.0), glm::dvec3(360.0)) + , _enableOpacityBlending(EnableOpacityBlendingInfo, false) + , _disableDepthTest(DisableDepthTestInfo, false) + , _blendingFuncOption( + BlendingOptionInfo, + properties::OptionProperty::DisplayType::Dropdown + ) , _lightSourcePropertyOwner({ "LightSources", "Light Sources" }) { documentation::testSpecificationAndThrow( @@ -235,6 +291,10 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _performShading = dictionary.value(ShadingInfo.identifier); } + if (dictionary.hasKey(DisableDepthTestInfo.identifier)) { + _disableDepthTest = dictionary.value(DisableDepthTestInfo.identifier); + } + if (dictionary.hasKey(DisableFaceCullingInfo.identifier)) { _disableFaceCulling = dictionary.value(DisableFaceCullingInfo.identifier); } @@ -252,14 +312,13 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) } } - addPropertySubOwner(_lightSourcePropertyOwner); - addProperty(_ambientIntensity); addProperty(_diffuseIntensity); addProperty(_specularIntensity); addProperty(_performShading); addProperty(_disableFaceCulling); + addProperty(_disableDepthTest); addProperty(_modelTransform); addProperty(_rotationVec); @@ -271,6 +330,29 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(RotationVecInfo.identifier)) { _rotationVec = dictionary.value(RotationVecInfo.identifier); } + + _blendingFuncOption.addOption(DefaultBlending, "Default"); + _blendingFuncOption.addOption(AdditiveBlending, "Additive"); + _blendingFuncOption.addOption(PointsAndLinesBlending, "Points and Lines"); + _blendingFuncOption.addOption(PolygonBlending, "Polygon"); + _blendingFuncOption.addOption(ColorAddingBlending, "Color Adding"); + + addProperty(_blendingFuncOption); + + if (dictionary.hasKey(BlendingOptionInfo.identifier)) { + const std::string blendingOpt = dictionary.value( + BlendingOptionInfo.identifier + ); + _blendingFuncOption.set(BlendingMapping[blendingOpt]); + } + + if (dictionary.hasKey(DisableDepthTestInfo.identifier)) { + _enableOpacityBlending = dictionary.value( + EnableOpacityBlendingInfo.identifier + ); + } + + addProperty(_enableOpacityBlending); } bool RenderableModel::isReady() const { @@ -384,11 +466,35 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { _program->setUniform(_uniformCache.diffuseIntensity, _diffuseIntensity); _program->setUniform(_uniformCache.specularIntensity, _specularIntensity); _program->setUniform(_uniformCache.performShading, _performShading); + _program->setUniform(_uniformCache.opacityBlending, _enableOpacityBlending); if (_disableFaceCulling) { glDisable(GL_CULL_FACE); } + glEnablei(GL_BLEND, 0); + switch (_blendingFuncOption) { + case DefaultBlending: + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + break; + case AdditiveBlending: + glBlendFunc(GL_ONE, GL_ONE); + break; + case PointsAndLinesBlending: + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + break; + case PolygonBlending: + glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE); + break; + case ColorAddingBlending: + glBlendFunc(GL_SRC_COLOR, GL_DST_COLOR); + break; + }; + + if (_disableDepthTest) { + glDisable(GL_DEPTH_TEST); + } + ghoul::opengl::TextureUnit unit; unit.activate(); _program->setUniform(_uniformCache.texture, unit); @@ -401,6 +507,12 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { glEnable(GL_CULL_FACE); } + global::renderEngine->openglStateCache().resetBlendState(); + + if (_disableDepthTest) { + glEnable(GL_DEPTH_TEST); + } + _program->deactivate(); } diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index ff382e5ecc..23beb352cc 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -26,7 +26,8 @@ #define __OPENSPACE_MODULE_BASE___RENDERABLEMODEL___H__ #include - +#include +#include #include #include #include @@ -79,11 +80,15 @@ private: properties::DMat4Property _modelTransform; properties::Vec3Property _rotationVec; + properties::BoolProperty _disableDepthTest; + properties::BoolProperty _enableOpacityBlending; + properties::OptionProperty _blendingFuncOption; + ghoul::opengl::ProgramObject* _program = nullptr; UniformCache(opacity, nLightSources, lightDirectionsViewSpace, lightIntensities, modelViewTransform, normalTransform, projectionTransform, performShading, texture, ambientIntensity, diffuseIntensity, - specularIntensity) _uniformCache; + specularIntensity, opacityBlending) _uniformCache; std::vector> _lightSources; diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index 8ea1340660..a26843ca2c 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -34,6 +34,7 @@ uniform float diffuseIntensity = 1.0; uniform float specularIntensity = 1.0; uniform bool performShading = true; +uniform bool opacityBlending = false; uniform sampler2D texture1; @@ -46,6 +47,10 @@ uniform float opacity = 1.0; const vec3 SpecularAlbedo = vec3(1.0); Fragment getFragment() { + if (opacity == 0.0) { + discard; + } + vec3 diffuseAlbedo = texture(texture1, vs_st).rgb; Fragment frag; @@ -84,12 +89,22 @@ Fragment getFragment() { frag.color.rgb = diffuseAlbedo; } - frag.color.a = opacity; + if (opacityBlending) { + // frag.color.a = opacity * (frag.color.r + frag.color.g + frag.color.b)/3.0; + frag.color.a = opacity * max(max(frag.color.r, frag.color.g), frag.color.b); + } + else { + frag.color.a = opacity; + } + + if (frag.color.a < 0.1) { + discard; + } + frag.depth = vs_screenSpaceDepth; frag.gPosition = vs_positionCameraSpace; frag.gNormal = vec4(vs_normalViewSpace, 0.0); frag.disableLDR2HDR = true; - return frag; } \ No newline at end of file From 9fa01165de0b8ae4aa76360cec52c09ff5ec99c5 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Wed, 4 Nov 2020 13:28:50 +0100 Subject: [PATCH 005/147] Added Lowlevel mouse filtering in touch module (#1365) - This disables windows "injected" mouse events, which stem from touch - Only attaches if we are not debugging, as this is a global listener and would stall the OS if we put a breakpoint with touch module - note that this means that debugging behaviour is different with touch enabled --- modules/touch/src/win32_touch.cpp | 55 +++++++++++++++++-------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/modules/touch/src/win32_touch.cpp b/modules/touch/src/win32_touch.cpp index 3e1640af86..bfd8b73aa9 100644 --- a/modules/touch/src/win32_touch.cpp +++ b/modules/touch/src/win32_touch.cpp @@ -35,6 +35,7 @@ #include #include #include +#include // #define ENABLE_TUIOMESSAGES #define ENABLE_DIRECTMSG @@ -230,25 +231,31 @@ Win32TouchHook::Win32TouchHook(void* nativeWindow) { GetCurrentThreadId() ); - // In theory, if our UI is pumped from a different thread, we can - // handle Low-level mouse events in that thread as well. - // this might help reduce mouse lag while running OpenSpace? - // gMouseHookThread = new std::thread([](){ - // gMouseHook = SetWindowsHookExW( - // WH_MOUSE_LL, - // LowLevelMouseProc, - // GetModuleHandleW(NULL), - // 0 //<- Global thread id (low-level mouse is global only) - // ); - // if (!gMouseHook) { - // LINFO("Could not setup mousehook!"); - // } + // Attach a lowlevel mouse hook. + // This mouse hook prevents injected mouse events (touch-to-mouse), + // since we cannot catch it in our messageloop. + // Since this is attached to windows global thread, this will block lowlevel mouse + // access to all running applications if we stall in this thread. + // Debug breakpoints typically freeze our application, in which case we simply don't + // create this if a debugger is attached. + if (!IsDebuggerPresent()) { + gMouseHookThread = new std::thread([](){ + gMouseHook = SetWindowsHookExW( + WH_MOUSE_LL, + LowLevelMouseProc, + GetModuleHandleW(NULL), + 0 //<- Global thread id (low-level mouse is global only) + ); + if (!gMouseHook) { + LINFO("Could not setup mousehook!"); + } - // MSG msg; - // while (GetMessage(&msg, NULL, 0, 0)) { - // DispatchMessage(&msg); - // } - // }); + MSG msg; + while (GetMessage(&msg, NULL, 0, 0)) { + DispatchMessage(&msg); + } + }); + } if (!gTouchHook) { LINFO(fmt::format("Failed to setup WindowsHook for touch input redirection")); @@ -272,13 +279,13 @@ Win32TouchHook::~Win32TouchHook() { } // Low-level mouse hook is "needed" if we want to stop mousecursor from moving -// when we get a touch-input on our window A negative effect is that this -// function is for global threads, meaning our application will cause Windows to -// stall the mouse cursor when this function can't be scheduled. This is not yet -// fail-proof...might be a race-condition on message pumping? +// when we get a touch-input on our window. +// A negative effect is that this function is for global threads, meaning our +// application will cause Windows to stall the mouse cursor when this +// function can't be scheduled (i.e. when debugger hits a breakpoint). +// This is not yet fail-proof...might be a race-condition on message pumping? // - Seems to move the cursor when we get two fingers as input.. -// - If we ourselves would pump windows for events, we can handle this in the -// pump-loop +// - If we ourselves would pump windows for events, we can handle this. LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) { constexpr const LONG_PTR SIGNATURE_MASK = 0xFFFFFF00; constexpr const LONG_PTR MOUSEEVENTF_FROMTOUCH = 0xFF515700; From 33191aafcbd541d2c8d2201e444e598731619f6e Mon Sep 17 00:00:00 2001 From: Malin Ejdbo Date: Wed, 4 Nov 2020 14:18:21 +0100 Subject: [PATCH 006/147] More cleanup --- .../space/translation/horizonstranslation.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index ee0171c866..b931afd0e3 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -169,7 +169,8 @@ void HorizonsTranslation::readHorizonsTextFile() { if (!fileStream.good()) { LERROR(fmt::format( - "Failed to open Horizons text file '{}'", _horizonsTextFile)); + "Failed to open Horizons text file '{}'", _horizonsTextFile + )); return; } @@ -227,7 +228,7 @@ bool HorizonsTranslation::loadCachedFile(const std::string& file) { return false; } - // Read how many values to read + // Read how many keyframes to read int32_t nKeyframes = 0; fileStream.read(reinterpret_cast(&nKeyframes), sizeof(int32_t)); @@ -265,7 +266,7 @@ void HorizonsTranslation::saveCachedFile(const std::string& file) const { return; } - // Write how many values are to be written + // Write how many keyframes are to be written int32_t nKeyframes = static_cast(_timeline.nKeyframes()); if (nKeyframes == 0) { throw ghoul::RuntimeError("Error writing cache: No values were loaded"); @@ -276,18 +277,22 @@ void HorizonsTranslation::saveCachedFile(const std::string& file) const { std::deque> keyframes = _timeline.keyframes(); for (int i = 0; i < nKeyframes; i++) { // First write timestamp - fileStream.write(reinterpret_cast(&keyframes[i].timestamp), + fileStream.write(reinterpret_cast( + &keyframes[i].timestamp), sizeof(double) ); // and then the components of the position vector one by one - fileStream.write(reinterpret_cast(&keyframes[i].data.x), + fileStream.write(reinterpret_cast( + &keyframes[i].data.x), sizeof(double) ); - fileStream.write(reinterpret_cast(&keyframes[i].data.y), + fileStream.write(reinterpret_cast( + &keyframes[i].data.y), sizeof(double) ); - fileStream.write(reinterpret_cast(&keyframes[i].data.z), + fileStream.write(reinterpret_cast( + &keyframes[i].data.z), sizeof(double) ); } From a673ed9fbf8a96fd892e5330679ddf91850241d6 Mon Sep 17 00:00:00 2001 From: Micah Date: Wed, 4 Nov 2020 18:55:49 -0500 Subject: [PATCH 007/147] fix to grids asset; issue/1371 --- data/assets/scene/digitaluniverse/grids.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset index 2699247df4..daf5d5fa20 100644 --- a/data/assets/scene/digitaluniverse/grids.asset +++ b/data/assets/scene/digitaluniverse/grids.asset @@ -550,6 +550,6 @@ asset.meta = { License = "AMNH Digital Universe", Identifiers = {"RadioSphere", "OortSphere", "EclipticSphere", "EclipticSphereLabels", "Equatorial", "EquatorialSphereLabels", "GalacticSphere", "GalacticSphereLabels", - "1ldGrid", "1lmGrid", "1lyGrid", "10lyGrid", "100lyGrid", "1klyGrid" "10klyGrid", + "1ldGrid", "1lmGrid", "1lyGrid", "10lyGrid", "100lyGrid", "1klyGrid", "10klyGrid", "100klyGrid", "1MlyGrid", "10MlyGrid", "100MlyGrid", "20GlyGrid"} } From 8ad757263f352ce5d68d2ec0ebc3a86b67cb04fe Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Thu, 12 Nov 2020 16:10:01 -0500 Subject: [PATCH 008/147] Added initial position (far away) in the g-Buffer position. (#1360) * Added initial position (far away) in the g-Buffer position. * Fixed bug with Sun's star and atmosphere. --- data/assets/scene/digitaluniverse/stars.asset | 3 ++- modules/space/shaders/star_fs.glsl | 2 +- src/rendering/framebufferrenderer.cpp | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/assets/scene/digitaluniverse/stars.asset b/data/assets/scene/digitaluniverse/stars.asset index 7328d0fae4..e269202667 100644 --- a/data/assets/scene/digitaluniverse/stars.asset +++ b/data/assets/scene/digitaluniverse/stars.asset @@ -66,7 +66,8 @@ local sunstar = { MagnitudeExponent = 6.2, SizeComposition = "Distance Modulus", RenderMethod = "Texture Based", -- or PSF - FadeInDistances = { 0.0001, 0.1 } + FadeInDistances = { 0.0001, 0.1 }, + RenderableType = "PostDeferredTransparent" }, GUI = { Name = "Sun", diff --git a/modules/space/shaders/star_fs.glsl b/modules/space/shaders/star_fs.glsl index 46c6ebb4a0..6b98775e7a 100644 --- a/modules/space/shaders/star_fs.glsl +++ b/modules/space/shaders/star_fs.glsl @@ -101,7 +101,7 @@ Fragment getFragment() { vec4 fullColor = vec4(color.rgb, textureColor.a); fullColor.a *= alphaValue; - if (fullColor.a == 0) { + if (fullColor.a < 0.001) { discard; } diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index aae263a0a5..028fd63fc7 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -73,6 +73,7 @@ namespace { } }; + constexpr const glm::vec4 PosBufferClearVal = { 1e32, 1e32, 1e32, 1.f }; constexpr const std::array HDRUniformNames = { "hdrFeedingTexture", "blackoutFactor", "hdrExposure", "gamma", @@ -1170,6 +1171,7 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac glBindFramebuffer(GL_FRAMEBUFFER, _gBuffers.framebuffer); glDrawBuffers(3, ColorAttachmentArray); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClearBufferfv(GL_COLOR, 1, glm::value_ptr(PosBufferClearVal)); } Time time = global::timeManager->time(); From 997c65f7291f5a3f7dc89e7e7f9d87e904eba0ff Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 12 Nov 2020 23:02:18 +0100 Subject: [PATCH 009/147] Update kameleon repository --- modules/kameleon/ext/kameleon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 1b4549edc7..338d482c86 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 1b4549edc74ef371730ef9d39c1ffa0efe90a985 +Subproject commit 338d482c8617bfacda0a5af8f3f6bb23163d436f From b4951d6607819024e70b2908a5d53d8fa5b060dd Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 13 Nov 2020 17:12:12 +0100 Subject: [PATCH 010/147] Add some rudimentary soft FPS cap --- include/openspace/rendering/renderengine.h | 3 +++ src/rendering/renderengine.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 08209e3ac8..59b03d02b0 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace ghoul { namespace fontrendering { class Font; } @@ -229,6 +230,8 @@ private: properties::FloatProperty _saturation; properties::FloatProperty _value; + properties::IntProperty _framerateLimit; + std::chrono::high_resolution_clock::time_point _lastFrameTime; properties::FloatProperty _horizFieldOfView; properties::Vec3Property _globalRotation; diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index b1ca205edc..c784d1fda3 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -230,6 +230,13 @@ namespace { "Value" }; + constexpr openspace::properties::Property::PropertyInfo FramerateLimitInfo = { + "FramerateLimit", + "Framerate Limit", + "If set to a value bigger than 0, the framerate will be limited to that many " + "frames per second without using V-Sync" + }; + constexpr openspace::properties::Property::PropertyInfo HorizFieldOfViewInfo = { "HorizFieldOfView", "Horizontal Field of View", @@ -276,6 +283,7 @@ RenderEngine::RenderEngine() , _hue(HueInfo, 0.f, 0.f, 360.f) , _saturation(SaturationInfo, 1.f, 0.0f, 2.f) , _value(ValueInfo, 1.f, 0.f, 2.f) + , _framerateLimit(FramerateLimitInfo, 0.f, 0.f, 500.f) , _horizFieldOfView(HorizFieldOfViewInfo, 80.f, 1.f, 179.f) , _globalRotation( GlobalRotationInfo, @@ -381,6 +389,7 @@ RenderEngine::RenderEngine() addProperty(_saveFrameInformation); #endif // OPENSPACE_WITH_INSTRUMENTATION + addProperty(_framerateLimit); addProperty(_globalRotation); addProperty(_screenSpaceRotation); addProperty(_masterRotation); @@ -676,6 +685,16 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat _camera->invalidateCache(); } + const int fpsLimit = _framerateLimit; + if (fpsLimit > 0) { + // Using a sleep here is not optimal, but we are not looking for FPS-perfect + // limiting + std::this_thread::sleep_until(_lastFrameTime); + const double delta = (1.0 / fpsLimit) * 1000.0 * 1000.0; + auto now = std::chrono::high_resolution_clock::now(); + _lastFrameTime = now + std::chrono::microseconds(static_cast(delta)); + } + const bool masterEnabled = delegate.isMaster() ? !_disableMasterRendering : true; if (masterEnabled && !delegate.isGuiWindow() && _globalBlackOutFactor > 0.f) { _renderer->render( From e23e5cf16f990cb6da5bd294d1a37eacd3586986 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Fri, 13 Nov 2020 22:40:35 -0700 Subject: [PATCH 011/147] First steps on session recording conversion --- .../openspace/interaction/sessionrecording.h | 108 +++- include/openspace/network/messagestructures.h | 5 +- src/interaction/sessionrecording.cpp | 535 +++++++++++++++--- 3 files changed, 561 insertions(+), 87 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 21b518568f..2d3f705bfd 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -33,9 +33,13 @@ namespace openspace::interaction { +struct ConversionError : public ghoul::RuntimeError { + explicit ConversionError(std::string msg); +}; class SessionRecording : public properties::PropertyOwner { public: + inline static const std::string FileHeaderTitle = "OpenSpace_record/playback"; inline static const std::string HeaderCameraAscii = "camera"; inline static const std::string HeaderTimeAscii = "time"; @@ -66,19 +70,18 @@ public: }; static const size_t FileHeaderVersionLength = 5; - static constexpr char FileHeaderVersion[FileHeaderVersionLength] = { - '0', '0', '.', '8', '5' - }; + static constexpr char FileHeaderVersion[] = "00.85"; static const char DataFormatAsciiTag = 'A'; static const char DataFormatBinaryTag = 'B'; static const size_t keyframeHeaderSize_bytes = 33; static const size_t saveBufferCameraSize_min = 82; - static const size_t saveBufferStringSize_max = 500; + static const size_t saveBufferStringSize_max = 1000; static const size_t _saveBufferMaxSize_bytes = keyframeHeaderSize_bytes + + saveBufferCameraSize_min + saveBufferStringSize_max; using CallbackHandle = int; using StateChangeCallback = std::function; + SessionRecording* legacyVersion; SessionRecording(); @@ -254,8 +257,10 @@ public: * \param kf reference to a camera keyframe which contains camera details * \param file an ifstream reference to the playback file being read * \param lineN keyframe number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readCameraKeyframeBinary(Timestamps& times, + static bool readCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ifstream& file, int lineN); /** @@ -266,8 +271,10 @@ public: * \param kf reference to a camera keyframe which contains camera details * \param currentParsingLine string containing the most current line that was read * \param lineN line number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readCameraKeyframeAscii(Timestamps& times, + static bool readCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::string currentParsingLine, int lineN); @@ -279,8 +286,10 @@ public: * \param kf reference to a time keyframe which contains time details * \param file an ifstream reference to the playback file being read * \param lineN keyframe number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readTimeKeyframeBinary(Timestamps& times, + static bool readTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ifstream& file, int lineN); /** @@ -291,8 +300,10 @@ public: * \param kf reference to a time keyframe which contains time details * \param currentParsingLine string containing the most current line that was read * \param lineN line number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readTimeKeyframeAscii(Timestamps& times, + static bool readTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::string currentParsingLine, int lineN); @@ -305,8 +316,10 @@ public: * (in chars) and the text itself * \param file an ifstream reference to the playback file being read * \param lineN keyframe number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readScriptKeyframeBinary(Timestamps& times, + static bool readScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::ifstream& file, int lineN); /** @@ -318,8 +331,10 @@ public: * (in chars) and the text itself * \param currentParsingLine string containing the most current line that was read * \param lineN line number in playback file where this keyframe resides + * + * \return true if data read has no errors */ - static void readScriptKeyframeAscii(Timestamps& times, + static bool readScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::string currentParsingLine, int lineN); @@ -331,7 +346,7 @@ public: * \param kfBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveCameraKeyframeBinary(Timestamps times, + static void saveCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file); @@ -342,7 +357,7 @@ public: * \param kf reference to a camera keyframe which contains the camera details * \param file an ofstream reference to the recording file being written-to */ - static void saveCameraKeyframeAscii(Timestamps times, + static void saveCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ofstream& file); /** @@ -353,7 +368,7 @@ public: * \param kfBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveTimeKeyframeBinary(Timestamps times, + static void saveTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file); @@ -364,7 +379,7 @@ public: * \param kf reference to a time keyframe which contains the time details * \param file an ofstream reference to the recording file being written-to */ - static void saveTimeKeyframeAscii(Timestamps times, + static void saveTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ofstream& file); /** @@ -375,7 +390,7 @@ public: * \param smBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveScriptKeyframeBinary(Timestamps times, + static void saveScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& sm, unsigned char* smBuffer, std::ofstream& file); @@ -386,7 +401,7 @@ public: * \param sm reference to a ScriptMessage which contains the script details * \param file an ofstream reference to the recording file being written-to */ - static void saveScriptKeyframeAscii(Timestamps times, + static void saveScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& sm, std::ofstream& file); /** @@ -406,7 +421,7 @@ public: * \param kfBuffer the char buffer holding the recording info to be written * \param idx index into write buffer (this is updated with the num of chars written) */ - static void saveHeaderBinary(Timestamps times, char type, unsigned char* kfBuffer, + static void saveHeaderBinary(Timestamps& times, char type, unsigned char* kfBuffer, size_t& idx); /** @@ -416,7 +431,7 @@ public: * \param type string signifying the keyframe type * \param line the stringstream buffer being written to */ - static void saveHeaderAscii(Timestamps times, const std::string& type, + static void saveHeaderAscii(Timestamps& times, const std::string& type, std::stringstream& line); /** @@ -435,6 +450,14 @@ public: */ static bool hasFileExtension(std::string filename, std::string extension); + /** + * Converts file format of a session recording file to the current format version + * (will determine the file format conversion to convert from based on the file's + * header version number). + * + */ + static bool convertFile(std::string filename); + private: properties::BoolProperty _renderPlaybackInformation; @@ -485,7 +508,21 @@ private: bool findNextFutureCameraIndex(double currTime); bool processCameraKeyframe(double now); bool processScriptKeyframe(); - //bool isDataModeBinary(); + static bool readSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, + const int lineNum); + static void saveSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); + static bool readSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, + const int lineNum); + static void saveSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); + static bool readSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, + const int lineNum); + static void saveSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); unsigned int findIndexOfLastCameraKeyframeInTimeline(); bool doesTimelineEntryContainCamera(unsigned int index) const; std::vector> _stateChangeCallbacks; @@ -495,6 +532,15 @@ private: double getNextTimestamp(); double getPrevTimestamp(); void cleanUpPlayback(); + static bool convertEntries(std::string& inFilename, std::ifstream& inFile, + DataMode mode, int lineNum, std::ofstream& outFile); + static bool convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, unsigned char* buff); + static bool convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, unsigned char* buff); + static bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, unsigned char* buff); + static std::string determineConversionOutFilename(const std::string filename); static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src); static void writeToFileBuffer(unsigned char* buf, size_t& idx, std::vector& cv); @@ -541,6 +587,30 @@ private: double _cameraFirstInTimeline_timestamp = 0; int _nextCallbackHandle = 0; + + DataMode _conversionDataMode = DataMode::Binary; + int _conversionLineNum = 1; +}; + +class SessionRecording_legacy_0085 : SessionRecording { + struct ScriptMessage_legacy_0085 : datamessagestructures::ScriptMessage { + void read(std::istream* in) { + size_t strLen; + //Read string length from file + in->read(reinterpret_cast(&strLen), sizeof(strLen)); + //Read back full string + std::vector temp(strLen + 1); + in->read(temp.data(), strLen); + temp[strLen] = '\0'; + + _script.erase(); + _script = temp.data(); + }; + }; + + void convertUp(std::string header, std::string fileToConvert); + + static constexpr char FileHeaderVersion[] = "01.00"; }; } // namespace openspace diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index bea328662d..8db45e0fda 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -370,6 +370,7 @@ struct ScriptMessage { ScriptMessage(const std::vector& buffer) { deserialize(buffer); } + virtual ~ScriptMessage() {}; std::string _script; double _timestamp = 0.0; @@ -429,8 +430,8 @@ struct ScriptMessage { ss << _script; } - void read(std::istream* in) { - size_t strLen; + virtual void read(std::istream* in) { + uint32_t strLen; //Read string length from file in->read(reinterpret_cast(&strLen), sizeof(strLen)); //Read back full string diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 56a5f3a462..b8a307366f 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -265,7 +265,8 @@ bool SessionRecording::startPlayback(const std::string& filename, size_t headerSize = FileHeaderTitle.length() + FileHeaderVersionLength + sizeof(DataFormatBinaryTag) + sizeof('\n'); - _playbackFile.read(reinterpret_cast(&_keyframeBuffer), headerSize); + char hBuffer[headerSize]; + _playbackFile.read(reinterpret_cast(hBuffer), headerSize); } if (!_playbackFile.is_open() || !_playbackFile.good()) { @@ -500,15 +501,10 @@ void SessionRecording::saveCameraKeyframe() { kf._timestamp - _timestampRecordStarted, global::timeManager.time().j2000Seconds() }; - if (_recordingDataMode == DataMode::Binary) { - saveCameraKeyframeBinary(times, kf, _keyframeBuffer, _recordFile); - } - else { - saveCameraKeyframeAscii(times, kf, _recordFile); - } + saveSingleKeyframeCamera(kf, times, _recordingDataMode, _recordFile, _keyframeBuffer); } -void SessionRecording::saveHeaderBinary(Timestamps times, +void SessionRecording::saveHeaderBinary(Timestamps& times, char type, unsigned char* kfBuffer, size_t& idx) @@ -519,7 +515,7 @@ void SessionRecording::saveHeaderBinary(Timestamps times, writeToFileBuffer(kfBuffer, idx, times.timeSim); } -void SessionRecording::saveHeaderAscii(Timestamps times, +void SessionRecording::saveHeaderAscii(Timestamps& times, const std::string& type, std::stringstream& line) { @@ -529,7 +525,7 @@ void SessionRecording::saveHeaderAscii(Timestamps times, line << std::fixed << std::setprecision(3) << times.timeSim << ' '; } -void SessionRecording::saveCameraKeyframeBinary(Timestamps times, +void SessionRecording::saveCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file) @@ -544,7 +540,7 @@ void SessionRecording::saveCameraKeyframeBinary(Timestamps times, saveKeyframeToFileBinary(kfBuffer, idx, file); } -void SessionRecording::saveCameraKeyframeAscii(Timestamps times, +void SessionRecording::saveCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ofstream& file) { @@ -567,14 +563,10 @@ void SessionRecording::saveTimeKeyframe() { kf._timestamp - _timestampRecordStarted, global::timeManager.time().j2000Seconds() }; - if (_recordingDataMode == DataMode::Binary) { - saveTimeKeyframeBinary(times, kf, _keyframeBuffer, _recordFile); - } else { - saveTimeKeyframeAscii(times, kf, _recordFile); - } + saveSingleKeyframeTime(kf, times, _recordingDataMode, _recordFile, _keyframeBuffer); } -void SessionRecording::saveTimeKeyframeBinary(Timestamps times, +void SessionRecording::saveTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file) @@ -587,7 +579,7 @@ void SessionRecording::saveTimeKeyframeBinary(Timestamps times, saveKeyframeToFileBinary(kfBuffer, idx, file); } -void SessionRecording::saveTimeKeyframeAscii(Timestamps times, +void SessionRecording::saveTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ofstream& file) { @@ -597,7 +589,8 @@ void SessionRecording::saveTimeKeyframeAscii(Timestamps times, saveKeyframeToFile(keyframeLine.str(), file); } -void SessionRecording::saveScriptKeyframe(std::string scriptToSave) { +void SessionRecording::saveScriptKeyframe(std::string scriptToSave) +{ if (_state != SessionState::Recording) { return; } @@ -611,15 +604,16 @@ void SessionRecording::saveScriptKeyframe(std::string scriptToSave) { global::timeManager.time().j2000Seconds() }; - if (_recordingDataMode == DataMode::Binary) { - saveScriptKeyframeBinary(times, sm, _keyframeBuffer, _recordFile); - } - else { - saveScriptKeyframeAscii(times, sm, _recordFile); - } + saveSingleKeyframeScript( + sm, + times, + _recordingDataMode, + _recordFile, + _keyframeBuffer + ); } -void SessionRecording::saveScriptKeyframeBinary(Timestamps times, +void SessionRecording::saveScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& sm, unsigned char* smBuffer, std::ofstream& file) @@ -633,7 +627,7 @@ void SessionRecording::saveScriptKeyframeBinary(Timestamps times, saveKeyframeToFileBinary(smBuffer, idx, file); } -void SessionRecording::saveScriptKeyframeAscii(Timestamps times, +void SessionRecording::saveScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& sm, std::ofstream& file) { @@ -871,12 +865,14 @@ bool SessionRecording::playbackCamera() { Timestamps times; datamessagestructures::CameraKeyframe kf; - if (_recordingDataMode == DataMode::Binary) { - readCameraKeyframeBinary(times, kf, _playbackFile, _playbackLineNum); - } - else { - readCameraKeyframeAscii(times, kf, _playbackLineParsing, _playbackLineNum); - } + bool success = readSingleKeyframeCamera( + kf, + times, + _recordingDataMode, + _playbackFile, + _playbackLineParsing, + _playbackLineNum + ); if (_setSimulationTimeWithNextCameraKeyframe) { global::timeManager.setTimeNextFrame(Time(times.timeSim)); @@ -886,10 +882,65 @@ bool SessionRecording::playbackCamera() { double timeRef = appropriateTimestamp(times.timeOs, times.timeRec, times.timeSim); interaction::KeyframeNavigator::CameraPose pbFrame(std::move(kf)); - return addKeyframe(timeRef, pbFrame, _playbackLineNum); + if (success) { + success = addKeyframe(timeRef, pbFrame, _playbackLineNum); + } + return success; } -void SessionRecording::readCameraKeyframeBinary(Timestamps& times, +bool SessionRecording::convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, + unsigned char* buffer) +{ + Timestamps times; + datamessagestructures::CameraKeyframe kf; + + bool success = readSingleKeyframeCamera( + kf, + times, + mode, + inFile, + inputLine, + lineNum + ); + if (success) { + saveSingleKeyframeCamera( + kf, + times, + mode, + outFile, + buffer + ); + } + return success; +} + +bool SessionRecording::readSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + Timestamps& times, DataMode mode, + std::ifstream& file, std::string& inLine, + const int lineNum) +{ + if (mode == DataMode::Binary) { + return readCameraKeyframeBinary(times, kf, file, lineNum); + } + else { + return readCameraKeyframeAscii(times, kf, inLine, lineNum); + } +} + +void SessionRecording::saveSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + Timestamps& times, DataMode mode, + std::ofstream& file, unsigned char* buffer) +{ + if (mode == DataMode::Binary) { + saveCameraKeyframeBinary(times, kf, buffer, file); + } + else { + saveCameraKeyframeAscii(times, kf, file); + } +} + +bool SessionRecording::readCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ifstream& file, int lineN) { @@ -904,14 +955,14 @@ void SessionRecording::readCameraKeyframeBinary(Timestamps& times, "Allocation error with camera playback from keyframe entry {}", lineN - 1 )); - return; + return false; } catch (std::length_error&) { LERROR(fmt::format( "length_error with camera playback from keyframe entry {}", lineN - 1 )); - return; + return false; } times.timeOs = kf._timestamp; @@ -920,11 +971,12 @@ void SessionRecording::readCameraKeyframeBinary(Timestamps& times, "Error reading camera playback from keyframe entry {}", lineN - 1 )); - return; + return false; } + return true; } -void SessionRecording::readCameraKeyframeAscii(Timestamps& times, +bool SessionRecording::readCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::string currentParsingLine, int lineN) @@ -941,28 +993,85 @@ void SessionRecording::readCameraKeyframeAscii(Timestamps& times, if (iss.fail() || !iss.eof()) { LERROR(fmt::format("Error parsing camera line {} of playback file", lineN)); - return; + return false; } + return true; } bool SessionRecording::playbackTimeChange() { Timestamps times; datamessagestructures::TimeKeyframe kf; - if (_recordingDataMode == DataMode::Binary) { - readTimeKeyframeBinary(times, kf, _playbackFile, _playbackLineNum); - } else { - readTimeKeyframeAscii(times, kf, _playbackLineParsing, _playbackLineNum); - } + bool success = readSingleKeyframeTime( + kf, + times, + _recordingDataMode, + _playbackFile, + _playbackLineParsing, + _playbackLineNum + ); kf._timestamp = equivalentApplicationTime(times.timeOs, times.timeRec, times.timeSim); kf._time = kf._timestamp + _timestampApplicationStarted_simulation; //global::timeManager.addKeyframe(timeRef, pbFrame._timestamp); //_externInteract.timeInteraction(pbFrame); - return addKeyframe(kf._timestamp, kf, _playbackLineNum); + if (success) { + success = addKeyframe(kf._timestamp, kf, _playbackLineNum); + } + return success; } -void SessionRecording::readTimeKeyframeBinary(Timestamps& times, +bool SessionRecording::convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, + unsigned char* buffer) +{ + Timestamps times; + datamessagestructures::TimeKeyframe kf; + + bool success = readSingleKeyframeTime( + kf, + times, + mode, + inFile, + inputLine, + lineNum + ); + if (success) { + saveSingleKeyframeTime( + kf, + times, + mode, + outFile, + buffer + ); + } + return success; +} + +bool SessionRecording::readSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + Timestamps& times, DataMode mode, + std::ifstream& file, std::string& inLine, + const int lineNum) +{ + if (mode == DataMode::Binary) { + return readTimeKeyframeBinary(times, kf, file, lineNum); + } else { + return readTimeKeyframeAscii(times, kf, inLine, lineNum); + } +} + +void SessionRecording::saveSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + Timestamps& times, DataMode mode, + std::ofstream& file, unsigned char* buffer) +{ + if (mode == DataMode::Binary) { + saveTimeKeyframeBinary(times, kf, buffer, file); + } else { + saveTimeKeyframeAscii(times, kf, file); + } +} + +bool SessionRecording::readTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ifstream& file, int lineN) { @@ -978,25 +1087,26 @@ void SessionRecording::readTimeKeyframeBinary(Timestamps& times, "Allocation error with time playback from keyframe entry {}", lineN - 1 )); - return; + return false; } catch (std::length_error&) { LERROR(fmt::format( "length_error with time playback from keyframe entry {}", lineN - 1 )); - return; + return false; } if (!file) { LERROR(fmt::format( "Error reading time playback from keyframe entry {}", lineN - 1 )); - return; + return false; } + return true; } -void SessionRecording::readTimeKeyframeAscii(Timestamps& times, +bool SessionRecording::readTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::string currentParsingLine, int lineN) @@ -1012,8 +1122,9 @@ void SessionRecording::readTimeKeyframeAscii(Timestamps& times, LERROR(fmt::format( "Error parsing time line {} of playback file", lineN )); - return; + return false; } + return true; } std::string SessionRecording::readHeaderElement(std::ifstream& stream, @@ -1028,17 +1139,75 @@ bool SessionRecording::playbackScript() { Timestamps times; datamessagestructures::ScriptMessage kf; - if (_recordingDataMode == DataMode::Binary) { - readScriptKeyframeBinary(times, kf, _playbackFile, _playbackLineNum); - } else { - readScriptKeyframeAscii(times, kf, _playbackLineParsing, _playbackLineNum); - } + bool success = readSingleKeyframeScript( + kf, + times, + _recordingDataMode, + _playbackFile, + _playbackLineParsing, + _playbackLineNum + ); double timeRef = appropriateTimestamp(times.timeOs, times.timeRec, times.timeSim); - return addKeyframe(timeRef, kf._script, _playbackLineNum); + if (success) { + success = addKeyframe(timeRef, kf._script, _playbackLineNum); + } + return success; } -void SessionRecording::readScriptKeyframeBinary(Timestamps& times, +bool SessionRecording::convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, + unsigned char* buffer) +{ + Timestamps times; + datamessagestructures::ScriptMessage kf; + + bool success = readSingleKeyframeScript( + kf, + times, + mode, + inFile, + inputLine, + lineNum + ); + if (success) { + saveSingleKeyframeScript( + kf, + times, + mode, + outFile, + buffer + ); + } + return success; +} + +bool SessionRecording::readSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + Timestamps& times, DataMode mode, + std::ifstream& file, std::string& inLine, + const int lineNum) +{ + if (mode == DataMode::Binary) { + return readScriptKeyframeBinary(times, kf, file, lineNum); + } + else { + return readScriptKeyframeAscii(times, kf, inLine, lineNum); + } +} + +void SessionRecording::saveSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + Timestamps& times, DataMode mode, + std::ofstream& file, unsigned char* buffer) +{ + if (mode == DataMode::Binary) { + saveScriptKeyframeBinary(times, kf, buffer, file); + } + else { + saveScriptKeyframeAscii(times, kf, file); + } +} + +bool SessionRecording::readScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::ifstream& file, int lineN) { @@ -1054,14 +1223,14 @@ void SessionRecording::readScriptKeyframeBinary(Timestamps& times, "Allocation error with script playback from keyframe entry {}", lineN - 1 )); - return; + return false; } catch (std::length_error&) { LERROR(fmt::format( "length_error with script playback from keyframe entry {}", lineN - 1 )); - return; + return false; } if (!file) { @@ -1069,11 +1238,12 @@ void SessionRecording::readScriptKeyframeBinary(Timestamps& times, "Error reading script playback from keyframe entry {}", lineN - 1 )); - return; + return false; } + return true; } -void SessionRecording::readScriptKeyframeAscii(Timestamps& times, +bool SessionRecording::readScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::string currentParsingLine, int lineN) @@ -1087,13 +1257,14 @@ void SessionRecording::readScriptKeyframeAscii(Timestamps& times, LERROR(fmt::format( "Error parsing script line {} of playback file", lineN )); - return; + return false; } else if (!iss.eof()) { LERROR(fmt::format( "Did not find an EOL at line {} of playback file", lineN )); - return; + return false; } + return true; } bool SessionRecording::addKeyframe(double timestamp, @@ -1448,7 +1619,7 @@ void SessionRecording::saveKeyframeToFileBinary(unsigned char* buffer, size_t size, std::ofstream& file) { - file.write(reinterpret_cast(buffer), size); + file.write(reinterpret_cast(buffer), size); } void SessionRecording::saveKeyframeToFile(std::string entry, std::ofstream& file) { @@ -1588,4 +1759,236 @@ scripting::LuaLibrary SessionRecording::luaLibrary() { }; } +bool SessionRecording::convertFile(std::string filename) { + bool success = true; + + try { + if (filename.find("/") != std::string::npos) { + throw ConversionError("Playback filename musn't contain path (/) elements"); + } + std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); + if (!FileSys.fileExists(conversionInFilename)) { + throw ConversionError("Cannot find the specified playback file to convert."); + } + + int conversionLineNum = 1; + // Open in ASCII first + std::ifstream conversionInFile; + conversionInFile.open(conversionInFilename, std::ifstream::in); + // Read header + std::string readBackHeaderString = readHeaderElement( + conversionInFile, + FileHeaderTitle.length() + ); + + if (readBackHeaderString != FileHeaderTitle) { + throw ConversionError("File to convert does not contain expected header."); + } + if (readBackHeaderString != FileHeaderTitle) { + throw ConversionError("File to convert does not contain expected header."); + } + readHeaderElement(conversionInFile, FileHeaderVersionLength); + std::string readDataMode = readHeaderElement(conversionInFile, 1); + DataMode mode; + if (readDataMode[0] == DataFormatAsciiTag) { + mode = DataMode::Ascii; + } + else if (readDataMode[0] == DataFormatBinaryTag) { + mode = DataMode::Binary; + } + else { + throw ConversionError("Unknown data type in header (needs Ascii or Binary)"); + } + + if (!conversionInFile.is_open() || !conversionInFile.good()) { + throw ConversionError(fmt::format( + "Unable to open file {} for conversion", conversionInFilename.c_str() + )); + } + + std::string conversionOutFilename = determineConversionOutFilename(filename); + std::ofstream conversionOutFile; + if (mode == DataMode::Binary) { + conversionOutFile.open(conversionOutFilename, std::ios::binary); + } + else { + conversionOutFile.open(conversionOutFilename); + } + if (!conversionOutFile.is_open() || !conversionOutFile.good()) { + LERROR(fmt::format( + "Unable to open file {} for conversion result", + conversionOutFilename.c_str() + )); + return false; + } + + success = convertEntries( + conversionInFilename, + conversionInFile, + mode, + conversionLineNum, + conversionOutFile + ); + } + catch (ConversionError& c) { + LERROR(c.message); + success = false; + } + + return success; +} + +bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& inFile, + DataMode mode, int lineNum, std::ofstream& outFile) +{ + bool conversionStatusOk = true; + std::string lineParsing; + std::shared_ptr buffer(new char[_saveBufferMaxSize_bytes]); + + if (mode == DataMode::Binary) { + unsigned char frameType; + bool fileReadOk = true; + + while (conversionStatusOk && fileReadOk) { + frameType = readFromPlayback(inFile); + // Check if have reached EOF + if (!inFile) { + LINFO(fmt::format( + "Finished converting {} entries from playback file {}", + lineNum - 1, inFilename + )); + fileReadOk = false; + break; + } + if (frameType == HeaderCameraBinary) { + conversionStatusOk = convertCamera( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else if (frameType == HeaderTimeBinary) { + conversionStatusOk = convertTimeChange( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else if (frameType == HeaderScriptBinary) { + conversionStatusOk = convertScript( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else { + LERROR(fmt::format( + "Unknown frame type {} @ index {} of conversion file {}", + frameType, lineNum - 1, inFilename + )); + conversionStatusOk = false; + break; + } + lineNum++; + } + } + else { + while (conversionStatusOk && std::getline(inFile, lineParsing)) { + lineNum++; + + std::istringstream iss(lineParsing); + std::string entryType; + if (!(iss >> entryType)) { + LERROR(fmt::format( + "Error reading entry type @ line {} of conversion file {}", + lineNum, inFilename + )); + break; + } + + if (entryType == HeaderCameraAscii) { + conversionStatusOk = convertCamera( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else if (entryType == HeaderTimeAscii) { + conversionStatusOk = convertTimeChange( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else if (entryType == HeaderScriptAscii) { + conversionStatusOk = convertScript( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + else if (entryType.substr(0, 1) == HeaderCommentAscii) { + continue; + } + else { + LERROR(fmt::format( + "Unknown frame type {} @ line {} of conversion file {}", + entryType, lineNum, inFilename + )); + conversionStatusOk = false; + break; + } + } + LINFO(fmt::format( + "Finished parsing {} entries from conversion file {}", + lineNum, inFilename + )); + } + return conversionStatusOk; +} + +std::string SessionRecording::determineConversionOutFilename(const std::string filename) { + std::string conversionOutFilename; + if (filename.substr(filename.find_last_of(".")) == FileExtensionBinary) { + conversionOutFilename = filename.substr(0, filename.find_last_of(".")) + + "_" + FileHeaderVersion + FileExtensionBinary; + } + else if (filename.substr(filename.find_last_of(".")) == FileExtensionAscii) { + conversionOutFilename = filename.substr(0, filename.find_last_of(".")) + + "_" + FileHeaderVersion + FileExtensionAscii; + } + else { + conversionOutFilename = filename + "_"; + } + return absPath("${RECORDINGS}/convert/" + conversionOutFilename); +} + +void SessionRecording_legacy_0085::convertUp(std::string header, std::string fileToConvert) +{ + if (strcmp(legacyVersion->FileHeaderVersion, FileHeaderVersion) == 0) { + convertFile(fileToConvert); + } + else { + //Oldest known version + } +} + } // namespace openspace::interaction From 86140d753e0de582bbb079aa4f67e6a625a79061 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Sun, 15 Nov 2020 18:41:18 -0700 Subject: [PATCH 012/147] First draft of file format conversion ready for testing --- .../openspace/interaction/sessionrecording.h | 41 +- .../interaction/tasks/convertrecformattask.h | 1 + src/interaction/sessionrecording.cpp | 356 +++++++++++------- src/interaction/sessionrecording_lua.inl | 19 + .../tasks/convertrecformattask.cpp | 7 +- 5 files changed, 269 insertions(+), 155 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 2d3f705bfd..0c89dbbb9d 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -70,7 +70,7 @@ public: }; static const size_t FileHeaderVersionLength = 5; - static constexpr char FileHeaderVersion[] = "00.85"; + char FileHeaderVersion[FileHeaderVersionLength+1] = "01.00"; static const char DataFormatAsciiTag = 'A'; static const char DataFormatBinaryTag = 'B'; static const size_t keyframeHeaderSize_bytes = 33; @@ -455,10 +455,21 @@ public: * (will determine the file format conversion to convert from based on the file's * header version number). * + * \param filename name of the file to convert + * \param root (optional) the 5-character version string that represents the version + * of the original file to convert (before recursion started) */ - static bool convertFile(std::string filename); + bool convertFile(std::string filename, std::string root = "root"); -private: + /** + * Returns pointer to SessionRecording object that is the previous legacy version + * of the current version. + * + * \return Pointer to the previous version of the SessionRecording + */ + SessionRecording* getLegacy(); + +protected: properties::BoolProperty _renderPlaybackInformation; enum class RecordedType { @@ -532,15 +543,18 @@ private: double getNextTimestamp(); double getPrevTimestamp(); void cleanUpPlayback(); - static bool convertEntries(std::string& inFilename, std::ifstream& inFile, + bool convertEntries(std::string& inFilename, std::ifstream& inFile, DataMode mode, int lineNum, std::ofstream& outFile); - static bool convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - static bool convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - static bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - static std::string determineConversionOutFilename(const std::string filename); + std::string determineConversionOutFilename(const std::string filename); + void readPlaybackFileHeader(const std::string filename, + std::string& conversionInFilename, std::ifstream& conversionInFile, + std::string& version, DataMode& mode); static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src); static void writeToFileBuffer(unsigned char* buf, size_t& idx, std::vector& cv); @@ -592,8 +606,10 @@ private: int _conversionLineNum = 1; }; -class SessionRecording_legacy_0085 : SessionRecording { - struct ScriptMessage_legacy_0085 : datamessagestructures::ScriptMessage { +class SessionRecording_legacy_0085 : public SessionRecording { + char FileHeaderVersion[FileHeaderVersionLength+1] = "00.85"; + + struct ScriptMessage_legacy_0085 : public datamessagestructures::ScriptMessage { void read(std::istream* in) { size_t strLen; //Read string length from file @@ -608,9 +624,8 @@ class SessionRecording_legacy_0085 : SessionRecording { }; }; - void convertUp(std::string header, std::string fileToConvert); - - static constexpr char FileHeaderVersion[] = "01.00"; + bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, unsigned char* buffer); }; } // namespace openspace diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index ba9f4f5ada..eb8107f494 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -59,6 +59,7 @@ private: std::ifstream _iFile; std::ofstream _oFile; SessionRecording::DataMode _fileFormatType; + std::string _version; std::string _valueFunctionLua; }; diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index b8a307366f..503d0f89fa 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -67,6 +67,10 @@ namespace { namespace openspace::interaction { +ConversionError::ConversionError(std::string msg) + : ghoul::RuntimeError(std::move(msg), "conversionError") +{} + SessionRecording::SessionRecording() : properties::PropertyOwner({ "SessionRecording", "Session Recording" }) , _renderPlaybackInformation(RenderPlaybackInfo, false) @@ -74,10 +78,15 @@ SessionRecording::SessionRecording() auto fTask = FactoryManager::ref().factory(); ghoul_assert(fTask, "No task factory existed"); fTask->registerClass("ConvertRecFormatTask"); + fTask->registerClass("ConvertRecFileVersionTask"); addProperty(_renderPlaybackInformation); } -SessionRecording::~SessionRecording() {} // NOLINT +SessionRecording::~SessionRecording() { // NOLINT + if (legacyVersion != nullptr) { + delete legacyVersion; + } +} void SessionRecording::deinitialize() { stopRecording(); @@ -1619,7 +1628,7 @@ void SessionRecording::saveKeyframeToFileBinary(unsigned char* buffer, size_t size, std::ofstream& file) { - file.write(reinterpret_cast(buffer), size); + file.write(reinterpret_cast(buffer), size); } void SessionRecording::saveKeyframeToFile(std::string entry, std::ofstream& file) { @@ -1664,140 +1673,82 @@ std::vector SessionRecording::playbackList() const { return fileList; } -scripting::LuaLibrary SessionRecording::luaLibrary() { - return { - "sessionRecording", - { - { - "startRecording", - &luascriptfunctions::startRecording, - {}, - "string", - "Starts a recording session. The string argument is the filename used " - "for the file where the recorded keyframes are saved. " - "The file data format is binary." - }, - { - "startRecordingAscii", - &luascriptfunctions::startRecordingAscii, - {}, - "string", - "Starts a recording session. The string argument is the filename used " - "for the file where the recorded keyframes are saved. " - "The file data format is ASCII." - }, - { - "stopRecording", - &luascriptfunctions::stopRecording, - {}, - "void", - "Stops a recording session" - }, - { - "startPlayback", - &luascriptfunctions::startPlaybackDefault, - {}, - "string", - "Starts a playback session with keyframe times that are relative to " - "the time since the recording was started (the same relative time " - "applies to the playback). When playback starts, the simulation time " - "is automatically set to what it was at recording time. The string " - "argument is the filename to pull playback keyframes from." - }, - { - "startPlaybackApplicationTime", - &luascriptfunctions::startPlaybackApplicationTime, - {}, - "string", - "Starts a playback session with keyframe times that are relative to " - "application time (seconds since OpenSpace application started). " - "The string argument is the filename to pull playback keyframes from." - }, - { - "startPlaybackRecordedTime", - &luascriptfunctions::startPlaybackRecordedTime, - {}, - "string", - "Starts a playback session with keyframe times that are relative to " - "the time since the recording was started (the same relative time " - "applies to the playback). The string argument is the filename to pull " - "playback keyframes from." - }, - { - "startPlaybackSimulationTime", - &luascriptfunctions::startPlaybackSimulationTime, - {}, - "string", - "Starts a playback session with keyframe times that are relative to " - "the simulated date & time. The string argument is the filename to pull " - "playback keyframes from." - }, - { - "stopPlayback", - &luascriptfunctions::stopPlayback, - {}, - "void", - "Stops a playback session before playback of all keyframes is complete" - }, - { - "enableTakeScreenShotDuringPlayback", - &luascriptfunctions::enableTakeScreenShotDuringPlayback, - {}, - "[int]", - "Enables that rendered frames should be saved during playback. The " - "parameter determines the number of frames that are exported per second " - "if this value is not provided, 60 frames per second will be exported." - }, - { - "disableTakeScreenShotDuringPlayback", - &luascriptfunctions::disableTakeScreenShotDuringPlayback, - {}, - "void", - "Used to disable that renderings are saved during playback" - } - } - }; +void SessionRecording::readPlaybackFileHeader(const std::string filename, + std::string& conversionInFilename, + std::ifstream& conversionInFile, + std::string& version, + DataMode& mode) +{ + if (filename.find("/") != std::string::npos) { + throw ConversionError("Playback filename musn't contain path (/) elements"); + } + conversionInFilename = absPath("${RECORDINGS}/" + filename); + if (!FileSys.fileExists(conversionInFilename)) { + throw ConversionError("Cannot find the specified playback file to convert."); + } + + + // Open in ASCII first + conversionInFile.open(conversionInFilename, std::ifstream::in); + // Read header + std::string readBackHeaderString = readHeaderElement( + conversionInFile, + FileHeaderTitle.length() + ); + + if (readBackHeaderString != FileHeaderTitle) { + throw ConversionError("File to convert does not contain expected header."); + } + version = readHeaderElement(conversionInFile, FileHeaderVersionLength); + std::string readDataMode = readHeaderElement(conversionInFile, 1); + if (readDataMode[0] == DataFormatAsciiTag) { + mode = DataMode::Ascii; + } + else if (readDataMode[0] == DataFormatBinaryTag) { + mode = DataMode::Binary; + } + else { + throw ConversionError("Unknown data type in header (needs Ascii or Binary)"); + } } -bool SessionRecording::convertFile(std::string filename) { +bool SessionRecording::convertFile(std::string filename, std::string version) { bool success = true; + std::string conversionInFilename; + std::ifstream conversionInFile; + DataMode mode; + bool preRecursion = (version == "root") ? true : false; + std::string throwOut; try { - if (filename.find("/") != std::string::npos) { - throw ConversionError("Playback filename musn't contain path (/) elements"); - } - std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); - if (!FileSys.fileExists(conversionInFilename)) { - throw ConversionError("Cannot find the specified playback file to convert."); - } - - int conversionLineNum = 1; - // Open in ASCII first - std::ifstream conversionInFile; - conversionInFile.open(conversionInFilename, std::ifstream::in); - // Read header - std::string readBackHeaderString = readHeaderElement( - conversionInFile, - FileHeaderTitle.length() + readPlaybackFileHeader( + filename, + conversionInFilename, + conversionInFile, + preRecursion ? version : throwOut, + mode ); + int conversionLineNum = 1; + LINFO(fmt::format( + "Starting conversion on rec file {}, version {} in {} mode.", + filename, version, (mode == DataMode::Ascii) ? "ascii" : "binary" + )); - if (readBackHeaderString != FileHeaderTitle) { - throw ConversionError("File to convert does not contain expected header."); - } - if (readBackHeaderString != FileHeaderTitle) { - throw ConversionError("File to convert does not contain expected header."); - } - readHeaderElement(conversionInFile, FileHeaderVersionLength); - std::string readDataMode = readHeaderElement(conversionInFile, 1); - DataMode mode; - if (readDataMode[0] == DataFormatAsciiTag) { - mode = DataMode::Ascii; - } - else if (readDataMode[0] == DataFormatBinaryTag) { - mode = DataMode::Binary; - } - else { - throw ConversionError("Unknown data type in header (needs Ascii or Binary)"); + //If this instance of the SessionRecording class isn't the instance with the + // correct version of the file to be converted, then call getLegacy() to recurse + // to the next level down in the legacy subclasses until we get the right + // version, then proceed with conversion from there. + if (version.compare(FileHeaderVersion) != 0) { + conversionInFile.close(); + SessionRecording* old = getLegacy(); + old->convertFile(filename, version); + readPlaybackFileHeader( + filename, + conversionInFilename, + conversionInFile, + version, + mode + ); } if (!conversionInFile.is_open() || !conversionInFile.good()) { @@ -1829,6 +1780,8 @@ bool SessionRecording::convertFile(std::string filename) { conversionLineNum, conversionOutFile ); + conversionInFile.close(); + conversionOutFile.close(); } catch (ConversionError& c) { LERROR(c.message); @@ -1843,7 +1796,8 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in { bool conversionStatusOk = true; std::string lineParsing; - std::shared_ptr buffer(new char[_saveBufferMaxSize_bytes]); + //std::shared_ptr buffer(new unsigned char[_saveBufferMaxSize_bytes]); + unsigned char* buffer = new unsigned char[_saveBufferMaxSize_bytes]; if (mode == DataMode::Binary) { unsigned char frameType; @@ -1867,7 +1821,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + reinterpret_cast(buffer) ); } else if (frameType == HeaderTimeBinary) { @@ -1962,9 +1916,16 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, inFilename )); } + if (buffer != nullptr) { + delete buffer; + } return conversionStatusOk; } +SessionRecording* SessionRecording::getLegacy() { + legacyVersion = new SessionRecording_legacy_0085(); +} + std::string SessionRecording::determineConversionOutFilename(const std::string filename) { std::string conversionOutFilename; if (filename.substr(filename.find_last_of(".")) == FileExtensionBinary) { @@ -1981,14 +1942,135 @@ std::string SessionRecording::determineConversionOutFilename(const std::string f return absPath("${RECORDINGS}/convert/" + conversionOutFilename); } -void SessionRecording_legacy_0085::convertUp(std::string header, std::string fileToConvert) +bool SessionRecording_legacy_0085::convertScript(std::ifstream& inFile, DataMode mode, + int lineNum, std::string& inputLine, + std::ofstream& outFile, + unsigned char* buffer) { - if (strcmp(legacyVersion->FileHeaderVersion, FileHeaderVersion) == 0) { - convertFile(fileToConvert); - } - else { - //Oldest known version + Timestamps times; + ScriptMessage_legacy_0085 kf; + + bool success = readSingleKeyframeScript( + kf, + times, + mode, + inFile, + inputLine, + lineNum + ); + if (success) { + saveSingleKeyframeScript( + kf, + times, + mode, + outFile, + buffer + ); } + return success; +} + +scripting::LuaLibrary SessionRecording::luaLibrary() { + return { + "sessionRecording", + { + { + "startRecording", + &luascriptfunctions::startRecording, + {}, + "string", + "Starts a recording session. The string argument is the filename used " + "for the file where the recorded keyframes are saved. " + "The file data format is binary." + }, + { + "startRecordingAscii", + &luascriptfunctions::startRecordingAscii, + {}, + "string", + "Starts a recording session. The string argument is the filename used " + "for the file where the recorded keyframes are saved. " + "The file data format is ASCII." + }, + { + "stopRecording", + &luascriptfunctions::stopRecording, + {}, + "void", + "Stops a recording session" + }, + { + "startPlayback", + &luascriptfunctions::startPlaybackDefault, + {}, + "string", + "Starts a playback session with keyframe times that are relative to " + "the time since the recording was started (the same relative time " + "applies to the playback). When playback starts, the simulation time " + "is automatically set to what it was at recording time. The string " + "argument is the filename to pull playback keyframes from." + }, + { + "startPlaybackApplicationTime", + &luascriptfunctions::startPlaybackApplicationTime, + {}, + "string", + "Starts a playback session with keyframe times that are relative to " + "application time (seconds since OpenSpace application started). " + "The string argument is the filename to pull playback keyframes from." + }, + { + "startPlaybackRecordedTime", + &luascriptfunctions::startPlaybackRecordedTime, + {}, + "string", + "Starts a playback session with keyframe times that are relative to " + "the time since the recording was started (the same relative time " + "applies to the playback). The string argument is the filename to pull " + "playback keyframes from." + }, + { + "startPlaybackSimulationTime", + &luascriptfunctions::startPlaybackSimulationTime, + {}, + "string", + "Starts a playback session with keyframe times that are relative to " + "the simulated date & time. The string argument is the filename to pull " + "playback keyframes from." + }, + { + "stopPlayback", + &luascriptfunctions::stopPlayback, + {}, + "void", + "Stops a playback session before playback of all keyframes is complete" + }, + { + "enableTakeScreenShotDuringPlayback", + &luascriptfunctions::enableTakeScreenShotDuringPlayback, + {}, + "[int]", + "Enables that rendered frames should be saved during playback. The " + "parameter determines the number of frames that are exported per second " + "if this value is not provided, 60 frames per second will be exported." + }, + { + "disableTakeScreenShotDuringPlayback", + &luascriptfunctions::disableTakeScreenShotDuringPlayback, + {}, + "void", + "Used to disable that renderings are saved during playback" + }, + { + "fileFormatConversion", + &luascriptfunctions::fileFormatConversion, + {}, + "string", + "Performs a conversion of the specified file to the most most recent " + "file format, creating a copy of the recording file." + }, + } + }; } } // namespace openspace::interaction diff --git a/src/interaction/sessionrecording_lua.inl b/src/interaction/sessionrecording_lua.inl index 303e647326..79c59889b7 100644 --- a/src/interaction/sessionrecording_lua.inl +++ b/src/interaction/sessionrecording_lua.inl @@ -167,4 +167,23 @@ int disableTakeScreenShotDuringPlayback(lua_State* L) { return 0; } +int fileFormatConversion(lua_State* L) { + using ghoul::lua::luaTypeToString; + + const std::string convertFilePath = ghoul::lua::value( + L, + 1, + ghoul::lua::PopValue::Yes + ); + + if (convertFilePath.empty()) { + return luaL_error(L, "filepath string is empty"); + } + + global::sessionRecording.convertFile(convertFilePath); + + ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); + return 0; +} + } // namespace openspace::luascriptfunctions diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 956639443b..75945477d0 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -128,10 +128,7 @@ void ConvertRecFormatTask::convert() { SessionRecording::FileHeaderTitle.c_str(), SessionRecording::FileHeaderTitle.length() ); - _oFile.write( - SessionRecording::FileHeaderVersion, - SessionRecording::FileHeaderVersionLength - ); + _oFile.write(_version.c_str(), SessionRecording::FileHeaderVersionLength); _oFile.close(); if (_fileFormatType == SessionRecording::DataMode::Ascii) { @@ -161,7 +158,7 @@ void ConvertRecFormatTask::determineFormatType() { } else { //Read version string and throw it away (and also line feed character at end) - SessionRecording::readHeaderElement(_iFile, + _version = SessionRecording::readHeaderElement(_iFile, SessionRecording::FileHeaderVersionLength); line = SessionRecording::readHeaderElement(_iFile, 1); SessionRecording::readHeaderElement(_iFile, 1); From ef081d27aa1b34ce7bee69cb1e845423f626ff4a Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 10:43:08 +0100 Subject: [PATCH 013/147] Try to get the location of the sync folder from the OPENSPACE_SYNC environment variable first, before using the ${BASE}/sync Update SGCT repository --- apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- openspace.cfg | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index cef10f55bd..6c351ebf2e 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit cef10f55bda2c683a936159e97c43a9104c03fb1 +Subproject commit 6c351ebf2e7a1106982502f4050363f31ac3d0a3 diff --git a/ext/ghoul b/ext/ghoul index 7814e7d3be..68af9b6971 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 7814e7d3be623a229ce3fb95754f0e8d2923c958 +Subproject commit 68af9b6971e1e6447fa63afe3ea9918bb0e5c6d3 diff --git a/openspace.cfg b/openspace.cfg index 4410c6c261..ab32afd02f 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -95,7 +95,11 @@ Paths = { PROFILES = "${DATA}/profiles", FONTS = "${DATA}/fonts", TASKS = "${DATA}/tasks", - SYNC = "${BASE}/sync", + -- If the the 'OPENSPACE_SYNC' environment variable is defined on the system, use that + -- value. Otherwise, fall back to the ${BASE}/sync folder instead. This allows a + -- reuse of the sync folder between multiple OpenSpace installations by simply setting + -- that environment variable + SYNC = os.getenv("OPENSPACE_SYNC") or "${BASE}/sync2", SCREENSHOTS = "${BASE}/screenshots", WEB = "${DATA}/web", RECORDINGS = "${BASE}/recordings", From 8d6fc92cbc542222434f7600d3aef4871532fb0c Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 11:02:43 +0100 Subject: [PATCH 014/147] Correctly set the height of the LuaConsole (closes #1375) --- src/rendering/luaconsole.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index 104f637218..441abc583b 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -600,7 +600,9 @@ void LuaConsole::update() { // what the bounding box for that text would be. using namespace ghoul::fontrendering; - const float height = _historyFont->height() * (_commandsHistory.size() + 1); + const float height = + _historyFont->height() * + (std::min(static_cast(_commandsHistory.size()), _historyLength.value()) + 1); // Update the full height and the target height. // Add the height of the entry line and space for a separator. From 88f546ca7d0ece306960f9eaadf68ccbd816159d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 11:36:16 +0100 Subject: [PATCH 015/147] Add property to disable joystickinput Set that property to false by default to disable stray joystick input (closes #1370) --- .../openspace/interaction/navigationhandler.h | 3 +- src/interaction/navigationhandler.cpp | 38 +++++++++++++------ src/interaction/orbitalnavigator.cpp | 7 ++++ 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/include/openspace/interaction/navigationhandler.h b/include/openspace/interaction/navigationhandler.h index 24d3ef495b..600456a50d 100644 --- a/include/openspace/interaction/navigationhandler.h +++ b/include/openspace/interaction/navigationhandler.h @@ -166,7 +166,8 @@ private: std::optional _pendingNavigationState; - properties::BoolProperty _disableInputs; + properties::BoolProperty _disableMouseInputs; + properties::BoolProperty _disableJoystickInputs; properties::BoolProperty _useKeyFrameInteraction; }; diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 548a0b9c3b..700dc8d06d 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -53,13 +53,20 @@ namespace { constexpr const char* KeyReferenceFrame = "ReferenceFrame"; const double Epsilon = 1E-7; - constexpr const openspace::properties::Property::PropertyInfo KeyDisableInputInfo = { - "DisableInputs", + using namespace openspace; + constexpr const properties::Property::PropertyInfo KeyDisableMouseInputInfo = { + "DisableMouseInputs", "Disable all mouse inputs", "Disables all mouse inputs and prevents them from affecting the camera" }; - constexpr const openspace::properties::Property::PropertyInfo KeyFrameInfo = { + constexpr const properties::Property::PropertyInfo KeyDisableJoystickInputInfo = { + "DisableJoystickInputs", + "Disable all joystick inputs", + "Disables all joystick inputs and prevents them from affecting the camera" + }; + + constexpr const properties::Property::PropertyInfo KeyFrameInfo = { "UseKeyFrameInteraction", "Use keyframe interaction", "If this is set to 'true' the entire interaction is based off key frames rather " @@ -148,12 +155,14 @@ NavigationHandler::NavigationState::NavigationState(std::string anchor, std::str NavigationHandler::NavigationHandler() : properties::PropertyOwner({ "NavigationHandler" }) - , _disableInputs(KeyDisableInputInfo, false) + , _disableMouseInputs(KeyDisableMouseInputInfo, false) + , _disableJoystickInputs(KeyDisableJoystickInputInfo, true) , _useKeyFrameInteraction(KeyFrameInfo, false) { addPropertySubOwner(_orbitalNavigator); - addProperty(_disableInputs); + addProperty(_disableMouseInputs); + addProperty(_disableJoystickInputs); addProperty(_useKeyFrameInteraction); } @@ -235,6 +244,13 @@ void NavigationHandler::updateCamera(double deltaTime) { _keyframeNavigator.updateCamera(*_camera, _playbackModeEnabled); } else { + if (_disableJoystickInputs) { + std::fill( + global::joystickInputStates->begin(), + global::joystickInputStates->end(), + JoystickInputState() + ); + } _orbitalNavigator.updateStatesFromInput(_inputState, deltaTime); _orbitalNavigator.updateCameraStateFromStates(deltaTime); } @@ -334,28 +350,28 @@ const InputState& NavigationHandler::inputState() const { } void NavigationHandler::mouseButtonCallback(MouseButton button, MouseAction action) { - if (!_disableInputs) { + if (!_disableMouseInputs) { _inputState.mouseButtonCallback(button, action); } } void NavigationHandler::mousePositionCallback(double x, double y) { - if (!_disableInputs) { + if (!_disableMouseInputs) { _inputState.mousePositionCallback(x, y); } } void NavigationHandler::mouseScrollWheelCallback(double pos) { - if (!_disableInputs) { + if (!_disableMouseInputs) { _inputState.mouseScrollWheelCallback(pos); } } void NavigationHandler::keyboardCallback(Key key, KeyModifier modifier, KeyAction action) { - if (!_disableInputs) { - _inputState.keyboardCallback(key, modifier, action); - } + // There is no need to disable the keyboard callback based on a property as the vast + // majority of input is coming through Lua scripts anyway which are not blocked here + _inputState.keyboardCallback(key, modifier, action); } NavigationHandler::NavigationState NavigationHandler::navigationState() const { diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 3f923ac7e6..a85f2f1b1d 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -103,6 +103,13 @@ namespace { "the sensitivity is the less impact a mouse motion will have." }; + constexpr openspace::properties::Property::PropertyInfo JoystickEnabledInfo = { + "JoystickEnabled", + "Joystick Control Enabled", + "If this is selected, a connected joystick will be used as an optional input " + "device. If this is deselected, any joystick input will be ignored" + }; + constexpr openspace::properties::Property::PropertyInfo JoystickSensitivityInfo = { "JoystickSensitivity", "Joystick Sensitivity", From 6c088a56098f0358f02c20bc8768c27cc5744172 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 13:47:42 +0100 Subject: [PATCH 016/147] Handle it gracefully if one of hte required folders for the launcher does not exist or when trying to launch OpenSpace with an empty profile (closes #1377) --- .../ext/launcher/src/launcherwindow.cpp | 39 +++++++++++++++---- apps/OpenSpace/main.cpp | 5 +++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 6d1e775849..200affb7d7 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -220,8 +221,17 @@ QWidget* LauncherWindow::createCentralWidget() { connect( startButton, &QPushButton::released, [this]() { - _shouldLaunch = true; - close(); + if (_profileBox->currentText().isEmpty()) { + QMessageBox::critical( + this, + "Empty Profile", + "Cannot launch with an empty profile" + ); + } + else { + _shouldLaunch = true; + close(); + } } ); startButton->setObjectName("large"); @@ -301,6 +311,13 @@ void LauncherWindow::populateProfilesList(std::string preset) { _profileBox->clear(); + if (!std::filesystem::exists(_profilePath)) { + LINFOC( + "LauncherWindow", + fmt::format("Could not find profile folder '{}'", _profilePath) + ); + return; + } // Add all the files with the .profile extension to the dropdown for (const fs::directory_entry& p : fs::directory_iterator(_profilePath)) { if (p.path().extension() != ".profile") { @@ -321,12 +338,20 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) { namespace fs = std::filesystem; _windowConfigBox->clear(); - // Add all the files with the .xml extension to the dropdown - for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) { - if (p.path().extension() != ".xml") { - continue; + if (std::filesystem::exists(_configPath)) { + // Add all the files with the .xml extension to the dropdown + for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) { + if (p.path().extension() != ".xml") { + continue; + } + _windowConfigBox->addItem(QString::fromStdString(p.path().stem().string())); } - _windowConfigBox->addItem(QString::fromStdString(p.path().stem().string())); + } + else { + LINFOC( + "LauncherWindow", + fmt::format("Could not find config folder '{}'", _configPath) + ); } // Try to find the requested configuration file and set it as the current one. As we diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index c41a94245f..3f66512e83 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -1189,6 +1189,11 @@ int main(int argc, char** argv) { xmlExt ); } + if (global::configuration->profile.empty()) { + LFATAL("Cannot launch with an empty profile"); + exit(EXIT_FAILURE); + } + // Prepend the outgoing sgctArguments with the program name // as well as the configuration file that sgct is supposed to use From 73d920d40d1b285d068e7dbc40f2852214bc0f03 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 14:00:18 +0100 Subject: [PATCH 017/147] Make the linear speed dependent on the current framerate (closes #1369) --- include/openspace/interaction/orbitalnavigator.h | 2 +- src/interaction/orbitalnavigator.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/openspace/interaction/orbitalnavigator.h b/include/openspace/interaction/orbitalnavigator.h index e541ab23fd..eec6daf2fb 100644 --- a/include/openspace/interaction/orbitalnavigator.h +++ b/include/openspace/interaction/orbitalnavigator.h @@ -268,7 +268,7 @@ private: */ glm::dvec3 moveCameraAlongVector(const glm::dvec3& camPos, double distFromCameraToFocus, const glm::dvec3& camPosToCenterPosDiff, - double destination) const; + double destination, double deltaTime) const; /* * Adds rotation to the camera position so that it follows the rotation of the anchor diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index a85f2f1b1d..47ab0f642f 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -256,7 +256,7 @@ OrbitalNavigator::OrbitalNavigator() , _flightDestinationDistance(FlightDestinationDistInfo, 2e8f, 0.0f, 1e10f) , _flightDestinationFactor(FlightDestinationFactorInfo, 1E-4, 1E-6, 0.5) , _applyLinearFlight(ApplyLinearFlightInfo, false) - , _velocitySensitivity(VelocityZoomControlInfo, 0.02f, 0.01f, 0.15f) + , _velocitySensitivity(VelocityZoomControlInfo, 3.5f, 0.001f, 20.f) , _mouseSensitivity(MouseSensitivityInfo, 15.f, 1.f, 50.f) , _joystickSensitivity(JoystickSensitivityInfo, 10.f, 1.0f, 50.f) , _websocketSensitivity(WebsocketSensitivityInfo, 5.f, 1.0f, 50.f) @@ -481,7 +481,8 @@ void OrbitalNavigator::updateCameraStateFromStates(double deltaTime) { pose.position, distFromCameraToFocus, camPosToAnchorPosDiff, - _flightDestinationDistance + _flightDestinationDistance, + deltaTime ); } else { @@ -1268,7 +1269,8 @@ glm::dvec3 OrbitalNavigator::translateHorizontally(double deltaTime, glm::dvec3 OrbitalNavigator::moveCameraAlongVector(const glm::dvec3& camPos, double distFromCameraToFocus, const glm::dvec3& camPosToAnchorPosDiff, - double destination) const + double destination, + double deltaTime) const { // This factor adapts the velocity so it slows down when getting closer // to our final destination @@ -1285,7 +1287,7 @@ glm::dvec3 OrbitalNavigator::moveCameraAlongVector(const glm::dvec3& camPos, velocity = distFromCameraToFocus / destination - 1.0; } } - velocity *= _velocitySensitivity; + velocity *= _velocitySensitivity * deltaTime; // Return the updated camera position return camPos - velocity * camPosToAnchorPosDiff; From 8d7300a2428d5fa0cba13c9160504cf92f70c524 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 14:22:56 +0100 Subject: [PATCH 018/147] Add the ability to change the screenshot folder at runtime (#1172) --- apps/OpenSpace/main.cpp | 3 +++ include/openspace/engine/windowdelegate.h | 2 ++ src/engine/openspaceengine.cpp | 7 +++++++ src/engine/openspaceengine_lua.inl | 22 ++++++++++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 3f66512e83..ec1d62ec3f 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -925,6 +925,9 @@ void setSgctDelegateFunctions() { return currentWindow->swapGroupFrameNumber(); }; + sgctDelegate.setScreenshotFolder = [](std::string path) { + Settings::instance().setCapturePath(std::move(path)); + }; } void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& hasProfile, diff --git a/include/openspace/engine/windowdelegate.h b/include/openspace/engine/windowdelegate.h index 0fd27ba589..b5b978c8dc 100644 --- a/include/openspace/engine/windowdelegate.h +++ b/include/openspace/engine/windowdelegate.h @@ -100,6 +100,8 @@ struct WindowDelegate { Frustum (*frustumMode)() = []() { return Frustum::Mono; }; uint64_t (*swapGroupFrameNumber)() = []() { return uint64_t(0); }; + + void (*setScreenshotFolder)(std::string) = [](std::string) {}; }; } // namespace openspace diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 61442d56c8..edb6de88f3 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1522,6 +1522,13 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() { "", "Remove all registered virtual properties" }, + { + "setScreenshotFolder", + &luascriptfunctions::setScreenshotFolder, + {}, + "string", + "Sets the folder used for storing screenshots or session recording frames" + }, { "addTag", &luascriptfunctions::addTag, diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index f92dad961b..e9e647296c 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -27,6 +27,7 @@ #include #include #include +#include namespace openspace::luascriptfunctions { @@ -182,6 +183,27 @@ int removeAllVirtualProperties(lua_State* L) { return 0; } +int setScreenshotFolder(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::setScreenshotFolder"); + + std::string arg = ghoul::lua::value(L); + lua_pop(L, 0); + + std::string folder = FileSys.absolutePath(arg); + if (!std::filesystem::exists(folder)) { + std::filesystem::create_directory(folder); + } + + FileSys.registerPathToken( + "${SCREENSHOTS}", + folder, + ghoul::filesystem::FileSystem::Override::Yes + ); + + global::windowDelegate->setScreenshotFolder(folder); + return 0; +} + /** * \ingroup LuaScripts * addTag() From 3f365d1b1ce7ce77eebbe94d86c4ba9584e440e9 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 15:09:21 +0100 Subject: [PATCH 019/147] Add Oumuamua and Borisov to the asteroids profile Add a check to the ssdb parser that checks for empty strings --- data/profiles/asteroids.profile | 2 ++ modules/space/rendering/renderablesmallbody.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/data/profiles/asteroids.profile b/data/profiles/asteroids.profile index 70bbb0af63..8e6cb40535 100644 --- a/data/profiles/asteroids.profile +++ b/data/profiles/asteroids.profile @@ -1,6 +1,8 @@ { "assets": [ "base", + "scene/solarsystem/interstellar/c-2019_q4_borisov", + "scene/solarsystem/interstellar/oumuamua", "scene/solarsystem/sssb/amor_asteroid", "scene/solarsystem/sssb/apollo_asteroid", "scene/solarsystem/sssb/aten_asteroid", diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 1da9da54a7..24666a385f 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -399,6 +399,10 @@ void RenderableSmallBody::readOrbitalParamsFromThisLine(bool firstDataLine, } static double importAngleValue(const std::string& angle) { + if (angle.empty()) { + return 0.0; + } + double output = std::stod(angle); output = std::fmod(output, 360.0); if (output < 0.0) { From 4d8dff01f55418be395f60f7581d1de233fcb9e5 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 15:25:48 +0100 Subject: [PATCH 020/147] Oops --- openspace.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openspace.cfg b/openspace.cfg index ab32afd02f..534ae46f9f 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -99,7 +99,7 @@ Paths = { -- value. Otherwise, fall back to the ${BASE}/sync folder instead. This allows a -- reuse of the sync folder between multiple OpenSpace installations by simply setting -- that environment variable - SYNC = os.getenv("OPENSPACE_SYNC") or "${BASE}/sync2", + SYNC = os.getenv("OPENSPACE_SYNC") or "${BASE}/sync", SCREENSHOTS = "${BASE}/screenshots", WEB = "${DATA}/web", RECORDINGS = "${BASE}/recordings", From 33e7561122f343d36b0402133ba0958a46a012bf Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 16 Nov 2020 15:59:15 +0100 Subject: [PATCH 021/147] Updated Ghoul repository --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index 68af9b6971..ae10aa2307 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 68af9b6971e1e6447fa63afe3ea9918bb0e5c6d3 +Subproject commit ae10aa23075d1f78407e9895a8ec2e91337e958d From f3b373d2491d872288b0149aa61a3796d4ca0d65 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 17 Nov 2020 11:22:38 +0100 Subject: [PATCH 022/147] Enable OpenGL debug context by default for the time being to prevent the frame stuttering from occurring --- openspace.cfg | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openspace.cfg b/openspace.cfg index 534ae46f9f..d94f164206 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -219,13 +219,18 @@ ScreenSpaceRotation = { 0.0, 0.0, 0.0 } RenderingMethod = "Framebuffer" OpenGLDebugContext = { - Activate = false, + Activate = true, FilterIdentifier = { { Type = "Other", Source = "API", Identifier = 131185 }, --- Buffer performance warning: "copied/moved from VIDEO memory to HOST memory" + -- Buffer performance warning: "copied/moved from VIDEO memory to HOST memory" { Type = "Performance", Source = "API", Identifier = 131186 }, --- API_ID_LINE_WIDTH deprecated behavior warning has been generated - { Type = "Deprecated", Source = "API", Identifier = 7 } + -- API_ID_LINE_WIDTH deprecated behavior warning has been generated + { Type = "Deprecated", Source = "API", Identifier = 7 }, + -- Program/shader state performance warning: Vertex shader in program %i is being recompiled based on GL state. + { Type = "Performance", Source = "API", Identifier = 131218 }, + -- This is getting a bit wordy + { Type = "Push group", Source = "Application", Identifier = 0 }, + { Type = "Pop group", Source = "Application", Identifier = 0 }, }, -- FilterSeverity = { } } From ff433fd4042336798fd147c351b829ef3907b6c0 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Tue, 17 Nov 2020 20:54:46 -0700 Subject: [PATCH 023/147] Added convert file format version sess rec task for taskrunner --- .../tasks/convertrecfileversiontask.h | 57 ++++++++ src/CMakeLists.txt | 2 + src/engine/globals.cpp | 2 +- src/interaction/sessionrecording.cpp | 130 +++++++++++------- src/interaction/sessionrecording_lua.inl | 2 +- .../tasks/convertrecfileversiontask.cpp | 126 +++++++++++++++++ 6 files changed, 265 insertions(+), 54 deletions(-) create mode 100644 include/openspace/interaction/tasks/convertrecfileversiontask.h create mode 100644 src/interaction/tasks/convertrecfileversiontask.cpp diff --git a/include/openspace/interaction/tasks/convertrecfileversiontask.h b/include/openspace/interaction/tasks/convertrecfileversiontask.h new file mode 100644 index 0000000000..66125ee5bc --- /dev/null +++ b/include/openspace/interaction/tasks/convertrecfileversiontask.h @@ -0,0 +1,57 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __OPENSPACE_CORE___CONVERTRECFILEVERSIONTASK___H__ +#define __OPENSPACE_CORE___CONVERTRECFILEVERSIONTASK___H__ + +#include +#include + +#include + +#include + + + +namespace openspace::interaction { + +class ConvertRecFileVersionTask : public Task { +public: + ConvertRecFileVersionTask(const ghoul::Dictionary& dictionary); + ~ConvertRecFileVersionTask(); + std::string description() override; + void perform(const Task::ProgressCallback& progressCallback) override; + static documentation::Documentation documentation(); + void convert(); + SessionRecording* sessRec; + +private: + std::string _inFilename; + std::string _inFilePath; + std::string _valueFunctionLua; +}; + +} // namespace openspace::interaction + +#endif //__OPENSPACE_CORE___CONVERTRECFILEVERSIONTASK___H__ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf8dce02a9..71d71e97be 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -63,6 +63,7 @@ set(OPENSPACE_SOURCE ${OPENSPACE_BASE_DIR}/src/interaction/shortcutmanager_lua.inl ${OPENSPACE_BASE_DIR}/src/interaction/websocketinputstate.cpp ${OPENSPACE_BASE_DIR}/src/interaction/websocketcamerastates.cpp + ${OPENSPACE_BASE_DIR}/src/interaction/tasks/convertrecfileversiontask.cpp ${OPENSPACE_BASE_DIR}/src/interaction/tasks/convertrecformattask.cpp ${OPENSPACE_BASE_DIR}/src/mission/mission.cpp ${OPENSPACE_BASE_DIR}/src/mission/missionmanager.cpp @@ -246,6 +247,7 @@ set(OPENSPACE_HEADER ${OPENSPACE_BASE_DIR}/include/openspace/interaction/shortcutmanager.h ${OPENSPACE_BASE_DIR}/include/openspace/interaction/websocketinputstate.h ${OPENSPACE_BASE_DIR}/include/openspace/interaction/websocketcamerastates.h + ${OPENSPACE_BASE_DIR}/include/openspace/interaction/tasks/convertrecfileversiontask.h ${OPENSPACE_BASE_DIR}/include/openspace/interaction/tasks/convertrecformattask.h ${OPENSPACE_BASE_DIR}/include/openspace/mission/mission.h ${OPENSPACE_BASE_DIR}/include/openspace/mission/missionmanager.h diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 8a28ea5070..ef15f99aa6 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -184,7 +184,7 @@ interaction::NavigationHandler& gNavigationHandler() { } interaction::SessionRecording& gSessionRecording() { - static interaction::SessionRecording g; + static interaction::SessionRecording g(true); return g; } diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 503d0f89fa..f357e1e77f 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,6 @@ namespace { constexpr const bool UsingTimeKeyframes = false; - } // namespace #include "sessionrecording_lua.inl" @@ -74,17 +74,24 @@ ConversionError::ConversionError(std::string msg) SessionRecording::SessionRecording() : properties::PropertyOwner({ "SessionRecording", "Session Recording" }) , _renderPlaybackInformation(RenderPlaybackInfo, false) +{} + +SessionRecording::SessionRecording(bool isGlobal) + : properties::PropertyOwner({ "SessionRecording", "Session Recording" }) + , _renderPlaybackInformation(RenderPlaybackInfo, false) { - auto fTask = FactoryManager::ref().factory(); - ghoul_assert(fTask, "No task factory existed"); - fTask->registerClass("ConvertRecFormatTask"); - fTask->registerClass("ConvertRecFileVersionTask"); - addProperty(_renderPlaybackInformation); + if (isGlobal) { + auto fTask = FactoryManager::ref().factory(); + ghoul_assert(fTask, "No task factory existed"); + fTask->registerClass("ConvertRecFormatTask"); + fTask->registerClass("ConvertRecFileVersionTask"); + addProperty(_renderPlaybackInformation); + } } SessionRecording::~SessionRecording() { // NOLINT - if (legacyVersion != nullptr) { - delete legacyVersion; + if (_legacyVersion != nullptr) { + delete _legacyVersion; } } @@ -1687,7 +1694,6 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, throw ConversionError("Cannot find the specified playback file to convert."); } - // Open in ASCII first conversionInFile.open(conversionInFilename, std::ifstream::in); // Read header @@ -1710,9 +1716,11 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, else { throw ConversionError("Unknown data type in header (needs Ascii or Binary)"); } + //Read to throw out newline at end of header + readHeaderElement(conversionInFile, 1); } -bool SessionRecording::convertFile(std::string filename, std::string version) { +bool SessionRecording::convertFile(std::string filename, int depth, std::string version) { bool success = true; std::string conversionInFilename; std::ifstream conversionInFile; @@ -1720,6 +1728,11 @@ bool SessionRecording::convertFile(std::string filename, std::string version) { bool preRecursion = (version == "root") ? true : false; std::string throwOut; + if (depth == _maximumRecursionDepth) { + LERROR("Runaway recursion in session recording conversion of file version."); + exit(EXIT_FAILURE); + } + try { readPlaybackFileHeader( filename, @@ -1729,19 +1742,15 @@ bool SessionRecording::convertFile(std::string filename, std::string version) { mode ); int conversionLineNum = 1; - LINFO(fmt::format( - "Starting conversion on rec file {}, version {} in {} mode.", - filename, version, (mode == DataMode::Ascii) ? "ascii" : "binary" - )); //If this instance of the SessionRecording class isn't the instance with the // correct version of the file to be converted, then call getLegacy() to recurse // to the next level down in the legacy subclasses until we get the right // version, then proceed with conversion from there. - if (version.compare(FileHeaderVersion) != 0) { + if (version.compare(fileFormatVersion()) != 0) { conversionInFile.close(); - SessionRecording* old = getLegacy(); - old->convertFile(filename, version); + getLegacy(); + _legacyVersion->convertFile(filename, depth + 1, version); readPlaybackFileHeader( filename, conversionInFilename, @@ -1751,43 +1760,48 @@ bool SessionRecording::convertFile(std::string filename, std::string version) { ); } - if (!conversionInFile.is_open() || !conversionInFile.good()) { - throw ConversionError(fmt::format( - "Unable to open file {} for conversion", conversionInFilename.c_str() + if (version != "root") { + if (!conversionInFile.is_open() || !conversionInFile.good()) { + throw ConversionError(fmt::format( + "Unable to open file {} for conversion", conversionInFilename.c_str() + )); + } + std::string conversionOutFilename = determineConversionOutFilename(filename); + LINFO(fmt::format( + "Starting conversion on rec file {}, version {} in {} mode. " + "Writing result to {}.", + filename, version, (mode == DataMode::Ascii) ? "ascii" : "binary", + conversionOutFilename )); + std::ofstream conversionOutFile; + if (mode == DataMode::Binary) { + conversionOutFile.open(conversionOutFilename, std::ios::binary); + } + else { + conversionOutFile.open(conversionOutFilename); + } + if (!conversionOutFile.is_open() || !conversionOutFile.good()) { + LERROR(fmt::format( + "Unable to open file {} for conversion result", + conversionOutFilename.c_str() + )); + return false; + } + success = convertEntries( + conversionInFilename, + conversionInFile, + mode, + conversionLineNum, + conversionOutFile + ); + conversionInFile.close(); + conversionOutFile.close(); } - - std::string conversionOutFilename = determineConversionOutFilename(filename); - std::ofstream conversionOutFile; - if (mode == DataMode::Binary) { - conversionOutFile.open(conversionOutFilename, std::ios::binary); - } - else { - conversionOutFile.open(conversionOutFilename); - } - if (!conversionOutFile.is_open() || !conversionOutFile.good()) { - LERROR(fmt::format( - "Unable to open file {} for conversion result", - conversionOutFilename.c_str() - )); - return false; - } - - success = convertEntries( - conversionInFilename, - conversionInFile, - mode, - conversionLineNum, - conversionOutFile - ); - conversionInFile.close(); - conversionOutFile.close(); } catch (ConversionError& c) { LERROR(c.message); success = false; } - return success; } @@ -1922,24 +1936,36 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in return conversionStatusOk; } -SessionRecording* SessionRecording::getLegacy() { - legacyVersion = new SessionRecording_legacy_0085(); +void SessionRecording::getLegacy() { + _legacyVersion = new SessionRecording_legacy_0085(); +} + +std::string SessionRecording::fileFormatVersion() { + return std::string(FileHeaderVersion); } std::string SessionRecording::determineConversionOutFilename(const std::string filename) { + const std::string legacyRecordingSaveDirectory = "${RECORDINGS}/convert"; std::string conversionOutFilename; if (filename.substr(filename.find_last_of(".")) == FileExtensionBinary) { conversionOutFilename = filename.substr(0, filename.find_last_of(".")) - + "_" + FileHeaderVersion + FileExtensionBinary; + + "_" + fileFormatVersion() + FileExtensionBinary; } else if (filename.substr(filename.find_last_of(".")) == FileExtensionAscii) { conversionOutFilename = filename.substr(0, filename.find_last_of(".")) - + "_" + FileHeaderVersion + FileExtensionAscii; + + "_" + fileFormatVersion() + FileExtensionAscii; } else { conversionOutFilename = filename + "_"; } - return absPath("${RECORDINGS}/convert/" + conversionOutFilename); + //if (!FileSys.directoryExists(absPath(legacyRecordingSaveDirectory))) { + // FileSys.createDirectory( + // absPath(legacyRecordingSaveDirectory), + // ghoul::filesystem::FileSystem::Recursive::Yes + // ); + //} + //return absPath(legacyRecordingSaveDirectory + "/" + conversionOutFilename); + return absPath(conversionOutFilename); } bool SessionRecording_legacy_0085::convertScript(std::ifstream& inFile, DataMode mode, diff --git a/src/interaction/sessionrecording_lua.inl b/src/interaction/sessionrecording_lua.inl index 79c59889b7..494012d75a 100644 --- a/src/interaction/sessionrecording_lua.inl +++ b/src/interaction/sessionrecording_lua.inl @@ -180,7 +180,7 @@ int fileFormatConversion(lua_State* L) { return luaL_error(L, "filepath string is empty"); } - global::sessionRecording.convertFile(convertFilePath); + global::sessionRecording.convertFile(convertFilePath, 0); ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); return 0; diff --git a/src/interaction/tasks/convertrecfileversiontask.cpp b/src/interaction/tasks/convertrecfileversiontask.cpp new file mode 100644 index 0000000000..8487bbe634 --- /dev/null +++ b/src/interaction/tasks/convertrecfileversiontask.cpp @@ -0,0 +1,126 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace { + constexpr const char* _loggerCat = "ConvertRecFileVersionTask"; + + constexpr const char* KeyInFilePath = "InputFilePath"; +} // namespace + +namespace openspace::interaction { + +ConvertRecFileVersionTask::ConvertRecFileVersionTask(const ghoul::Dictionary& dictionary) +{ + openspace::documentation::testSpecificationAndThrow( + documentation(), + dictionary, + "ConvertRecFileVersionTask" + ); + + _inFilename = dictionary.value(KeyInFilePath); + _inFilePath = absPath(_inFilename); + + std::string::size_type idx = _inFilename.find_last_of('/'); + if( idx != std::string::npos ) { + _inFilename = _inFilename.substr(idx + 1); + } + + ghoul_assert(FileSys.fileExists(_inFilePath), "The filename must exist"); + if (!FileSys.fileExists(_inFilePath)) { + LERROR(fmt::format("Failed to load session recording file: {}", _inFilePath)); + } + else { + sessRec = new SessionRecording(false); + } +} + +ConvertRecFileVersionTask::~ConvertRecFileVersionTask() { + if (sessRec != nullptr) { + delete sessRec; + } +} + +std::string ConvertRecFileVersionTask::description() { + std::string description = "Convert file format of session recording file '" + + _inFilePath + "' to current version."; + return description; +} + +void ConvertRecFileVersionTask::perform(const Task::ProgressCallback& progressCallback) { + convert(); +} + +void ConvertRecFileVersionTask::convert() { + bool hasBinaryFileExtension = sessRec->hasFileExtension( + _inFilename, + SessionRecording::FileExtensionBinary + ); + bool hasAsciiFileExtension = sessRec->hasFileExtension( + _inFilename, + SessionRecording::FileExtensionAscii + ); + if (!hasBinaryFileExtension && !hasAsciiFileExtension) { + LERROR(fmt::format( + "Input filename does not have expected {} or {} extension.", + SessionRecording::FileExtensionBinary, + SessionRecording::FileExtensionAscii + )); + return; + } + sessRec->convertFile(_inFilename, 0); +} + +documentation::Documentation ConvertRecFileVersionTask::documentation() { + using namespace documentation; + return { + "ConvertRecFileVersionTask", + "convert_file_version_task", + { + { + "Type", + new StringEqualVerifier("ConvertRecFileVersionTask"), + Optional::No, + "The type of this task", + }, + { + KeyInFilePath, + new StringAnnotationVerifier("A valid filename to convert"), + Optional::No, + "The filename to update to the current file format.", + }, + }, + }; +} + +} From 76e82f273a46027e10eedc2180c78c244b438e49 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Tue, 17 Nov 2020 20:55:31 -0700 Subject: [PATCH 024/147] Updates to header for sess rec legacy inherited class --- .../openspace/interaction/sessionrecording.h | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 0c89dbbb9d..02edd93a20 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -81,9 +81,10 @@ public: using CallbackHandle = int; using StateChangeCallback = std::function; - SessionRecording* legacyVersion; + SessionRecording* _legacyVersion; SessionRecording(); + SessionRecording(bool isGlobal); ~SessionRecording(); @@ -456,18 +457,33 @@ public: * header version number). * * \param filename name of the file to convert + * \param depth iteration number to prevent runaway recursion (call with zero) * \param root (optional) the 5-character version string that represents the version * of the original file to convert (before recursion started) */ - bool convertFile(std::string filename, std::string root = "root"); + bool convertFile(std::string filename, int depth, std::string root = "root"); /** - * Returns pointer to SessionRecording object that is the previous legacy version - * of the current version. - * - * \return Pointer to the previous version of the SessionRecording + * Sets the object's legacy pointer to the SessionRecording object from the previous + * legacy version */ - SessionRecording* getLegacy(); + void getLegacy(); + + /* + * \return string of the file format version this class supports + * + */ + virtual std::string fileFormatVersion(); + + /* + * Determines a filename for the conversion result based on the original filename + * and the file format version number. + * + * \param filename source filename to be converted + * + * \return pathname of the converted version of the file + */ + std::string determineConversionOutFilename(const std::string filename); protected: properties::BoolProperty _renderPlaybackInformation; @@ -551,7 +567,6 @@ protected: std::string& inputLine, std::ofstream& outFile, unsigned char* buff); virtual bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - std::string determineConversionOutFilename(const std::string filename); void readPlaybackFileHeader(const std::string filename, std::string& conversionInFilename, std::ifstream& conversionInFile, std::string& version, DataMode& mode); @@ -604,10 +619,17 @@ protected: DataMode _conversionDataMode = DataMode::Binary; int _conversionLineNum = 1; + const int _maximumRecursionDepth = 100; }; class SessionRecording_legacy_0085 : public SessionRecording { +public: + SessionRecording_legacy_0085() : SessionRecording() {} + ~SessionRecording_legacy_0085() {} char FileHeaderVersion[FileHeaderVersionLength+1] = "00.85"; + std::string fileFormatVersion() { + return std::string(FileHeaderVersion); + } struct ScriptMessage_legacy_0085 : public datamessagestructures::ScriptMessage { void read(std::istream* in) { @@ -624,6 +646,7 @@ class SessionRecording_legacy_0085 : public SessionRecording { }; }; +protected: bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buffer); }; From 929f5e65c6c0f3d1a147670d2273918f6ee7c022 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 18 Nov 2020 09:33:23 +0100 Subject: [PATCH 025/147] Avoid errors caused by dots in exoplanet identifiers --- modules/exoplanets/exoplanetshelper.cpp | 1 + modules/exoplanets/exoplanetsmodule_lua.inl | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index ed624d67de..dfc821c7e2 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -177,6 +177,7 @@ glm::dmat3 computeSystemRotation(glm::dvec3 starPosition) { std::string createIdentifier(std::string name) { std::replace(name.begin(), name.end(), ' ', '_'); + std::replace(name.begin(), name.end(), '.', '-'); sanitizeNameString(name); return name; } diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index cd73664631..d2f6bc0ec1 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -275,11 +275,11 @@ void createExoplanetSystem(std::string_view starName) { const std::string planetKeplerTranslation = "{" "Type = 'KeplerTranslation'," - "Eccentricity = " + std::to_string(planet.ecc) + "," //ECC + "Eccentricity = " + std::to_string(planet.ecc) + "," "SemiMajorAxis = " + std::to_string(semiMajorAxisInKm) + "," - "Inclination = " + std::to_string(planet.i) + "," //I - "AscendingNode = " + std::to_string(planet.bigOmega) + "," //BIGOM - "ArgumentOfPeriapsis = " + std::to_string(planet.omega) + "," //OM + "Inclination = " + std::to_string(planet.i) + "," + "AscendingNode = " + std::to_string(planet.bigOmega) + "," + "ArgumentOfPeriapsis = " + std::to_string(planet.omega) + "," "MeanAnomaly = 0.0," "Epoch = '" + sEpoch + "'," //TT. JD to YYYY MM DD hh:mm:ss "Period = " + std::to_string(period) + "" @@ -292,7 +292,7 @@ void createExoplanetSystem(std::string_view starName) { "Renderable = {" "Type = 'RenderableGlobe'," "Enabled = " + enabled + "," - "Radii = " + std::to_string(planetRadius) + "," //R. in meters. + "Radii = " + std::to_string(planetRadius) + "," //R. in meters "SegmentsPerPatch = 64," "PerformShading = false," "Layers = {}" @@ -308,7 +308,7 @@ void createExoplanetSystem(std::string_view starName) { int trailResolution = 1000; - // increase the resolution for highly eccentric orbits + // Increase the resolution for highly eccentric orbits const float eccentricityThreshold = 0.85f; if (planet.ecc > eccentricityThreshold) { trailResolution *= 2; From 9c9f547a103fe6cb6e9a7d5d0bb1062356ec3996 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Wed, 18 Nov 2020 10:20:38 -0700 Subject: [PATCH 026/147] Some bug fixes for recursion problems --- data/tasks/sessFileVersion.task | 6 ++ .../openspace/interaction/sessionrecording.h | 3 + src/interaction/sessionrecording.cpp | 71 ++++++++++++------- 3 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 data/tasks/sessFileVersion.task diff --git a/data/tasks/sessFileVersion.task b/data/tasks/sessFileVersion.task new file mode 100644 index 0000000000..61fae36c7f --- /dev/null +++ b/data/tasks/sessFileVersion.task @@ -0,0 +1,6 @@ +return { + { + Type = "ConvertRecFileVersionTask", + InputFilePath = "../../recordings/test-libcurl-certificate.osrec" + } +} diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 02edd93a20..da03fdb12f 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -636,6 +636,9 @@ public: size_t strLen; //Read string length from file in->read(reinterpret_cast(&strLen), sizeof(strLen)); + if (strLen > saveBufferStringSize_max) { + throw ConversionError("Invalid script size for conversion read."); + } //Read back full string std::vector temp(strLen + 1); in->read(temp.data(), strLen); diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index f357e1e77f..522de2c67d 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -1722,11 +1722,8 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, bool SessionRecording::convertFile(std::string filename, int depth, std::string version) { bool success = true; - std::string conversionInFilename; - std::ifstream conversionInFile; DataMode mode; - bool preRecursion = (version == "root") ? true : false; - std::string throwOut; + bool rootLevel = (version == "root"); if (depth == _maximumRecursionDepth) { LERROR("Runaway recursion in session recording conversion of file version."); @@ -1734,11 +1731,14 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string } try { + std::string conversionInFilename; + std::ifstream conversionInFile; + std::string throwOut; readPlaybackFileHeader( filename, conversionInFilename, conversionInFile, - preRecursion ? version : throwOut, + rootLevel ? version : throwOut, mode ); int conversionLineNum = 1; @@ -1760,7 +1760,7 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string ); } - if (version != "root") { + if (!rootLevel) { if (!conversionInFile.is_open() || !conversionInFile.good()) { throw ConversionError(fmt::format( "Unable to open file {} for conversion", conversionInFilename.c_str() @@ -1787,6 +1787,15 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string )); return false; } + conversionOutFile << FileHeaderTitle; + conversionOutFile.write(FileHeaderVersion, FileHeaderVersionLength); + if (mode == DataMode::Binary) { + conversionOutFile << DataFormatBinaryTag; + } + else { + conversionOutFile << DataFormatAsciiTag; + } + conversionOutFile << '\n'; success = convertEntries( conversionInFilename, conversionInFile, @@ -1794,9 +1803,9 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string conversionLineNum, conversionOutFile ); - conversionInFile.close(); conversionOutFile.close(); } + conversionInFile.close(); } catch (ConversionError& c) { LERROR(c.message); @@ -1849,14 +1858,20 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in ); } else if (frameType == HeaderScriptBinary) { - conversionStatusOk = convertScript( - inFile, - mode, - lineNum, - lineParsing, - outFile, - buffer - ); + try { + conversionStatusOk = convertScript( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + catch (ConversionError& c) { + LERROR(c.message); + conversionStatusOk = false; + } } else { LERROR(fmt::format( @@ -1864,7 +1879,6 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in frameType, lineNum - 1, inFilename )); conversionStatusOk = false; - break; } lineNum++; } @@ -1904,14 +1918,20 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in ); } else if (entryType == HeaderScriptAscii) { - conversionStatusOk = convertScript( - inFile, - mode, - lineNum, - lineParsing, - outFile, - buffer - ); + try { + conversionStatusOk = convertScript( + inFile, + mode, + lineNum, + lineParsing, + outFile, + buffer + ); + } + catch (ConversionError& c) { + LERROR(c.message); + conversionStatusOk = false; + } } else if (entryType.substr(0, 1) == HeaderCommentAscii) { continue; @@ -1922,7 +1942,6 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in entryType, lineNum, inFilename )); conversionStatusOk = false; - break; } } LINFO(fmt::format( @@ -1965,7 +1984,7 @@ std::string SessionRecording::determineConversionOutFilename(const std::string f // ); //} //return absPath(legacyRecordingSaveDirectory + "/" + conversionOutFilename); - return absPath(conversionOutFilename); + return absPath("${RECORDINGS}/" + conversionOutFilename); } bool SessionRecording_legacy_0085::convertScript(std::ifstream& inFile, DataMode mode, From 0a432473283db8d9b4746616958ac43d1885fe27 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 18 Nov 2020 21:10:09 +0100 Subject: [PATCH 027/147] Add an explicit digitaluniverse asset (closes #1398) --- data/assets/base.asset | 5 +-- .../digitaluniverse/digitaluniverse.asset | 36 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 data/assets/scene/digitaluniverse/digitaluniverse.asset diff --git a/data/assets/base.asset b/data/assets/base.asset index d857183682..ff0a537a19 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -22,8 +22,9 @@ asset.require('scene/milkyway/objects/orionnebula/orionnebula') asset.require('util/launcher_images') local assetHelper = asset.require('util/asset_helper') -assetHelper.requireAll(asset, 'scene/milkyway/exoplanets') -assetHelper.requireAll(asset, 'scene/digitaluniverse') +asset.require('scene/milkyway/exoplanets/exoplanets_data') +asset.require('scene/milkyway/exoplanets/exoplanets_textures') +asset.require('scene/digitaluniverse/digitaluniverse') asset.require('customization/globebrowsing') diff --git a/data/assets/scene/digitaluniverse/digitaluniverse.asset b/data/assets/scene/digitaluniverse/digitaluniverse.asset new file mode 100644 index 0000000000..9739bca03e --- /dev/null +++ b/data/assets/scene/digitaluniverse/digitaluniverse.asset @@ -0,0 +1,36 @@ +asset.require('./2dF') +asset.require('./2mass') +asset.require('./6dF') +asset.require('./abell') +asset.require('./alternatestarlabels') +asset.require('./backgroundradiation') +asset.require('./clusters') +asset.require('./constellationbounds') +asset.require('./constellations') +asset.require('./deepsky') +asset.require('./dwarfs') +asset.require('./exoplanets') +asset.require('./globularclusters') +asset.require('./grids') +asset.require('./groups') +asset.require('./h2regions') +asset.require('./kepler') +asset.require('./localdwarfs') +asset.require('./milkyway') +asset.require('./milkyway_arm_labels') +asset.require('./milkyway_data') +asset.require('./milkyway_label') +asset.require('./milkyway_sphere') +asset.require('./obassociations') +asset.require('./openclusters') +asset.require('./planetarynebulae') +asset.require('./pulsars') +asset.require('./quasars') +asset.require('./sdss') +asset.require('./starlabels') +asset.require('./starorbits') +asset.require('./stars') +asset.require('./superclusters') +asset.require('./supernovaremnants') +asset.require('./tully') +asset.require('./voids') From 88cab58f09d0d6e37eb4eb9b9117fa6b979c179e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 18 Nov 2020 21:43:14 +0100 Subject: [PATCH 028/147] Add the ability to toggle planets in the customization/globebrowsing.asset (closes #1392) Improve the handling of reading info files that have error messages --- data/assets/customization/globebrowsing.asset | 43 ++++++++++++++----- .../globebrowsing/scripts/layer_support.lua | 13 +++++- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/data/assets/customization/globebrowsing.asset b/data/assets/customization/globebrowsing.asset index f9ed7a949e..608a09cfe4 100644 --- a/data/assets/customization/globebrowsing.asset +++ b/data/assets/customization/globebrowsing.asset @@ -1,10 +1,13 @@ --- Add require statements for assets exporting the neccessary globes --- here we add Mars, Moon and Mercury: -asset.require('../scene/solarsystem/planets/mars/mars') -asset.require('../scene/solarsystem/planets/earth/moon/moon') -asset.require('../scene/solarsystem/planets/mercury/mercury') - +---------------------------------------- +-- Configuration options for this asset local CreateFocusNodes = false +local AddMarsLayers = true +local AddMoonLayers = true +local AddMercuryLayers = true +---------------------------------------- + +-- If you add layers for different planets than listed here, be sure to add an +-- asset.require(...) statement in here similar to the ones that are used below -- Add folders to this list that contain .info files describing patches -- OBS: Even on Windows, you have to use forward slashes (/) or double backslashes (\\) @@ -22,11 +25,11 @@ local vrt_folders = { -- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX' -- We recommend using this folder for CTX - openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'), + openspace.absPath('G:/OpenSpaceData/Mars/CTX'), -- if not and you have a custom path for CTX layers, enter it below '', -- We recommend using this folder for HiRISE - openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'), + openspace.absPath('G:/OpenSpaceData/Mars/HiRISE'), -- if not and you have a custom path for HiRISE layers, enter it below '' }, @@ -36,8 +39,8 @@ local vrt_folders = { -- if areas overlap, images from the lower results will overwrite the images from former -- results -- example: 'C:/OpenSpace/GlobeBrowsingData/Moon' - openspace.absPath('${BASE}/../OpenSpaceData/Moon'), - openspace.absPath('${BASE}/../OpenSpaceData/Apollo'), + openspace.absPath('G:/OpenSpaceData/Moon'), + openspace.absPath('G:/OpenSpaceData/Apollo'), '' }, Mercury = { @@ -46,11 +49,29 @@ local vrt_folders = { -- if areas overlap, images from the lower results will overwrite the images from former -- results -- example: 'C:/OpenSpace/GlobeBrowsingData/Mercury' - openspace.absPath('${BASE}/../OpenSpaceData/Mercury'), + openspace.absPath('G:/OpenSpaceData/Mercury'), '' } } +-- Add require statements for assets exporting the neccessary globes +-- here we add Mars, Moon and Mercury: +if AddMarsLayers then + asset.require('../scene/solarsystem/planets/mars/mars') +else + vrt_folders['Mars'] = nil +end +if AddMoonLayers then + asset.require('../scene/solarsystem/planets/earth/moon/moon') +else + vrt_folders['Moon'] = nil +end +if AddMercuryLayers then + asset.require('../scene/solarsystem/planets/mercury/mercury') +else + vrt_folders['Mercury'] = nil +end + asset.onInitialize(function () -- Add local patches described at the top of this file for obj, list in pairs(vrt_folders) do diff --git a/modules/globebrowsing/scripts/layer_support.lua b/modules/globebrowsing/scripts/layer_support.lua index 28b2447d00..9771fd8b3f 100644 --- a/modules/globebrowsing/scripts/layer_support.lua +++ b/modules/globebrowsing/scripts/layer_support.lua @@ -205,11 +205,22 @@ openspace.globebrowsing.parseInfoFile = function (file) HeightFile = nil local dir = openspace.directoryForPath(file) - dofile(file) + file_func, error = loadfile(file) + if file_func then + file_func() + else + openspace.printError('Error loading file "' .. file .. '": '.. error) + return nil, nil, nil, nil + end local name = Name or Identifier local identifier = Identifier or Name + if name == nil and identifier == nil then + openspace.printError('Error loading file "' .. file .. '": No "Name" or "Identifier" found') + return nil, nil, nil, nil + end + local color = nil if ColorFile then color = { From d3a2ea4a5f1357e10841a20865df80d5446aa025 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 18 Nov 2020 21:50:10 +0100 Subject: [PATCH 029/147] Add units to the profile editor camera dialog (closes #1390) --- .../ext/launcher/src/profile/cameradialog.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index 2137770c36..206549e1f3 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -191,22 +191,22 @@ QWidget* CameraDialog::createNavStateWidget() { QWidget* posBox = new QWidget; QBoxLayout* posLayout = new QHBoxLayout(posBox); posLayout->setContentsMargins(0, 0, 0, 0); - posLayout->addWidget(new QLabel("X")); + posLayout->addWidget(new QLabel("X [m]")); _navState.positionX = new QLineEdit; _navState.positionX->setValidator(new QDoubleValidator); - _navState.positionX->setToolTip("Camera position vector (x)"); + _navState.positionX->setToolTip("Camera position vector (x) [m]"); posLayout->addWidget(_navState.positionX); - posLayout->addWidget(new QLabel("Y")); + posLayout->addWidget(new QLabel("Y [m]")); _navState.positionY = new QLineEdit; _navState.positionY->setValidator(new QDoubleValidator); - _navState.positionY->setToolTip("Camera position vector (y)"); + _navState.positionY->setToolTip("Camera position vector (y) [m]"); posLayout->addWidget(_navState.positionY); - posLayout->addWidget(new QLabel("Z")); + posLayout->addWidget(new QLabel("Z [m]")); _navState.positionZ = new QLineEdit; _navState.positionZ->setValidator(new QDoubleValidator); - _navState.positionZ->setToolTip("Camera position vector (z)"); + _navState.positionZ->setToolTip("Camera position vector (z) [m]"); posLayout->addWidget(_navState.positionZ); layout->addWidget(posBox, 3, 1); } @@ -277,7 +277,7 @@ QWidget* CameraDialog::createGeoWidget() { _geoState.longitude->setToolTip("Longitude of camera focus point (+/- 180 degrees)"); layout->addWidget(_geoState.longitude, 2, 1); - layout->addWidget(new QLabel("Altitude"), 3, 0); + layout->addWidget(new QLabel("Altitude [m]"), 3, 0); _geoState.altitude = new QLineEdit; _geoState.altitude->setValidator(new QDoubleValidator); _geoState.altitude->setToolTip("Altitude of camera (meters)"); From 822c3a2d26bbf375095590a002b793b42e14c5d8 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Thu, 19 Nov 2020 15:04:00 -0700 Subject: [PATCH 030/147] Working session record conversions in tasks and OS application --- .../openspace/interaction/sessionrecording.h | 63 ++++++-- src/interaction/sessionrecording.cpp | 134 +++++++++++------- src/interaction/sessionrecording_lua.inl | 5 +- .../tasks/convertrecfileversiontask.cpp | 2 +- 4 files changed, 139 insertions(+), 65 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index da03fdb12f..3c0a6a0918 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -71,6 +71,7 @@ public: static const size_t FileHeaderVersionLength = 5; char FileHeaderVersion[FileHeaderVersionLength+1] = "01.00"; + char TargetConvertVersion[FileHeaderVersionLength+1] = "01.00"; static const char DataFormatAsciiTag = 'A'; static const char DataFormatBinaryTag = 'B'; static const size_t keyframeHeaderSize_bytes = 33; @@ -81,7 +82,6 @@ public: using CallbackHandle = int; using StateChangeCallback = std::function; - SessionRecording* _legacyVersion; SessionRecording(); SessionRecording(bool isGlobal); @@ -162,7 +162,7 @@ public: * * \return \c true if recording to file starts without errors */ - bool startPlayback(const std::string& filename, KeyframeTimeRef timeMode, + bool startPlayback(std::string& filename, KeyframeTimeRef timeMode, bool forceSimTimeAtStart); /** @@ -457,24 +457,42 @@ public: * header version number). * * \param filename name of the file to convert - * \param depth iteration number to prevent runaway recursion (call with zero) - * \param root (optional) the 5-character version string that represents the version - * of the original file to convert (before recursion started) + * \param depth iteration number to prevent runaway recursion (init call with zero) + * + * \return string containing the filename of the previous conversion step. This is + * used if there are multiple conversion steps where each step has to use + * the output of the previous. */ - bool convertFile(std::string filename, int depth, std::string root = "root"); + std::string convertFile(std::string filename, int depth = 0); /** - * Sets the object's legacy pointer to the SessionRecording object from the previous - * legacy version + * Goes to legacy session recording inherited class, and calls its convertFile() + * method, and then returns the resulting conversion filename. + * + * \param filename name of the file to convert + * \param depth iteration number to prevent runaway recursion (init call with zero) + * + * \return string containing the filename of the conversion */ - void getLegacy(); + virtual std::string getLegacyConversionResult(std::string filename, int depth); /* - * \return string of the file format version this class supports + * Version string for file format version currently supported by this class * + * \return string of the file format version this class supports */ virtual std::string fileFormatVersion(); + /* + * Version string for file format version that a conversion operation will convert + * to (e.g. upgrades to this version). This is only relevant for inherited classes + * that support conversion from legacy versions (if called in the base class, it + * will return its own current version). + * + * \return string of the file format version this class supports + */ + virtual std::string targetFileFormatVersion(); + /* * Determines a filename for the conversion result based on the original filename * and the file format version number. @@ -485,6 +503,23 @@ public: */ std::string determineConversionOutFilename(const std::string filename); + /* + * Sets the filename of the final conversion result. Intended to be used only in + * the base class when all conversion recursions are complete. + * + * \param filename the name of the final conversion result + * + */ + virtual void setFinalConversionFilename(std::string filename) final; + + /* + * Retrieves filename of the final conversion result. Intended to be used only in + * the base class when all conversion recursions are complete. + * + * \return filename of the converted version of the file + */ + virtual std::string finalConversionFilename() final; + protected: properties::BoolProperty _renderPlaybackInformation; @@ -568,7 +603,7 @@ protected: virtual bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); void readPlaybackFileHeader(const std::string filename, - std::string& conversionInFilename, std::ifstream& conversionInFile, + std::ifstream& conversionInFile, std::string& version, DataMode& mode); static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src); @@ -617,6 +652,7 @@ protected: int _nextCallbackHandle = 0; + std::string _finalConversionFile; DataMode _conversionDataMode = DataMode::Binary; int _conversionLineNum = 1; const int _maximumRecursionDepth = 100; @@ -627,9 +663,14 @@ public: SessionRecording_legacy_0085() : SessionRecording() {} ~SessionRecording_legacy_0085() {} char FileHeaderVersion[FileHeaderVersionLength+1] = "00.85"; + char TargetConvertVersion[FileHeaderVersionLength+1] = "01.00"; std::string fileFormatVersion() { return std::string(FileHeaderVersion); } + std::string targetFileFormatVersion() { + return std::string(TargetConvertVersion); + } + std::string getLegacyConversionResult(std::string filename, int depth); struct ScriptMessage_legacy_0085 : public datamessagestructures::ScriptMessage { void read(std::istream* in) { diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 522de2c67d..2001a2d1f4 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -90,9 +90,6 @@ SessionRecording::SessionRecording(bool isGlobal) } SessionRecording::~SessionRecording() { // NOLINT - if (_legacyVersion != nullptr) { - delete _legacyVersion; - } } void SessionRecording::deinitialize() { @@ -219,7 +216,7 @@ void SessionRecording::stopRecording() { _recordFile.close(); } -bool SessionRecording::startPlayback(const std::string& filename, +bool SessionRecording::startPlayback(std::string& filename, KeyframeTimeRef timeMode, bool forceSimTimeAtStart) { @@ -227,7 +224,16 @@ bool SessionRecording::startPlayback(const std::string& filename, LERROR("Playback filename must not contain path (/) elements"); return false; } - const std::string absFilename = absPath("${RECORDINGS}/" + filename); + std::string absFilename; + //Run through conversion in case file is older. Does nothing if the file format + // is up-to-date + filename = convertFile(filename); + if (FileSys.fileExists(filename)) { + absFilename = filename; + } + else { + absFilename = absPath("${RECORDINGS}/" + filename); + } if (_state == SessionState::Recording) { LERROR("Unable to start playback while in session recording mode"); @@ -1681,7 +1687,6 @@ std::vector SessionRecording::playbackList() const { } void SessionRecording::readPlaybackFileHeader(const std::string filename, - std::string& conversionInFilename, std::ifstream& conversionInFile, std::string& version, DataMode& mode) @@ -1689,7 +1694,7 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, if (filename.find("/") != std::string::npos) { throw ConversionError("Playback filename musn't contain path (/) elements"); } - conversionInFilename = absPath("${RECORDINGS}/" + filename); + std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); if (!FileSys.fileExists(conversionInFilename)) { throw ConversionError("Cannot find the specified playback file to convert."); } @@ -1720,57 +1725,52 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, readHeaderElement(conversionInFile, 1); } -bool SessionRecording::convertFile(std::string filename, int depth, std::string version) { - bool success = true; - DataMode mode; - bool rootLevel = (version == "root"); - - if (depth == _maximumRecursionDepth) { +std::string SessionRecording::convertFile(std::string filename, int depth) +{ + std::string conversionOutFilename = filename; + if (depth >= _maximumRecursionDepth) { LERROR("Runaway recursion in session recording conversion of file version."); exit(EXIT_FAILURE); } + std::string newFilename = filename; try { - std::string conversionInFilename; std::ifstream conversionInFile; - std::string throwOut; - readPlaybackFileHeader( - filename, - conversionInFilename, - conversionInFile, - rootLevel ? version : throwOut, - mode - ); + DataMode mode; + std::string fileVersion; + readPlaybackFileHeader(filename, conversionInFile, fileVersion, mode); int conversionLineNum = 1; //If this instance of the SessionRecording class isn't the instance with the // correct version of the file to be converted, then call getLegacy() to recurse // to the next level down in the legacy subclasses until we get the right // version, then proceed with conversion from there. - if (version.compare(fileFormatVersion()) != 0) { + if (fileVersion.compare(fileFormatVersion()) != 0) { conversionInFile.close(); - getLegacy(); - _legacyVersion->convertFile(filename, depth + 1, version); - readPlaybackFileHeader( - filename, - conversionInFilename, - conversionInFile, - version, - mode - ); - } + newFilename = getLegacyConversionResult(filename, depth + 1); - if (!rootLevel) { + while (newFilename.substr(newFilename.length() - 1, 1) == "/") { + newFilename.pop_back(); + } + if (newFilename.find("/") != std::string::npos) { + newFilename = newFilename.substr(newFilename.find_last_of("/") + 1); + } + if (filename == newFilename) { + return filename; + } + readPlaybackFileHeader(newFilename, conversionInFile, fileVersion, mode); + } + if (depth != 0) { if (!conversionInFile.is_open() || !conversionInFile.good()) { throw ConversionError(fmt::format( - "Unable to open file {} for conversion", conversionInFilename.c_str() + "Unable to open file {} for conversion", newFilename.c_str() )); } - std::string conversionOutFilename = determineConversionOutFilename(filename); + conversionOutFilename = determineConversionOutFilename(filename); LINFO(fmt::format( "Starting conversion on rec file {}, version {} in {} mode. " "Writing result to {}.", - filename, version, (mode == DataMode::Ascii) ? "ascii" : "binary", + newFilename, fileVersion, (mode == DataMode::Ascii) ? "ascii" : "binary", conversionOutFilename )); std::ofstream conversionOutFile; @@ -1785,10 +1785,13 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string "Unable to open file {} for conversion result", conversionOutFilename.c_str() )); - return false; + return ""; } conversionOutFile << FileHeaderTitle; - conversionOutFile.write(FileHeaderVersion, FileHeaderVersionLength); + conversionOutFile.write( + targetFileFormatVersion().c_str(), + FileHeaderVersionLength + ); if (mode == DataMode::Binary) { conversionOutFile << DataFormatBinaryTag; } @@ -1796,8 +1799,8 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string conversionOutFile << DataFormatAsciiTag; } conversionOutFile << '\n'; - success = convertEntries( - conversionInFilename, + convertEntries( + newFilename, conversionInFile, mode, conversionLineNum, @@ -1809,9 +1812,14 @@ bool SessionRecording::convertFile(std::string filename, int depth, std::string } catch (ConversionError& c) { LERROR(c.message); - success = false; } - return success; + + if (depth == 0) { + return newFilename; + } + else { + return conversionOutFilename; + } } bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& inFile, @@ -1955,24 +1963,50 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in return conversionStatusOk; } -void SessionRecording::getLegacy() { - _legacyVersion = new SessionRecording_legacy_0085(); +std::string SessionRecording::getLegacyConversionResult(std::string filename, int depth) { + SessionRecording_legacy_0085 legacy; + return legacy.convertFile(filename, depth + 1); +} + +std::string SessionRecording_legacy_0085::getLegacyConversionResult(std::string filename, + int depth) +{ + //This method is overriden in each legacy subclass, but does nothing in this instance + // as the oldest supported legacy version. + LERROR(fmt::format( + "Version 00.85 is the oldest supported legacy file format; no conversion " + "can be made. It is possible that file {} has a corrupted header or an invalid " + "file format version number.", + filename + )); + return filename; } std::string SessionRecording::fileFormatVersion() { return std::string(FileHeaderVersion); } +std::string SessionRecording::targetFileFormatVersion() { + return std::string(FileHeaderVersion); +} + +std::string SessionRecording::finalConversionFilename() { + return _finalConversionFile; +} + +void SessionRecording::setFinalConversionFilename(std::string filename) { + _finalConversionFile = filename; +} + std::string SessionRecording::determineConversionOutFilename(const std::string filename) { const std::string legacyRecordingSaveDirectory = "${RECORDINGS}/convert"; - std::string conversionOutFilename; + std::string conversionOutFilename = filename.substr(0, filename.find_last_of(".")) + + "_" + fileFormatVersion() + "-" + targetFileFormatVersion(); if (filename.substr(filename.find_last_of(".")) == FileExtensionBinary) { - conversionOutFilename = filename.substr(0, filename.find_last_of(".")) - + "_" + fileFormatVersion() + FileExtensionBinary; + conversionOutFilename += FileExtensionBinary; } else if (filename.substr(filename.find_last_of(".")) == FileExtensionAscii) { - conversionOutFilename = filename.substr(0, filename.find_last_of(".")) - + "_" + fileFormatVersion() + FileExtensionAscii; + conversionOutFilename += FileExtensionAscii; } else { conversionOutFilename = filename + "_"; diff --git a/src/interaction/sessionrecording_lua.inl b/src/interaction/sessionrecording_lua.inl index 494012d75a..eea0fafb9a 100644 --- a/src/interaction/sessionrecording_lua.inl +++ b/src/interaction/sessionrecording_lua.inl @@ -96,7 +96,7 @@ int startPlayback(lua_State* L, interaction::KeyframeTimeRef timeMode, } global::sessionRecording.startPlayback( - playbackFilePath, + const_cast(playbackFilePath), timeMode, forceSimTimeAtStart ); @@ -179,8 +179,7 @@ int fileFormatConversion(lua_State* L) { if (convertFilePath.empty()) { return luaL_error(L, "filepath string is empty"); } - - global::sessionRecording.convertFile(convertFilePath, 0); + global::sessionRecording.convertFile(convertFilePath); ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); return 0; diff --git a/src/interaction/tasks/convertrecfileversiontask.cpp b/src/interaction/tasks/convertrecfileversiontask.cpp index 8487bbe634..2d444445a5 100644 --- a/src/interaction/tasks/convertrecfileversiontask.cpp +++ b/src/interaction/tasks/convertrecfileversiontask.cpp @@ -98,7 +98,7 @@ void ConvertRecFileVersionTask::convert() { )); return; } - sessRec->convertFile(_inFilename, 0); + sessRec->convertFile(_inFilename); } documentation::Documentation ConvertRecFileVersionTask::documentation() { From 763fb110d1b9811cbab1de22968508f349a511d5 Mon Sep 17 00:00:00 2001 From: GPayne Date: Thu, 19 Nov 2020 20:23:59 -0700 Subject: [PATCH 031/147] Removed a few obsolete functions --- .../openspace/interaction/sessionrecording.h | 18 ------------------ src/interaction/sessionrecording.cpp | 8 -------- 2 files changed, 26 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 3c0a6a0918..ee7429838c 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -503,23 +503,6 @@ public: */ std::string determineConversionOutFilename(const std::string filename); - /* - * Sets the filename of the final conversion result. Intended to be used only in - * the base class when all conversion recursions are complete. - * - * \param filename the name of the final conversion result - * - */ - virtual void setFinalConversionFilename(std::string filename) final; - - /* - * Retrieves filename of the final conversion result. Intended to be used only in - * the base class when all conversion recursions are complete. - * - * \return filename of the converted version of the file - */ - virtual std::string finalConversionFilename() final; - protected: properties::BoolProperty _renderPlaybackInformation; @@ -652,7 +635,6 @@ protected: int _nextCallbackHandle = 0; - std::string _finalConversionFile; DataMode _conversionDataMode = DataMode::Binary; int _conversionLineNum = 1; const int _maximumRecursionDepth = 100; diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 2001a2d1f4..79cc85a205 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -1990,14 +1990,6 @@ std::string SessionRecording::targetFileFormatVersion() { return std::string(FileHeaderVersion); } -std::string SessionRecording::finalConversionFilename() { - return _finalConversionFile; -} - -void SessionRecording::setFinalConversionFilename(std::string filename) { - _finalConversionFile = filename; -} - std::string SessionRecording::determineConversionOutFilename(const std::string filename) { const std::string legacyRecordingSaveDirectory = "${RECORDINGS}/convert"; std::string conversionOutFilename = filename.substr(0, filename.find_last_of(".")) From f7cd107744183958c3b906839f5b3bb11376c172 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 20 Nov 2020 19:41:39 +0100 Subject: [PATCH 032/147] Add 'no-data' representation of exoplanet host star --- modules/exoplanets/exoplanetsmodule_lua.inl | 84 ++++++++++++--------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index d2f6bc0ec1..50206be659 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -51,6 +51,7 @@ constexpr const char* ExoplanetsDataPath = "${SYNC}/http/exoplanets_data/1/exoplanets_data.bin"; constexpr const char* StarTextureFile = "${SYNC}/http/exoplanets_textures/1/sun.jpg"; +constexpr const char* NoDataTextureFile = "${SYNC}/http/exoplanets_textures/1/grid-32.png"; constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; @@ -145,49 +146,58 @@ void createExoplanetSystem(std::string_view starName) { const glm::dmat3 exoplanetSystemRotation = computeSystemRotation(starPosition); - // Star renderable globe, if we have a radius and bv color index - std::string starGlobeRenderableString; + // Star + float radiusInMeter = static_cast(distanceconstants::SolarRadius); if (!std::isnan(p.rStar)) { - const float radiusInMeter = - p.rStar * static_cast(distanceconstants::SolarRadius); + radiusInMeter *= p.rStar; + } - std::string layers = ""; - if (!std::isnan(p.bmv)) { - // @TODO (emmbr, 2020-10-12) should also check the bv value for the siblings. - // The data on the planets is derived from different sources, so while this - // planet has a nan value, another might not - const std::string color = starColor(p.bmv); + std::string colorLayers; + if (!std::isnan(p.bmv)) { + // @TODO (emmbr, 2020-10-12) should also check the bv value for the siblings. + // The data on the planets is derived from different sources, so while this + // planet has a nan value, another might not + const std::string color = starColor(p.bmv); - if (color.empty()) { - LERROR("Error occurred when computing star color"); - return; - } - - layers = "ColorLayers = {" - "{" - "Identifier = 'StarColor'," - "Type = 'SolidColor'," - "Color = " + color + "," - "BlendMode = 'Normal'," - "Enabled = true" - "}," - "{" - "Identifier = 'StarTexture'," - "FilePath = openspace.absPath('" + StarTextureFile + "')," - "BlendMode = 'Color'," - "Enabled = true" - "}" - "}"; + if (color.empty()) { + LERROR("Error occurred when computing star color"); + return; } - starGlobeRenderableString = "Renderable = {" - "Type = 'RenderableGlobe'," - "Radii = " + std::to_string(radiusInMeter) + "," - "SegmentsPerPatch = 64," - "PerformShading = false," - "Layers = {" + layers + "}" - "},"; + colorLayers = + "{" + "Identifier = 'StarColor'," + "Type = 'SolidColor'," + "Color = " + color + "," + "BlendMode = 'Normal'," + "Enabled = true" + "}," + "{" + "Identifier = 'StarTexture'," + "FilePath = " + fmt::format("openspace.absPath('{}')", StarTextureFile) + "," + "BlendMode = 'Color'," + "Enabled = true" + "}"; } + else { + colorLayers = + "{" + "Identifier = 'NoDataStarTexture'," + "FilePath = " + fmt::format("openspace.absPath('{}')", NoDataTextureFile) + "," + "BlendMode = 'Color'," + "Enabled = true" + "}"; + } + + const std::string starGlobeRenderableString = "Renderable = {" + "Type = 'RenderableGlobe'," + "Radii = " + std::to_string(radiusInMeter) + "," + "SegmentsPerPatch = 64," + "PerformShading = false," + "Layers = {" + "ColorLayers = { " + colorLayers + "}" + "}" + "},"; const std::string starParent = "{" "Identifier = '" + starIdentifier + "'," From 3ba3d25a6b710d739bf13c39083e218e6fb274e3 Mon Sep 17 00:00:00 2001 From: GPayne Date: Sat, 21 Nov 2020 00:40:02 -0700 Subject: [PATCH 033/147] Changes to accept both unix and windows style path delimiters --- .../openspace/interaction/sessionrecording.h | 5 +- src/interaction/sessionrecording.cpp | 58 +++++++++++++------ src/interaction/sessionrecording_lua.inl | 2 +- 3 files changed, 46 insertions(+), 19 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index ee7429838c..74a1902cbd 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -527,6 +527,9 @@ protected: double equivalentSimulationTime(double timeOs, double timeRec, double timeSim); double equivalentApplicationTime(double timeOs, double timeRec, double timeSim); bool handleRecordingFile(std::string filenameIn); + bool isPath(std::string& filename); + void removeTrailingPathSlashes(std::string& filename); + void extractFilenameFromPath(std::string& filename); bool playbackCamera(); bool playbackTimeChange(); bool playbackScript(); @@ -637,7 +640,7 @@ protected: DataMode _conversionDataMode = DataMode::Binary; int _conversionLineNum = 1; - const int _maximumRecursionDepth = 100; + const int _maximumRecursionDepth = 50; }; class SessionRecording_legacy_0085 : public SessionRecording { diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index e9c099db79..7f4b2d3ee7 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -110,8 +110,32 @@ bool SessionRecording::hasFileExtension(std::string filename, std::string extens } } +bool SessionRecording::isPath(std::string& filename) { + size_t unixDelimiter = filename.find("/"); + size_t windowsDelimiter = filename.find("\\"); + return (unixDelimiter != std::string::npos || windowsDelimiter != std::string::npos); +} + +void SessionRecording::removeTrailingPathSlashes(std::string& filename) { + while (filename.substr(filename.length() - 1, 1) == "/") { + filename.pop_back(); + } + while (filename.substr(filename.length() - 1, 1) == "\\") { + filename.pop_back(); + } +} + +void SessionRecording::extractFilenameFromPath(std::string& filename) { + size_t unixDelimiter = filename.find_last_of("/"); + if (unixDelimiter != std::string::npos) + filename = filename.substr(unixDelimiter + 1); + size_t windowsDelimiter = filename.find_last_of("\\"); + if (windowsDelimiter != std::string::npos) + filename = filename.substr(windowsDelimiter + 1); +} + bool SessionRecording::handleRecordingFile(std::string filenameIn) { - if (filenameIn.find("/") != std::string::npos) { + if (isPath(filenameIn)) { LERROR("Recording filename must not contain path (/) elements"); return false; } @@ -220,7 +244,7 @@ bool SessionRecording::startPlayback(std::string& filename, KeyframeTimeRef timeMode, bool forceSimTimeAtStart) { - if (filename.find("/") != std::string::npos) { + if (isPath(filename)) { LERROR("Playback filename must not contain path (/) elements"); return false; } @@ -284,11 +308,11 @@ bool SessionRecording::startPlayback(std::string& filename, // past the header, version, and data type _playbackFile.close(); _playbackFile.open(_playbackFilename, std::ifstream::in | std::ios::binary); - size_t headerSize = FileHeaderTitle.length() + - FileHeaderVersionLength + - sizeof(DataFormatBinaryTag) + sizeof('\n'); - char hBuffer[headerSize]; - _playbackFile.read(reinterpret_cast(hBuffer), headerSize); + size_t headerSize = FileHeaderTitle.length() + FileHeaderVersionLength + + sizeof(DataFormatBinaryTag) + sizeof('\n'); + std::vector hBuffer; + hBuffer.resize(headerSize); + _playbackFile.read(hBuffer.data(), headerSize); } if (!_playbackFile.is_open() || !_playbackFile.good()) { @@ -1691,12 +1715,15 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, std::string& version, DataMode& mode) { - if (filename.find("/") != std::string::npos) { - throw ConversionError("Playback filename musn't contain path (/) elements"); + if (isPath(const_cast(filename))) { + throw ConversionError("Playback filename must not contain path (/) elements"); } std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); if (!FileSys.fileExists(conversionInFilename)) { - throw ConversionError("Cannot find the specified playback file to convert."); + throw ConversionError(fmt::format( + "Cannot find the specified playback file '{}' to convert.", + conversionInFilename + )); } // Open in ASCII first @@ -1748,12 +1775,9 @@ std::string SessionRecording::convertFile(std::string filename, int depth) if (fileVersion.compare(fileFormatVersion()) != 0) { conversionInFile.close(); newFilename = getLegacyConversionResult(filename, depth + 1); - - while (newFilename.substr(newFilename.length() - 1, 1) == "/") { - newFilename.pop_back(); - } - if (newFilename.find("/") != std::string::npos) { - newFilename = newFilename.substr(newFilename.find_last_of("/") + 1); + removeTrailingPathSlashes(newFilename); + if (isPath(newFilename)) { + extractFilenameFromPath(newFilename); } if (filename == newFilename) { return filename; @@ -1965,7 +1989,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in std::string SessionRecording::getLegacyConversionResult(std::string filename, int depth) { SessionRecording_legacy_0085 legacy; - return legacy.convertFile(filename, depth + 1); + return legacy.convertFile(filename, depth); } std::string SessionRecording_legacy_0085::getLegacyConversionResult(std::string filename, diff --git a/src/interaction/sessionrecording_lua.inl b/src/interaction/sessionrecording_lua.inl index 33b29c961e..4c8585e9aa 100644 --- a/src/interaction/sessionrecording_lua.inl +++ b/src/interaction/sessionrecording_lua.inl @@ -179,7 +179,7 @@ int fileFormatConversion(lua_State* L) { if (convertFilePath.empty()) { return luaL_error(L, "filepath string is empty"); } - global::sessionRecording.convertFile(convertFilePath); + global::sessionRecording->convertFile(convertFilePath); ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); return 0; From 2c91c21be5bf5ab1b29be2967eb7aec39c9632ee Mon Sep 17 00:00:00 2001 From: GPayne Date: Mon, 23 Nov 2020 00:14:15 -0700 Subject: [PATCH 034/147] Temporarily block legacy versions, switched to using class member buffer --- .../openspace/interaction/sessionrecording.h | 2 +- src/interaction/sessionrecording.cpp | 26 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 74a1902cbd..63cef1fbd3 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -76,7 +76,7 @@ public: static const char DataFormatBinaryTag = 'B'; static const size_t keyframeHeaderSize_bytes = 33; static const size_t saveBufferCameraSize_min = 82; - static const size_t saveBufferStringSize_max = 1000; + static const size_t saveBufferStringSize_max = 2000; static const size_t _saveBufferMaxSize_bytes = keyframeHeaderSize_bytes + + saveBufferCameraSize_min + saveBufferStringSize_max; diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 7f4b2d3ee7..ec9bd44593 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -252,6 +252,10 @@ bool SessionRecording::startPlayback(std::string& filename, //Run through conversion in case file is older. Does nothing if the file format // is up-to-date filename = convertFile(filename); + if (filename.compare("Legacy currently unsupported") == 0) { + LERROR("Playback of legacy format versions is currently not supported."); + return false; + } if (FileSys.fileExists(filename)) { absFilename = filename; } @@ -993,6 +997,7 @@ bool SessionRecording::readCameraKeyframeBinary(Timestamps& times, times.timeOs = readFromPlayback(file); times.timeRec = readFromPlayback(file); times.timeSim = readFromPlayback(file); + try { kf.read(&file); } @@ -1665,7 +1670,7 @@ void SessionRecording::saveKeyframeToFileBinary(unsigned char* buffer, size_t size, std::ofstream& file) { - file.write(reinterpret_cast(buffer), size); + file.write(reinterpret_cast(buffer), size); } void SessionRecording::saveKeyframeToFile(std::string entry, std::ofstream& file) { @@ -1773,6 +1778,8 @@ std::string SessionRecording::convertFile(std::string filename, int depth) // to the next level down in the legacy subclasses until we get the right // version, then proceed with conversion from there. if (fileVersion.compare(fileFormatVersion()) != 0) { + //Temporary placeholder for rejecting legacy versions: + return "Legacy currently unsupported"; conversionInFile.close(); newFilename = getLegacyConversionResult(filename, depth + 1); removeTrailingPathSlashes(newFilename); @@ -1851,8 +1858,6 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in { bool conversionStatusOk = true; std::string lineParsing; - //std::shared_ptr buffer(new unsigned char[_saveBufferMaxSize_bytes]); - unsigned char* buffer = new unsigned char[_saveBufferMaxSize_bytes]; if (mode == DataMode::Binary) { unsigned char frameType; @@ -1876,7 +1881,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - reinterpret_cast(buffer) + _keyframeBuffer ); } else if (frameType == HeaderTimeBinary) { @@ -1886,7 +1891,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + _keyframeBuffer ); } else if (frameType == HeaderScriptBinary) { @@ -1897,7 +1902,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + _keyframeBuffer ); } catch (ConversionError& c) { @@ -1936,7 +1941,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + _keyframeBuffer ); } else if (entryType == HeaderTimeAscii) { @@ -1946,7 +1951,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + _keyframeBuffer ); } else if (entryType == HeaderScriptAscii) { @@ -1957,7 +1962,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, lineParsing, outFile, - buffer + _keyframeBuffer ); } catch (ConversionError& c) { @@ -1981,9 +1986,6 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in lineNum, inFilename )); } - if (buffer != nullptr) { - delete buffer; - } return conversionStatusOk; } From 0939c14639ca214d5211d6d17efc4f57a7e34ea3 Mon Sep 17 00:00:00 2001 From: GPayne Date: Tue, 24 Nov 2020 17:48:30 -0700 Subject: [PATCH 035/147] Switched to stringstream of conversion input file, fixed binary read bug --- .../openspace/interaction/sessionrecording.h | 66 +++++---- .../interaction/sessionrecording.inl | 7 + .../interaction/tasks/convertrecformattask.h | 1 + src/interaction/sessionrecording.cpp | 137 ++++++++++-------- .../tasks/convertrecformattask.cpp | 35 +++-- 5 files changed, 145 insertions(+), 101 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 63cef1fbd3..3952797d16 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -261,7 +261,7 @@ public: * * \return true if data read has no errors */ - static bool readCameraKeyframeBinary(Timestamps& times, + bool readCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ifstream& file, int lineN); /** @@ -275,7 +275,7 @@ public: * * \return true if data read has no errors */ - static bool readCameraKeyframeAscii(Timestamps& times, + bool readCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::string currentParsingLine, int lineN); @@ -290,7 +290,7 @@ public: * * \return true if data read has no errors */ - static bool readTimeKeyframeBinary(Timestamps& times, + bool readTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ifstream& file, int lineN); /** @@ -304,7 +304,7 @@ public: * * \return true if data read has no errors */ - static bool readTimeKeyframeAscii(Timestamps& times, + bool readTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::string currentParsingLine, int lineN); @@ -320,7 +320,7 @@ public: * * \return true if data read has no errors */ - static bool readScriptKeyframeBinary(Timestamps& times, + bool readScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::ifstream& file, int lineN); /** @@ -335,7 +335,7 @@ public: * * \return true if data read has no errors */ - static bool readScriptKeyframeAscii(Timestamps& times, + bool readScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& kf, std::string currentParsingLine, int lineN); @@ -347,7 +347,7 @@ public: * \param kfBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveCameraKeyframeBinary(Timestamps& times, + void saveCameraKeyframeBinary(Timestamps& times, datamessagestructures::CameraKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file); @@ -358,7 +358,7 @@ public: * \param kf reference to a camera keyframe which contains the camera details * \param file an ofstream reference to the recording file being written-to */ - static void saveCameraKeyframeAscii(Timestamps& times, + void saveCameraKeyframeAscii(Timestamps& times, datamessagestructures::CameraKeyframe& kf, std::ofstream& file); /** @@ -369,7 +369,7 @@ public: * \param kfBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveTimeKeyframeBinary(Timestamps& times, + void saveTimeKeyframeBinary(Timestamps& times, datamessagestructures::TimeKeyframe& kf, unsigned char* kfBuffer, std::ofstream& file); @@ -380,7 +380,7 @@ public: * \param kf reference to a time keyframe which contains the time details * \param file an ofstream reference to the recording file being written-to */ - static void saveTimeKeyframeAscii(Timestamps& times, + void saveTimeKeyframeAscii(Timestamps& times, datamessagestructures::TimeKeyframe& kf, std::ofstream& file); /** @@ -391,7 +391,7 @@ public: * \param smBuffer a buffer temporarily used for preparing data to be written * \param file an ofstream reference to the recording file being written-to */ - static void saveScriptKeyframeBinary(Timestamps& times, + void saveScriptKeyframeBinary(Timestamps& times, datamessagestructures::ScriptMessage& sm, unsigned char* smBuffer, std::ofstream& file); @@ -402,7 +402,7 @@ public: * \param sm reference to a ScriptMessage which contains the script details * \param file an ofstream reference to the recording file being written-to */ - static void saveScriptKeyframeAscii(Timestamps& times, + void saveScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& sm, std::ofstream& file); /** @@ -414,6 +414,15 @@ public: */ static std::string readHeaderElement(std::ifstream& stream, size_t readLen_chars); + /** + * Reads header information from a session recording file + * + * \param stringstream reference to ifstream that contains the session recording file data + * \param readLen_chars number of characters to be read, which may be the expected + * length of the header line, or an arbitrary number of characters within it + */ + static std::string readHeaderElement(std::stringstream& stream, size_t readLen_chars); + /** * Writes a header to a binary recording file buffer * @@ -527,7 +536,7 @@ protected: double equivalentSimulationTime(double timeOs, double timeRec, double timeSim); double equivalentApplicationTime(double timeOs, double timeRec, double timeSim); bool handleRecordingFile(std::string filenameIn); - bool isPath(std::string& filename); + static bool isPath(std::string& filename); void removeTrailingPathSlashes(std::string& filename); void extractFilenameFromPath(std::string& filename); bool playbackCamera(); @@ -556,20 +565,20 @@ protected: bool findNextFutureCameraIndex(double currTime); bool processCameraKeyframe(double now); bool processScriptKeyframe(); - static bool readSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, - Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, - const int lineNum); - static void saveSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + bool readSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, + Timestamps& times, DataMode mode, std::ifstream& file, + std::string& inLine, const int lineNum); + void saveSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); - static bool readSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + bool readSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, const int lineNum); - static void saveSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, + void saveSingleKeyframeTime(datamessagestructures::TimeKeyframe& kf, Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); - static bool readSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + bool readSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, Timestamps& times, DataMode mode, std::ifstream& file, std::string& inLine, const int lineNum); - static void saveSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, + void saveSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, Timestamps& times, DataMode mode, std::ofstream& file, unsigned char* buffer); unsigned int findIndexOfLastCameraKeyframeInTimeline(); bool doesTimelineEntryContainCamera(unsigned int index) const; @@ -580,22 +589,23 @@ protected: double getNextTimestamp(); double getPrevTimestamp(); void cleanUpPlayback(); - bool convertEntries(std::string& inFilename, std::ifstream& inFile, + bool convertEntries(std::string& inFilename, std::stringstream& inStream, DataMode mode, int lineNum, std::ofstream& outFile); - virtual bool convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertCamera(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - virtual bool convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertTimeChange(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - virtual bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + virtual bool convertScript(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - void readPlaybackFileHeader(const std::string filename, - std::ifstream& conversionInFile, + void readPlaybackFileHeader(std::stringstream& conversionInStream, std::string& version, DataMode& mode); static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src); static void writeToFileBuffer(unsigned char* buf, size_t& idx, std::vector& cv); static void writeToFileBuffer(unsigned char* buf, size_t& idx, unsigned char c); static void writeToFileBuffer(unsigned char* buf, size_t& idx, bool b); + static void readFileIntoStringStream(std::string filename, + std::ifstream& inputFstream, std::stringstream& stream); DataMode _recordingDataMode = DataMode::Binary; SessionState _state = SessionState::Idle; @@ -676,7 +686,7 @@ public: }; protected: - bool convertScript(std::ifstream& inFile, DataMode mode, int lineNum, + bool convertScript(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buffer); }; diff --git a/include/openspace/interaction/sessionrecording.inl b/include/openspace/interaction/sessionrecording.inl index 1d8ca3bcad..62c8b4b04b 100644 --- a/include/openspace/interaction/sessionrecording.inl +++ b/include/openspace/interaction/sessionrecording.inl @@ -62,4 +62,11 @@ T readFromPlayback(std::ifstream& stream) { return res; } +template +T readFromPlayback(std::stringstream& stream) { + T res; + stream.read(reinterpret_cast(&res), sizeof(T)); + return res; +} + } // namespace openspace::interaction diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index eb8107f494..a221109b2a 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -62,6 +62,7 @@ private: std::string _version; std::string _valueFunctionLua; + SessionRecording* sessRec; }; } // namespace openspace::interaction diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index ec9bd44593..1bc6a59918 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -252,10 +252,6 @@ bool SessionRecording::startPlayback(std::string& filename, //Run through conversion in case file is older. Does nothing if the file format // is up-to-date filename = convertFile(filename); - if (filename.compare("Legacy currently unsupported") == 0) { - LERROR("Playback of legacy format versions is currently not supported."); - return false; - } if (FileSys.fileExists(filename)) { absFilename = filename; } @@ -938,9 +934,9 @@ bool SessionRecording::playbackCamera() { return success; } -bool SessionRecording::convertCamera(std::ifstream& inFile, DataMode mode, int lineNum, - std::string& inputLine, std::ofstream& outFile, - unsigned char* buffer) +bool SessionRecording::convertCamera(std::stringstream& inStream, DataMode mode, + int lineNum, std::string& inputLine, + std::ofstream& outFile, unsigned char* buffer) { Timestamps times; datamessagestructures::CameraKeyframe kf; @@ -949,7 +945,7 @@ bool SessionRecording::convertCamera(std::ifstream& inFile, DataMode mode, int l kf, times, mode, - inFile, + reinterpret_cast(inStream), inputLine, lineNum ); @@ -1072,7 +1068,7 @@ bool SessionRecording::playbackTimeChange() { return success; } -bool SessionRecording::convertTimeChange(std::ifstream& inFile, DataMode mode, int lineNum, +bool SessionRecording::convertTimeChange(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buffer) { @@ -1083,7 +1079,7 @@ bool SessionRecording::convertTimeChange(std::ifstream& inFile, DataMode mode, i kf, times, mode, - inFile, + reinterpret_cast(inStream), inputLine, lineNum ); @@ -1186,6 +1182,14 @@ std::string SessionRecording::readHeaderElement(std::ifstream& stream, return std::string(readTemp.begin(), readTemp.end()); } +std::string SessionRecording::readHeaderElement(std::stringstream& stream, + size_t readLen_chars) +{ + std::vector readTemp(readLen_chars); + stream.read(&readTemp[0], readLen_chars); + return std::string(readTemp.begin(), readTemp.end()); +} + bool SessionRecording::playbackScript() { Timestamps times; datamessagestructures::ScriptMessage kf; @@ -1206,7 +1210,7 @@ bool SessionRecording::playbackScript() { return success; } -bool SessionRecording::convertScript(std::ifstream& inFile, DataMode mode, int lineNum, +bool SessionRecording::convertScript(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buffer) { @@ -1217,7 +1221,7 @@ bool SessionRecording::convertScript(std::ifstream& inFile, DataMode mode, int l kf, times, mode, - inFile, + reinterpret_cast(inStream), inputLine, lineNum ); @@ -1715,35 +1719,21 @@ std::vector SessionRecording::playbackList() const { return fileList; } -void SessionRecording::readPlaybackFileHeader(const std::string filename, - std::ifstream& conversionInFile, +void SessionRecording::readPlaybackFileHeader(std::stringstream& conversionInStream, std::string& version, DataMode& mode) { - if (isPath(const_cast(filename))) { - throw ConversionError("Playback filename must not contain path (/) elements"); - } - std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); - if (!FileSys.fileExists(conversionInFilename)) { - throw ConversionError(fmt::format( - "Cannot find the specified playback file '{}' to convert.", - conversionInFilename - )); - } - - // Open in ASCII first - conversionInFile.open(conversionInFilename, std::ifstream::in); // Read header std::string readBackHeaderString = readHeaderElement( - conversionInFile, + conversionInStream, FileHeaderTitle.length() ); if (readBackHeaderString != FileHeaderTitle) { throw ConversionError("File to convert does not contain expected header."); } - version = readHeaderElement(conversionInFile, FileHeaderVersionLength); - std::string readDataMode = readHeaderElement(conversionInFile, 1); + version = readHeaderElement(conversionInStream, FileHeaderVersionLength); + std::string readDataMode = readHeaderElement(conversionInStream, 1); if (readDataMode[0] == DataFormatAsciiTag) { mode = DataMode::Ascii; } @@ -1754,23 +1744,54 @@ void SessionRecording::readPlaybackFileHeader(const std::string filename, throw ConversionError("Unknown data type in header (needs Ascii or Binary)"); } //Read to throw out newline at end of header - readHeaderElement(conversionInFile, 1); + readHeaderElement(conversionInStream, 1); +} + +void SessionRecording::readFileIntoStringStream(std::string filename, + std::ifstream& inputFstream, + std::stringstream& stream) +{ + if (isPath(filename)) { + throw ConversionError("Playback filename must not contain path (/) elements"); + } + std::string conversionInFilename = absPath("${RECORDINGS}/" + filename); + if (!FileSys.fileExists(conversionInFilename)) { + throw ConversionError(fmt::format( + "Cannot find the specified playback file '{}' to convert.", + conversionInFilename + )); + } + stream.str(""); + stream.clear(); + inputFstream.open(conversionInFilename, std::ifstream::in | std::ios::binary); + stream << inputFstream.rdbuf(); + if (!inputFstream.is_open() || !inputFstream.good()) { + throw ConversionError(fmt::format( + "Unable to open file {} for conversion", filename.c_str() + )); + } + inputFstream.close(); } std::string SessionRecording::convertFile(std::string filename, int depth) { std::string conversionOutFilename = filename; + std::ifstream conversionInFile; + std::stringstream conversionInStream; if (depth >= _maximumRecursionDepth) { LERROR("Runaway recursion in session recording conversion of file version."); exit(EXIT_FAILURE); } - std::string newFilename = filename; try { - std::ifstream conversionInFile; + readFileIntoStringStream(filename, conversionInFile, conversionInStream); DataMode mode; std::string fileVersion; - readPlaybackFileHeader(filename, conversionInFile, fileVersion, mode); + readPlaybackFileHeader( + conversionInStream, + fileVersion, + mode + ); int conversionLineNum = 1; //If this instance of the SessionRecording class isn't the instance with the @@ -1778,9 +1799,7 @@ std::string SessionRecording::convertFile(std::string filename, int depth) // to the next level down in the legacy subclasses until we get the right // version, then proceed with conversion from there. if (fileVersion.compare(fileFormatVersion()) != 0) { - //Temporary placeholder for rejecting legacy versions: - return "Legacy currently unsupported"; - conversionInFile.close(); + //conversionInStream.seekg(conversionInStream.beg); newFilename = getLegacyConversionResult(filename, depth + 1); removeTrailingPathSlashes(newFilename); if (isPath(newFilename)) { @@ -1789,14 +1808,14 @@ std::string SessionRecording::convertFile(std::string filename, int depth) if (filename == newFilename) { return filename; } - readPlaybackFileHeader(newFilename, conversionInFile, fileVersion, mode); + readFileIntoStringStream(newFilename, conversionInFile, conversionInStream); + readPlaybackFileHeader( + conversionInStream, + fileVersion, + mode + ); } if (depth != 0) { - if (!conversionInFile.is_open() || !conversionInFile.good()) { - throw ConversionError(fmt::format( - "Unable to open file {} for conversion", newFilename.c_str() - )); - } conversionOutFilename = determineConversionOutFilename(filename); LINFO(fmt::format( "Starting conversion on rec file {}, version {} in {} mode. " @@ -1832,7 +1851,7 @@ std::string SessionRecording::convertFile(std::string filename, int depth) conversionOutFile << '\n'; convertEntries( newFilename, - conversionInFile, + conversionInStream, mode, conversionLineNum, conversionOutFile @@ -1853,8 +1872,9 @@ std::string SessionRecording::convertFile(std::string filename, int depth) } } -bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& inFile, - DataMode mode, int lineNum, std::ofstream& outFile) +bool SessionRecording::convertEntries(std::string& inFilename, + std::stringstream& inStream, DataMode mode, + int lineNum, std::ofstream& outFile) { bool conversionStatusOk = true; std::string lineParsing; @@ -1864,9 +1884,9 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in bool fileReadOk = true; while (conversionStatusOk && fileReadOk) { - frameType = readFromPlayback(inFile); + frameType = readFromPlayback(inStream); // Check if have reached EOF - if (!inFile) { + if (!inStream) { LINFO(fmt::format( "Finished converting {} entries from playback file {}", lineNum - 1, inFilename @@ -1876,7 +1896,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in } if (frameType == HeaderCameraBinary) { conversionStatusOk = convertCamera( - inFile, + inStream, mode, lineNum, lineParsing, @@ -1886,7 +1906,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in } else if (frameType == HeaderTimeBinary) { conversionStatusOk = convertTimeChange( - inFile, + inStream, mode, lineNum, lineParsing, @@ -1897,7 +1917,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in else if (frameType == HeaderScriptBinary) { try { conversionStatusOk = convertScript( - inFile, + inStream, mode, lineNum, lineParsing, @@ -1921,7 +1941,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in } } else { - while (conversionStatusOk && std::getline(inFile, lineParsing)) { + while (conversionStatusOk && std::getline(inStream, lineParsing)) { lineNum++; std::istringstream iss(lineParsing); @@ -1936,7 +1956,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in if (entryType == HeaderCameraAscii) { conversionStatusOk = convertCamera( - inFile, + inStream, mode, lineNum, lineParsing, @@ -1946,7 +1966,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in } else if (entryType == HeaderTimeAscii) { conversionStatusOk = convertTimeChange( - inFile, + inStream, mode, lineNum, lineParsing, @@ -1957,7 +1977,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::ifstream& in else if (entryType == HeaderScriptAscii) { try { conversionStatusOk = convertScript( - inFile, + inStream, mode, lineNum, lineParsing, @@ -2039,8 +2059,9 @@ std::string SessionRecording::determineConversionOutFilename(const std::string f return absPath("${RECORDINGS}/" + conversionOutFilename); } -bool SessionRecording_legacy_0085::convertScript(std::ifstream& inFile, DataMode mode, - int lineNum, std::string& inputLine, +bool SessionRecording_legacy_0085::convertScript(std::stringstream& inStream, + DataMode mode, int lineNum, + std::string& inputLine, std::ofstream& outFile, unsigned char* buffer) { @@ -2051,7 +2072,7 @@ bool SessionRecording_legacy_0085::convertScript(std::ifstream& inFile, DataMode kf, times, mode, - inFile, + reinterpret_cast(inStream), inputLine, lineNum ); diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 75945477d0..57281fc1c3 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -56,14 +56,18 @@ ConvertRecFormatTask::ConvertRecFormatTask(const ghoul::Dictionary& dictionary) LERROR(fmt::format("Failed to load session recording file: {}", _inFilePath)); } else { - _iFile.open(_inFilePath, std::ifstream::in); + _iFile.open(_inFilePath, std::ifstream::in | std::ifstream::binary); determineFormatType(); + sessRec = new SessionRecording(false); } } ConvertRecFormatTask::~ConvertRecFormatTask() { _iFile.close(); _oFile.close(); + if (sessRec != nullptr) { + delete sessRec; + } } std::string ConvertRecFormatTask::description() { @@ -101,8 +105,7 @@ void ConvertRecFormatTask::convert() { if (!SessionRecording::hasFileExtension(_inFilePath, expectedFileExtension_in)) { LWARNING(fmt::format( - "Input filename doesn't have expected {} " - "format file extension", + "Input filename doesn't have expected {} format file extension", currentFormat) ); } @@ -199,21 +202,22 @@ void ConvertRecFormatTask::convertToAscii() { std::stringstream keyframeLine = std::stringstream(); keyframeLine.str(std::string()); + if (frameType == SessionRecording::HeaderCameraBinary) { - SessionRecording::readCameraKeyframeBinary(times, ckf, _iFile, lineNum); - SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderCameraAscii, + sessRec->readCameraKeyframeBinary(times, ckf, _iFile, lineNum); + sessRec->saveHeaderAscii(times, SessionRecording::HeaderCameraAscii, keyframeLine); ckf.write(keyframeLine); } else if (frameType == SessionRecording::HeaderTimeBinary) { - SessionRecording::readTimeKeyframeBinary(times, tkf, _iFile, lineNum); - SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderTimeAscii, + sessRec->readTimeKeyframeBinary(times, tkf, _iFile, lineNum); + sessRec->saveHeaderAscii(times, SessionRecording::HeaderTimeAscii, keyframeLine); tkf.write(keyframeLine); } else if (frameType == SessionRecording::HeaderScriptBinary) { - SessionRecording::readScriptKeyframeBinary(times, skf, _iFile, lineNum); - SessionRecording::saveHeaderAscii(times, SessionRecording::HeaderScriptAscii, + sessRec->readScriptKeyframeBinary(times, skf, _iFile, lineNum); + sessRec->saveHeaderAscii(times, SessionRecording::HeaderScriptAscii, keyframeLine); skf.write(keyframeLine); } @@ -224,6 +228,7 @@ void ConvertRecFormatTask::convertToAscii() { )); break; } + SessionRecording::saveKeyframeToFile(keyframeLine.str(), _oFile); lineNum++; } @@ -258,18 +263,18 @@ void ConvertRecFormatTask::convertToBinary() { } if (entryType == SessionRecording::HeaderCameraAscii) { - SessionRecording::readCameraKeyframeAscii(times, ckf, lineContents, lineNum); - SessionRecording::saveCameraKeyframeBinary(times, ckf, keyframeBuffer, + sessRec->readCameraKeyframeAscii(times, ckf, lineContents, lineNum); + sessRec->saveCameraKeyframeBinary(times, ckf, keyframeBuffer, _oFile); } else if (entryType == SessionRecording::HeaderTimeAscii) { - SessionRecording::readTimeKeyframeAscii(times, tkf, lineContents, lineNum); - SessionRecording::saveTimeKeyframeBinary(times, tkf, keyframeBuffer, + sessRec->readTimeKeyframeAscii(times, tkf, lineContents, lineNum); + sessRec->saveTimeKeyframeBinary(times, tkf, keyframeBuffer, _oFile); } else if (entryType == SessionRecording::HeaderScriptAscii) { - SessionRecording::readScriptKeyframeAscii(times, skf, lineContents, lineNum); - SessionRecording::saveScriptKeyframeBinary(times, skf, keyframeBuffer, + sessRec->readScriptKeyframeAscii(times, skf, lineContents, lineNum); + sessRec->saveScriptKeyframeBinary(times, skf, keyframeBuffer, _oFile); } else if (entryType.substr(0, 1) == SessionRecording::HeaderCommentAscii) { From c39b57378b901f0d3df89616e24fe2970067c892 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 25 Nov 2020 16:51:59 +0100 Subject: [PATCH 036/147] Adapt the taskrunner to the new global mechanism (closes #1404) --- apps/TaskRunner/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/TaskRunner/main.cpp b/apps/TaskRunner/main.cpp index f41d8105ab..ce7f27e2cc 100644 --- a/apps/TaskRunner/main.cpp +++ b/apps/TaskRunner/main.cpp @@ -107,6 +107,7 @@ int main(int argc, char** argv) { using namespace openspace; ghoul::initialize(); + global::create(); // Register the path of the executable, // to make it possible to find other files in the same directory. @@ -117,9 +118,9 @@ int main(int argc, char** argv) { ); std::string configFile = configuration::findConfiguration(); - global::configuration = configuration::loadConfigurationFromFile(configFile); - openspace::global::openSpaceEngine.registerPathTokens(); - global::openSpaceEngine.initialize(); + *global::configuration = configuration::loadConfigurationFromFile(configFile); + openspace::global::openSpaceEngine->registerPathTokens(); + global::openSpaceEngine->initialize(); ghoul::cmdparser::CommandlineParser commandlineParser( "OpenSpace TaskRunner", @@ -157,5 +158,7 @@ int main(int argc, char** argv) { std::cout << "TASK > "; } + global::destroy(); + ghoul::deinitialize(); return 0; }; From 4de671e673be1403c763f5c2f81ff5426f4d4bba Mon Sep 17 00:00:00 2001 From: GPayne Date: Wed, 25 Nov 2020 13:34:50 -0700 Subject: [PATCH 037/147] Fix for ascii files with windows line endings, or missing file extension --- .../openspace/interaction/sessionrecording.h | 7 +- src/interaction/sessionrecording.cpp | 81 ++++++++++++------- 2 files changed, 58 insertions(+), 30 deletions(-) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 3952797d16..ba66e18f69 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -510,7 +510,7 @@ public: * * \return pathname of the converted version of the file */ - std::string determineConversionOutFilename(const std::string filename); + std::string determineConversionOutFilename(const std::string filename, DataMode mode); protected: properties::BoolProperty _renderPlaybackInformation; @@ -597,14 +597,15 @@ protected: std::string& inputLine, std::ofstream& outFile, unsigned char* buff); virtual bool convertScript(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - void readPlaybackFileHeader(std::stringstream& conversionInStream, + DataMode readModeFromHeader(std::string filename); + void readPlaybackHeader_stream(std::stringstream& conversionInStream, std::string& version, DataMode& mode); static void writeToFileBuffer(unsigned char* buf, size_t& idx, double src); static void writeToFileBuffer(unsigned char* buf, size_t& idx, std::vector& cv); static void writeToFileBuffer(unsigned char* buf, size_t& idx, unsigned char c); static void writeToFileBuffer(unsigned char* buf, size_t& idx, bool b); - static void readFileIntoStringStream(std::string filename, + void readFileIntoStringStream(std::string filename, std::ifstream& inputFstream, std::stringstream& stream); DataMode _recordingDataMode = DataMode::Binary; diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 1bc6a59918..1468bf2d85 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -1719,9 +1719,8 @@ std::vector SessionRecording::playbackList() const { return fileList; } -void SessionRecording::readPlaybackFileHeader(std::stringstream& conversionInStream, - std::string& version, - DataMode& mode) +void SessionRecording::readPlaybackHeader_stream(std::stringstream& conversionInStream, + std::string& version, DataMode& mode) { // Read header std::string readBackHeaderString = readHeaderElement( @@ -1747,6 +1746,34 @@ void SessionRecording::readPlaybackFileHeader(std::stringstream& conversionInStr readHeaderElement(conversionInStream, 1); } +SessionRecording::DataMode SessionRecording::readModeFromHeader(std::string filename) { + DataMode mode; + std::ifstream inputFile; + // Open in ASCII first + inputFile.open(filename, std::ifstream::in); + // Read header + std::string readBackHeaderString = readHeaderElement( + inputFile, + FileHeaderTitle.length() + ); + if (readBackHeaderString != FileHeaderTitle) { + LERROR("Specified playback file does not contain expected header."); + } + readHeaderElement(inputFile, FileHeaderVersionLength); + std::string readDataMode = readHeaderElement(inputFile, 1); + if (readDataMode[0] == DataFormatAsciiTag) { + mode = DataMode::Ascii; + } + else if (readDataMode[0] == DataFormatBinaryTag) { + mode = DataMode::Binary; + } + else { + LERROR("Unknown data type in header (should be Ascii or Binary)"); + } + inputFile.close(); + return mode; +} + void SessionRecording::readFileIntoStringStream(std::string filename, std::ifstream& inputFstream, std::stringstream& stream) @@ -1761,9 +1788,18 @@ void SessionRecording::readFileIntoStringStream(std::string filename, conversionInFilename )); } + + DataMode mode = readModeFromHeader(conversionInFilename); + stream.str(""); stream.clear(); - inputFstream.open(conversionInFilename, std::ifstream::in | std::ios::binary); + inputFstream.close(); + if (mode == DataMode::Binary) { + inputFstream.open(conversionInFilename, std::ifstream::in | std::ios::binary); + } + else { + inputFstream.open(conversionInFilename, std::ifstream::in); + } stream << inputFstream.rdbuf(); if (!inputFstream.is_open() || !inputFstream.good()) { throw ConversionError(fmt::format( @@ -1787,7 +1823,7 @@ std::string SessionRecording::convertFile(std::string filename, int depth) readFileIntoStringStream(filename, conversionInFile, conversionInStream); DataMode mode; std::string fileVersion; - readPlaybackFileHeader( + readPlaybackHeader_stream( conversionInStream, fileVersion, mode @@ -1809,14 +1845,14 @@ std::string SessionRecording::convertFile(std::string filename, int depth) return filename; } readFileIntoStringStream(newFilename, conversionInFile, conversionInStream); - readPlaybackFileHeader( + readPlaybackHeader_stream( conversionInStream, fileVersion, mode ); } if (depth != 0) { - conversionOutFilename = determineConversionOutFilename(filename); + conversionOutFilename = determineConversionOutFilename(filename, mode); LINFO(fmt::format( "Starting conversion on rec file {}, version {} in {} mode. " "Writing result to {}.", @@ -2036,27 +2072,18 @@ std::string SessionRecording::targetFileFormatVersion() { return std::string(FileHeaderVersion); } -std::string SessionRecording::determineConversionOutFilename(const std::string filename) { - const std::string legacyRecordingSaveDirectory = "${RECORDINGS}/convert"; - std::string conversionOutFilename = filename.substr(0, filename.find_last_of(".")) - + "_" + fileFormatVersion() + "-" + targetFileFormatVersion(); - if (filename.substr(filename.find_last_of(".")) == FileExtensionBinary) { - conversionOutFilename += FileExtensionBinary; +std::string SessionRecording::determineConversionOutFilename(const std::string filename, + DataMode mode) +{ + std::string filenameSansExtension = filename; + std::string fileExtension = (mode == DataMode::Binary) ? + FileExtensionBinary : FileExtensionAscii; + + if (filename.find_last_of(".") != std::string::npos) { + filenameSansExtension = filename.substr(0, filename.find_last_of(".")); } - else if (filename.substr(filename.find_last_of(".")) == FileExtensionAscii) { - conversionOutFilename += FileExtensionAscii; - } - else { - conversionOutFilename = filename + "_"; - } - //if (!FileSys.directoryExists(absPath(legacyRecordingSaveDirectory))) { - // FileSys.createDirectory( - // absPath(legacyRecordingSaveDirectory), - // ghoul::filesystem::FileSystem::Recursive::Yes - // ); - //} - //return absPath(legacyRecordingSaveDirectory + "/" + conversionOutFilename); - return absPath("${RECORDINGS}/" + conversionOutFilename); + filenameSansExtension += "_" + fileFormatVersion() + "-" + targetFileFormatVersion(); + return absPath("${RECORDINGS}/" + filenameSansExtension + fileExtension); } bool SessionRecording_legacy_0085::convertScript(std::stringstream& inStream, From ab7813260711d42e252aa98f1fa5ac475e34bed0 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 28 Nov 2020 19:01:38 +0100 Subject: [PATCH 038/147] Disable culling for renderableplanetsclose (closes #1411) --- modules/digitaluniverse/rendering/renderableplanescloud.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 04aaa90d06..2b7bb6e7f6 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -562,6 +562,8 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&, _program->setUniform(_uniformCache.alphaValue, _opacity); _program->setUniform(_uniformCache.fadeInValue, fadeInVariable); + glDisable(GL_CULL_FACE); + GLint viewport[4]; glGetIntegerv(GL_VIEWPORT, viewport); @@ -592,6 +594,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&, // Restores OpenGL Rendering State global::renderEngine->openglStateCache().resetBlendState(); global::renderEngine->openglStateCache().resetDepthState(); + global::renderEngine->openglStateCache().resetPolygonAndClippingState(); } void RenderablePlanesCloud::renderLabels(const RenderData& data, From 60e3ed2170ad993f0b86450874eb89ecaa18d9e0 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 28 Nov 2020 22:31:06 +0100 Subject: [PATCH 039/147] General pass for coding style --- apps/OpenSpace/ext/sgct | 2 +- apps/OpenSpace/main.cpp | 8 +- ext/ghoul | 2 +- .../openspace/interaction/sessionrecording.h | 4 +- .../tasks/convertrecfileversiontask.h | 2 +- .../interaction/tasks/convertrecformattask.h | 4 +- include/openspace/rendering/helper.h | 3 +- include/openspace/scene/assetloader.h | 2 +- include/openspace/scene/profile.h | 2 +- include/openspace/util/timemanager.h | 3 +- .../rendering/renderableatmosphere.cpp | 9 +- .../rendering/grids/renderableboxgrid.cpp | 9 +- .../base/rendering/grids/renderablegrid.cpp | 7 +- modules/base/rendering/grids/renderablegrid.h | 2 +- .../rendering/grids/renderableradialgrid.cpp | 28 ++-- .../grids/renderablesphericalgrid.cpp | 4 +- modules/base/rendering/modelgeometry.cpp | 1 - modules/base/rendering/renderablemodel.cpp | 4 +- modules/base/rendering/renderablemodel.h | 4 +- modules/base/rendering/renderablesphere.cpp | 8 +- modules/base/rendering/renderabletrail.cpp | 16 ++- modules/base/rotation/staticrotation.cpp | 4 +- .../rendering/renderabledumeshes.cpp | 2 +- .../rendering/renderableplanescloud.cpp | 2 +- modules/exoplanets/exoplanetshelper.h | 6 +- modules/exoplanets/exoplanetsmodule.cpp | 8 +- modules/exoplanets/exoplanetsmodule_lua.inl | 64 ++++----- .../tasks/exoplanetsdatapreparationtask.cpp | 8 +- .../src/globelabelscomponent.cpp | 2 +- modules/globebrowsing/src/layergroupid.h | 9 +- modules/globebrowsing/src/renderableglobe.cpp | 3 +- modules/globebrowsing/src/renderableglobe.h | 3 +- modules/server/src/topics/timetopic.cpp | 2 +- .../rendering/renderableorbitalkepler.cpp | 14 +- modules/space/rendering/renderablerings.cpp | 4 +- .../space/tasks/generatedebrisvolumetask.cpp | 123 +++++++++++++----- .../space/translation/horizonstranslation.cpp | 4 +- .../rendering/renderablefov.cpp | 74 +++++------ modules/touch/src/win32_touch.cpp | 20 +-- modules/volume/envelope.cpp | 3 +- src/engine/configuration_doc.inl | 2 +- src/engine/globals.cpp | 69 +++++----- src/engine/openspaceengine.cpp | 2 +- src/interaction/orbitalnavigator.cpp | 6 +- src/interaction/sessionrecording.cpp | 24 ++-- .../tasks/convertrecformattask.cpp | 3 +- src/properties/propertyowner.cpp | 7 +- src/rendering/framebufferrenderer.cpp | 27 ++-- src/rendering/renderengine.cpp | 2 +- src/scene/assetloader.cpp | 3 +- src/scene/lightsource.cpp | 2 +- src/scene/profile.cpp | 5 +- src/scene/profile_lua.inl | 2 +- src/scene/scale.cpp | 4 +- src/scene/scenelicensewriter.cpp | 2 +- src/util/time_lua.inl | 16 +-- 56 files changed, 377 insertions(+), 278 deletions(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 6c351ebf2e..dc7d75681b 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 6c351ebf2e7a1106982502f4050363f31ac3d0a3 +Subproject commit dc7d75681b1fe5259c7adf7502d99679a01270a8 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index ec1d62ec3f..d074fc737a 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -582,10 +582,10 @@ void mainPostDrawFunc() { } if (w.right.initialized) { - const GLuint texId = window.frameBufferTexture(Window::TextureIndex::RightEye); - glBindTexture(GL_TEXTURE_2D, texId); + const GLuint tId = window.frameBufferTexture(Window::TextureIndex::RightEye); + glBindTexture(GL_TEXTURE_2D, tId); w.right.handle->SendTexture( - texId, + tId, GL_TEXTURE_2D, window.framebufferResolution().x, window.framebufferResolution().y @@ -1205,7 +1205,7 @@ int main(int argc, char** argv) { arguments.insert(arguments.begin() + 2, absPath(windowConfiguration)); // Need to set this before the creation of the sgct::Engine - + Log::instance().setLogToConsole(false); Log::instance().setShowTime(false); Log::instance().setShowLogLevel(false); diff --git a/ext/ghoul b/ext/ghoul index ae10aa2307..d08973205c 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit ae10aa23075d1f78407e9895a8ec2e91337e958d +Subproject commit d08973205c88a2c759d86a679db0d5536df7ee71 diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index ba66e18f69..0ab16c63d2 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -593,8 +593,8 @@ protected: DataMode mode, int lineNum, std::ofstream& outFile); virtual bool convertCamera(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); - virtual bool convertTimeChange(std::stringstream& inStream, DataMode mode, int lineNum, - std::string& inputLine, std::ofstream& outFile, unsigned char* buff); + virtual bool convertTimeChange(std::stringstream& inStream, DataMode mode, + int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); virtual bool convertScript(std::stringstream& inStream, DataMode mode, int lineNum, std::string& inputLine, std::ofstream& outFile, unsigned char* buff); DataMode readModeFromHeader(std::string filename); diff --git a/include/openspace/interaction/tasks/convertrecfileversiontask.h b/include/openspace/interaction/tasks/convertrecfileversiontask.h index 66125ee5bc..98a5a51da6 100644 --- a/include/openspace/interaction/tasks/convertrecfileversiontask.h +++ b/include/openspace/interaction/tasks/convertrecfileversiontask.h @@ -54,4 +54,4 @@ private: } // namespace openspace::interaction -#endif //__OPENSPACE_CORE___CONVERTRECFILEVERSIONTASK___H__ +#endif // __OPENSPACE_CORE___CONVERTRECFILEVERSIONTASK___H__ diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index a221109b2a..17df5c5c4e 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -32,8 +32,6 @@ #include - - namespace openspace::interaction { class ConvertRecFormatTask : public Task { @@ -67,4 +65,4 @@ private: } // namespace openspace::interaction -#endif //__OPENSPACE_CORE___CONVERTRECFORMATTASK___H__ +#endif // __OPENSPACE_CORE___CONVERTRECFORMATTASK___H__ diff --git a/include/openspace/rendering/helper.h b/include/openspace/rendering/helper.h index a26eb9aab6..a776dfb25d 100644 --- a/include/openspace/rendering/helper.h +++ b/include/openspace/rendering/helper.h @@ -105,7 +105,8 @@ VertexXYZ convertToXYZ(const Vertex& v); std::vector convert(std::vector v); -std::vector createRing(int nSegments, float radius, glm::vec4 colors = glm::vec4(1.f)); +std::vector createRing(int nSegments, float radius, + glm::vec4 colors = glm::vec4(1.f)); } // namespace openspace::rendering::helper diff --git a/include/openspace/scene/assetloader.h b/include/openspace/scene/assetloader.h index 644acf671d..5d0b72c007 100644 --- a/include/openspace/scene/assetloader.h +++ b/include/openspace/scene/assetloader.h @@ -215,7 +215,7 @@ private: _onDependencyInitializationFunctionRefs; std::unordered_map>> _onDependencyDeinitializationFunctionRefs; - + int _assetsTableRef = 0; }; diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h index ab8de80916..cb539cbe35 100644 --- a/include/openspace/scene/profile.h +++ b/include/openspace/scene/profile.h @@ -127,7 +127,7 @@ public: * and all of the property & asset changes that were made since startup. */ void saveCurrentSettingsToProfile(const properties::PropertyOwner& rootOwner, - std::string currentTime, + std::string currentTime, interaction::NavigationHandler::NavigationState navState); /// If the value passed to this function is 'true', the addAsset and removeAsset diff --git a/include/openspace/util/timemanager.h b/include/openspace/util/timemanager.h index 2297e29a18..658b5f08a3 100644 --- a/include/openspace/util/timemanager.h +++ b/include/openspace/util/timemanager.h @@ -160,7 +160,8 @@ private: std::vector> _timeChangeCallbacks; std::vector> _deltaTimeChangeCallbacks; - std::vector> _deltaTimeStepsChangeCallbacks; + std::vector> + _deltaTimeStepsChangeCallbacks; std::vector> _timeJumpCallbacks; std::vector> _timelineChangeCallbacks; diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 62582209a1..776c38032a 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -384,13 +384,14 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) "Atmosphere Effects. Disabling atmosphere effects for this planet." ); } - + if (atmosphereDictionary.hasKey(SunIntensityInfo.identifier)) { _sunRadianceIntensity = atmosphereDictionary.value(SunIntensityInfo.identifier); } - - if (atmosphereDictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) { + + if (atmosphereDictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) + { _mieScattExtPropCoefProp = atmosphereDictionary.value( MieScatteringExtinctionPropCoeffInfo.identifier ); @@ -621,7 +622,7 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) _mieScatteringCoeffZP.onChange(updateAtmosphere); addProperty(_mieScatteringCoeffZP); - _mieScatteringExtinctionPropCoefficientP = + _mieScatteringExtinctionPropCoefficientP = _mieScattExtPropCoefProp != 1.f ? _mieScattExtPropCoefProp : _mieScatteringCoeff.x / _mieExtinctionCoeff.x; diff --git a/modules/base/rendering/grids/renderableboxgrid.cpp b/modules/base/rendering/grids/renderableboxgrid.cpp index c05f583011..e56c997d0a 100644 --- a/modules/base/rendering/grids/renderableboxgrid.cpp +++ b/modules/base/rendering/grids/renderableboxgrid.cpp @@ -272,14 +272,7 @@ void RenderableBoxGrid::update(const UpdateData&) { GL_STATIC_DRAW ); - glVertexAttribPointer( - 0, - 3, - GL_FLOAT, - GL_FALSE, - sizeof(Vertex), - nullptr - ); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), nullptr); glBindVertexArray(0); diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index e8b8857103..9e55e4a216 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -81,7 +81,8 @@ documentation::Documentation RenderableGrid::Documentation() { }, { SegmentsInfo.identifier, - new DoubleVector2Verifier, // @TODO (emmbr 2020-07-07): should be Int, but specification test fails... + // @TODO (emmbr 2020-07-07): should be Int, but specification test fails.. + new DoubleVector2Verifier, Optional::Yes, SegmentsInfo.description }, @@ -230,13 +231,13 @@ void RenderableGrid::update(const UpdateData&) { const glm::vec2 halfSize = _size.value() / 2.f; const glm::uvec2 nSegments = _segments.value(); - const glm::vec2 step = _size.value() / static_cast(nSegments); + const glm::vec2 step = _size.value() / static_cast(nSegments); const int nLines = (2 * nSegments.x * nSegments.y) + nSegments.x + nSegments.y; const int nVertices = 2 * nLines; _varray.resize(nVertices); // OBS! Could be optimized further by removing duplicate vertices - + int nr = 0; for (unsigned int i = 0; i < nSegments.x; ++i) { for (unsigned int j = 0; j < nSegments.y; ++j) { diff --git a/modules/base/rendering/grids/renderablegrid.h b/modules/base/rendering/grids/renderablegrid.h index 79d43df723..39c3c2d751 100644 --- a/modules/base/rendering/grids/renderablegrid.h +++ b/modules/base/rendering/grids/renderablegrid.h @@ -35,7 +35,7 @@ #include #include -namespace ghoul::opengl { class ProgramObject; } +namespace ghoul::opengl { class ProgramObject; } namespace openspace::documentation { struct Documentation; } namespace openspace { diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index 0b61d9fc56..73c0f5ed25 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -131,8 +131,8 @@ RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _gridColor(GridColorInfo, glm::vec3(0.5f), glm::vec3(0.f), glm::vec3(1.f)) , _gridSegments( - GridSegmentsInfo, - glm::ivec2(1, 1), + GridSegmentsInfo, + glm::ivec2(1, 1), glm::ivec2(1), glm::ivec2(200) ) @@ -258,7 +258,7 @@ void RenderableRadialGrid::render(const RenderData& data, RendererTasks&) { "MVPTransform", glm::dmat4(data.camera.projectionMatrix()) * modelViewTransform ); - + _gridProgram->setUniform("gridColor", _gridColor); float adjustedLineWidth = 1.f; @@ -272,7 +272,7 @@ void RenderableRadialGrid::render(const RenderData& data, RendererTasks&) { glEnablei(GL_BLEND, 0); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LINE_SMOOTH); - + for (GeometryData& c : _circles) { c.render(); } @@ -337,9 +337,9 @@ void RenderableRadialGrid::update(const UpdateData&) { rendering::helper::createRing(nLines, _minRadius); for (int i = 0; i < nLines; ++i) { - const rendering::helper::VertexXYZ vOut = + const rendering::helper::VertexXYZ vOut = rendering::helper::convertToXYZ(outerVertices[i]); - + const rendering::helper::VertexXYZ vIn = rendering::helper::convertToXYZ(innerVertices[i]); @@ -352,7 +352,7 @@ void RenderableRadialGrid::update(const UpdateData&) { _gridIsDirty = false; } -RenderableRadialGrid::GeometryData::GeometryData(GLenum renderMode) +RenderableRadialGrid::GeometryData::GeometryData(GLenum renderMode) : mode(renderMode) { glGenVertexArrays(1, &vao); @@ -375,8 +375,8 @@ RenderableRadialGrid::GeometryData::GeometryData(GeometryData&& other) noexcept other.vbo = 0; } -RenderableRadialGrid::GeometryData& -RenderableRadialGrid::GeometryData::operator=(GeometryData&& other) noexcept +RenderableRadialGrid::GeometryData& +RenderableRadialGrid::GeometryData::operator=(GeometryData&& other) noexcept { if (this != &other) { vao = other.vao; @@ -409,11 +409,11 @@ void RenderableRadialGrid::GeometryData::update() { ); glVertexAttribPointer( - 0, - 3, - GL_FLOAT, - GL_FALSE, - sizeof(rendering::helper::VertexXYZ), + 0, + 3, + GL_FLOAT, + GL_FALSE, + sizeof(rendering::helper::VertexXYZ), nullptr ); } diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index 76e2467944..95af20718b 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -201,7 +201,7 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){ "MVPTransform", glm::dmat4(data.camera.projectionMatrix()) * modelViewTransform ); - + _gridProgram->setUniform("gridColor", _gridColor); float adjustedLineWidth = 1.f; @@ -215,7 +215,7 @@ void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){ glEnablei(GL_BLEND, 0); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LINE_SMOOTH); - + glBindVertexArray(_vaoID); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _iBufferID); glDrawElements(_mode, _isize, GL_UNSIGNED_INT, nullptr); diff --git a/modules/base/rendering/modelgeometry.cpp b/modules/base/rendering/modelgeometry.cpp index f6a2e8424f..fa0b673bdb 100644 --- a/modules/base/rendering/modelgeometry.cpp +++ b/modules/base/rendering/modelgeometry.cpp @@ -82,7 +82,6 @@ documentation:: Documentation ModelGeometry::Documentation() { }; } -// Create with ghoul::mm_unique_ptr ghoul::mm_unique_ptr ModelGeometry::createFromDictionary( const ghoul::Dictionary& dictionary) { diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 39c920ded5..3fb0bc90f6 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -62,8 +62,8 @@ namespace { constexpr const std::array UniformNames = { "opacity", "nLightSources", "lightDirectionsViewSpace", "lightIntensities", - "modelViewTransform", "normalTransform", "projectionTransform", - "performShading", "texture1", "ambientIntensity", "diffuseIntensity", + "modelViewTransform", "normalTransform", "projectionTransform", + "performShading", "texture1", "ambientIntensity", "diffuseIntensity", "specularIntensity", "opacityBlending" }; diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index 23beb352cc..b89cbcf944 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -86,8 +86,8 @@ private: ghoul::opengl::ProgramObject* _program = nullptr; UniformCache(opacity, nLightSources, lightDirectionsViewSpace, lightIntensities, - modelViewTransform, normalTransform, projectionTransform, - performShading, texture, ambientIntensity, diffuseIntensity, + modelViewTransform, normalTransform, projectionTransform, + performShading, texture, ambientIntensity, diffuseIntensity, specularIntensity, opacityBlending) _uniformCache; std::vector> _lightSources; diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index f097a5a806..c88294d8f5 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -370,7 +370,9 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) { const float startLogFadeDistance = glm::log(_size * _fadeInThreshold); const float stopLogFadeDistance = startLogFadeDistance + 1.f; - if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) { + if (logDistCamera > startLogFadeDistance && logDistCamera < + stopLogFadeDistance) + { const float fadeFactor = glm::clamp( (logDistCamera - startLogFadeDistance) / (stopLogFadeDistance - startLogFadeDistance), @@ -391,7 +393,9 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) { const float startLogFadeDistance = glm::log(_size * _fadeOutThreshold); const float stopLogFadeDistance = startLogFadeDistance + 1.f; - if (logDistCamera > startLogFadeDistance && logDistCamera < stopLogFadeDistance) { + if (logDistCamera > startLogFadeDistance && logDistCamera < + stopLogFadeDistance) + { const float fadeFactor = glm::clamp( (logDistCamera - startLogFadeDistance) / (stopLogFadeDistance - startLogFadeDistance), diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 9c96849da0..c46038e569 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -71,11 +71,17 @@ namespace { }; // Fragile! Keep in sync with documentation - const std::map RenderBinModeConversion = { + const std::map RenderBinConversion = { { "Background", openspace::Renderable::RenderBin::Background }, { "Opaque", openspace::Renderable::RenderBin::Opaque }, - { "PreDeferredTransparent", openspace::Renderable::RenderBin::PreDeferredTransparent}, - { "PostDeferredTransparent", openspace::Renderable::RenderBin::PostDeferredTransparent} + { + "PreDeferredTransparent", + openspace::Renderable::RenderBin::PreDeferredTransparent + }, + { + "PostDeferredTransparent", + openspace::Renderable::RenderBin::PostDeferredTransparent + } }; static const openspace::properties::PropertyOwner::PropertyOwnerInfo @@ -274,7 +280,7 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) addPropertySubOwner(_appearance); if (dictionary.hasKeyAndValue(RenderBinModeInfo.identifier)) { - openspace::Renderable::RenderBin cfgRenderBin = RenderBinModeConversion.at( + openspace::Renderable::RenderBin cfgRenderBin = RenderBinConversion.at( dictionary.value(RenderBinModeInfo.identifier) ); setRenderBin(cfgRenderBin); @@ -327,7 +333,7 @@ bool RenderableTrail::isReady() const { void RenderableTrail::internalRender(bool renderLines, bool renderPoints, const RenderData& data, - const glm::dmat4& modelTransform, + const glm::dmat4& modelTransform, RenderInformation& info, int nVertices, int offset) { ZoneScoped diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 9cdba21e3a..8c995246b1 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -94,9 +94,9 @@ StaticRotation::StaticRotation() ) { addProperty(_eulerRotation); - _eulerRotation.onChange([this]() { + _eulerRotation.onChange([this]() { _matrixIsDirty = true; - requireUpdate(); + requireUpdate(); }); } diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index afff95f42d..01094ae093 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -485,7 +485,7 @@ void RenderableDUMeshes::renderLabels(const RenderData& data, labelInfo.scale = pow(10.f, _textSize); labelInfo.enableDepth = true; labelInfo.enableFalseDepth = false; - + glm::vec4 textColor = glm::vec4(glm::vec3(_textColor), _textOpacity); for (const std::pair& pair : _labelData) { diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 2b7bb6e7f6..a1d80e4503 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -628,7 +628,7 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, } glm::vec4 textColor = glm::vec4( - glm::vec3(_textColor), + glm::vec3(_textColor), _textOpacity * fadeInVariable ); diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 29e6b5a7ac..476cd781bd 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_EXOPLANETS___EXOPLANET_HELPER___H__ -#define __OPENSPACE_MODULE_EXOPLANETS___EXOPLANET_HELPER___H__ +#ifndef __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSHELPER___H__ +#define __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSHELPER___H__ #include #include @@ -91,4 +91,4 @@ void sanitizeNameString(std::string& s); } // namespace openspace::exoplanets -#endif // __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSMODULE___H__ +#endif // __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSHELPER___H__ diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index 3a9305d206..201e82a857 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -54,14 +54,14 @@ scripting::LuaLibrary ExoplanetsModule::luaLibrary() const { {}, "string or list of strings", "Add one or multiple exoplanet systems to the scene, as specified by the " - "input. An input string should be the name of the system host star." + "input. An input string should be the name of the system host star" }, { "removeExoplanetSystem", &exoplanets::luascriptfunctions::removeExoplanetSystem, {}, "string", - "Removes the nodes of the specified exoplanet system from the scene graph." + "Removes the nodes of the specified exoplanet system from the scene graph" }, { "listAvailableExoplanetSystems", @@ -69,14 +69,14 @@ scripting::LuaLibrary ExoplanetsModule::luaLibrary() const { {}, "", "Prints a list with the names of all exoplanet systems that can be added to " - "the scene graph to the OpenSpace Log. " + "the scene graph to the OpenSpace Log" }, { "getListOfExoplanets", &exoplanets::luascriptfunctions::getListOfExoplanets, {}, "", - "Gets a list with the names of all exoplanet systems, that can be used by a GUI." + "Gets a list with the names of all exoplanet systems" } }; diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 50206be659..5f40a768c1 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -1,26 +1,26 @@ /***************************************************************************************** -* * -* OpenSpace * -* * -* Copyright (c) 2014-2020 * -* * -* Permission is hereby granted, free of charge, to any person obtaining a copy of this * -* software and associated documentation files (the "Software"), to deal in the Software * -* without restriction, including without limitation the rights to use, copy, modify, * -* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * -* permit persons to whom the Software is furnished to do so, subject to the following * -* conditions: * -* * -* The above copyright notice and this permission notice shall be included in all copies * -* or substantial portions of the Software. * -* * -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * -* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * -* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * -* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * -* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * -* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -****************************************************************************************/ + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ #include #include @@ -51,7 +51,8 @@ constexpr const char* ExoplanetsDataPath = "${SYNC}/http/exoplanets_data/1/exoplanets_data.bin"; constexpr const char* StarTextureFile = "${SYNC}/http/exoplanets_textures/1/sun.jpg"; -constexpr const char* NoDataTextureFile = "${SYNC}/http/exoplanets_textures/1/grid-32.png"; +constexpr const char* NoDataTextureFile = + "${SYNC}/http/exoplanets_textures/1/grid-32.png"; constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; @@ -122,7 +123,7 @@ void createExoplanetSystem(std::string_view starName) { if (!hasSufficientData(p)) { LERROR(fmt::format( - "Insufficient data available for visualizion of exoplanet system: '{}'", + "Insufficient data available for exoplanet system: '{}'", starName )); return; @@ -174,16 +175,18 @@ void createExoplanetSystem(std::string_view starName) { "}," "{" "Identifier = 'StarTexture'," - "FilePath = " + fmt::format("openspace.absPath('{}')", StarTextureFile) + "," + "FilePath = " + + fmt::format("openspace.absPath('{}')", StarTextureFile) + "," "BlendMode = 'Color'," "Enabled = true" "}"; } else { - colorLayers = + colorLayers = "{" "Identifier = 'NoDataStarTexture'," - "FilePath = " + fmt::format("openspace.absPath('{}')", NoDataTextureFile) + "," + "FilePath = " + + fmt::format("openspace.absPath('{}')", NoDataTextureFile) + "," "BlendMode = 'Color'," "Enabled = true" "}"; @@ -194,7 +197,7 @@ void createExoplanetSystem(std::string_view starName) { "Radii = " + std::to_string(radiusInMeter) + "," "SegmentsPerPatch = 64," "PerformShading = false," - "Layers = {" + "Layers = {" "ColorLayers = { " + colorLayers + "}" "}" "},"; @@ -259,7 +262,8 @@ void createExoplanetSystem(std::string_view starName) { float planetRadius; std::string enabled; - const float astronomicalUnit = static_cast(distanceconstants::AstronomicalUnit); + const float astronomicalUnit = + static_cast(distanceconstants::AstronomicalUnit); const float solarRadius = static_cast(distanceconstants::SolarRadius); const float jupiterRadius = static_cast(distanceconstants::JupiterRadius); @@ -285,7 +289,7 @@ void createExoplanetSystem(std::string_view starName) { const std::string planetKeplerTranslation = "{" "Type = 'KeplerTranslation'," - "Eccentricity = " + std::to_string(planet.ecc) + "," + "Eccentricity = " + std::to_string(planet.ecc) + "," "SemiMajorAxis = " + std::to_string(semiMajorAxisInKm) + "," "Inclination = " + std::to_string(planet.i) + "," "AscendingNode = " + std::to_string(planet.bigOmega) + "," diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 8b66c057b7..c1bb2ff2d6 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -48,7 +48,9 @@ namespace { namespace openspace::exoplanets { -ExoplanetsDataPreparationTask::ExoplanetsDataPreparationTask(const ghoul::Dictionary& dictionary) { +ExoplanetsDataPreparationTask::ExoplanetsDataPreparationTask( + const ghoul::Dictionary& dictionary) +{ openspace::documentation::testSpecificationAndThrow( documentation(), dictionary, @@ -71,7 +73,9 @@ std::string ExoplanetsDataPreparationTask::description() { ); } -void ExoplanetsDataPreparationTask::perform(const Task::ProgressCallback& progressCallback) { +void ExoplanetsDataPreparationTask::perform( + const Task::ProgressCallback& progressCallback) +{ std::ifstream inputDataFile(_inputDataPath); if (!inputDataFile.good()) { LERROR(fmt::format("Failed to open input file '{}'", _inputDataPath)); diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 2eb2e0f97e..045b98cbb5 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -692,7 +692,7 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data, float fadeInVariable ) { glm::vec4 textColor = glm::vec4( - glm::vec3(_labelsColor), + glm::vec3(_labelsColor), _labelsOpacity * fadeInVariable ); diff --git a/modules/globebrowsing/src/layergroupid.h b/modules/globebrowsing/src/layergroupid.h index e2c28e503b..d86ffb9247 100644 --- a/modules/globebrowsing/src/layergroupid.h +++ b/modules/globebrowsing/src/layergroupid.h @@ -140,7 +140,8 @@ constexpr openspace::globebrowsing::layergroupid::GroupID from_string( std::string_view string) { for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_LAYER_GROUPS; ++i) { - if (string == openspace::globebrowsing::layergroupid::LAYER_GROUP_IDENTIFIERS[i]) { + if (string == openspace::globebrowsing::layergroupid::LAYER_GROUP_IDENTIFIERS[i]) + { return static_cast(i); } } @@ -151,9 +152,11 @@ template <> constexpr openspace::globebrowsing::layergroupid::AdjustmentTypeID from_string( std::string_view string) { - for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_ADJUSTMENT_TYPES; ++i) { + for (int i = 0; i < openspace::globebrowsing::layergroupid::NUM_ADJUSTMENT_TYPES; ++i) + { if (string == openspace::globebrowsing::layergroupid::ADJUSTMENT_TYPE_NAMES[i]) { - return static_cast(i); + return + static_cast(i); } } return openspace::globebrowsing::layergroupid::AdjustmentTypeID::None; diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index 0c774885df..d3c47d8bb2 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -273,7 +273,8 @@ const Chunk& findChunkNode(const Chunk& node, const Geodetic2& location) { #if defined(__APPLE__) || (defined(__linux__) && defined(__clang__)) using ChunkTileVector = std::vector>; #else -using ChunkTileVector = std::pmr::vector>; +using ChunkTileVector = + std::pmr::vector>; #endif ChunkTileVector tilesAndSettingsUnsorted(const LayerGroup& layerGroup, diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index f632d38e59..188ec97b5c 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -222,7 +222,8 @@ private: void debugRenderChunk(const Chunk& chunk, const glm::dmat4& mvp, bool renderBounds, bool renderAABB) const; - bool isCullableByFrustum(const Chunk& chunk, const RenderData& renderData, const glm::dmat4& mvp) const; + bool isCullableByFrustum(const Chunk& chunk, const RenderData& renderData, + const glm::dmat4& mvp) const; bool isCullableByHorizon(const Chunk& chunk, const RenderData& renderData, const BoundingHeights& heights) const; diff --git a/modules/server/src/topics/timetopic.cpp b/modules/server/src/topics/timetopic.cpp index 57d61adb9b..a4b8ba0f75 100644 --- a/modules/server/src/topics/timetopic.cpp +++ b/modules/server/src/topics/timetopic.cpp @@ -170,7 +170,7 @@ void TimeTopic::sendDeltaTimeSteps() { const std::vector& steps = global::timeManager->deltaTimeSteps(); json deltaTimeStepsJson = { - { "deltaTimeSteps", steps } + { "deltaTimeSteps", steps } }; const json nextPrevJson = getNextPrevDeltaTimeStepJson(); diff --git a/modules/space/rendering/renderableorbitalkepler.cpp b/modules/space/rendering/renderableorbitalkepler.cpp index 0afe86fc94..8b438ead27 100644 --- a/modules/space/rendering/renderableorbitalkepler.cpp +++ b/modules/space/rendering/renderableorbitalkepler.cpp @@ -51,11 +51,17 @@ namespace { constexpr const char* KeyLineNum = "LineNumber"; // Fragile! Keep in sync with documentation - const std::map RenderBinModeConversion = { + const std::map RenderBinConversion = { { "Background", openspace::Renderable::RenderBin::Background }, { "Opaque", openspace::Renderable::RenderBin::Opaque }, - { "PreDeferredTransparent", openspace::Renderable::RenderBin::PreDeferredTransparent}, - { "PostDeferredTransparent", openspace::Renderable::RenderBin::PostDeferredTransparent} + { + "PreDeferredTransparent", + openspace::Renderable::RenderBin::PreDeferredTransparent + }, + { + "PostDeferredTransparent", + openspace::Renderable::RenderBin::PostDeferredTransparent + } }; constexpr const std::array LeapYears = { @@ -416,7 +422,7 @@ RenderableOrbitalKepler::RenderableOrbitalKepler(const ghoul::Dictionary& dict) _sizeRenderCallbackHandle = _sizeRender.onChange(_updateRenderSizeSelect); if (dict.hasKeyAndValue(RenderBinModeInfo.identifier)) { - openspace::Renderable::RenderBin cfgRenderBin = RenderBinModeConversion.at( + openspace::Renderable::RenderBin cfgRenderBin = RenderBinConversion.at( dict.value(RenderBinModeInfo.identifier) ); setRenderBin(cfgRenderBin); diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 4e882de4a0..ac786e9b82 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -39,8 +39,8 @@ namespace { constexpr const std::array UniformNames = { - "modelViewProjectionTransform", "textureOffset", "colorFilterValue", "_nightFactor", - "sunPosition", "texture1" + "modelViewProjectionTransform", "textureOffset", "colorFilterValue", + "_nightFactor", "sunPosition", "texture1" }; constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/space/tasks/generatedebrisvolumetask.cpp b/modules/space/tasks/generatedebrisvolumetask.cpp index 3946f9ccc2..aea20f3c61 100644 --- a/modules/space/tasks/generatedebrisvolumetask.cpp +++ b/modules/space/tasks/generatedebrisvolumetask.cpp @@ -483,7 +483,9 @@ float getMaxApogee(std::vector inData){ return static_cast(maxApogee*1000); // * 1000 for meters } -int getIndexFromPosition(glm::dvec3 position, glm::uvec3 dim, float maxApogee, std::string gridType){ +int getIndexFromPosition(glm::dvec3 position, glm::uvec3 dim, float maxApogee, + std::string gridType) +{ // epsilon is to make sure that for example if newPosition.x/maxApogee = 1, // then the index for that dimension will not exceed the range of the grid. float epsilon = static_cast(0.000000001); @@ -492,12 +494,15 @@ int getIndexFromPosition(glm::dvec3 position, glm::uvec3 dim, float maxApogee, s ,position.y + maxApogee ,position.z + maxApogee); - glm::uvec3 coordinateIndex = glm::uvec3(static_cast(newPosition.x * dim.x / (2 * (maxApogee + epsilon))) - ,static_cast(newPosition.y * dim.y / (2 * (maxApogee + epsilon))) - ,static_cast(newPosition.z * dim.z / (2 * (maxApogee + epsilon)))); + glm::uvec3 coordinateIndex = glm::uvec3( + static_cast(newPosition.x * dim.x / (2 * (maxApogee + epsilon))), + static_cast(newPosition.y * dim.y / (2 * (maxApogee + epsilon))), + static_cast(newPosition.z * dim.z / (2 * (maxApogee + epsilon))) + ); - return coordinateIndex.z * (dim.x * dim.y) + coordinateIndex.y * dim.x + coordinateIndex.x; + return coordinateIndex.z * (dim.x * dim.y) + + coordinateIndex.y * dim.x + coordinateIndex.x; } else if(gridType == "Spherical"){ @@ -508,16 +513,13 @@ int getIndexFromPosition(glm::dvec3 position, glm::uvec3 dim, float maxApogee, s position.z = 0; } - glm::uvec3 coordinateIndex = glm::uvec3(static_cast(position.x * dim.x / (maxApogee)) - ,static_cast(position.y * dim.y / (3.14159265358979323846264338327950288)) - ,static_cast(position.z * dim.z / (2*3.14159265358979323846264338327950288))); + glm::uvec3 coordinateIndex = glm::uvec3( + static_cast(position.x * dim.x / (maxApogee)), + static_cast(position.y * dim.y / glm::pi()), + static_cast(position.z * dim.z / glm::two_pi())); - - // LINFO(fmt::format("index coords: {} ", coordinateIndex)); - // LINFO(fmt::format("index dim: {} ", dim)); - // LINFO(fmt::format("index va: {} ", coordinateIndex.y * (dim.x * dim.y) + coordinateIndex.z * dim.x + coordinateIndex.x)); - - return coordinateIndex.z * (dim.x * dim.y) + coordinateIndex.y * dim.x + coordinateIndex.x; + return coordinateIndex.z * (dim.x * dim.y) + + coordinateIndex.y * dim.x + coordinateIndex.x; } return -1; @@ -541,9 +543,12 @@ double getVoxelVolume(int index, RawVolume& raw, glm::uvec3 dim, float ma } -double* mapDensityToVoxels(double* densityArray, std::vector positions, glm::uvec3 dim, float maxApogee, std::string gridType, RawVolume& raw) { +double* mapDensityToVoxels(double* densityArray, std::vector positions, + glm::uvec3 dim, float maxApogee, std::string gridType, + RawVolume& raw) +{ - for(const glm::dvec3& position : positions) { + for (const glm::dvec3& position : positions) { //LINFO(fmt::format("pos: {} ", position)); int index = getIndexFromPosition(position, dim, maxApogee, gridType); //LINFO(fmt::format("index: {} ", index)); @@ -551,7 +556,8 @@ double* mapDensityToVoxels(double* densityArray, std::vector positio ++densityArray[index]; } else if(gridType == "Spherical"){ - double voxelVolume = getVoxelVolume(index, raw, dim, maxApogee); //something like this + // something like this + double voxelVolume = getVoxelVolume(index, raw, dim, maxApogee); densityArray[index] += 1/voxelVolume; } } @@ -569,9 +575,11 @@ GenerateDebrisVolumeTask::GenerateDebrisVolumeTask(const ghoul::Dictionary& dict _rawVolumeOutputPath = absPath(dictionary.value(KeyRawVolumeOutput)); _dictionaryOutputPath = absPath(dictionary.value(KeyDictionaryOutput)); - _dimensions = dictionary.value(KeyDimensions); // must not be for some reason. + // must not be for some reason. + _dimensions = dictionary.value(KeyDimensions); _startTime = dictionary.value(KeyStartTime); - _timeStep = dictionary.value(KeyTimeStep); // Todo: send KeyTimeStep in as a int or float correctly. + // Todo: send KeyTimeStep in as a int or float correctly. + _timeStep = dictionary.value(KeyTimeStep); _endTime = dictionary.value(KeyEndTime); // since _inputPath is past from task, // there will have to be either one task per dataset, @@ -605,12 +613,35 @@ void GenerateDebrisVolumeTask::perform(const Task::ProgressCallback& progressCal // std::vectorTLEDataVector3 = readTLEFile(_inputPath3); // std::vectorTLEDataVector4 = readTLEFile(_inputPath4); - // _TLEDataVector.reserve( TLEDataVector.size() + TLEDataVector1.size() + TLEDataVector2.size() + TLEDataVector3.size() + TLEDataVector4.size()); - // _TLEDataVector.insert(_TLEDataVector.end(), TLEDataVector.begin(), TLEDataVector.end()); - // _TLEDataVector.insert(_TLEDataVector.end(), TLEDataVector1.begin(), TLEDataVector1.end()); - // _TLEDataVector.insert(_TLEDataVector.end(), TLEDataVector2.begin(), TLEDataVector2.end()); - // _TLEDataVector.insert(_TLEDataVector.end(), TLEDataVector3.begin(), TLEDataVector3.end()); - // _TLEDataVector.insert(_TLEDataVector.end(), TLEDataVector4.begin(), TLEDataVector4.end()); + // _TLEDataVector.reserve( + // TLEDataVector.size() + TLEDataVector1.size() + TLEDataVector2.size() + + // TLEDataVector3.size() + TLEDataVector4.size() + // ); + // _TLEDataVector.insert( + // _TLEDataVector.end(), + // TLEDataVector.begin(), + // TLEDataVector.end() + // ); + //_TLEDataVector.insert( + // _TLEDataVector.end(), + // TLEDataVector1.begin(), + // TLEDataVector1.end() + //); + //_TLEDataVector.insert( + // _TLEDataVector.end(), + // TLEDataVector2.begin(), + // TLEDataVector2.end() + //); + //_TLEDataVector.insert( + // _TLEDataVector.end(), + // TLEDataVector3.begin(), + // TLEDataVector3.end() + //); + //_TLEDataVector.insert( + // _TLEDataVector.end(), + // TLEDataVector4.begin(), + // TLEDataVector4.end() + //); // ----- or ----- if only one // _TLEDataVector = readTLEFile(_inputPath); @@ -651,16 +682,31 @@ void GenerateDebrisVolumeTask::perform(const Task::ProgressCallback& progressCal float minVal = std::numeric_limits::max(); float maxVal = std::numeric_limits::min(); // 2. - for(int i=0 ; i<=numberOfIterations ; ++i) { - - std::vector startPositionBuffer = getPositionBuffer(_TLEDataVector, startTimeInSeconds+(i*timeStep), _gridType); //+(i*timeStep) + for (int i=0 ; i<=numberOfIterations ; ++i) { + std::vector startPositionBuffer = getPositionBuffer( + _TLEDataVector, + startTimeInSeconds + (i * timeStep), + _gridType + ); //+(i*timeStep) //LINFO(fmt::format("pos: {} ", startPositionBuffer[4])); double *densityArrayp = new double[size](); - //densityArrayp = mapDensityToVoxels(densityArrayp, generatedPositions, _dimensions, maxApogee); + //densityArrayp = mapDensityToVoxels( + // densityArrayp, + // generatedPositions, + // _dimensions, + // maxApogee + //); volume::RawVolume rawVolume(_dimensions); - densityArrayp = mapDensityToVoxels(densityArrayp, startPositionBuffer, _dimensions, _maxApogee, _gridType, rawVolume); + densityArrayp = mapDensityToVoxels( + densityArrayp, + startPositionBuffer, + _dimensions, + _maxApogee, + _gridType, + rawVolume + ); /*std::vector testBuffer; testBuffer.push_back(glm::dvec3(0,0,0)); testBuffer.push_back(glm::dvec3(1,1.5,1.5)); @@ -669,14 +715,20 @@ void GenerateDebrisVolumeTask::perform(const Task::ProgressCallback& progressCal //testBuffer.push_back(glm::dvec3(10000,1000000000,1000000000)); - densityArrayp = mapDensityToVoxels(densityArrayp, testBuffer, _dimensions, _maxApogee, _gridType); + densityArrayp = mapDensityToVoxels( + densityArrayp, + testBuffer, + _dimensions, + _maxApogee, + _gridType + ); */ // create object rawVolume //glm::vec3 domainSize = _upperDomainBound - _lowerDomainBound; - // TODO: Create a forEachSatallite and set(cell, value) to combine mapDensityToVoxel - // and forEachVoxel for less time complexity. + // TODO: Create a forEachSatallite and set(cell, value) to combine + // mapDensityToVoxel and forEachVoxel for less time complexity. rawVolume.forEachVoxel([&](glm::uvec3 cell, float) { // glm::vec3 coord = _lowerDomainBound + // glm::vec3(cell) / glm::vec3(_dimensions) * domainSize; @@ -708,7 +760,10 @@ void GenerateDebrisVolumeTask::perform(const Task::ProgressCallback& progressCal ghoul::filesystem::File file(rawOutputName); const std::string directory = file.directoryName(); if (!FileSys.directoryExists(directory)) { - FileSys.createDirectory(directory, ghoul::filesystem::FileSystem::Recursive::Yes); + FileSys.createDirectory( + directory, + ghoul::filesystem::FileSystem::Recursive::Yes + ); } volume::RawVolumeWriter writer(rawOutputName); diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index b931afd0e3..7a794e1e74 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -141,7 +141,9 @@ void HorizonsTranslation::loadData() { bool hasCachedFile = FileSys.fileExists(cachedFile); if (hasCachedFile) { - LINFO(fmt::format("Cached file '{}' used for Horizon file '{}'", cachedFile, file)); + LINFO(fmt::format( + "Cached file '{}' used for Horizon file '{}'", cachedFile, file + )); bool success = loadCachedFile(cachedFile); if (success) { diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index a8ea7682e0..be75dca698 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -256,46 +256,46 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) , _drawSolid(DrawSolidInfo, false) , _standOffDistance(StandoffDistanceInfo, 0.9999, 0.99, 1.0, 0.000001) , _colors({ - { - DefaultStartColorInfo, - glm::vec3(0.4f), - glm::vec3(0.f), - glm::vec3(1.f) - }, - { - DefaultEndColorInfo, - glm::vec3(0.85f), - glm::vec3(0.f), - glm::vec3(1.f) - }, - { - ActiveColorInfo, - glm::vec3(0.f, 1.f, 0.f), - glm::vec3(0.f), - glm::vec3(1.f) - }, - { - TargetInFovInfo, - glm::vec3(0.f, 0.5f, 0.7f), - glm::vec3(0.f), - glm::vec3(1.f) - }, - { - IntersectionStartInfo, - glm::vec3(1.f, 0.89f, 0.f), + { + DefaultStartColorInfo, + glm::vec3(0.4f), glm::vec3(0.f), - glm::vec3(1.f) - }, - { - IntersectionEndInfo, - glm::vec3(1.f, 0.29f, 0.f), - glm::vec3(0.f), glm::vec3(1.f) }, - { - SquareColorInfo, - glm::vec3(0.85f), - glm::vec3(0.f), + { + DefaultEndColorInfo, + glm::vec3(0.85f), + glm::vec3(0.f), + glm::vec3(1.f) + }, + { + ActiveColorInfo, + glm::vec3(0.f, 1.f, 0.f), + glm::vec3(0.f), + glm::vec3(1.f) + }, + { + TargetInFovInfo, + glm::vec3(0.f, 0.5f, 0.7f), + glm::vec3(0.f), + glm::vec3(1.f) + }, + { + IntersectionStartInfo, + glm::vec3(1.f, 0.89f, 0.f), + glm::vec3(0.f), + glm::vec3(1.f) + }, + { + IntersectionEndInfo, + glm::vec3(1.f, 0.29f, 0.f), + glm::vec3(0.f), + glm::vec3(1.f) + }, + { + SquareColorInfo, + glm::vec3(0.85f), + glm::vec3(0.f), glm::vec3(1.f) } }) diff --git a/modules/touch/src/win32_touch.cpp b/modules/touch/src/win32_touch.cpp index bfd8b73aa9..f0de96acad 100644 --- a/modules/touch/src/win32_touch.cpp +++ b/modules/touch/src/win32_touch.cpp @@ -235,9 +235,9 @@ Win32TouchHook::Win32TouchHook(void* nativeWindow) { // This mouse hook prevents injected mouse events (touch-to-mouse), // since we cannot catch it in our messageloop. // Since this is attached to windows global thread, this will block lowlevel mouse - // access to all running applications if we stall in this thread. - // Debug breakpoints typically freeze our application, in which case we simply don't - // create this if a debugger is attached. + // access to all running applications if we stall in this thread. + // Debug breakpoints typically freeze our application, in which case we simply + // don't create this if a debugger is attached. if (!IsDebuggerPresent()) { gMouseHookThread = new std::thread([](){ gMouseHook = SetWindowsHookExW( @@ -246,7 +246,7 @@ Win32TouchHook::Win32TouchHook(void* nativeWindow) { GetModuleHandleW(NULL), 0 //<- Global thread id (low-level mouse is global only) ); - if (!gMouseHook) { + if (!gMouseHook) { LINFO("Could not setup mousehook!"); } @@ -278,12 +278,12 @@ Win32TouchHook::~Win32TouchHook() { } } -// Low-level mouse hook is "needed" if we want to stop mousecursor from moving -// when we get a touch-input on our window. -// A negative effect is that this function is for global threads, meaning our -// application will cause Windows to stall the mouse cursor when this -// function can't be scheduled (i.e. when debugger hits a breakpoint). -// This is not yet fail-proof...might be a race-condition on message pumping? +// Low-level mouse hook is "needed" if we want to stop mousecursor from moving when we get +// a touch-input on our window. +// A negative effect is that this function is for global threads, meaning our application +// will cause Windows to stall the mouse cursor when this function can't be scheduled +// (i.e. when debugger hits a breakpoint). This is not yet fail-proof...might be a +// race-condition on message pumping? // - Seems to move the cursor when we get two fingers as input.. // - If we ourselves would pump windows for events, we can handle this. LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) { diff --git a/modules/volume/envelope.cpp b/modules/volume/envelope.cpp index 21f5cfdad3..a3539dc83d 100644 --- a/modules/volume/envelope.cpp +++ b/modules/volume/envelope.cpp @@ -123,7 +123,8 @@ glm::vec4 Envelope::valueAtPosition(float pos) const { beforeIter->color * (std::fabs(pos - afterIter->position.first) / dist) + afterIter->color * (std::fabs(pos - beforeIter->position.first) / dist) ), - beforeIter->position.second * (std::fabs(pos - afterIter->position.first) / dist) + + beforeIter->position.second * + (std::fabs(pos - afterIter->position.first) / dist) + afterIter->position.second * (std::fabs(pos - beforeIter->position.first) / dist) }; diff --git a/src/engine/configuration_doc.inl b/src/engine/configuration_doc.inl index 0e92ca2427..8790848033 100644 --- a/src/engine/configuration_doc.inl +++ b/src/engine/configuration_doc.inl @@ -41,7 +41,7 @@ documentation::Documentation Configuration::Documentation = { }, { KeySgctConfigNameInitialized, - new StringAnnotationVerifier("The type of SGCT auto-gen function (if called)"), + new StringAnnotationVerifier("The type of SGCT autogen function (if called)"), Optional::Yes, "The SGCT configuration can be defined from an .xml file, or auto-generated " "by an sgct.config.* lua function. If a lua function is used to generate the " diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 156f8f7465..1a008a11ca 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -106,127 +107,129 @@ void create() { std::byte* currentPos = DataStorage.data(); fontManager = new (currentPos) ghoul::fontrendering::FontManager({ 1536, 1536, 1 }); - assert(fontManager); + ghoul_assert(fontManager, "No fontManager"); currentPos += sizeof(ghoul::fontrendering::FontManager); dashboard = new (currentPos) Dashboard; - assert(dashboard); + ghoul_assert(dashboard, "No dashboard"); currentPos += sizeof(Dashboard); deferredcasterManager = new (currentPos) DeferredcasterManager; - assert(deferredcasterManager); + ghoul_assert(deferredcasterManager, "No deferredcasterManager"); currentPos += sizeof(DeferredcasterManager); downloadManager = new (currentPos) DownloadManager; - assert(downloadManager); + ghoul_assert(downloadManager, "No downloadManager"); currentPos += sizeof(DownloadManager); luaConsole = new (currentPos) LuaConsole; - assert(luaConsole); + ghoul_assert(luaConsole, "No luaConsole"); currentPos += sizeof(LuaConsole); memoryManager = new (currentPos) MemoryManager; - assert(memoryManager); + ghoul_assert(memoryManager, "No memoryManager"); currentPos += sizeof(MemoryManager); missionManager = new (currentPos) MissionManager; - assert(missionManager); + ghoul_assert(missionManager, "No missionManager"); currentPos += sizeof(MissionManager); moduleEngine = new (currentPos) ModuleEngine; - assert(moduleEngine); + ghoul_assert(moduleEngine, "No moduleEngine"); currentPos += sizeof(ModuleEngine); openSpaceEngine = new (currentPos) OpenSpaceEngine; - assert(openSpaceEngine); + ghoul_assert(openSpaceEngine, "No openSpaceEngine"); currentPos += sizeof(OpenSpaceEngine); parallelPeer = new (currentPos) ParallelPeer; - assert(parallelPeer); + ghoul_assert(parallelPeer, "No parallelPeer"); currentPos += sizeof(ParallelPeer); raycasterManager = new (currentPos) RaycasterManager; - assert(raycasterManager); + ghoul_assert(raycasterManager, "No raycasterManager"); currentPos += sizeof(RaycasterManager); renderEngine = new (currentPos) RenderEngine; - assert(renderEngine); + ghoul_assert(renderEngine, "No renderEngine"); currentPos += sizeof(RenderEngine); - screenSpaceRenderables = new (currentPos) std::vector>; - assert(screenSpaceRenderables); + screenSpaceRenderables = + new (currentPos) std::vector>; + ghoul_assert(screenSpaceRenderables, "No screenSpaceRenderables"); currentPos += sizeof(std::vector>); syncEngine = new (currentPos) SyncEngine(4096); - assert(syncEngine); + ghoul_assert(syncEngine, "No syncEngine"); currentPos += sizeof(SyncEngine); timeManager = new (currentPos) TimeManager; - assert(timeManager); + ghoul_assert(timeManager, "No timeManager"); currentPos += sizeof(TimeManager); versionChecker = new (currentPos) VersionChecker; - assert(versionChecker); + ghoul_assert(versionChecker, "No versionChecker"); currentPos += sizeof(VersionChecker); virtualPropertyManager = new (currentPos) VirtualPropertyManager; - assert(virtualPropertyManager); + ghoul_assert(virtualPropertyManager, "No virtualPropertyManager"); currentPos += sizeof(VirtualPropertyManager); windowDelegate = new (currentPos) WindowDelegate; - assert(windowDelegate); + ghoul_assert(windowDelegate, "No windowDelegate"); currentPos += sizeof(WindowDelegate); configuration = new (currentPos) configuration::Configuration; - assert(configuration); + ghoul_assert(configuration, "No configuration"); currentPos += sizeof(configuration::Configuration); interactionMonitor = new (currentPos) interaction::InteractionMonitor; - assert(interactionMonitor); + ghoul_assert(interactionMonitor, "No interactionMonitor"); currentPos += sizeof(interaction::InteractionMonitor); joystickInputStates = new (currentPos) interaction::JoystickInputStates; - assert(joystickInputStates); + ghoul_assert(joystickInputStates, "No joystickInputStates"); currentPos += sizeof(interaction::JoystickInputStates); websocketInputStates = new (currentPos) interaction::WebsocketInputStates; - assert(websocketInputStates); + ghoul_assert(websocketInputStates, "No websocketInputStates"); currentPos += sizeof(interaction::WebsocketInputStates); keybindingManager = new (currentPos) interaction::KeybindingManager; - assert(keybindingManager); + ghoul_assert(keybindingManager, "No keybindingManager"); currentPos += sizeof(interaction::KeybindingManager); navigationHandler = new (currentPos) interaction::NavigationHandler; - assert(navigationHandler); + ghoul_assert(navigationHandler, "No navigationHandler"); currentPos += sizeof(interaction::NavigationHandler); sessionRecording = new (currentPos) interaction::SessionRecording(true); - assert(sessionRecording); + ghoul_assert(sessionRecording, "No sessionRecording"); currentPos += sizeof(interaction::SessionRecording); shortcutManager = new (currentPos) interaction::ShortcutManager; - assert(shortcutManager); + ghoul_assert(shortcutManager, "No shortcutManager"); currentPos += sizeof(interaction::ShortcutManager); rootPropertyOwner = new (currentPos) properties::PropertyOwner({ "" }); - assert(rootPropertyOwner); + ghoul_assert(rootPropertyOwner, "No rootPropertyOwner"); currentPos += sizeof(properties::PropertyOwner); - screenSpaceRootPropertyOwner = new (currentPos) properties::PropertyOwner({ "ScreenSpace" }); - assert(screenSpaceRootPropertyOwner); + screenSpaceRootPropertyOwner = + new (currentPos) properties::PropertyOwner({ "ScreenSpace" }); + ghoul_assert(screenSpaceRootPropertyOwner, "No screenSpaceRootPropertyOwner"); currentPos += sizeof(properties::PropertyOwner); scriptEngine = new (currentPos) scripting::ScriptEngine; - assert(scriptEngine); + ghoul_assert(scriptEngine, "No scriptEngine"); currentPos += sizeof(scripting::ScriptEngine); scriptScheduler = new (currentPos) scripting::ScriptScheduler; - assert(scriptScheduler); + ghoul_assert(scriptScheduler, "No scriptScheduler"); currentPos += sizeof(scripting::ScriptScheduler); profile = new (currentPos) Profile; - assert(profile); + ghoul_assert(profile, "No profile"); currentPos += sizeof(Profile); } diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index edb6de88f3..cedd6501b7 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1017,7 +1017,7 @@ void OpenSpaceEngine::writeSceneDocumentation() { &properties::PropertyOwner::generateJson, global::rootPropertyOwner ); - + std::future scene = std::async( &properties::PropertyOwner::generateJson, _scene.get() diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 47ab0f642f..06c54aecae 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -256,7 +256,7 @@ OrbitalNavigator::OrbitalNavigator() , _flightDestinationDistance(FlightDestinationDistInfo, 2e8f, 0.0f, 1e10f) , _flightDestinationFactor(FlightDestinationFactorInfo, 1E-4, 1E-6, 0.5) , _applyLinearFlight(ApplyLinearFlightInfo, false) - , _velocitySensitivity(VelocityZoomControlInfo, 3.5f, 0.001f, 20.f) + , _velocitySensitivity(VelocityZoomControlInfo, 3.5f, 0.001f, 20.f) , _mouseSensitivity(MouseSensitivityInfo, 15.f, 1.f, 50.f) , _joystickSensitivity(JoystickSensitivityInfo, 10.f, 1.0f, 50.f) , _websocketSensitivity(WebsocketSensitivityInfo, 5.f, 1.0f, 50.f) @@ -476,7 +476,9 @@ void OrbitalNavigator::updateCameraStateFromStates(double deltaTime) { // Fly towards the flight destination distance. When getting closer than // arrivalThreshold terminate the flight - if (std::fabs(distFromCameraToFocus - _flightDestinationDistance) > arrivalThreshold) { + if (std::fabs(distFromCameraToFocus - _flightDestinationDistance) > + arrivalThreshold) + { pose.position = moveCameraAlongVector( pose.position, distFromCameraToFocus, diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 1468bf2d85..4e5b9d8a93 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -976,7 +976,8 @@ bool SessionRecording::readSingleKeyframeCamera(datamessagestructures::CameraKey void SessionRecording::saveSingleKeyframeCamera(datamessagestructures::CameraKeyframe& kf, Timestamps& times, DataMode mode, - std::ofstream& file, unsigned char* buffer) + std::ofstream& file, + unsigned char* buffer) { if (mode == DataMode::Binary) { saveCameraKeyframeBinary(times, kf, buffer, file); @@ -1068,9 +1069,9 @@ bool SessionRecording::playbackTimeChange() { return success; } -bool SessionRecording::convertTimeChange(std::stringstream& inStream, DataMode mode, int lineNum, - std::string& inputLine, std::ofstream& outFile, - unsigned char* buffer) +bool SessionRecording::convertTimeChange(std::stringstream& inStream, DataMode mode, + int lineNum, std::string& inputLine, + std::ofstream& outFile, unsigned char* buffer) { Timestamps times; datamessagestructures::TimeKeyframe kf; @@ -1210,9 +1211,9 @@ bool SessionRecording::playbackScript() { return success; } -bool SessionRecording::convertScript(std::stringstream& inStream, DataMode mode, int lineNum, - std::string& inputLine, std::ofstream& outFile, - unsigned char* buffer) +bool SessionRecording::convertScript(std::stringstream& inStream, DataMode mode, + int lineNum, std::string& inputLine, + std::ofstream& outFile, unsigned char* buffer) { Timestamps times; datamessagestructures::ScriptMessage kf; @@ -1252,7 +1253,8 @@ bool SessionRecording::readSingleKeyframeScript(datamessagestructures::ScriptMes void SessionRecording::saveSingleKeyframeScript(datamessagestructures::ScriptMessage& kf, Timestamps& times, DataMode mode, - std::ofstream& file, unsigned char* buffer) + std::ofstream& file, + unsigned char* buffer) { if (mode == DataMode::Binary) { saveScriptKeyframeBinary(times, kf, buffer, file); @@ -1300,8 +1302,7 @@ bool SessionRecording::readScriptKeyframeBinary(Timestamps& times, bool SessionRecording::readScriptKeyframeAscii(Timestamps& times, datamessagestructures::ScriptMessage& kf, - std::string currentParsingLine, - int lineN) + std::string currentParsingLine, int lineN) { std::string entryType; std::istringstream iss(currentParsingLine); @@ -1366,8 +1367,7 @@ bool SessionRecording::addKeyframe(double timestamp, bool SessionRecording::addKeyframeToTimeline(RecordedType type, size_t indexIntoTypeKeyframes, - double timestamp, - int lineNum) + double timestamp, int lineNum) { try { _timeline.push_back({ diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 57281fc1c3..9132449df0 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -117,7 +117,8 @@ void ConvertRecFormatTask::convert() { ); return; } - else if (!SessionRecording::hasFileExtension(_outFilePath, expectedFileExtension_out)) { + else if (!SessionRecording::hasFileExtension(_outFilePath, expectedFileExtension_out)) + { _outFilePath += expectedFileExtension_out; } diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 4fedbd95d2..0b0be17ca6 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -121,9 +121,12 @@ namespace { buf.push_back(','); constexpr const char propertyOwnersText[] = "\"propertyOwners\": ["; - //constexpr const std::array propertyOwnersText = { "\"propertyOwners\": [" }; //json << "\"propertyOwners\": ["; - buf.insert(buf.end(), std::begin(propertyOwnersText), std::end(propertyOwnersText) - 1); + buf.insert( + buf.end(), + std::begin(propertyOwnersText), + std::end(propertyOwnersText) - 1 + ); auto propertyOwners = owner->propertySubOwners(); for (properties::PropertyOwner* o : propertyOwners) { createJson(o, buf); diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index 028fd63fc7..48aa47acfe 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -176,27 +176,27 @@ void FramebufferRenderer::initialize() { glGenTextures(1, &_gBuffers.positionTexture); glGenTextures(1, &_gBuffers.normalTexture); glGenFramebuffers(1, &_gBuffers.framebuffer); - + // PingPong Buffers // The first pingpong buffer shares the color texture with the renderbuffer: _pingPongBuffers.colorTexture[0] = _gBuffers.colorTexture; glGenTextures(1, &_pingPongBuffers.colorTexture[1]); glGenFramebuffers(1, &_pingPongBuffers.framebuffer); - + // Exit framebuffer glGenTextures(1, &_exitColorTexture); - glGenTextures(1, &_exitDepthTexture); + glGenTextures(1, &_exitDepthTexture); glGenFramebuffers(1, &_exitFramebuffer); // HDR / Filtering Buffers glGenFramebuffers(1, &_hdrBuffers.hdrFilteringFramebuffer); glGenTextures(1, &_hdrBuffers.hdrFilteringTexture); - + // FXAA Buffers glGenFramebuffers(1, &_fxaaBuffers.fxaaFramebuffer); glGenTextures(1, &_fxaaBuffers.fxaaTexture); - + // DownscaleVolumeRendering glGenFramebuffers(1, &_downscaleVolumeRendering.framebuffer); glGenTextures(1, &_downscaleVolumeRendering.colorTexture); @@ -318,7 +318,12 @@ void FramebufferRenderer::initialize() { 0 ); if (glbinding::Binding::ObjectLabel.isResolved()) { - glObjectLabel(GL_FRAMEBUFFER, _hdrBuffers.hdrFilteringFramebuffer, -1, "HDR filtering"); + glObjectLabel( + GL_FRAMEBUFFER, + _hdrBuffers.hdrFilteringFramebuffer, + -1, + "HDR filtering" + ); } status = glCheckFramebufferStatus(GL_FRAMEBUFFER); @@ -1134,8 +1139,8 @@ void FramebufferRenderer::updateFXAA() { void FramebufferRenderer::updateDownscaledVolume() { ZoneScoped - - _downscaledVolumeProgram = ghoul::opengl::ProgramObject::Build( + + _downscaledVolumeProgram = ghoul::opengl::ProgramObject::Build( "Write Downscaled Volume Program", absPath("${SHADERS}/framebuffer/mergeDownscaledVolume.vert"), absPath("${SHADERS}/framebuffer/mergeDownscaledVolume.frag") @@ -1225,7 +1230,7 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac performDeferredTasks(tasks.deferredcasterTasks); } - + glDrawBuffers(1, &ColorAttachmentArray[_pingPongIndex]); glEnablei(GL_BLEND, 0); @@ -1283,7 +1288,7 @@ void FramebufferRenderer::performRaycasterTasks(const std::vector for (const RaycasterTask& raycasterTask : tasks) { TracyGpuZone("Raycaster") - + VolumeRaycaster* raycaster = raycasterTask.raycaster; glBindFramebuffer(GL_FRAMEBUFFER, _exitFramebuffer); @@ -1418,7 +1423,7 @@ void FramebufferRenderer::performDeferredTasks( for (const DeferredcasterTask& deferredcasterTask : tasks) { TracyGpuZone("Deferredcaster") - + Deferredcaster* deferredcaster = deferredcasterTask.deferredcaster; ghoul::opengl::ProgramObject* deferredcastProgram = nullptr; diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index c784d1fda3..afc0022b02 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -1314,7 +1314,7 @@ void RenderEngine::renderCameraInformation() { global::navigationHandler->orbitalNavigator(); using FR = ghoul::fontrendering::FontRenderer; - + _cameraButtonLocations.rotation = { fontResolution().x - rotationBox.x - XSeparation, fontResolution().y - penPosY, diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index 06804dbf08..ee8d509ef9 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -306,7 +306,8 @@ bool AssetLoader::loadAsset(Asset* asset) { metaDict.getValue(MetaInformationURL, meta.url); metaDict.getValue(MetaInformationLicense, meta.license); if (metaDict.hasKey(MetaInformationIdentifiers)) { - ghoul::Dictionary iddict = metaDict.value(MetaInformationIdentifiers); + ghoul::Dictionary iddict = + metaDict.value(MetaInformationIdentifiers); for (int i = 1; i <= iddict.size(); ++i) { std::string key = std::to_string(i); std::string identifier = iddict.value(key); diff --git a/src/scene/lightsource.cpp b/src/scene/lightsource.cpp index be63cf1a30..221a3ac107 100644 --- a/src/scene/lightsource.cpp +++ b/src/scene/lightsource.cpp @@ -92,7 +92,7 @@ std::unique_ptr LightSource::createFromDictionary( auto factory = FactoryManager::ref().factory(); LightSource* source = factory->create(timeFrameType, dictionary); - + const std::string identifier = dictionary.value(KeyIdentifier); source->setIdentifier(identifier); diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index 5f8b389c45..b612cc8612 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -792,7 +792,7 @@ std::string Profile::convertToScene() const { ); if (camera.up.has_value()) { result += fmt::format( - "Up = {{ {}, {}, {} }}, ", + "Up = {{ {}, {}, {} }}, ", camera.up->x, camera.up->y, camera.up->z ); } @@ -809,7 +809,8 @@ std::string Profile::convertToScene() const { if (camera.altitude.has_value()) { return fmt::format( "openspace.globebrowsing.goToGeo([[{}]], {}, {}, {});\n", - camera.anchor, camera.latitude, camera.longitude, *camera.altitude + camera.anchor, + camera.latitude, camera.longitude, *camera.altitude ); } else { diff --git a/src/scene/profile_lua.inl b/src/scene/profile_lua.inl index a009f1d07d..d1ec908e7d 100644 --- a/src/scene/profile_lua.inl +++ b/src/scene/profile_lua.inl @@ -105,7 +105,7 @@ int saveSettingsToProfile(lua_State* L) { if (FileSys.fileExists(absFilename) && !overwrite) { return luaL_error( - L, + L, fmt::format( "Unable to save profile '{}'. File of same name already exists", absFilename diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index 3035a22884..1cec27f683 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -60,7 +60,9 @@ documentation::Documentation Scale::Documentation() { }; } -ghoul::mm_unique_ptr Scale::createFromDictionary(const ghoul::Dictionary& dictionary) { +ghoul::mm_unique_ptr Scale::createFromDictionary( + const ghoul::Dictionary& dictionary) +{ documentation::testSpecificationAndThrow(Documentation(), dictionary, "Scale"); std::string scaleType = dictionary.value(KeyType); diff --git a/src/scene/scenelicensewriter.cpp b/src/scene/scenelicensewriter.cpp index 42dd91f544..628e86d487 100644 --- a/src/scene/scenelicensewriter.cpp +++ b/src/scene/scenelicensewriter.cpp @@ -65,7 +65,7 @@ std::string SceneLicenseWriter::generateJson() const { int metaCount = 0; for (const Asset* asset : assets) { std::optional meta = asset->metaInformation(); - + if (!meta.has_value()) { continue; } diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index fe5cc9fadd..b5e0f47b81 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -108,7 +108,7 @@ int time_setDeltaTimeSteps(lua_State* L) { /** * \ingroup LuaScripts * setNextDeltaTimeStep(): -* Immediately set the simulation speed to the first delta time step in the list that is +* Immediately set the simulation speed to the first delta time step in the list that is * larger than the current choice of simulation speed, if any. */ int time_setNextDeltaTimeStep(lua_State* L) { @@ -147,12 +147,12 @@ int time_setPreviousDeltaTimeStep(lua_State* L) { */ int time_interpolateNextDeltaTimeStep(lua_State* L) { ghoul::lua::checkArgumentsAndThrow( - L, - { 0, 1 }, + L, + { 0, 1 }, "lua::time_interpolateNextDeltaTimeStep" ); - double interpolationDuration = + double interpolationDuration = global::timeManager->defaultDeltaTimeInterpolationDuration(); const int nArguments = lua_gettop(L); @@ -181,19 +181,19 @@ int time_interpolateNextDeltaTimeStep(lua_State* L) { /** * \ingroup LuaScripts * interpolatePreviousDeltaTimeStep([interpolationDuration]): -* Interpolate the simulation speed to the previous delta time step in the list. If an +* Interpolate the simulation speed to the previous delta time step in the list. If an * input value is given, the interpolation is done over the specified number of seconds. * If interpolationDuration is not provided, the interpolation time will be based on the * `defaultDeltaTimeInterpolationDuration` property of the TimeManager. */ int time_interpolatePreviousDeltaTimeStep(lua_State* L) { ghoul::lua::checkArgumentsAndThrow( - L, - { 0, 1 }, + L, + { 0, 1 }, "lua::time_interpolatePreviousDeltaTimeStep" ); - double interpolationDuration = + double interpolationDuration = global::timeManager->defaultDeltaTimeInterpolationDuration(); const int nArguments = lua_gettop(L); From 876493c6dd8af8ef6d678ab044a6897b1d43a30b Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Mon, 30 Nov 2020 21:38:54 -0700 Subject: [PATCH 040/147] Comment-only changes with instructions for bumping SessionRecording version --- .../openspace/interaction/sessionrecording.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 0ab16c63d2..4e2ce1faef 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -654,6 +654,28 @@ protected: const int _maximumRecursionDepth = 50; }; +// Instructions for bumping the file format version with new changes: +// +// 1. Create a new subclass with the current version # in its name, such as: +// SessionRecording_legacy_####, which inherits from SessionRecording +// 2. Override any method that changes in the new version. This includes both +// methods in SessionRecording class and structs in +// openspace::datamessagestructure that do data read/writes. Make the modified +// method/struct virtual, and override it in the new legacy subclass. This +// override will contain the code as it is before the new changes. This will +// need to be done in every legacy subclass/struct that exists, but only if that +// subclass does NOT already contain an override of that method/struct. +// 3. Override FileHeaderVersion with the version # of the new subclass (which is +// the version being replaced by the new changes). +// 4. Override TargetConvertVersion with the version # with the new changes. This +// is now the version that this legacy subclass converts up to. +// 5. Override getLegacyConversionResult method so that it creates an instance of +// the new version subclass. This is how the current version looks back to the +// legacy version that preceded it. +// 6. The convert method for frame types that changed will need to be changed +// (for example SessionRecording_legacy_0085::convertScript uses its own +// override of script keyframe for the conversion functionality). + class SessionRecording_legacy_0085 : public SessionRecording { public: SessionRecording_legacy_0085() : SessionRecording() {} From f4831b0c03747e5e8d759a2d0497d4c1e3f6899b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 2 Dec 2020 21:11:46 +0100 Subject: [PATCH 041/147] Feature/jenkins (#1419) * Add ability to toggle operating system builds on Jenkins via environment variables * Update ghoul repository * Update SGCT repository * Reduce chattiness of the Jenkins log file * Build native and ninja builds in parallel * Disable ninja build on Windows as it fails with the OpenSpace Helper --- Jenkinsfile | 238 +++++++++++------- apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- .../base/dashboard/dashboarditemframerate.cpp | 15 -- modules/base/rendering/renderabletrail.cpp | 2 +- modules/webgui/cmake/nodejs_support.cmake | 2 +- 6 files changed, 157 insertions(+), 104 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 53b9c5ab90..cee2734009 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,100 +92,168 @@ parallel tools: { ) recordIssues( id: 'tools-cppcheck', - tool: cppCheck() + tool: cppCheck(pattern: 'build/cppcheck.xml') ) } cleanWs() } // node('tools') }, -linux_gcc: { - node('linux' && 'gcc') { - stage('linux-gcc/scm') { - deleteDir(); - gitHelper.checkoutGit(url, branch); - } - stage('linux-gcc/build(make)') { - def cmakeCompileOptions = moduleCMakeFlags(); - cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release'; - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-make'); - compileHelper.recordCompileIssues(compileHelper.Gcc()); - } - stage('linux-gcc/build(ninja)') { - def cmakeCompileOptions = moduleCMakeFlags(); - cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release'; - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); - } - stage('linux-gcc/test') { - // testHelper.runUnitTests('build/OpenSpaceTest'); - } - cleanWs() - } // node('linux') -}, -linux_clang: { - node('linux' && 'clang') { - stage('linux-clang/scm') { - deleteDir() - gitHelper.checkoutGit(url, branch); - } - stage('linux-clang/build(make)') { - def cmakeCompileOptions = moduleCMakeFlags() - cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release' - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-make'); - compileHelper.recordCompileIssues(compileHelper.Clang()); - } - stage('linux-clang/build(ninja)') { - def cmakeCompileOptions = moduleCMakeFlags() - cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release' - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); - } - stage('linux-clang/test') { - // testHelper.runUnitTests('build/OpenSpaceTest'); - } - cleanWs() - } // node('linux') -}, -windows: { - node('windows') { - ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { - stage('windows/scm') { +linux_gcc_make: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'gcc') { + stage('linux-gcc-make/scm') { deleteDir(); gitHelper.checkoutGit(url, branch); } - stage('windows/build(msvc)') { - compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-msvc'); - compileHelper.recordCompileIssues(compileHelper.VisualStudio()); + stage('linux-gcc-make/build') { + def cmakeCompileOptions = moduleCMakeFlags(); + cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release'; + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-make'); + compileHelper.recordCompileIssues(compileHelper.Gcc()); } - stage('windows/build(ninja)') { - compileHelper.build(compileHelper.Ninja(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-ninja'); + stage('linux-gcc-make/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); } - stage('windows/test') { - // Currently, the unit tests are failing on Windows - // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') - } - } // node('windows') - cleanWs() - } // node('windows') + cleanWs() + } // node('linux') + } }, -macos: { - node('macos') { - stage('macos/scm') { - deleteDir(); - gitHelper.checkoutGit(url, branch); - } - stage('macos/build(make)') { - compileHelper.build(compileHelper.Make(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-make'); - } - stage('macos/build(xcode)') { - compileHelper.build(compileHelper.Xcode(), compileHelper.Xcode(), moduleCMakeFlags(), '', 'build-xcode'); - } - stage('macos/test') { - // Currently, the unit tests are crashing on OS X - // testHelper.runUnitTests('build/Debug/OpenSpaceTest') - } - cleanWs() - } // node('macos') +linux_gcc_ninja: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'gcc') { + stage('linux-gcc-ninja/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('linux-gcc-ninja/build') { + def cmakeCompileOptions = moduleCMakeFlags(); + cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release'; + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); + } + stage('linux-gcc-ninja/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + } + cleanWs() + } // node('linux') + } +}, +linux_clang_make: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'clang') { + stage('linux-clang-make/scm') { + deleteDir() + gitHelper.checkoutGit(url, branch); + } + stage('linux-clang-make/build') { + def cmakeCompileOptions = moduleCMakeFlags() + cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release' + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-make'); + compileHelper.recordCompileIssues(compileHelper.Clang()); + } + stage('linux-clang-make/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + } + cleanWs() + } // node('linux') + } +}, +linux_clang_ninja: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'clang') { + stage('linux-clang-ninja/scm') { + deleteDir() + gitHelper.checkoutGit(url, branch); + } + stage('linux-clang-ninja/build') { + def cmakeCompileOptions = moduleCMakeFlags() + cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release' + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); + } + stage('linux-clang-ninja/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + } + cleanWs() + } // node('linux') + } +}, +windows_msvc: { + if (env.USE_BUILD_OS_WINDOWS == 'true') { + node('windows') { + ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { + stage('windows-msvc/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('windows-msvc/build') { + compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-msvc'); + compileHelper.recordCompileIssues(compileHelper.VisualStudio()); + } + stage('windows-msvc/test') { + // Currently, the unit tests are failing on Windows + // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') + } + } // node('windows') + cleanWs() + } // node('windows') + } +}, +// windows_ninja: { +// if (env.USE_BUILD_OS_WINDOWS == 'true') { +// node('windows') { +// ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { +// stage('windows-ninja/scm') { +// deleteDir(); +// gitHelper.checkoutGit(url, branch); +// } +// stage('windows-ninja/build') { +// compileHelper.build(compileHelper.Ninja(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-ninja'); +// } +// stage('windows-ninja/test') { +// // Currently, the unit tests are failing on Windows +// // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') +// } +// } // node('windows') +// cleanWs() +// } // node('windows') +// } +// }, +macos_make: { + if (env.USE_BUILD_OS_MACOS == 'true') { + node('macos') { + stage('macos-make/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('macos-make/build') { + compileHelper.build(compileHelper.Make(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-make'); + } + stage('macos-make/test') { + // Currently, the unit tests are crashing on OS X + // testHelper.runUnitTests('build/Debug/OpenSpaceTest') + } + cleanWs() + } // node('macos') + } +}, +macos_xcode: { + if (env.USE_BUILD_OS_MACOS == 'true') { + node('macos') { + stage('macos-xcode/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('macos-xcode/build') { + compileHelper.build(compileHelper.Xcode(), compileHelper.Xcode(), moduleCMakeFlags(), '', 'build-xcode'); + } + stage('macos-xcode/test') { + // Currently, the unit tests are crashing on OS X + // testHelper.runUnitTests('build/Debug/OpenSpaceTest') + } + cleanWs() + } // node('macos') + } } diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index dc7d75681b..e1a110f866 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit dc7d75681b1fe5259c7adf7502d99679a01270a8 +Subproject commit e1a110f866afef2b2539100bf02893982b9eb304 diff --git a/ext/ghoul b/ext/ghoul index d08973205c..37045760b0 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit d08973205c88a2c759d86a679db0d5536df7ee71 +Subproject commit 37045760b03bc0d8cac8e52c22c0d10a791ec16f diff --git a/modules/base/dashboard/dashboarditemframerate.cpp b/modules/base/dashboard/dashboarditemframerate.cpp index 27e583f6d8..8453ce627a 100644 --- a/modules/base/dashboard/dashboarditemframerate.cpp +++ b/modules/base/dashboard/dashboarditemframerate.cpp @@ -149,21 +149,6 @@ namespace { throw ghoul::MissingCaseException(); } } - - [[ nodiscard ]] int nLines( - openspace::DashboardItemFramerate::FrametimeType frametimeType) - { - using FrametimeType = openspace::DashboardItemFramerate::FrametimeType; - switch (frametimeType) { - case FrametimeType::DtTimeAvg: return 1; - case FrametimeType::DtTimeExtremes: return 2; - case FrametimeType::DtStandardDeviation: return 1; - case FrametimeType::DtCoefficientOfVariation: return 1; - case FrametimeType::FPS: return 1; - case FrametimeType::FPSAvg: return 1; - default: throw ghoul::MissingCaseException(); - } - } } // namespace namespace openspace { diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index c46038e569..9484b0dd24 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -426,7 +426,7 @@ void RenderableTrail::internalRender(bool renderLines, bool renderPoints, } } } -#pragma optimize("", off) + void RenderableTrail::render(const RenderData& data, RendererTasks&) { ZoneScoped diff --git a/modules/webgui/cmake/nodejs_support.cmake b/modules/webgui/cmake/nodejs_support.cmake index 1296a709eb..c892251c2b 100644 --- a/modules/webgui/cmake/nodejs_support.cmake +++ b/modules/webgui/cmake/nodejs_support.cmake @@ -79,7 +79,7 @@ function(DownloadNodeJs version download_dir) # Linux uses tar.xz message(STATUS "Extracting NodeJs: ${NODEJS_DOWNLOAD_PATH} in ${NODEJS_DOWNLOAD_DIR}") execute_process( - COMMAND tar xvf ${NODEJS_DOWNLOAD_PATH} + COMMAND tar xf ${NODEJS_DOWNLOAD_PATH} WORKING_DIRECTORY ${NODEJS_DOWNLOAD_DIR} ) endif() From 9a683bb29af86ebc2cf6b5f4c91b9c0590627de0 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Sat, 5 Dec 2020 23:22:24 +0100 Subject: [PATCH 042/147] Rename ScreenSpaceRenderable alpha to opacity (closes #1416) (#1421) --- .../rendering/screenspacerenderable.h | 2 +- src/rendering/screenspacerenderable.cpp | 23 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index 24d887e1a7..7270c91e10 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -104,7 +104,7 @@ protected: properties::Vec3Property _localRotation; properties::FloatProperty _scale; - properties::FloatProperty _alpha; + properties::FloatProperty _opacity; properties::TriggerProperty _delete; glm::ivec2 _objectSize = glm::ivec2(0); diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 8b0f561038..c354a81eb4 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -102,10 +102,10 @@ namespace { }; - constexpr openspace::properties::Property::PropertyInfo AlphaInfo = { - "Alpha", - "Transparency", - "This value determines the transparency of the screen space plane. If this value " + constexpr openspace::properties::Property::PropertyInfo OpacityInfo = { + "Opacity", + "Opacity", + "This value determines the opacity of the screen space plane. If this value " "is 1, the plane is completely opaque, if this value is 0, the plane is " "completely transparent." }; @@ -280,10 +280,10 @@ documentation::Documentation ScreenSpaceRenderable::Documentation() { ScaleInfo.description }, { - AlphaInfo.identifier, + OpacityInfo.identifier, new DoubleVerifier, Optional::Yes, - AlphaInfo.description + OpacityInfo.description }, { KeyTag, @@ -362,7 +362,7 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary glm::vec3(glm::pi()) ) , _scale(ScaleInfo, 0.25f, 0.f, 2.f) - , _alpha(AlphaInfo, 1.f, 0.f, 1.f) + , _opacity(OpacityInfo, 1.f, 0.f, 1.f) , _delete(DeleteInfo) { if (dictionary.hasKey(KeyIdentifier)) { @@ -373,7 +373,6 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary setGuiName(dictionary.value(KeyName)); } - addProperty(_enabled); addProperty(_useRadiusAzimuthElevation); addProperty(_usePerspectiveProjection); @@ -392,7 +391,7 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary }); addProperty(_scale); - addProperty(_alpha); + addProperty(_opacity); addProperty(_localRotation); if (dictionary.hasKey(EnabledInfo.identifier)) { @@ -424,8 +423,8 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary _scale = static_cast(dictionary.value(ScaleInfo.identifier)); } - if (dictionary.hasKey(AlphaInfo.identifier)) { - _alpha = static_cast(dictionary.value(AlphaInfo.identifier)); + if (dictionary.hasKey(OpacityInfo.identifier)) { + _opacity = static_cast(dictionary.value(OpacityInfo.identifier)); } if (dictionary.hasKey(UsePerspectiveProjectionInfo.identifier)) { @@ -613,7 +612,7 @@ void ScreenSpaceRenderable::draw(glm::mat4 modelTransform) { _shader->activate(); - _shader->setUniform(_uniformCache.alpha, _alpha); + _shader->setUniform(_uniformCache.alpha, _opacity); _shader->setUniform(_uniformCache.modelTransform, modelTransform); _shader->setUniform( From 3d1bd9122e71bccc465d0836b45ded9dd9c5cf61 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Sat, 5 Dec 2020 17:23:25 -0500 Subject: [PATCH 043/147] Added checking to avoiding compile the globebrowsing shaders with accurate normals support when no height information is available. (#1422) --- modules/globebrowsing/src/renderableglobe.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index d3c47d8bb2..d4c47cf3e1 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -1695,9 +1695,13 @@ void RenderableGlobe::recompileShaders() { std::vector>& pairs = preprocessingData.keyValuePairs; - + + const bool hasHeightLayer = !_layerManager.layerGroup( + layergroupid::HeightLayers + ).activeLayers().empty(); + pairs.emplace_back("useAccurateNormals", - std::to_string(_generalProperties.useAccurateNormals) + std::to_string(_generalProperties.useAccurateNormals && hasHeightLayer) ); pairs.emplace_back( "performShading", From 51470c0a0d29327f117d3afe7d759161baf669b1 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 7 Dec 2020 23:41:20 +0100 Subject: [PATCH 044/147] Issue/1355 (#1424) * Move glfw init after macOS window is ready * MacOS fixes for BigSur * Compile fixs * Rename hirise.asset since linux filenames are case-sensitive * Modified globals DataStorage method to make Linux and Mac happy * Switched to unsecure http URLs for satellites due to httprequest problem * Keep the QApplication around on Mac because of some reason otherwise the keyboard handler crashes * Add comment explaining the madness * Apply same techniques to the globalscallback file Co-authored-by: Micah Acinapura Co-authored-by: Gene Payne --- apps/OpenSpace/main.cpp | 29 +- .../planets/earth/satellites/misc/iss.asset | 2 +- .../earth/satellites/weather/aqua.asset | 2 +- .../earth/satellites/weather/snpp.asset | 2 +- .../earth/satellites/weather/terra.asset | 2 +- .../{HiRISE.asset => hirise.asset} | 0 include/openspace/engine/globalscallbacks.h | 77 +--- modules/cefwebgui/cefwebguimodule.cpp | 6 +- modules/cefwebgui/src/guikeyboardhandler.cpp | 2 +- modules/globebrowsing/globebrowsingmodule.cpp | 8 +- modules/imgui/imguimodule.cpp | 26 +- modules/iswa/iswamodule.cpp | 2 +- modules/server/servermodule.cpp | 2 +- modules/touch/touchmodule.cpp | 14 +- modules/webbrowser/CMakeLists.txt | 2 +- .../webbrowser/cmake/webbrowser_helpers.cmake | 3 +- modules/webbrowser/src/eventhandler.cpp | 16 +- modules/webbrowser/webbrowsermodule.cpp | 2 +- src/engine/globals.cpp | 267 ++++++++++++- src/engine/globalscallbacks.cpp | 374 +++++++++++++----- src/engine/openspaceengine.cpp | 34 +- src/interaction/touchbar.mm | 14 +- 22 files changed, 667 insertions(+), 219 deletions(-) rename data/assets/scene/solarsystem/planets/mars/layers/colorlayers/{HiRISE.asset => hirise.asset} (100%) diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index d074fc737a..d4628cd9c6 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -224,6 +224,8 @@ void mainInitFunc(GLFWwindow*) { global::openSpaceEngine->initialize(); LDEBUG("Initializing OpenSpace Engine finished"); +#ifndef __APPLE__ + // Apparently: "Cocoa: Regular windows do not have icons on macOS" { std::string path = absPath("${DATA}/openspace-icon.png"); int x; @@ -242,6 +244,7 @@ void mainInitFunc(GLFWwindow*) { stbi_image_free(icons[0].pixels); } +#endif // __APPLE__ currentWindow = Engine::instance().windows().front().get(); currentViewport = currentWindow->viewports().front().get(); @@ -1012,7 +1015,6 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC } int main(int argc, char** argv) { - glfwInit(); #ifdef WIN32 SetUnhandledExceptionFilter(generateMiniDump); @@ -1169,19 +1171,38 @@ int main(int argc, char** argv) { sgctFunctionName ); + // (abock, 2020-12-07) For some reason on Apple the keyboard handler in CEF will call + // the Qt one even if the QApplication was destroyed, leading to invalid memory + // access. The only way we could fix this for the release was to keep the + // QApplication object around until the end of the program. Even though the Qt + // keyboard handler gets called, it doesn't do anything so everything still works. +#ifdef __APPLE__ + int qac = 0; + QApplication app(qac, nullptr); +#endif // __APPLE__ + bool skipLauncher = (hasProfile && hasSGCTConfig) || global::configuration->bypassLauncher; if (!skipLauncher) { +#ifndef __APPLE__ int qac = 0; QApplication app(qac, nullptr); - LauncherWindow win(!hasProfile, - *global::configuration, !hasSGCTConfig, windowCfgPreset, nullptr); +#endif // __APPLE__ + + LauncherWindow win( + !hasProfile, + *global::configuration, + !hasSGCTConfig, + windowCfgPreset, + nullptr + ); win.show(); app.exec(); if (!win.wasLaunchSelected()) { exit(EXIT_SUCCESS); } + glfwInit(); global::configuration->profile = win.selectedProfile(); windowConfiguration = selectedSgctProfileFromLauncher( @@ -1191,6 +1212,8 @@ int main(int argc, char** argv) { labelFromCfgFile, xmlExt ); + } else { + glfwInit(); } if (global::configuration->profile.empty()) { LFATAL("Cannot launch with an empty profile"); diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset index 635c56d9f0..2a91bf1261 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=25544" +local url = "http://celestrak.com/satcat/tle.php?CATNR=25544" local identifier = "ISS" local filename = "ISS.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset index 9d2587e1fd..9ebe43df49 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=27424" +local url = "http://celestrak.com/satcat/tle.php?CATNR=27424" local identifier = "Aqua" local filename = "Aqua.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset index ff812053a1..2b251d229d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=37849" +local url = "http://celestrak.com/satcat/tle.php?CATNR=37849" local identifier = "SNPP" local filename = "SNPP.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset index 0cdae52344..3d064550ee 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=25994" +local url = "http://celestrak.com/satcat/tle.php?CATNR=25994" local identifier = "Terra" local filename = "Terra.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/HiRISE.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/hirise.asset similarity index 100% rename from data/assets/scene/solarsystem/planets/mars/layers/colorlayers/HiRISE.asset rename to data/assets/scene/solarsystem/planets/mars/layers/colorlayers/hirise.asset diff --git a/include/openspace/engine/globalscallbacks.h b/include/openspace/engine/globalscallbacks.h index 9131294139..cc06979e97 100644 --- a/include/openspace/engine/globalscallbacks.h +++ b/include/openspace/engine/globalscallbacks.h @@ -31,62 +31,26 @@ #include #include -namespace openspace::global { +namespace openspace::global::callback { -namespace detail { - -std::vector>& gInitialize(); -std::vector>& gDeinitialize(); - -std::vector>& gInitializeGL(); -std::vector>& gDeinitializeGL(); - -std::vector>& gPreSync(); -std::vector>& gPostSyncPreDraw(); -std::vector>& gRender(); -std::vector>& gDraw2D(); -std::vector>& gPostDraw(); - -std::vector>& gKeyboard(); -std::vector>& gCharacter(); - -std::vector>& gMouseButton(); -std::vector>& gMousePosition(); -std::vector>& gMouseScrollWheel(); - -std::vector>& gTouchDetected(); -std::vector>& gTouchUpdated(); -std::vector>& gTouchExit(); - -} // namespace detail - -namespace callback { - -static std::vector>& initialize = detail::gInitialize(); -static std::vector>& deinitialize = detail::gDeinitialize(); -static std::vector>& initializeGL = detail::gInitializeGL(); -static std::vector>& deinitializeGL = detail::gDeinitializeGL(); -static std::vector>& preSync = detail::gPreSync(); -static std::vector>& postSyncPreDraw = detail::gPostSyncPreDraw(); -static std::vector>& render = detail::gRender(); -static std::vector>& draw2D = detail::gDraw2D(); -static std::vector>& postDraw = detail::gPostDraw(); -static std::vector>& keyboard = - detail::gKeyboard(); -static std::vector>& character = - detail::gCharacter(); -static std::vector>& - mouseButton = detail::gMouseButton(); -static std::vector>& mousePosition = - detail::gMousePosition(); -static std::vector>& mouseScrollWheel = - detail::gMouseScrollWheel(); -static std::vector>& touchDetected = - detail::gTouchDetected(); -static std::vector>& touchUpdated = - detail::gTouchUpdated(); -static std::vector>& touchExit = - detail::gTouchExit(); +inline std::vector>* initialize; +inline std::vector>* deinitialize; +inline std::vector>* initializeGL; +inline std::vector>* deinitializeGL; +inline std::vector>* preSync; +inline std::vector>* postSyncPreDraw; +inline std::vector>* render; +inline std::vector>* draw2D; +inline std::vector>* postDraw; +inline std::vector>* keyboard; +inline std::vector>* character; +inline std::vector>* + mouseButton; +inline std::vector>* mousePosition; +inline std::vector>* mouseScrollWheel; +inline std::vector>* touchDetected; +inline std::vector>* touchUpdated; +inline std::vector>* touchExit; /** * If the framerate becomes slow, Chromium Embedded Framework (used in Web Browser Module) @@ -99,7 +63,8 @@ static std::vector>& touchExit = */ extern void (*webBrowserPerformanceHotfix)(); -} // namespace callback +void create(); +void destroy(); } // namespace openspace::global diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index ceecc0e650..71b0967697 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -206,11 +206,11 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) _visible = configuration.hasValue(VisibleInfo.identifier) && configuration.value(VisibleInfo.identifier); - global::callback::initializeGL.emplace_back([this]() { + global::callback::initializeGL->emplace_back([this]() { startOrStopGui(); }); - global::callback::draw2D.emplace_back([this](){ + global::callback::draw2D->emplace_back([this](){ ZoneScopedN("CefWebGuiModule") const bool isGuiWindow = @@ -233,7 +233,7 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) } }); - global::callback::deinitializeGL.emplace_back([this]() { + global::callback::deinitializeGL->emplace_back([this]() { ZoneScopedN("CefWebGuiModule") if (_endpointCallback != -1) { diff --git a/modules/cefwebgui/src/guikeyboardhandler.cpp b/modules/cefwebgui/src/guikeyboardhandler.cpp index ef534d0095..3711fa0629 100644 --- a/modules/cefwebgui/src/guikeyboardhandler.cpp +++ b/modules/cefwebgui/src/guikeyboardhandler.cpp @@ -31,7 +31,7 @@ namespace openspace { GUIKeyboardHandler::GUIKeyboardHandler() { _keyConsumed = false; - global::callback::keyboard.emplace_back( + global::callback::keyboard->emplace_back( [&](Key, KeyModifier, KeyAction) -> bool { const bool previous = _keyConsumed; _keyConsumed = false; diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index e7e36ddaa1..6a36997952 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -216,7 +216,7 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { // Initialize - global::callback::initializeGL.emplace_back([&]() { + global::callback::initializeGL->emplace_back([&]() { ZoneScopedN("GlobeBrowsingModule") _tileCache = std::make_unique(_tileCacheSizeMB); @@ -232,7 +232,7 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { addPropertySubOwner(GdalWrapper::ref()); }); - global::callback::deinitializeGL.emplace_back([]() { + global::callback::deinitializeGL->emplace_back([]() { ZoneScopedN("GlobeBrowsingModule") tileprovider::deinitializeDefaultTile(); @@ -240,14 +240,14 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { // Render - global::callback::render.emplace_back([&]() { + global::callback::render->emplace_back([&]() { ZoneScopedN("GlobeBrowsingModule") _tileCache->update(); }); // Deinitialize - global::callback::deinitialize.emplace_back([&]() { + global::callback::deinitialize->emplace_back([&]() { ZoneScopedN("GlobeBrowsingModule") GdalWrapper::destroy(); diff --git a/modules/imgui/imguimodule.cpp b/modules/imgui/imguimodule.cpp index 50bc8dbe78..02ce4f908e 100644 --- a/modules/imgui/imguimodule.cpp +++ b/modules/imgui/imguimodule.cpp @@ -44,7 +44,7 @@ namespace openspace { ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { addPropertySubOwner(gui); - global::callback::initialize.emplace_back([&]() { + global::callback::initialize->emplace_back([&]() { LDEBUGC("ImGUIModule", "Initializing GUI"); gui.initialize(); @@ -130,28 +130,28 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { ); }); - global::callback::deinitialize.emplace_back([&]() { + global::callback::deinitialize->emplace_back([&]() { ZoneScopedN("ImGUI") LDEBUGC("ImGui", "Deinitialize GUI"); gui.deinitialize(); }); - global::callback::initializeGL.emplace_back([&]() { + global::callback::initializeGL->emplace_back([&]() { ZoneScopedN("ImGUI") LDEBUGC("ImGui", "Initializing GUI OpenGL"); gui.initializeGL(); }); - global::callback::deinitializeGL.emplace_back([&]() { + global::callback::deinitializeGL->emplace_back([&]() { ZoneScopedN("ImGUI") LDEBUGC("ImGui", "Deinitialize GUI OpenGL"); gui.deinitializeGL(); }); - global::callback::draw2D.emplace_back([&]() { + global::callback::draw2D->emplace_back([&]() { ZoneScopedN("ImGUI") WindowDelegate& delegate = *global::windowDelegate; @@ -179,7 +179,7 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { } }); - global::callback::keyboard.emplace_back( + global::callback::keyboard->emplace_back( [&](Key key, KeyModifier mod, KeyAction action) -> bool { ZoneScopedN("ImGUI") @@ -193,7 +193,7 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { } ); - global::callback::character.emplace_back( + global::callback::character->emplace_back( [&](unsigned int codepoint, KeyModifier modifier) -> bool { ZoneScopedN("ImGUI") @@ -207,13 +207,13 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { } ); - global::callback::mousePosition.emplace_back( + global::callback::mousePosition->emplace_back( [&](double x, double y) { _mousePosition = glm::vec2(static_cast(x), static_cast(y)); } ); - global::callback::mouseButton.emplace_back( + global::callback::mouseButton->emplace_back( [&](MouseButton button, MouseAction action, KeyModifier) -> bool { ZoneScopedN("ImGUI") @@ -234,7 +234,7 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { } ); - global::callback::mouseScrollWheel.emplace_back( + global::callback::mouseScrollWheel->emplace_back( [&](double, double posY) -> bool { ZoneScopedN("ImGUI") @@ -248,19 +248,19 @@ ImGUIModule::ImGUIModule() : OpenSpaceModule(Name) { } ); - global::callback::touchDetected.emplace_back( + global::callback::touchDetected->emplace_back( [&](TouchInput input) -> bool { return gui.touchDetectedCallback(input); } ); - global::callback::touchUpdated.emplace_back( + global::callback::touchUpdated->emplace_back( [&](TouchInput input) -> bool { return gui.touchUpdatedCallback(input); } ); - global::callback::touchExit.emplace_back( + global::callback::touchExit->emplace_back( [&](TouchInput input) { gui.touchExitCallback(input); } diff --git a/modules/iswa/iswamodule.cpp b/modules/iswa/iswamodule.cpp index fa2869a174..59b222fb71 100644 --- a/modules/iswa/iswamodule.cpp +++ b/modules/iswa/iswamodule.cpp @@ -43,7 +43,7 @@ namespace openspace { IswaModule::IswaModule() : OpenSpaceModule(Name) { - global::callback::initialize.push_back([]() { + global::callback::initialize->push_back([]() { ZoneScopedN("IswaModule") IswaManager::initialize(); }); diff --git a/modules/server/servermodule.cpp b/modules/server/servermodule.cpp index 84910594da..a7a3df6ae3 100644 --- a/modules/server/servermodule.cpp +++ b/modules/server/servermodule.cpp @@ -73,7 +73,7 @@ ServerInterface* ServerModule::serverInterfaceByIdentifier(const std::string& id } void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) { - global::callback::preSync.emplace_back([this]() { + global::callback::preSync->emplace_back([this]() { ZoneScopedN("ServerModule") preSync(); diff --git a/modules/touch/touchmodule.cpp b/modules/touch/touchmodule.cpp index dc80b46fac..a5ace0268b 100644 --- a/modules/touch/touchmodule.cpp +++ b/modules/touch/touchmodule.cpp @@ -191,7 +191,7 @@ TouchModule::~TouchModule() { void TouchModule::internalInitialize(const ghoul::Dictionary& /*dictionary*/){ _ear.reset(new TuioEar()); - global::callback::initializeGL.push_back([&]() { + global::callback::initializeGL->push_back([&]() { LDEBUGC("TouchModule", "Initializing TouchMarker OpenGL"); _markers.initialize(); #ifdef WIN32 @@ -204,33 +204,33 @@ void TouchModule::internalInitialize(const ghoul::Dictionary& /*dictionary*/){ #endif }); - global::callback::deinitializeGL.push_back([&]() { + global::callback::deinitializeGL->push_back([&]() { LDEBUGC("TouchMarker", "Deinitialize TouchMarker OpenGL"); _markers.deinitialize(); }); // These are handled in UI thread, which (as of 20th dec 2019) is in main/rendering // thread so we don't need a mutex here - global::callback::touchDetected.push_back( + global::callback::touchDetected->push_back( [this](TouchInput i) { addTouchInput(i); return true; } ); - global::callback::touchUpdated.push_back( + global::callback::touchUpdated->push_back( [this](TouchInput i) { updateOrAddTouchInput(i); return true; } ); - global::callback::touchExit.push_back( + global::callback::touchExit->push_back( std::bind(&TouchModule::removeTouchInput, this, std::placeholders::_1) ); - global::callback::preSync.push_back([&]() { + global::callback::preSync->push_back([&]() { _touch.setCamera(global::navigationHandler->camera()); _touch.setFocusNode(global::navigationHandler->orbitalNavigator().anchorNode()); @@ -251,7 +251,7 @@ void TouchModule::internalInitialize(const ghoul::Dictionary& /*dictionary*/){ clearInputs(); }); - global::callback::render.push_back([&]() { + global::callback::render->push_back([&]() { _markers.render(_touchPoints); }); } diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index c914689fda..55f88c9be4 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -156,7 +156,7 @@ if (OS_MACOSX) # Helper executable target. add_executable(${CEF_HELPER_TARGET} MACOSX_BUNDLE ${WEBBROWSER_HELPER_SOURCES}) SET_EXECUTABLE_TARGET_PROPERTIES(${CEF_HELPER_TARGET}) - add_cef_logical_target("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}") + # add_cef_logical_target("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}") add_dependencies(${CEF_HELPER_TARGET} libcef_dll_wrapper) target_link_libraries(${CEF_HELPER_TARGET} libcef_dll_wrapper ${CEF_STANDARD_LIBS}) set_target_properties(${CEF_HELPER_TARGET} PROPERTIES diff --git a/modules/webbrowser/cmake/webbrowser_helpers.cmake b/modules/webbrowser/cmake/webbrowser_helpers.cmake index ac082325ba..c9b6242ba8 100644 --- a/modules/webbrowser/cmake/webbrowser_helpers.cmake +++ b/modules/webbrowser/cmake/webbrowser_helpers.cmake @@ -77,7 +77,8 @@ function(run_cef_macosx_config CEF_ROOT module_path) add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}") - target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) + # target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) + target_link_libraries(${CEF_TARGET} PUBLIC libcef_dll_wrapper ${CEF_STANDARD_LIBS}) set_target_properties(${CEF_TARGET} PROPERTIES RESOURCE "${WEBBROWSER_RESOURCES_SRCS}" MACOSX_BUNDLE_INFO_PLIST ${module_path}/mac/Info.plist diff --git a/modules/webbrowser/src/eventhandler.cpp b/modules/webbrowser/src/eventhandler.cpp index da9ca87185..aa65c1f64d 100644 --- a/modules/webbrowser/src/eventhandler.cpp +++ b/modules/webbrowser/src/eventhandler.cpp @@ -152,7 +152,7 @@ namespace { namespace openspace { void EventHandler::initialize() { - global::callback::character.emplace_back( + global::callback::character->emplace_back( [this](unsigned int charCode, KeyModifier mod) -> bool { if (_browserInstance) { return charCallback(charCode, mod); @@ -160,7 +160,7 @@ void EventHandler::initialize() { return false; } ); - global::callback::keyboard.emplace_back( + global::callback::keyboard->emplace_back( [this](Key key, KeyModifier mod, KeyAction action) -> bool { if (_browserInstance) { return keyboardCallback(key, mod, action); @@ -168,7 +168,7 @@ void EventHandler::initialize() { return false; } ); - global::callback::mousePosition.emplace_back( + global::callback::mousePosition->emplace_back( [this](double x, double y) -> bool { if (_browserInstance) { return mousePositionCallback(x, y); @@ -176,7 +176,7 @@ void EventHandler::initialize() { return false; } ); - global::callback::mouseButton.emplace_back( + global::callback::mouseButton->emplace_back( [this](MouseButton button, MouseAction action, KeyModifier mods) -> bool { if (_browserInstance) { return mouseButtonCallback(button, action, mods); @@ -184,7 +184,7 @@ void EventHandler::initialize() { return false; } ); - global::callback::mouseScrollWheel.emplace_back( + global::callback::mouseScrollWheel->emplace_back( [this](double x, double y) -> bool { if (_browserInstance) { const glm::ivec2 delta(x, y); @@ -194,7 +194,7 @@ void EventHandler::initialize() { } ); - global::callback::touchDetected.emplace_back( + global::callback::touchDetected->emplace_back( [&](TouchInput input) -> bool { if (!_browserInstance) { return false; @@ -236,7 +236,7 @@ void EventHandler::initialize() { } ); - global::callback::touchUpdated.emplace_back( + global::callback::touchUpdated->emplace_back( [&](TouchInput input) -> bool { if (!_browserInstance) { return false; @@ -278,7 +278,7 @@ void EventHandler::initialize() { } ); - global::callback::touchExit.emplace_back( + global::callback::touchExit->emplace_back( [&](TouchInput input) { if (!_browserInstance) { return; diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index 33a5fe0f46..cdcc85faeb 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -73,7 +73,7 @@ WebBrowserModule::WebBrowserModule() , _updateBrowserBetweenRenderables(UpdateBrowserBetweenRenderablesInfo, true) , _browserUpdateInterval(BrowserUpdateIntervalInfo, 1.f, 1.0f, 1000.f) { - global::callback::deinitialize.emplace_back([this]() { + global::callback::deinitialize->emplace_back([this]() { ZoneScopedN("WebBrowserModule") deinitialize(); diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 1a008a11ca..2f5785d68e 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -63,6 +64,12 @@ namespace openspace { namespace { + // This is kind of weird. Optimally, we would want to use the std::array also on + // non-Windows platforms but that causes some issues with nullptrs being thrown + // around and invalid accesses. Switching this to a std::vector with dynamic memory + // allocation works on Linux, but it fails on Windows in some SGCT function and on Mac + // in some random global randoms +#ifdef WIN32 constexpr const int TotalSize = sizeof(ghoul::fontrendering::FontManager) + sizeof(Dashboard) + @@ -96,6 +103,7 @@ namespace { sizeof(Profile); std::array DataStorage; +#endif // WIN32 } // namespace } // namespace openspace @@ -104,133 +112,262 @@ namespace openspace::global { void create() { ZoneScoped - std::byte* currentPos = DataStorage.data(); + callback::create(); +#ifdef WIN32 + std::fill(DataStorage.begin(), DataStorage.end(), std::byte(0)); + std::byte* currentPos = DataStorage.data(); +#endif // WIN32 + +#ifdef WIN32 fontManager = new (currentPos) ghoul::fontrendering::FontManager({ 1536, 1536, 1 }); ghoul_assert(fontManager, "No fontManager"); currentPos += sizeof(ghoul::fontrendering::FontManager); +#else // ^^^ WIN32 / !WIN32 vvv + fontManager = new ghoul::fontrendering::FontManager({ 1536, 1536, 1 }); +#endif // WIN32 +#ifdef WIN32 dashboard = new (currentPos) Dashboard; ghoul_assert(dashboard, "No dashboard"); currentPos += sizeof(Dashboard); +#else // ^^^ WIN32 / !WIN32 vvv + dashboard = new Dashboard; +#endif // WIN32 +#ifdef WIN32 deferredcasterManager = new (currentPos) DeferredcasterManager; ghoul_assert(deferredcasterManager, "No deferredcasterManager"); currentPos += sizeof(DeferredcasterManager); +#else // ^^^ WIN32 / !WIN32 vvv + deferredcasterManager = new DeferredcasterManager; +#endif // WIN32 +#ifdef WIN32 downloadManager = new (currentPos) DownloadManager; ghoul_assert(downloadManager, "No downloadManager"); currentPos += sizeof(DownloadManager); +#else // ^^^ WIN32 / !WIN32 vvv + downloadManager = new DownloadManager; +#endif // WIN32 +#ifdef WIN32 luaConsole = new (currentPos) LuaConsole; ghoul_assert(luaConsole, "No luaConsole"); currentPos += sizeof(LuaConsole); +#else // ^^^ WIN32 / !WIN32 vvv + luaConsole = new LuaConsole; +#endif // WIN32 +#ifdef WIN32 memoryManager = new (currentPos) MemoryManager; ghoul_assert(memoryManager, "No memoryManager"); currentPos += sizeof(MemoryManager); +#else // ^^^ WIN32 / !WIN32 vvv + memoryManager = new MemoryManager; +#endif // WIN32 +#ifdef WIN32 missionManager = new (currentPos) MissionManager; ghoul_assert(missionManager, "No missionManager"); currentPos += sizeof(MissionManager); +#else // ^^^ WIN32 / !WIN32 vvv + missionManager = new MissionManager; +#endif // WIN32 +#ifdef WIN32 moduleEngine = new (currentPos) ModuleEngine; ghoul_assert(moduleEngine, "No moduleEngine"); currentPos += sizeof(ModuleEngine); +#else // ^^^ WIN32 / !WIN32 vvv + moduleEngine = new ModuleEngine; +#endif // WIN32 +#ifdef WIN32 openSpaceEngine = new (currentPos) OpenSpaceEngine; ghoul_assert(openSpaceEngine, "No openSpaceEngine"); currentPos += sizeof(OpenSpaceEngine); +#else // ^^^ WIN32 / !WIN32 vvv + openSpaceEngine = new OpenSpaceEngine; +#endif // WIN32 +#ifdef WIN32 parallelPeer = new (currentPos) ParallelPeer; ghoul_assert(parallelPeer, "No parallelPeer"); currentPos += sizeof(ParallelPeer); +#else // ^^^ WIN32 / !WIN32 vvv + parallelPeer = new ParallelPeer; +#endif // WIN32 +#ifdef WIN32 raycasterManager = new (currentPos) RaycasterManager; ghoul_assert(raycasterManager, "No raycasterManager"); currentPos += sizeof(RaycasterManager); +#else // ^^^ WIN32 / !WIN32 vvv + raycasterManager = new RaycasterManager; +#endif // WIN32 +#ifdef WIN32 renderEngine = new (currentPos) RenderEngine; ghoul_assert(renderEngine, "No renderEngine"); currentPos += sizeof(RenderEngine); +#else // ^^^ WIN32 / !WIN32 vvv + renderEngine = new RenderEngine; +#endif // WIN32 +#ifdef WIN32 screenSpaceRenderables = new (currentPos) std::vector>; ghoul_assert(screenSpaceRenderables, "No screenSpaceRenderables"); currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + screenSpaceRenderables = new std::vector>; +#endif // WIN32 +#ifdef WIN32 syncEngine = new (currentPos) SyncEngine(4096); ghoul_assert(syncEngine, "No syncEngine"); currentPos += sizeof(SyncEngine); +#else // ^^^ WIN32 / !WIN32 vvv + syncEngine = new SyncEngine(4096); +#endif // WIN32 +#ifdef WIN32 timeManager = new (currentPos) TimeManager; ghoul_assert(timeManager, "No timeManager"); currentPos += sizeof(TimeManager); +#else // ^^^ WIN32 / !WIN32 vvv + timeManager = new TimeManager; +#endif // WIN32 +#ifdef WIN32 versionChecker = new (currentPos) VersionChecker; ghoul_assert(versionChecker, "No versionChecker"); currentPos += sizeof(VersionChecker); +#else + versionChecker = new VersionChecker; +#endif // WIN32 +#ifdef WIN32 virtualPropertyManager = new (currentPos) VirtualPropertyManager; ghoul_assert(virtualPropertyManager, "No virtualPropertyManager"); currentPos += sizeof(VirtualPropertyManager); +#else // ^^^ WIN32 / !WIN32 vvv + virtualPropertyManager = new VirtualPropertyManager; +#endif // WIN32 +#ifdef WIN32 windowDelegate = new (currentPos) WindowDelegate; ghoul_assert(windowDelegate, "No windowDelegate"); currentPos += sizeof(WindowDelegate); +#else // ^^^ WIN32 / !WIN32 vvv + windowDelegate = new WindowDelegate; +#endif // WIN32 +#ifdef WIN32 configuration = new (currentPos) configuration::Configuration; ghoul_assert(configuration, "No configuration"); currentPos += sizeof(configuration::Configuration); +#else // ^^^ WIN32 / !WIN32 vvv + configuration = new configuration::Configuration; +#endif // WIN32 +#ifdef WIN32 interactionMonitor = new (currentPos) interaction::InteractionMonitor; ghoul_assert(interactionMonitor, "No interactionMonitor"); currentPos += sizeof(interaction::InteractionMonitor); +#else // ^^^ WIN32 / !WIN32 vvv + interactionMonitor = new interaction::InteractionMonitor; +#endif // WIN32 +#ifdef WIN32 joystickInputStates = new (currentPos) interaction::JoystickInputStates; ghoul_assert(joystickInputStates, "No joystickInputStates"); currentPos += sizeof(interaction::JoystickInputStates); +#else // ^^^ WIN32 / !WIN32 vvv + joystickInputStates = new interaction::JoystickInputStates; +#endif // WIN32 +#ifdef WIN32 websocketInputStates = new (currentPos) interaction::WebsocketInputStates; ghoul_assert(websocketInputStates, "No websocketInputStates"); currentPos += sizeof(interaction::WebsocketInputStates); +#else // ^^^ WIN32 / !WIN32 vvv + websocketInputStates = new interaction::WebsocketInputStates; +#endif // WIN32 +#ifdef WIN32 keybindingManager = new (currentPos) interaction::KeybindingManager; ghoul_assert(keybindingManager, "No keybindingManager"); currentPos += sizeof(interaction::KeybindingManager); +#else // ^^^ WIN32 / !WIN32 vvv + keybindingManager = new interaction::KeybindingManager; +#endif // WIN32 +#ifdef WIN32 navigationHandler = new (currentPos) interaction::NavigationHandler; ghoul_assert(navigationHandler, "No navigationHandler"); currentPos += sizeof(interaction::NavigationHandler); +#else // ^^^ WIN32 / !WIN32 vvv + navigationHandler = new interaction::NavigationHandler; +#endif // WIN32 +#ifdef WIN32 sessionRecording = new (currentPos) interaction::SessionRecording(true); ghoul_assert(sessionRecording, "No sessionRecording"); currentPos += sizeof(interaction::SessionRecording); +#else // ^^^ WIN32 / !WIN32 vvv + sessionRecording = new interaction::SessionRecording(true); +#endif // WIN32 +#ifdef WIN32 shortcutManager = new (currentPos) interaction::ShortcutManager; ghoul_assert(shortcutManager, "No shortcutManager"); currentPos += sizeof(interaction::ShortcutManager); +#else // ^^^ WIN32 / !WIN32 vvv + shortcutManager = new interaction::ShortcutManager; +#endif // WIN32 +#ifdef WIN32 rootPropertyOwner = new (currentPos) properties::PropertyOwner({ "" }); ghoul_assert(rootPropertyOwner, "No rootPropertyOwner"); currentPos += sizeof(properties::PropertyOwner); +#else // ^^^ WIN32 / !WIN32 vvv + rootPropertyOwner = new properties::PropertyOwner({ "" }); +#endif // WIN32 +#ifdef WIN32 screenSpaceRootPropertyOwner = new (currentPos) properties::PropertyOwner({ "ScreenSpace" }); ghoul_assert(screenSpaceRootPropertyOwner, "No screenSpaceRootPropertyOwner"); currentPos += sizeof(properties::PropertyOwner); +#else // ^^^ WIN32 / !WIN32 vvv + screenSpaceRootPropertyOwner = new properties::PropertyOwner({ "ScreenSpace" }); +#endif // WIN32 +#ifdef WIN32 scriptEngine = new (currentPos) scripting::ScriptEngine; ghoul_assert(scriptEngine, "No scriptEngine"); currentPos += sizeof(scripting::ScriptEngine); +#else // ^^^ WIN32 / !WIN32 vvv + scriptEngine = new scripting::ScriptEngine; +#endif // WIN32 +#ifdef WIN32 scriptScheduler = new (currentPos) scripting::ScriptScheduler; ghoul_assert(scriptScheduler, "No scriptScheduler"); currentPos += sizeof(scripting::ScriptScheduler); +#else // ^^^ WIN32 / !WIN32 vvv + scriptScheduler = new scripting::ScriptScheduler; +#endif // WIN32 +#ifdef WIN32 profile = new (currentPos) Profile; ghoul_assert(profile, "No profile"); currentPos += sizeof(Profile); +#else // ^^^ WIN32 / !WIN32 vvv + profile = new Profile; +#endif // WIN32 } void initialize() { @@ -262,99 +399,223 @@ void initializeGL() { void destroy() { LDEBUGC("Globals", "Destroying 'Profile'"); +#ifdef WIN32 profile->~Profile(); +#else // ^^^ WIN32 / !WIN32 vvv + delete profile; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ScriptScheduler'"); +#ifdef WIN32 scriptScheduler->~ScriptScheduler(); +#else // ^^^ WIN32 / !WIN32 vvv + delete scriptScheduler; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ScriptEngine'"); +#ifdef WIN32 scriptEngine->~ScriptEngine(); +#else // ^^^ WIN32 / !WIN32 vvv + delete scriptEngine; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ScreenSpace Root Owner'"); +#ifdef WIN32 screenSpaceRootPropertyOwner->~PropertyOwner(); +#else // ^^^ WIN32 / !WIN32 vvv + delete screenSpaceRootPropertyOwner; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'Root Owner'"); +#ifdef WIN32 rootPropertyOwner->~PropertyOwner(); +#else // ^^^ WIN32 / !WIN32 vvv + delete rootPropertyOwner; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ShortcutManager'"); +#ifdef WIN32 shortcutManager->~ShortcutManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete shortcutManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'SessionRecording'"); +#ifdef WIN32 sessionRecording->~SessionRecording(); +#else // ^^^ WIN32 / !WIN32 vvv + delete sessionRecording; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'NavigationHandler'"); +#ifdef WIN32 navigationHandler->~NavigationHandler(); +#else // ^^^ WIN32 / !WIN32 vvv + delete navigationHandler; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'KeybindingManager'"); +#ifdef WIN32 keybindingManager->~KeybindingManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete keybindingManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'WebsocketInputStates'"); +#ifdef WIN32 websocketInputStates->~WebsocketInputStates(); +#else // ^^^ WIN32 / !WIN32 vvv + delete websocketInputStates; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'JoystickInputStates'"); +#ifdef WIN32 joystickInputStates->~JoystickInputStates(); +#else // ^^^ WIN32 / !WIN32 vvv + delete joystickInputStates; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'InteractionMonitor'"); +#ifdef WIN32 interactionMonitor->~InteractionMonitor(); +#else // ^^^ WIN32 / !WIN32 vvv + delete interactionMonitor; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'Configuration'"); +#ifdef WIN32 configuration->~Configuration(); +#else // ^^^ WIN32 / !WIN32 vvv + delete configuration; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'WindowDelegate'"); +#ifdef WIN32 windowDelegate->~WindowDelegate(); +#else // ^^^ WIN32 / !WIN32 vvv + delete windowDelegate; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'VirtualPropertyManager'"); +#ifdef WIN32 virtualPropertyManager->~VirtualPropertyManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete virtualPropertyManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'VersionChecker'"); +#ifdef WIN32 versionChecker->~VersionChecker(); +#else // ^^^ WIN32 / !WIN32 vvv + delete versionChecker; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'TimeManager'"); +#ifdef WIN32 timeManager->~TimeManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete timeManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'SyncEngine'"); +#ifdef WIN32 syncEngine->~SyncEngine(); +#else // ^^^ WIN32 / !WIN32 vvv + delete syncEngine; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ScreenSpaceRenderables'"); - screenSpaceRenderables->~vector>(); +#ifdef WIN32 + screenSpaceRenderables->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete screenSpaceRenderables; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'RenderEngine'"); +#ifdef WIN32 renderEngine->~RenderEngine(); +#else // ^^^ WIN32 / !WIN32 vvv + delete renderEngine; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'RaycasterManager'"); +#ifdef WIN32 raycasterManager->~RaycasterManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete raycasterManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ParallelPeer'"); +#ifdef WIN32 parallelPeer->~ParallelPeer(); +#else // ^^^ WIN32 / !WIN32 vvv + delete parallelPeer; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'OpenSpaceEngine'"); +#ifdef WIN32 openSpaceEngine->~OpenSpaceEngine(); +#else // ^^^ WIN32 / !WIN32 vvv + delete openSpaceEngine; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'ModuleEngine'"); +#ifdef WIN32 moduleEngine->~ModuleEngine(); +#else // ^^^ WIN32 / !WIN32 vvv + delete moduleEngine; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'MissionManager'"); +#ifdef WIN32 missionManager->~MissionManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete missionManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'MemoryManager'"); +#ifdef WIN32 memoryManager->~MemoryManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete memoryManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'LuaConsole'"); +#ifdef WIN32 luaConsole->~LuaConsole(); +#else // ^^^ WIN32 / !WIN32 vvv + delete luaConsole; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'DownloadManager'"); +#ifdef WIN32 downloadManager->~DownloadManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete downloadManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'DeferredcasterManager'"); +#ifdef WIN32 deferredcasterManager->~DeferredcasterManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete deferredcasterManager; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'Dashboard'"); +#ifdef WIN32 dashboard->~Dashboard(); +#else // ^^^ WIN32 / !WIN32 vvv + delete dashboard; +#endif // WIN32 LDEBUGC("Globals", "Destroying 'FontManager'"); +#ifdef WIN32 fontManager->~FontManager(); +#else // ^^^ WIN32 / !WIN32 vvv + delete fontManager; +#endif // WIN32 - std::fill(DataStorage.begin(), DataStorage.end(), std::byte(0)); + callback::destroy(); } void deinitialize() { diff --git a/src/engine/globalscallbacks.cpp b/src/engine/globalscallbacks.cpp index a6dba4bc19..e2953460eb 100644 --- a/src/engine/globalscallbacks.cpp +++ b/src/engine/globalscallbacks.cpp @@ -24,97 +24,295 @@ #include -namespace openspace::global::detail { - -std::vector>& gInitialize() { - static std::vector> g; - return g; -} - -std::vector>& gDeinitialize() { - static std::vector> g; - return g; -} - -std::vector>& gInitializeGL() { - static std::vector> g; - return g; -} - -std::vector>& gDeinitializeGL() { - static std::vector> g; - return g; -} - -std::vector>& gPreSync() { - static std::vector> g; - return g; -} - -std::vector>& gPostSyncPreDraw() { - static std::vector> g; - return g; -} - -std::vector>& gRender() { - static std::vector> g; - return g; -} - -std::vector>& gDraw2D() { - static std::vector> g; - return g; -} - -std::vector>& gPostDraw() { - static std::vector> g; - return g; -} - -std::vector>& gKeyboard() { - static std::vector> g; - return g; -} - -std::vector>& gCharacter() { - static std::vector> g; - return g; -} - -std::vector>& gMouseButton() { - static std::vector> g; - return g; -} - -std::vector>& gMousePosition() { - static std::vector> g; - return g; -} - -std::vector>& gMouseScrollWheel() { - static std::vector> g; - return g; -} - -std::vector>& gTouchDetected() { - static std::vector> g; - return g; -} - -std::vector>& gTouchUpdated() { - static std::vector> g; - return g; -} - -std::vector>& gTouchExit() { - static std::vector> g; - return g; -} - -} // namespace openspace::global::detail +#include +#include namespace openspace::global::callback { +namespace { + // Using the same mechanism as in the globals file +#ifdef WIN32 + constexpr const int TotalSize = + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>) + + sizeof(std::vector>); + + std::array DataStorage; +#endif // WIN32 + +} // namespace + +void create() { + ZoneScoped + +#ifdef WIN32 + std::fill(DataStorage.begin(), DataStorage.end(), std::byte(0)); + std::byte* currentPos = DataStorage.data(); +#endif // WIN32 + +#ifdef WIN32 + initialize = new (currentPos) std::vector>; + ghoul_assert(initialize, "No initialize"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + initialize = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + deinitialize = new (currentPos) std::vector>; + ghoul_assert(deinitialize, "No deinitialize"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + deinitialize = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + initializeGL = new (currentPos) std::vector>; + ghoul_assert(initializeGL, "No initializeGL"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + initializeGL = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + deinitializeGL = new (currentPos) std::vector>; + ghoul_assert(deinitializeGL, "No deinitializeGL"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + deinitializeGL = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + preSync = new (currentPos) std::vector>; + ghoul_assert(preSync, "No preSync"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + preSync = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + postSyncPreDraw = new (currentPos) std::vector>; + ghoul_assert(postSyncPreDraw, "No postSyncPreDraw"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + postSyncPreDraw = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + render = new (currentPos) std::vector>; + ghoul_assert(render, "No render"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + render = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + draw2D = new (currentPos) std::vector>; + ghoul_assert(draw2D, "No draw2D"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + draw2D = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + postDraw = new (currentPos) std::vector>; + ghoul_assert(postDraw, "No postDraw"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + postDraw = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + keyboard = + new (currentPos) std::vector>; + ghoul_assert(keyboard, "No keyboard"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + keyboard = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + character = + new (currentPos) std::vector>; + ghoul_assert(character, "No character"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + character = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + mouseButton = + new (currentPos) std::vector< + std::function + >; + ghoul_assert(mouseButton, "No mouseButton"); + currentPos += sizeof( + std::vector> + ); +#else // ^^^ WIN32 / !WIN32 vvv + mouseButton = + new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + mousePosition = new (currentPos) std::vector>; + ghoul_assert(mousePosition, "No mousePosition"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + mousePosition = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + mouseScrollWheel = new (currentPos) std::vector>; + ghoul_assert(mouseScrollWheel, "No mouseScrollWheel"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + mouseScrollWheel = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + touchDetected = new (currentPos) std::vector>; + ghoul_assert(touchDetected, "No touchDetected"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + touchDetected = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + touchUpdated = new (currentPos) std::vector>; + ghoul_assert(touchUpdated, "No touchUpdated"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + touchUpdated = new std::vector>; +#endif // WIN32 + +#ifdef WIN32 + touchExit = new (currentPos) std::vector>; + ghoul_assert(touchExit, "No touchExit"); + currentPos += sizeof(std::vector>); +#else // ^^^ WIN32 / !WIN32 vvv + touchExit = new std::vector>; +#endif // WIN32 +} + +void destroy() { +#ifdef WIN32 + touchExit->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete touchExit; +#endif // WIN32 + +#ifdef WIN32 + touchUpdated->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete touchUpdated; +#endif // WIN32 + +#ifdef WIN32 + touchDetected->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete touchDetected; +#endif // WIN32 + +#ifdef WIN32 + mouseScrollWheel->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete mouseScrollWheel; +#endif // WIN32 + +#ifdef WIN32 + mousePosition->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete mousePosition; +#endif // WIN32 + +#ifdef WIN32 + mouseButton->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete mouseButton; +#endif // WIN32 + +#ifdef WIN32 + character->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete character; +#endif // WIN32 + +#ifdef WIN32 + keyboard->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete keyboard; +#endif // WIN32 + +#ifdef WIN32 + postDraw->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete postDraw; +#endif // WIN32 + +#ifdef WIN32 + draw2D->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete draw2D; +#endif // WIN32 + +#ifdef WIN32 + render->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete render; +#endif // WIN32 + +#ifdef WIN32 + postSyncPreDraw->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete postSyncPreDraw; +#endif // WIN32 + +#ifdef WIN32 + preSync->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete preSync; +#endif // WIN32 + +#ifdef WIN32 + deinitializeGL->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete deinitializeGL; +#endif // WIN32 + +#ifdef WIN32 + initializeGL->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete initializeGL; +#endif // WIN32 + +#ifdef WIN32 + deinitialize->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete deinitialize; +#endif // WIN32 + +#ifdef WIN32 + initialize->~vector(); +#else // ^^^ WIN32 / !WIN32 vvv + delete initialize; +#endif // WIN32 +} + void(*webBrowserPerformanceHotfix)() = nullptr; } // namespace openspace::global::callback diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index cedd6501b7..d51f322e91 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -370,7 +370,7 @@ void OpenSpaceEngine::initialize() { global::renderEngine->initialize(); - for (const std::function& func : global::callback::initialize) { + for (const std::function& func : *global::callback::initialize) { ZoneScopedN("[Module] initialize") func(); @@ -663,7 +663,7 @@ void OpenSpaceEngine::initializeGL() { global::moduleEngine->initializeGL(); - for (const std::function& func : global::callback::initializeGL) { + for (const std::function& func : *global::callback::initializeGL) { ZoneScopedN("[Module] initializeGL") func(); } @@ -865,7 +865,7 @@ void OpenSpaceEngine::deinitialize() { LTRACE("OpenSpaceEngine::deinitialize(begin)"); - for (const std::function& func : global::callback::deinitialize) { + for (const std::function& func : *global::callback::deinitialize) { func(); } @@ -914,7 +914,7 @@ void OpenSpaceEngine::deinitializeGL() { global::openSpaceEngine->_scene = nullptr; global::renderEngine->setScene(nullptr); - for (const std::function& func : global::callback::deinitializeGL) { + for (const std::function& func : *global::callback::deinitializeGL) { func(); } @@ -1125,7 +1125,7 @@ void OpenSpaceEngine::preSynchronization() { global::interactionMonitor->updateActivityState(); } - for (const std::function& func : global::callback::preSync) { + for (const std::function& func : *global::callback::preSync) { ZoneScopedN("[Module] preSync") func(); @@ -1180,7 +1180,7 @@ void OpenSpaceEngine::postSynchronizationPreDraw() { _scene->camera()->invalidateCache(); } - for (const std::function& func : global::callback::postSyncPreDraw) { + for (const std::function& func : *global::callback::postSyncPreDraw) { ZoneScopedN("[Module] postSyncPreDraw") func(); @@ -1226,7 +1226,7 @@ void OpenSpaceEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& view global::renderEngine->render(sceneMatrix, viewMatrix, projectionMatrix); - for (const std::function& func : global::callback::render) { + for (const std::function& func : *global::callback::render) { ZoneScopedN("[Module] render") func(); @@ -1251,7 +1251,7 @@ void OpenSpaceEngine::drawOverlays() { global::sessionRecording->render(); } - for (const std::function& func : global::callback::draw2D) { + for (const std::function& func : *global::callback::draw2D) { ZoneScopedN("[Module] draw2D") func(); @@ -1267,7 +1267,7 @@ void OpenSpaceEngine::postDraw() { global::renderEngine->postDraw(); - for (const std::function& func : global::callback::postDraw) { + for (const std::function& func : *global::callback::postDraw) { ZoneScopedN("[Module] postDraw") func(); @@ -1317,7 +1317,7 @@ void OpenSpaceEngine::keyboardCallback(Key key, KeyModifier mod, KeyAction actio } using F = std::function; - for (const F& func : global::callback::keyboard) { + for (const F& func : *global::callback::keyboard) { const bool isConsumed = func(key, mod, action); if (isConsumed) { return; @@ -1340,7 +1340,7 @@ void OpenSpaceEngine::charCallback(unsigned int codepoint, KeyModifier modifier) ZoneScoped using F = std::function; - for (const F& func : global::callback::character) { + for (const F& func : *global::callback::character) { bool isConsumed = func(codepoint, modifier); if (isConsumed) { return; @@ -1358,7 +1358,7 @@ void OpenSpaceEngine::mouseButtonCallback(MouseButton button, ZoneScoped using F = std::function; - for (const F& func : global::callback::mouseButton) { + for (const F& func : *global::callback::mouseButton) { bool isConsumed = func(button, action, mods); if (isConsumed) { // If the mouse was released, we still want to forward it to the navigation @@ -1390,7 +1390,7 @@ void OpenSpaceEngine::mousePositionCallback(double x, double y) { ZoneScoped using F = std::function; - for (const F& func : global::callback::mousePosition) { + for (const F& func : *global::callback::mousePosition) { func(x, y); } @@ -1404,7 +1404,7 @@ void OpenSpaceEngine::mouseScrollWheelCallback(double posX, double posY) { ZoneScoped using F = std::function; - for (const F& func : global::callback::mouseScrollWheel) { + for (const F& func : *global::callback::mouseScrollWheel) { bool isConsumed = func(posX, posY); if (isConsumed) { return; @@ -1419,7 +1419,7 @@ void OpenSpaceEngine::touchDetectionCallback(TouchInput input) { ZoneScoped using F = std::function; - for (const F& func : global::callback::touchDetected) { + for (const F& func : *global::callback::touchDetected) { bool isConsumed = func(input); if (isConsumed) { return; @@ -1431,7 +1431,7 @@ void OpenSpaceEngine::touchUpdateCallback(TouchInput input) { ZoneScoped using F = std::function; - for (const F& func : global::callback::touchUpdated) { + for (const F& func : *global::callback::touchUpdated) { bool isConsumed = func(input); if (isConsumed) { return; @@ -1443,7 +1443,7 @@ void OpenSpaceEngine::touchExitCallback(TouchInput input) { ZoneScoped using F = std::function; - for (const F& func : global::callback::touchExit) { + for (const F& func : *global::callback::touchExit) { func(input); } } diff --git a/src/interaction/touchbar.mm b/src/interaction/touchbar.mm index 644e199e29..077c553561 100644 --- a/src/interaction/touchbar.mm +++ b/src/interaction/touchbar.mm @@ -92,7 +92,7 @@ NSArray* focusIdentifiers; if ([identifier isEqualToString:pauseResultId]) { NSButton* button = [NSButton buttonWithTitle:NSLocalizedString( - (global::timeManager.isPaused() ? @"Resume" : @"Pause"), + (global::timeManager->isPaused() ? @"Resume" : @"Pause"), @"" ) target:self action:@selector(pauseResumeButtonAction:) @@ -172,14 +172,14 @@ NSArray* focusIdentifiers; } - (void)pauseResumeButtonAction:(id)sender { - global::scriptEngine.queueScript( + global::scriptEngine->queueScript( "openspace.time.togglePause();", scripting::ScriptEngine::RemoteScripting::Yes ); NSButton* button = static_cast(sender); // This check is inverted since the togglePause script has not run yet - [button setTitle: global::timeManager.isPaused() ? @"Pause" : @"Resume"]; + [button setTitle: global::timeManager->isPaused() ? @"Pause" : @"Resume"]; } - (void)focusObjectAction:(id)sender { @@ -195,7 +195,7 @@ NSArray* focusIdentifiers; "NavigationHandler.OrbitalNavigator.Aim", "NavigationHandler.OrbitalNavigator.RetargetAnchor" ); - global::scriptEngine.queueScript( + global::scriptEngine->queueScript( str, scripting::ScriptEngine::RemoteScripting::Yes ); @@ -205,7 +205,7 @@ NSArray* focusIdentifiers; // Remove unused variable warning (void)sender; - global::scriptEngine.queueScript( + global::scriptEngine->queueScript( "local isEnabled = openspace.getPropertyValue('Dashboard.IsEnabled');\ openspace.setPropertyValueSingle('Dashboard.IsEnabled', not isEnabled);\ openspace.setPropertyValueSingle('RenderEngine.ShowLog', not isEnabled);\ @@ -218,7 +218,7 @@ NSArray* focusIdentifiers; - (void)hideGuiAction:(id)sender { // Remove unused variable warning (void)sender; - global::scriptEngine.queueScript( + global::scriptEngine->queueScript( "local isEnabled = openspace.getPropertyValue('Modules.CefWebGui.Visible');\ openspace.setPropertyValueSingle('Modules.CefWebGui.Visible', not isEnabled);", scripting::ScriptEngine::RemoteScripting::No @@ -242,7 +242,7 @@ void showTouchbar() { [NSApplication sharedApplication].automaticCustomizeTouchBarMenuItemEnabled = YES; } - std::vector ns = global::renderEngine.scene()->allSceneGraphNodes(); + std::vector ns = global::renderEngine->scene()->allSceneGraphNodes(); std::sort( ns.begin(), From 86bb19d81c2c0e8a33da0d3b92ad1846211eea18 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 7 Dec 2020 23:43:05 +0100 Subject: [PATCH 045/147] Feature/warnings (#1425) * Remove MSVC, GCC, Clang compiler warnings * Remove cppcheck warnings --- .../include/profile/deltatimesdialog.h | 2 +- .../include/profile/keybindingsdialog.h | 2 +- .../include/profile/marknodesdialog.h | 2 +- .../launcher/include/profile/modulesdialog.h | 2 +- .../launcher/include/profile/profileedit.h | 2 +- .../include/profile/propertiesdialog.h | 2 +- .../ext/launcher/src/filesystemaccess.cpp | 9 ++- .../ext/launcher/src/profile/assetsdialog.cpp | 7 +-- .../launcher/src/profile/assettreeitem.cpp | 16 ++--- .../ext/launcher/src/profile/cameradialog.cpp | 2 +- .../launcher/src/profile/deltatimesdialog.cpp | 16 ++--- .../src/profile/keybindingsdialog.cpp | 4 +- .../launcher/src/profile/marknodesdialog.cpp | 4 +- .../ext/launcher/src/profile/profileedit.cpp | 6 +- apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- include/openspace/network/messagestructures.h | 14 +++-- include/openspace/util/httprequest.h | 3 - include/openspace/util/syncbuffer.h | 5 ++ include/openspace/util/syncbuffer.inl | 7 ++- .../rendering/atmospheredeferredcaster.cpp | 2 +- .../rendering/renderableatmosphere.cpp | 2 +- .../dashboarditemparallelconnection.cpp | 2 - .../rendering/grids/renderableradialgrid.cpp | 1 - modules/base/rendering/renderablenodeline.cpp | 6 +- modules/base/rendering/renderableplane.cpp | 2 +- modules/base/rendering/renderabletrail.cpp | 7 ++- .../rendering/renderableplanescloud.cpp | 10 +--- modules/exoplanets/exoplanetshelper.h | 9 ++- .../rendering/renderableorbitdisc.cpp | 6 +- .../tasks/exoplanetsdatapreparationtask.cpp | 7 ++- modules/fitsfilereader/CMakeLists.txt | 6 +- modules/fitsfilereader/src/fitsfilereader.cpp | 2 +- .../gaia/rendering/renderablegaiastars.cpp | 18 +++--- modules/gaia/tasks/readfilejob.cpp | 2 +- modules/galaxy/rendering/renderablegalaxy.cpp | 14 ++--- modules/globebrowsing/globebrowsingmodule.cpp | 15 +++-- modules/globebrowsing/src/basictypes.h | 6 +- .../src/globelabelscomponent.cpp | 2 - modules/globebrowsing/src/layer.cpp | 12 ++-- .../globebrowsing/src/rawtiledatareader.cpp | 40 ++++++------- modules/globebrowsing/src/renderableglobe.cpp | 30 ++++------ modules/globebrowsing/src/shadowcomponent.cpp | 4 +- modules/globebrowsing/src/tileprovider.cpp | 28 ++++----- .../globebrowsing/src/tiletextureinitdata.cpp | 8 +-- modules/globebrowsing/src/timequantizer.cpp | 28 +++------ modules/globebrowsing/src/timequantizer.h | 7 --- modules/imgui/src/gui.cpp | 4 +- modules/imgui/src/guigibscomponent.cpp | 2 +- modules/imgui/src/guimemorycomponent.cpp | 2 +- modules/imgui/src/guispacetimecomponent.cpp | 4 +- .../src/topics/flightcontrollertopic.cpp | 11 ---- .../rendering/renderableorbitalkepler.cpp | 11 ++-- .../space/rendering/renderableorbitalkepler.h | 1 - .../space/rendering/renderablesatellites.cpp | 1 - .../space/rendering/renderablesatellites.h | 2 +- .../space/rendering/renderablesmallbody.cpp | 41 +++++++------ modules/space/rendering/renderablesmallbody.h | 5 -- modules/space/rendering/renderablestars.cpp | 2 +- .../dashboard/dashboarditeminstruments.cpp | 2 - .../rendering/renderablemodelprojection.cpp | 2 - .../util/hongkangparser.cpp | 16 +++-- .../util/projectioncomponent.cpp | 2 +- modules/sync/tasks/syncassettask.cpp | 1 - modules/volume/rawvolume.inl | 7 +-- src/CMakeLists.txt | 4 +- src/documentation/documentationengine.cpp | 8 +-- src/documentation/verifier.cpp | 54 ++++++++--------- src/interaction/externinteraction.cpp | 29 --------- src/interaction/interactionmonitor.cpp | 2 - src/interaction/navigationhandler.cpp | 28 ++++----- src/interaction/navigationhandler_lua.inl | 16 ++--- src/interaction/orbitalnavigator.cpp | 7 --- src/interaction/scriptcamerastates.cpp | 5 -- src/interaction/sessionrecording.cpp | 18 +++--- .../tasks/convertrecfileversiontask.cpp | 2 +- .../tasks/convertrecformattask.cpp | 3 +- src/network/parallelserver.cpp | 6 -- src/properties/propertyowner.cpp | 2 +- src/rendering/dashboard.cpp | 2 +- src/rendering/helper.cpp | 16 ++--- src/rendering/luaconsole.cpp | 2 +- src/rendering/renderengine.cpp | 29 ++++----- src/rendering/screenspacerenderable.cpp | 27 ++++----- src/scene/assetloader.cpp | 6 +- src/scene/profile.cpp | 2 - src/scene/scene_lua.inl | 10 ++-- src/util/blockplaneintersectiongeometry.cpp | 2 +- src/util/keys.cpp | 4 -- src/util/syncbuffer.cpp | 30 +++++++++- src/util/timemanager.cpp | 10 ++-- src/util/touch.cpp | 14 ++--- support/cppcheck/suppressions.txt | 4 +- tests/test_latlonpatch.cpp | 60 +++++++++---------- 94 files changed, 392 insertions(+), 511 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index 3d192af852..2dae14f531 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -61,7 +61,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: diff --git a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h index 2bc01477ca..42d9a0e162 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h @@ -56,7 +56,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index eae3617543..9c0ec0bd5a 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -51,7 +51,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index c2c419528f..c15e95ccb7 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -52,7 +52,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h index d8de4c4ab9..6ad0ea05be 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h @@ -75,7 +75,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void duplicateProfile(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h index ac13ed474e..a04e4cf2e7 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h @@ -53,7 +53,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp index f0a98ce58d..91489868f1 100644 --- a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp +++ b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp @@ -56,14 +56,13 @@ void FileSystemAccess::parseChildDirElements(QFileInfo fileInfo, std::string spa QFileInfoList fileList = dir.entryInfoList(_fileFilterOptions); for (int i = 0; i < fileList.size(); i++) { - QFileInfo fileInfo = fileList[i]; - std::string res = space + fileInfo.fileName().toStdString(); + QFileInfo fi = fileList[i]; + std::string res = space + fi.fileName().toStdString(); - if (fileInfo.isDir()) { + if (fi.isDir()) { if (level != 0 || (level == 0 && isApprovedPath(res))) { dirNames.push_back(res); - parseChildDirElements(fileInfo, (space + " "), level + 1, dirNames, - output); + parseChildDirElements(fi, (space + " "), level + 1, dirNames, output); } } else { diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp index e8d99b617c..d0cf730c76 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp @@ -207,12 +207,9 @@ QString AssetsDialog::createTextSummary() { return ""; } QString summary; - for (int i = 0; i < summaryItems.size(); ++i) { + for (size_t i = 0; i < summaryItems.size(); ++i) { bool existsInFilesystem = summaryItems.at(i)->doesExistInFilesystem(); - constexpr const char* ExistsFormat = "{}
"; - constexpr const char* NotExistsFormat = "{}
"; - std::string s = existsInFilesystem ? fmt::format("{}
", summaryPaths.at(i)) : fmt::format("{}
", summaryPaths.at(i)); @@ -233,6 +230,6 @@ void AssetsDialog::parseSelections() { accept(); } -void AssetsDialog::selected(const QModelIndex& sel) { +void AssetsDialog::selected(const QModelIndex&) { _summary->setText(createTextSummary()); } diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp index 199a755fb1..7ad1f07e09 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp @@ -55,7 +55,7 @@ int AssetTreeItem::row() const { _parentItem->_childItems.cend(), this ); - return std::distance(_parentItem->_childItems.cbegin(), it); + return static_cast(std::distance(_parentItem->_childItems.cbegin(), it)); } else { return 0; @@ -63,11 +63,11 @@ int AssetTreeItem::row() const { } int AssetTreeItem::columnCount() const { - return _itemData.size(); + return static_cast(_itemData.size()); } QVariant AssetTreeItem::data(int column) const { - if (column < 0 || column >= _itemData.size()) { + if (column < 0 || column >= static_cast(_itemData.size())) { return QVariant(); } else { @@ -76,7 +76,7 @@ QVariant AssetTreeItem::data(int column) const { } bool AssetTreeItem::setData(int column, const QVariant& value) { - if (column < 0 || column >= _itemData.size()) { + if (column < 0 || column >= static_cast(_itemData.size())) { return false; } @@ -112,11 +112,11 @@ bool AssetTreeItem::doesExistInFilesystem() const { } QString AssetTreeItem::name() const { - return QString(data(0).toString()); + return data(0).toString(); } bool AssetTreeItem::insertChildren(int position, int count, int columns) { - if (position < 0 || position > _childItems.size()) { + if (position < 0 || position > static_cast(_childItems.size())) { return false; } @@ -130,7 +130,7 @@ bool AssetTreeItem::insertChildren(int position, int count, int columns) { } bool AssetTreeItem::removeChildren(int position, int count) { - if (position < 0 || position + count > _childItems.size()) { + if (position < 0 || position + count > static_cast(_childItems.size())) { return false; } @@ -143,7 +143,7 @@ bool AssetTreeItem::removeChildren(int position, int count) { } bool AssetTreeItem::insertColumns(int position, int columns) { - if (position < 0 || position > _itemData.size()) { + if (position < 0 || position > static_cast(_itemData.size())) { return false; } diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index 206549e1f3..ce586a449f 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -308,7 +308,7 @@ bool CameraDialog::areRequiredFormsFilledAndValid() { allFormsOk = false; addErrorMsg("Position Z is empty"); } - int upVectorCount = 0; + const bool hasUpX = !_navState.upX->text().isEmpty(); const bool hasUpY = !_navState.upY->text().isEmpty(); const bool hasUpZ = !_navState.upZ->text().isEmpty(); diff --git a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp index 8beac8fb1d..b78a132443 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp @@ -75,7 +75,7 @@ namespace { break; } } - return checkForTimeDescription(i, value); + return checkForTimeDescription(static_cast(i), value); } } // namespace @@ -230,8 +230,8 @@ void DeltaTimesDialog::listItemSelected() { void DeltaTimesDialog::setLabelForKey(int index, bool editMode, std::string color) { std::string labelS = "Set Simulation Time Increment for key"; - if (index >= _data.size()) { - index = _data.size() - 1; + if (index >= static_cast(_data.size())) { + index = static_cast(_data.size()) - 1; } if (editMode) { labelS += " '" + createSummaryForDeltaTime(index, false) + "':"; @@ -242,14 +242,14 @@ void DeltaTimesDialog::setLabelForKey(int index, bool editMode, std::string colo } void DeltaTimesDialog::valueChanged(const QString& text) { - if (_seconds->text().isEmpty()) { + if (text.isEmpty()) { _errorMsg->setText(""); } else { - int value = _seconds->text().toDouble(); + int value = text.toDouble(); if (value != 0) { _value->setText(QString::fromStdString( - timeDescription(_seconds->text().toDouble())) + timeDescription(text.toDouble())) ); _errorMsg->setText(""); } @@ -358,14 +358,14 @@ void DeltaTimesDialog::parseSelections() { if ((_data.size() == 1) && (_data.at(0) == 0)) { _data.clear(); } - int finalNonzeroIndex = _data.size() - 1; + int finalNonzeroIndex = static_cast(_data.size()) - 1; for (; finalNonzeroIndex >= 0; --finalNonzeroIndex) { if (_data.at(finalNonzeroIndex) != 0) { break; } } std::vector tempDt; - for (size_t i = 0; i < (finalNonzeroIndex + 1); ++i) { + for (int i = 0; i < (finalNonzeroIndex + 1); ++i) { tempDt.push_back(_data[i]); } _profile.setDeltaTimes(tempDt); diff --git a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp index 2201d728ba..df51a77bf6 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp @@ -323,7 +323,7 @@ void KeybindingsDialog::keySelected(int index) { int KeybindingsDialog::indexInKeyMapping(std::vector& mapVector, int keyInt) { const auto it = std::find(mapVector.cbegin(), mapVector.cend(), keyInt); - return std::distance(mapVector.cbegin(), it); + return static_cast(std::distance(mapVector.cbegin(), it)); } bool KeybindingsDialog::isLineEmpty(int index) { @@ -338,8 +338,6 @@ bool KeybindingsDialog::isLineEmpty(int index) { } void KeybindingsDialog::listItemAdded() { - int currentListSize = _list->count(); - _data.push_back(BlankKey); _list->addItem(new QListWidgetItem(" (Enter details below & click 'Save')")); // Scroll down to that blank line highlighted diff --git a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp index 604827f837..ce4c6d58dc 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp @@ -112,7 +112,7 @@ void MarkNodesDialog::listItemAdded() { std::string itemToAdd = _newNode->text().toStdString(); const auto it = std::find(_data.cbegin(), _data.cend(), itemToAdd); if (it != _data.end()) { - _list->setCurrentRow(std::distance(_data.cbegin(), it)); + _list->setCurrentRow(static_cast(std::distance(_data.cbegin(), it))); } else { _data.push_back(itemToAdd); @@ -131,7 +131,7 @@ void MarkNodesDialog::listItemRemove() { QListWidgetItem* item = _list->currentItem(); int index = _list->row(item); - if (index < 0 || index >= _markedNodesListItems.size()) { + if (index < 0 || index >= static_cast(_markedNodesListItems.size())) { return; } diff --git a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp index 46e7a8d942..3141d8f9c3 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp @@ -50,7 +50,7 @@ using namespace openspace; namespace { - QString labelText(int size, QString title) { + QString labelText(size_t size, QString title) { QString label; if (size > 0) { label = title + " (" + QString::number(size) + ")"; @@ -98,9 +98,9 @@ ProfileEdit::ProfileEdit(Profile& profile, const std::string& profileName, const std::vector& readOnlyProfiles, QWidget* parent) : QDialog(parent) + , _profile(profile) , _assetBasePath(std::move(assetBasePath)) , _profileBasePath(std::move(profileBasePath)) - , _profile(profile) , _readOnlyProfiles(readOnlyProfiles) { setWindowTitle("Profile Editor"); @@ -373,7 +373,7 @@ void ProfileEdit::duplicateProfile() { // will remove the suffix here first profile = profile.substr(0, it); } - catch (const std::invalid_argument& e) { + catch (const std::invalid_argument&) { // If this exception is thrown, we did find a separator character but the // substring afterwards was not a number, so the user just added a separator // by themselves. In this case we don't do anything diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index e1a110f866..4a3882d46c 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit e1a110f866afef2b2539100bf02893982b9eb304 +Subproject commit 4a3882d46cbcaec9675396e9d61bcb985c055323 diff --git a/ext/ghoul b/ext/ghoul index 37045760b0..4ca4101a7a 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 37045760b03bc0d8cac8e52c22c0d10a791ec16f +Subproject commit 4ca4101a7a12fc029ace1a2b47702733c9cb2a02 diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index 8db45e0fda..5d19824f83 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -114,12 +114,12 @@ struct CameraKeyframe { // Position size = sizeof(_position); - std::memcpy(&_position, buffer.data() + offset, size); + std::memcpy(glm::value_ptr(_position), buffer.data() + offset, size); offset += size; // Orientation size = sizeof(_rotation); - std::memcpy(&_rotation, buffer.data() + offset, size); + std::memcpy(glm::value_ptr(_rotation), buffer.data() + offset, size); offset += size; // Follow focus node rotation? @@ -150,8 +150,14 @@ struct CameraKeyframe { }; void write(std::ostream& out) const { - out.write(reinterpret_cast(&_position), sizeof(_position)); - out.write(reinterpret_cast(&_rotation), sizeof(_rotation)); + out.write( + reinterpret_cast(glm::value_ptr(_position)), + sizeof(_position) + ); + out.write( + reinterpret_cast(glm::value_ptr(_rotation)), + sizeof(_rotation) + ); // Write follow focus node rotation? out.write( diff --git a/include/openspace/util/httprequest.h b/include/openspace/util/httprequest.h index fa08dd4c65..1cbade7885 100644 --- a/include/openspace/util/httprequest.h +++ b/include/openspace/util/httprequest.h @@ -184,7 +184,6 @@ class AsyncHttpDownload : public virtual HttpDownload { public: AsyncHttpDownload(std::string url); AsyncHttpDownload(AsyncHttpDownload&& d); - AsyncHttpDownload& operator=(AsyncHttpDownload&&) = default; virtual ~AsyncHttpDownload() = default; void start(HttpRequest::RequestOptions opt); void cancel(); @@ -210,8 +209,6 @@ public: HttpFileDownload() = default; HttpFileDownload(std::string destination, Overwrite = Overwrite::No); - HttpFileDownload(HttpFileDownload&& d) = default; - HttpFileDownload& operator=(HttpFileDownload&&) = default; virtual ~HttpFileDownload() = default; const std::string& destination() const; diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index c73d05270c..58c55981fc 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -25,6 +25,7 @@ #ifndef __OPENSPACE_CORE___SYNCBUFFER___H__ #define __OPENSPACE_CORE___SYNCBUFFER___H__ +#include #include #include #include @@ -48,6 +49,10 @@ public: T decode(); void decode(std::string& s); + void decode(glm::quat& value); + void decode(glm::dquat& value); + void decode(glm::vec3& value); + void decode(glm::dvec3& value); template void decode(T& value); diff --git a/include/openspace/util/syncbuffer.inl b/include/openspace/util/syncbuffer.inl index fcac31e1e5..3414ed687e 100644 --- a/include/openspace/util/syncbuffer.inl +++ b/include/openspace/util/syncbuffer.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include #include namespace openspace { @@ -36,7 +37,7 @@ void SyncBuffer::encode(const T& v) { _dataStream.resize(anticpatedBufferSize); } - memcpy(_dataStream.data() + _encodeOffset, &v, size); + std::memcpy(_dataStream.data() + _encodeOffset, &v, size); _encodeOffset += size; } @@ -45,7 +46,7 @@ T SyncBuffer::decode() { const size_t size = sizeof(T); ghoul_assert(_decodeOffset + size < _n, ""); T value; - memcpy(&value, _dataStream.data() + _decodeOffset, size); + std::memcpy(&value, _dataStream.data() + _decodeOffset, size); _decodeOffset += size; return value; } @@ -54,7 +55,7 @@ template void SyncBuffer::decode(T& value) { const size_t size = sizeof(T); ghoul_assert(_decodeOffset + size < _n, ""); - memcpy(&value, _dataStream.data() + _decodeOffset, size); + std::memcpy(&value, _dataStream.data() + _decodeOffset, size); _decodeOffset += size; } diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp index 54dfbaa48e..00d9cd476a 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp @@ -1377,7 +1377,7 @@ void AtmosphereDeferredcaster::step3DTexture( shaderProg->setUniform("dhdH", dminT, dH, dminG, dh); } - shaderProg->setUniform("layer", static_cast(layer)); + shaderProg->setUniform("layer", layer); } void AtmosphereDeferredcaster::saveTextureToPPMFile(GLenum color_buffer_attachment, diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 776c38032a..c4de1f58a9 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -713,7 +713,7 @@ glm::dmat4 RenderableAtmosphere::computeModelTransformMatrix( // scale the planet to appropriate size since the planet is a unit sphere return glm::translate(glm::dmat4(1.0), transformData.translation) * // Translation glm::dmat4(transformData.rotation) * // Spice rotation - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(transformData.scale))); + glm::scale(glm::dmat4(1.0), glm::dvec3(transformData.scale)); } void RenderableAtmosphere::render(const RenderData& data, RendererTasks& renderTask) { diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index 8f23e4928d..f2612c6641 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -204,11 +204,9 @@ glm::vec2 DashboardItemParallelConnection::size() const { connectionInfo += "\n"; if (nClients > 2) { - std::string c = std::to_string(nClients - 1); connectionInfo += fmt::format(Plural, nClients); } else if (nClients == 2) { - std::string c = std::to_string(nClients - 1); connectionInfo += fmt::format(Singular, nClients - 1); } else if (nClients == 1) { diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index 73c0f5ed25..cc7e030e80 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -324,7 +324,6 @@ void RenderableRadialGrid::update(const UpdateData&) { // Lines const int nLines = _gridSegments.value()[1]; const int nVertices = 2 * nLines; - const float fsegments = static_cast(nLines); _lines.varray.clear(); _lines.varray.reserve(nVertices); diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index fe875fd7df..68bfd4d0da 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -124,10 +124,10 @@ documentation::Documentation RenderableNodeLine::Documentation() { RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) - , _lineWidth(LineWidthInfo, 2.f, 1.f, 20.f) , _start(StartNodeInfo, Root) , _end(EndNodeInfo, Root) + , _lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) + , _lineWidth(LineWidthInfo, 2.f, 1.f, 20.f) { documentation::testSpecificationAndThrow( Documentation(), @@ -249,8 +249,6 @@ void RenderableNodeLine::updateVertexData() { _vertexArray.push_back(static_cast(_endPos.y)); _vertexArray.push_back(static_cast(_endPos.z)); - _vertexArray; - bindGL(); glBufferData( GL_ARRAY_BUFFER, diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 93202d9578..fd0ee7eac7 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -102,9 +102,9 @@ documentation::Documentation RenderablePlane::Documentation() { RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) + , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _billboard(BillboardInfo, false) , _size(SizeInfo, 10.f, 0.f, 1e25f) - , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 9484b0dd24..928872c451 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -346,11 +346,12 @@ void RenderableTrail::internalRender(bool renderLines, bool renderPoints, data.camera.combinedViewMatrix() * modelTransform * info._localTransform ); - const int sorting = [](RenderInformation::VertexSorting sorting) { - switch (sorting) { + const int sorting = [](RenderInformation::VertexSorting s) { + switch (s) { case RenderInformation::VertexSorting::NewestFirst: return 0; case RenderInformation::VertexSorting::OldestFirst: return 1; - case RenderInformation::VertexSorting::NoSorting: return 2; + case RenderInformation::VertexSorting::NoSorting: return 2; + default: throw ghoul::MissingCaseException(); } }(info.sorting); diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index a1d80e4503..5ad3c26ae7 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -635,8 +635,8 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, ghoul::fontrendering::FontRenderer::ProjectedLabelsInformation labelInfo; labelInfo.orthoRight = orthoRight; labelInfo.orthoUp = orthoUp; - labelInfo.minSize = static_cast(_textMinSize); - labelInfo.maxSize = static_cast(_textMaxSize); + labelInfo.minSize = _textMinSize; + labelInfo.maxSize = _textMaxSize; labelInfo.cameraPos = data.camera.positionVec3(); labelInfo.cameraLookUp = data.camera.lookUpVectorWorldSpace(); labelInfo.renderType = _renderOption; @@ -992,7 +992,6 @@ bool RenderablePlanesCloud::readSpeckFile() { glm::vec3 u(0.f); glm::vec3 v(0.f); - int textureIndex = 0; std::vector values(_nValuesPerAstronomicalObject); @@ -1022,11 +1021,6 @@ bool RenderablePlanesCloud::readSpeckFile() { break; } } - - // JCC: This should be moved to the RenderablePlanesCloud: - if (i == _textureVariableIndex) { - textureIndex = static_cast(values[i]); - } } _fullData.insert(_fullData.end(), values.begin(), values.end()); diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 476cd781bd..6b24ee6afd 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -61,9 +61,12 @@ struct Exoplanet { double tt; // Epoch of transit center in HJD-2440000 float ttUpper; // Upper uncertainty of epoch of transit center float ttLower; // Lower uncertainty of epoch of transit center - float positionX; // Star position's X-coordinate in parsec - float positionY; // Star position's Y-coordinate in parsec - float positionZ; // Star position's Z-coordinate in parsec + // Star position's X-coordinate in parsec + float positionX = std::numeric_limits::quiet_NaN(); + // Star position's Y-coordinate in parsec + float positionY = std::numeric_limits::quiet_NaN(); + // Star position's Z-coordinate in parsec + float positionZ = std::numeric_limits::quiet_NaN(); }; // Convert csv-file specific names to the corresponding name in the speck data file diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 216d8c16fa..319b78b3b0 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -130,7 +130,9 @@ RenderableOrbitDisc::RenderableOrbitDisc(const ghoul::Dictionary& dictionary) addProperty(_offset); _size = static_cast(dictionary.value(SizeInfo.identifier)); - _size = _size + (_offset.value().y * distanceconstants::AstronomicalUnit); + _size = static_cast( + _size + (_offset.value().y * distanceconstants::AstronomicalUnit) + ); setBoundingSphere(_size); _size.onChange([&]() { _planeIsDirty = true; }); addProperty(_size); @@ -233,7 +235,7 @@ void RenderableOrbitDisc::render(const RenderData& data, RendererTasks&) { global::renderEngine->openglStateCache().resetPolygonAndClippingState(); } -void RenderableOrbitDisc::update(const UpdateData& data) { +void RenderableOrbitDisc::update(const UpdateData&) { if (_shader->isDirty()) { _shader->rebuildFromFile(); _uniformCache.modelViewProjection = _shader->uniformLocation( diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index c1bb2ff2d6..a7ec330972 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -373,11 +373,14 @@ float ExoplanetsDataPreparationTask::bvFromTeff(float teff) { float bv = 0.f; float bvUpper = 0.f; float bvLower = 0.f; - float teffLower, teffUpper; - std::string row, teffString, bvString; + float teffLower; + float teffUpper; + std::string row; while (getline(teffToBvFile, row)) { std::istringstream lineStream(row); + std::string teffString; getline(lineStream, teffString, ','); + std::string bvString; getline(lineStream, bvString); float teffCurrent = std::stof(teffString.c_str(), nullptr); diff --git a/modules/fitsfilereader/CMakeLists.txt b/modules/fitsfilereader/CMakeLists.txt index bea007310d..a95eebce93 100644 --- a/modules/fitsfilereader/CMakeLists.txt +++ b/modules/fitsfilereader/CMakeLists.txt @@ -59,10 +59,8 @@ add_subdirectory(${CCFITS_ROOT_DIR}) set_folder_location(CCfits "External") set(CCfits_BUILD_SHARED_LIBS OFF) -if (GHOUL_DISABLE_EXTERNAL_WARNINGS) - disable_external_warnings(cfitsio) - disable_external_warnings(CCfits) -endif () +disable_external_warnings(cfitsio) +disable_external_warnings(CCfits) target_include_directories(${MODULE_NAME} SYSTEM PUBLIC ${INCLUDES_FOR_TARGET}) target_link_libraries(${MODULE_NAME} PRIVATE CCfits) diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index f35a51aa9f..8d978d718a 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -325,7 +325,7 @@ std::vector FitsFileReader::readFitsFile(std::string filePath, int& nValu values[idx++] = tycho_v_err[i % nStars]; // Read extra columns, if any. This will slow down the sorting tremendously! - for (size_t col = defaultCols; col < nColumnsRead; ++col) { + for (int col = defaultCols; col < nColumnsRead; ++col) { std::vector vecData = std::move(tableContent[allColumnNames[col]]); values[idx++] = vecData[i]; } diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp index ff10f2a3f1..d4c1f2a0de 100644 --- a/modules/gaia/rendering/renderablegaiastars.cpp +++ b/modules/gaia/rendering/renderablegaiastars.cpp @@ -503,12 +503,6 @@ documentation::Documentation RenderableGaiaStars::Documentation() { RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _filePath(FilePathInfo) - , _fileReaderOption( - FileReaderOptionInfo, - properties::OptionProperty::DisplayType::Dropdown - ) - , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) - , _shaderOption(ShaderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _pointSpreadFunctionTexturePath(PsfTextureInfo) , _colorTexturePath(ColorTextureInfo) , _luminosityMultiplier(LuminosityMultiplierInfo, 35.f, 1.f, 1000.f) @@ -522,8 +516,6 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) , _additionalNodes(AdditionalNodesInfo, glm::ivec2(1), glm::ivec2(0), glm::ivec2(4)) , _tmPointPixelWeightThreshold(TmPointPxThresholdInfo, 0.001f, 0.000001f, 0.01f) , _lodPixelThreshold(LodPixelThresholdInfo, 250.f, 0.f, 5000.f) - , _maxGpuMemoryPercent(MaxGpuMemoryPercentInfo, 0.45f, 0.f, 1.f) - , _maxCpuMemoryPercent(MaxCpuMemoryPercentInfo, 0.5f, 0.f, 1.f) , _posXThreshold(FilterPosXInfo, glm::vec2(0.f), glm::vec2(-10.f), glm::vec2(10.f)) , _posYThreshold(FilterPosYInfo, glm::vec2(0.f), glm::vec2(-10.f), glm::vec2(10.f)) , _posZThreshold(FilterPosZInfo, glm::vec2(0.f), glm::vec2(-10.f), glm::vec2(10.f)) @@ -533,9 +525,17 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) , _firstRow(FirstRowInfo, 0, 0, 2539913) // DR1-max: 2539913 , _lastRow(LastRowInfo, 0, 0, 2539913) , _columnNamesList(ColumnNamesInfo) + , _fileReaderOption( + FileReaderOptionInfo, + properties::OptionProperty::DisplayType::Dropdown + ) + , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) + , _shaderOption(ShaderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _nRenderedStars(NumRenderedStarsInfo, 0, 0, 2000000000) // 2 Billion stars , _cpuRamBudgetProperty(CpuRamBudgetInfo, 0.f, 0.f, 1.f) , _gpuStreamBudgetProperty(GpuStreamBudgetInfo, 0.f, 0.f, 1.f) + , _maxGpuMemoryPercent(MaxGpuMemoryPercentInfo, 0.45f, 0.f, 1.f) + , _maxCpuMemoryPercent(MaxCpuMemoryPercentInfo, 0.5f, 0.f, 1.f) , _reportGlErrors(ReportGlErrorsInfo, false) , _accumulatedIndices(1, 0) { @@ -1142,7 +1142,7 @@ void RenderableGaiaStars::render(const RenderData& data, RendererTasks&) { glm::dmat4 model = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * glm::dmat4(data.modelTransform.rotation) * - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale))); + glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale)); float viewScaling = data.camera.scaling(); glm::dmat4 view = data.camera.combinedViewMatrix(); diff --git a/modules/gaia/tasks/readfilejob.cpp b/modules/gaia/tasks/readfilejob.cpp index ac15d85d87..bf116931d7 100644 --- a/modules/gaia/tasks/readfilejob.cpp +++ b/modules/gaia/tasks/readfilejob.cpp @@ -39,11 +39,11 @@ ReadFileJob::ReadFileJob(std::string filePath, std::vector allColum int firstRow, int lastRow, size_t nDefaultCols, int nValuesPerStar, std::shared_ptr fitsReader) : _inFilePath(std::move(filePath)) - , _allColumns(std::move(allColumns)) , _firstRow(firstRow) , _lastRow(lastRow) , _nDefaultCols(nDefaultCols) , _nValuesPerStar(nValuesPerStar) + , _allColumns(std::move(allColumns)) , _fitsFileReader(std::move(fitsReader)) , _octants(8) {} diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 34cf343446..acda52d1f1 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -52,12 +52,6 @@ namespace { constexpr int8_t CurrentCacheVersion = 1; - constexpr const char* GlslRaycastPath = - "${MODULE_GALAXY}/shaders/galaxyraycast.glsl"; - constexpr const char* GlslBoundsVsPath = - "${MODULE_GALAXY}/shaders/raycasterbounds_vs.glsl"; - constexpr const char* GlslBoundsFsPath = - "${MODULE_GALAXY}/shaders/raycasterbounds_fs.glsl"; constexpr const char* _loggerCat = "Renderable Galaxy"; constexpr const std::array UniformNamesPoints = { @@ -157,13 +151,13 @@ namespace { ); fileStream.write(reinterpret_cast(&nPoints), sizeof(int64_t)); fileStream.write(reinterpret_cast(&pointsRatio), sizeof(float)); - uint64_t nPositions = static_cast(positions.size()); + uint64_t nPositions = positions.size(); fileStream.write(reinterpret_cast(&nPositions), sizeof(uint64_t)); fileStream.write( reinterpret_cast(positions.data()), positions.size() * sizeof(glm::vec3) ); - uint64_t nColors = static_cast(colors.size()); + uint64_t nColors = colors.size(); fileStream.write(reinterpret_cast(&nColors), sizeof(uint64_t)); fileStream.write( reinterpret_cast(colors.data()), @@ -685,7 +679,7 @@ void RenderableGalaxy::renderPoints(const RenderData& data) { glm::dmat4 modelMatrix = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * glm::dmat4(data.modelTransform.rotation) * rotMatrix * - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale))); + glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale)); glm::dmat4 projectionMatrix = glm::dmat4(data.camera.projectionMatrix()); @@ -760,7 +754,7 @@ void RenderableGalaxy::renderBillboards(const RenderData& data) { glm::dmat4 modelMatrix = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * glm::dmat4(data.modelTransform.rotation) * rotMatrix * - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale))); + glm::scale(glm::dmat4(1.0), data.modelTransform.scale); glm::dmat4 projectionMatrix = glm::dmat4(data.camera.projectionMatrix()); diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 6a36997952..1c49f7ae5e 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -452,7 +452,13 @@ std::vector GlobeBrowsingModule::documentations() void GlobeBrowsingModule::goToChunk(const globebrowsing::RenderableGlobe& globe, int x, int y, int level) { - goToChunk(globe, globebrowsing::TileIndex(x, y, level), glm::vec2(0.5f, 0.5f), true); + ghoul_assert(level < std::numeric_limits::max(), "Level way too big"); + goToChunk( + globe, + globebrowsing::TileIndex(x, y, static_cast(level)), + glm::vec2(0.5f, 0.5f), + true + ); } void GlobeBrowsingModule::goToGeo(const globebrowsing::RenderableGlobe& globe, @@ -528,10 +534,6 @@ void GlobeBrowsingModule::goToChunk(const globebrowsing::RenderableGlobe& globe, cameraPositionModelSpace ); - const Geodetic2 geo2 = globe.ellipsoid().cartesianToGeodetic2( - posHandle.centerToReferenceSurface - ); - const double altitude = glm::length( cameraPositionModelSpace - posHandle.centerToReferenceSurface ); @@ -595,9 +597,6 @@ glm::dquat GlobeBrowsingModule::lookDownCameraRotation( { using namespace globebrowsing; - // Camera is described in world space - const glm::dmat4 modelTransform = globe.modelTransform(); - // Lookup vector const glm::dvec3 positionModelSpace = globe.ellipsoid().cartesianSurfacePosition( geo2 diff --git a/modules/globebrowsing/src/basictypes.h b/modules/globebrowsing/src/basictypes.h index 049ce3d8ed..fa6499db1c 100644 --- a/modules/globebrowsing/src/basictypes.h +++ b/modules/globebrowsing/src/basictypes.h @@ -89,8 +89,8 @@ enum Quad { struct TileDepthTransform { - float scale; - float offset; + float scale = 1.f; + float offset = 0.f; }; @@ -104,7 +104,7 @@ struct TileMetaData { std::array maxValues; std::array minValues; std::array hasMissingData; - uint8_t nValues; + uint8_t nValues = 0; }; diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 045b98cbb5..08e3c19a05 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -696,8 +696,6 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data, _labelsOpacity * fadeInVariable ); - glm::dvec4 cameraUpVecWorld = glm::dvec4(data.camera.lookUpVectorWorldSpace(), 0.0); - glm::dmat4 VP = glm::dmat4(data.camera.sgctInternal.projectionMatrix()) * data.camera.combinedViewMatrix(); diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index cb84f810ed..fc65e5501e 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -225,9 +225,9 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, , _enabled(EnabledInfo, false) , _reset(ResetInfo) , _remove(RemoveInfo) + , _guiDescription(GuiDescriptionInfo) , _solidColor(ColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) , _layerGroupId(id) - , _guiDescription(GuiDescriptionInfo) { documentation::testSpecificationAndThrow(Documentation(), layerDict, "Layer"); @@ -412,9 +412,9 @@ ChunkTilePile Layer::chunkTilePile(const TileIndex& tileIndex, int pileSize) con ChunkTilePile chunkTilePile; std::fill(chunkTilePile.begin(), chunkTilePile.end(), std::nullopt); for (int i = 0; i < pileSize; ++i) { - chunkTilePile[i] = ChunkTile { - Tile(), TileUvTransform { { 0, 0 }, { 1, 1 } } - }; + ChunkTile tile; + tile.uvTransform = TileUvTransform{ { 0, 0 }, { 1, 1 } }; + chunkTilePile[i] = tile; } return chunkTilePile; } @@ -517,9 +517,7 @@ void Layer::initializeBasedOnType(layergroupid::TypeID id, ghoul::Dictionary ini std::string name = initDict.value(KeyName); LDEBUG("Initializing tile provider for layer: '" + name + "'"); } - _tileProvider = std::unique_ptr( - tileprovider::createFromDictionary(id, std::move(initDict)) - ); + _tileProvider = tileprovider::createFromDictionary(id, std::move(initDict)); break; } case layergroupid::TypeID::SolidColor: { diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index bbbee1d771..540fbc9795 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -197,25 +197,25 @@ int calculateTileLevelDifference(GDALDataset* dataset, int minimumPixelSize) { * Example: Side = left and pos = 16: * start.x = 16 and keep the size the same */ -void alignPixelRegion(PixelRegion& pr, Side side, int pos) { +void alignPixelRegion(PixelRegion& pixelRegion, Side side, int pos) { switch (side) { case Side::Left: - pr.start.x = pos; + pixelRegion.start.x = pos; break; case Side::Top: - pr.start.y = pos; + pixelRegion.start.y = pos; break; case Side::Right: - pr.start.x = pos - pr.numPixels.x; + pixelRegion.start.x = pos - pixelRegion.numPixels.x; break; case Side::Bottom: - pr.start.y = pos - pr.numPixels.y; + pixelRegion.start.y = pos - pixelRegion.numPixels.y; break; } } -PixelRegion globalCut(PixelRegion& pr, Side side, int p) { - const bool lineIntersect = [pr, side, p]() { +PixelRegion globalCut(PixelRegion& pixelRegion, Side side, int p) { + const bool lineIntersect = [pr = pixelRegion, side, p]() { switch (side) { case Side::Left: case Side::Right: @@ -232,8 +232,8 @@ PixelRegion globalCut(PixelRegion& pr, Side side, int p) { return PixelRegion(); } - auto setSide = [](PixelRegion& pr, Side side, int pos) { - switch (side) { + auto setSide = [](PixelRegion& pr, Side s, int pos) { + switch (s) { case Side::Left: pr.numPixels.x += (pr.start.x - pos); pr.start.x = pos; @@ -251,35 +251,35 @@ PixelRegion globalCut(PixelRegion& pr, Side side, int p) { } }; - PixelRegion cutOff(pr); + PixelRegion cutOff(pixelRegion); int cutSize = 0; switch (side) { case Side::Left: - setSide(pr, Side::Left, p); + setSide(pixelRegion, Side::Left, p); setSide(cutOff, Side::Right, p - cutSize); break; case Side::Top: - setSide(pr, Side::Top, p); + setSide(pixelRegion, Side::Top, p); setSide(cutOff, Side::Bottom, p - cutSize); break; case Side::Right: - setSide(pr, Side::Right, p); + setSide(pixelRegion, Side::Right, p); setSide(cutOff, Side::Left, p + cutSize); break; case Side::Bottom: - setSide(pr, Side::Bottom, p); + setSide(pixelRegion, Side::Bottom, p); setSide(cutOff, Side::Top, p + cutSize); break; } return cutOff; } -int edge(const PixelRegion& pr, Side side) { +int edge(const PixelRegion& pixelRegion, Side side) { switch (side) { - case Side::Left: return pr.start.x; - case Side::Top: return pr.start.y; - case Side::Right: return pr.start.x + pr.numPixels.x; - case Side::Bottom: return pr.start.y + pr.numPixels.y; + case Side::Left: return pixelRegion.start.x; + case Side::Top: return pixelRegion.start.y; + case Side::Right: return pixelRegion.start.x + pixelRegion.numPixels.x; + case Side::Bottom: return pixelRegion.start.y + pixelRegion.numPixels.y; default: throw ghoul::MissingCaseException(); } } @@ -650,7 +650,7 @@ RawTile RawTileDataReader::readTileData(TileIndex tileIndex) const { for (const MemoryLocation& ml : NoDataAvailableData) { std::byte* ptr = rawTile.imageData.get(); - if (ml.offset >= numBytes || ptr[ml.offset] != ml.value) { + if (ml.offset >= static_cast(numBytes) || ptr[ml.offset] != ml.value) { // Bail out as early as possible break; } diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index d4c47cf3e1..2c6b10e237 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -1140,14 +1140,6 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, modelViewProjectionTransform ); - const bool hasNightLayers = !_layerManager.layerGroup( - layergroupid::GroupID::NightLayers - ).activeLayers().empty(); - - const bool hasWaterLayer = !_layerManager.layerGroup( - layergroupid::GroupID::WaterMasks - ).activeLayers().empty(); - _globalRenderer.program->setUniform("modelViewTransform", modelViewTransform); const bool hasHeightLayer = !_layerManager.layerGroup( @@ -1224,7 +1216,7 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, int localCount = 0; auto traversal = [](const Chunk& node, std::vector& global, - int& globalCount, std::vector& local, int& localCount, int cutoff, + int& iGlobal, std::vector& local, int& iLocal, int cutoff, std::vector& traversalMemory) { ZoneScopedN("traversal") @@ -1239,12 +1231,12 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, if (isLeaf(*n) && n->isVisible) { if (n->tileIndex.level < cutoff) { - global[globalCount] = n; - ++globalCount; + global[iGlobal] = n; + ++iGlobal; } else { - local[localCount] = n; - ++localCount; + local[iLocal] = n; + ++iLocal; } } @@ -1316,7 +1308,8 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, // After certain number of iterations(_debugProperties.dynamicLodIterationCount) of // unavailable/available data in a row, we assume that a change could be made. const int iterCount = _debugProperties.dynamicLodIterationCount; - const bool exceededIterations = _iterationsOfUnavailableData > iterCount; + const bool exceededIterations = + static_cast(_iterationsOfUnavailableData) > iterCount; const float clf = _generalProperties.currentLodScaleFactor; const float clfMin = _generalProperties.currentLodScaleFactor.minValue(); const float targetLod = _generalProperties.targetLodScaleFactor; @@ -1327,7 +1320,9 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, _iterationsOfUnavailableData = 0; _lodScaleFactorDirty = true; } // Make 2 times the iterations with available data to move it up again - else if (_iterationsOfAvailableData > (iterCount * 2) && clf < targetLod) { + else if (static_cast(_iterationsOfAvailableData) > + (iterCount * 2) && clf < targetLod) + { _generalProperties.currentLodScaleFactor = _generalProperties.currentLodScaleFactor + 0.1f; _iterationsOfAvailableData = 0; @@ -1966,7 +1961,8 @@ float RenderableGlobe::getHeight(const glm::dvec3& position) const { const int x = static_cast(floor(xIndexSpace)); const int y = static_cast(floor(yIndexSpace)); - const TileIndex tileIndex(x, y, chunkLevel); + ghoul_assert(chunkLevel < std::numeric_limits::max(), "Too high level"); + const TileIndex tileIndex(x, y, static_cast(chunkLevel)); const GeodeticPatch patch = GeodeticPatch(tileIndex); const Geodetic2 northEast = patch.corner(Quad::NORTH_EAST); @@ -2401,7 +2397,7 @@ int RenderableGlobe::desiredLevelByAvailableTileData(const Chunk& chunk) const { ////////////////////////////////////////////////////////////////////////////////////////// bool RenderableGlobe::isCullableByFrustum(const Chunk& chunk, - const RenderData& renderData, + const RenderData&, const glm::dmat4& mvp) const { ZoneScoped diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index b9615037cb..ab84f32c50 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -298,7 +298,7 @@ RenderData ShadowComponent::begin(const RenderData& data) { //matrix[14] = -glm::dot(cameraZ, lightPosition); - _lightCamera = std::move(std::unique_ptr(new Camera(data.camera))); + _lightCamera = std::make_unique(data.camera); _lightCamera->setPositionVec3(lightPosition); _lightCamera->setRotation(glm::dquat(glm::inverse(cameraRotationMatrix))); //======================================================================= @@ -512,7 +512,7 @@ void ShadowComponent::updateDepthTexture() { 0, GL_DEPTH_COMPONENT, GL_FLOAT, - 0 + nullptr ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); diff --git a/modules/globebrowsing/src/tileprovider.cpp b/modules/globebrowsing/src/tileprovider.cpp index a8fa393b0e..a0d6e1b267 100644 --- a/modules/globebrowsing/src/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider.cpp @@ -629,9 +629,9 @@ SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) -TextTileProvider::TextTileProvider(TileTextureInitData initData, size_t fontSize) - : initData(std::move(initData)) - , fontSize(fontSize) +TextTileProvider::TextTileProvider(TileTextureInitData initData_, size_t fontSize_) + : initData(std::move(initData_)) + , fontSize(fontSize_) { ZoneScoped @@ -715,9 +715,11 @@ TileProviderByIndex::TileProviderByIndex(const ghoul::Dictionary& dictionary) { constexpr const char* KeyY = "Y"; int level = static_cast(tileIndexDict.value(KeyLevel)); + ghoul_assert(level < std::numeric_limits::max(), "Level too large"); int x = static_cast(tileIndexDict.value(KeyX)); int y = static_cast(tileIndexDict.value(KeyY)); - const TileIndex tileIndex(x, y, level); + + const TileIndex tileIndex(x, y, static_cast(level)); layergroupid::TypeID providerTypeID = layergroupid::TypeID::DefaultTileLayer; if (defaultProviderDict.hasKeyAndValue("Type")) { @@ -783,9 +785,7 @@ TileProviderByLevel::TileProviderByLevel(const ghoul::Dictionary& dictionary) { typeID = layergroupid::TypeID::DefaultTileLayer; } - std::unique_ptr tp = std::unique_ptr( - createFromDictionary(typeID, providerDict) - ); + std::unique_ptr tp = createFromDictionary(typeID, providerDict); std::string provId = providerDict.value("Identifier"); tp->setIdentifier(provId); @@ -845,14 +845,14 @@ bool initialize(TileProvider& tp) { ghoul_assert(!tp.isInitialized, "TileProvider can only be initialized once."); - if (TileProvider::NumTileProviders > std::numeric_limits::max()) { + if (TileProvider::NumTileProviders > std::numeric_limits::max() - 1) { LERRORC( "TileProvider", "Number of tile providers exceeds 65535. Something will break soon" ); TileProvider::NumTileProviders = 0; } - tp.uniqueIdentifier = TileProvider::NumTileProviders++; + tp.uniqueIdentifier = static_cast(TileProvider::NumTileProviders++); if (TileProvider::NumTileProviders == std::numeric_limits::max()) { --TileProvider::NumTileProviders; return false; @@ -1411,15 +1411,15 @@ ChunkTile chunkTile(TileProvider& tp, TileIndex tileIndex, int parents, int maxP ghoul_assert(tp.isInitialized, "TileProvider was not initialized."); - auto ascendToParent = [](TileIndex& tileIndex, TileUvTransform& uv) { + auto ascendToParent = [](TileIndex& ti, TileUvTransform& uv) { uv.uvOffset *= 0.5; uv.uvScale *= 0.5; - uv.uvOffset += tileIndex.positionRelativeParent(); + uv.uvOffset += ti.positionRelativeParent(); - tileIndex.x /= 2; - tileIndex.y /= 2; - tileIndex.level--; + ti.x /= 2; + ti.y /= 2; + ti.level--; }; TileUvTransform uvTransform = { glm::vec2(0.f, 0.f), glm::vec2(1.f, 1.f) }; diff --git a/modules/globebrowsing/src/tiletextureinitdata.cpp b/modules/globebrowsing/src/tiletextureinitdata.cpp index a77e92bcc3..afdd8fff2a 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.cpp +++ b/modules/globebrowsing/src/tiletextureinitdata.cpp @@ -186,18 +186,18 @@ TileTextureInitData::TileTextureInitData(size_t width, size_t height, GLenum typ TileTextureInitData TileTextureInitData::operator=(const TileTextureInitData& rhs) { if (this == &rhs) { - return TileTextureInitData(*this); + return *this; } - return TileTextureInitData(rhs); + return rhs; } TileTextureInitData TileTextureInitData::operator=(TileTextureInitData&& rhs) { if (this == &rhs) { - return TileTextureInitData(*this); + return *this; } - return TileTextureInitData(rhs); + return rhs; } } // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index 64aab1b640..fd03fda9f0 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -148,7 +148,7 @@ std::string_view RangedTime::end() const { DateTime::DateTime(std::string_view initDateTime) { setTime(initDateTime); -}; +} void DateTime::setTime(std::string_view input) { // Indices into an ISO8601 YYYY-MM-ddTHH:mm:ss string @@ -172,7 +172,7 @@ std::string DateTime::ISO8601() const { "{:0>4}-{:0>2}-{:0>2}T{:0>2}:{:0>2}:{:0>2}", _year, _month, _day, _hour, _minute, _second ); -}; +} double DateTime::J2000() const { char Buffer[20]; @@ -185,15 +185,6 @@ double DateTime::J2000() const { return Time::convertTime(Buffer); } -void DateTime::operator=(DateTime& src) { - _year = src.year(); - _month = src.month(); - _day = src.day(); - _hour = src.hour(); - _minute = src.minute(); - _second = src.second(); -} - int DateTime::increment(int value, char unit, double error, double resolution) { unsigned int nIncrements = std::abs(static_cast(error / resolution)); if (nIncrements == 0) { @@ -259,30 +250,26 @@ void DateTime::decrementOnce(int value, char unit) { if (singleDecrement(_minute, value, 0, 59)) { break; } - // else fall-through if underflow... - + [[ fallthrough ]]; case 'h': if (singleDecrement(_hour, value, 0, 23)) { break; } - // else fall-through if underflow... - + [[ fallthrough ]]; case 'd': if (singleDecrement(_day, value, 1, monthSize(_month == 1 ? 12 : _month - 1, _year))) { break; } - // else fall-through if underflow... - + [[ fallthrough ]]; case 'M': inBounds = singleDecrement(_month, value, 1, 12); _day = std::clamp(_day, 1, monthSize(_month, _year)); if (inBounds) { break; } - // else fall-through if underflow... - + [[ fallthrough ]]; case 'y': _year -= value; break; @@ -417,7 +404,7 @@ void TimeQuantizer::verifyResolutionRestrictions(const int value, const char uni } break; case 'h': - if (!(value >= 1 && value <= 4 || value == 6 || value == 12)) { + if (!((value >= 1 && value <= 4) || value == 6 || value == 12)) { throw ghoul::RuntimeError(fmt::format( "Invalid resolution count of {} for (h)our option. Valid counts are " "1, 2, 3, 4, 6, or 12", value @@ -631,7 +618,6 @@ std::vector TimeQuantizer::quantized(Time& start, Time& end) { static_cast(delta) % static_cast(_resolution) == 0, "Quantization error" ); - const int nSteps = static_cast(delta / _resolution); std::vector result; DateTime itr = s; diff --git a/modules/globebrowsing/src/timequantizer.h b/modules/globebrowsing/src/timequantizer.h index b940c8fe43..c89daa027e 100644 --- a/modules/globebrowsing/src/timequantizer.h +++ b/modules/globebrowsing/src/timequantizer.h @@ -131,13 +131,6 @@ public: */ void setTime(std::string_view input); - /* - * Used to deep-copy from another DateTime instance - * - * \params src the DateTime object to copy from - */ - void operator=(DateTime& src); - /* * Get the date/time value in ISO8601 format * diff --git a/modules/imgui/src/gui.cpp b/modules/imgui/src/gui.cpp index 85868ef5c3..5de1a683b0 100644 --- a/modules/imgui/src/gui.cpp +++ b/modules/imgui/src/gui.cpp @@ -512,7 +512,7 @@ void GUI::endFrame() { glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData( GL_ARRAY_BUFFER, - static_cast(cmdList->VtxBuffer.size() * sizeof(ImDrawVert)), + cmdList->VtxBuffer.size() * sizeof(ImDrawVert), reinterpret_cast(&cmdList->VtxBuffer.front()), GL_STREAM_DRAW ); @@ -520,7 +520,7 @@ void GUI::endFrame() { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vboElements); glBufferData( GL_ELEMENT_ARRAY_BUFFER, - static_cast(cmdList->IdxBuffer.size() * sizeof(ImDrawIdx)), + cmdList->IdxBuffer.size() * sizeof(ImDrawIdx), reinterpret_cast(&cmdList->IdxBuffer.front()), GL_STREAM_DRAW ); diff --git a/modules/imgui/src/guigibscomponent.cpp b/modules/imgui/src/guigibscomponent.cpp index 779cf00de6..124dca04d1 100644 --- a/modules/imgui/src/guigibscomponent.cpp +++ b/modules/imgui/src/guigibscomponent.cpp @@ -28,7 +28,7 @@ #include #include #include -#pragma optimize ("", off) + namespace { const ImVec2 WindowSize = ImVec2(350, 500); } // namespace diff --git a/modules/imgui/src/guimemorycomponent.cpp b/modules/imgui/src/guimemorycomponent.cpp index 04a6e6f6a4..8aac5b0d9a 100644 --- a/modules/imgui/src/guimemorycomponent.cpp +++ b/modules/imgui/src/guimemorycomponent.cpp @@ -39,7 +39,7 @@ namespace { for (size_t i = 0; i < occupancies.size(); ++i) { ImGui::Text( " %i: %i/%i (%.2f/%.2f kiB)", - i, + static_cast(i), occupancies[i], p._bucketSize, occupancies[i] / 1024.f, diff --git a/modules/imgui/src/guispacetimecomponent.cpp b/modules/imgui/src/guispacetimecomponent.cpp index 2508abef96..b02c32cbb4 100644 --- a/modules/imgui/src/guispacetimecomponent.cpp +++ b/modules/imgui/src/guispacetimecomponent.cpp @@ -393,7 +393,7 @@ void GuiSpaceTimeComponent::render() { // value to the new unit _deltaTime = static_cast( - convertTime(dt, TimeUnit::Second, static_cast(_deltaTimeUnit)) + convertTime(dt, TimeUnit::Second, _deltaTimeUnit) ); } } @@ -461,7 +461,7 @@ void GuiSpaceTimeComponent::render() { const double newDeltaTime = convertTime( _deltaTime + _accelerationDelta * global::windowDelegate->deltaTime() * 10, - static_cast(_deltaTimeUnit), + _deltaTimeUnit, TimeUnit::Second ); diff --git a/modules/server/src/topics/flightcontrollertopic.cpp b/modules/server/src/topics/flightcontrollertopic.cpp index ed95e9df7b..29e7504b80 100644 --- a/modules/server/src/topics/flightcontrollertopic.cpp +++ b/modules/server/src/topics/flightcontrollertopic.cpp @@ -47,8 +47,6 @@ #include namespace { - constexpr const char* BasePathToken = "${BASE}"; - enum class Command { Connect = 0, Disconnect, @@ -90,12 +88,7 @@ namespace { constexpr const char* AutopilotEngagedKey = "engaged"; constexpr const char* AutopilotInputKey = "autopilotInput"; - constexpr const char* FlightControllerType = "flightcontroller"; - // Friction JSON Keys - constexpr const char* FrictionEngagedKey = "engaged"; - constexpr const char* FrictionPropertyUri = - "NavigationHandler.OrbitalNavigator.Friction"; constexpr const char* FrictionRotationKey = "rotation"; constexpr const char* FrictionZoomKey = "zoom"; constexpr const char* FrictionRollKey = "roll"; @@ -104,7 +97,6 @@ namespace { constexpr const char* RollFriction = "Friction.RollFriction"; // Friction Lua Keys - constexpr const char* LuaKey = "lua"; constexpr const char* LuaScript = "script"; constexpr const char* OrbitX = "orbitX"; @@ -148,9 +140,6 @@ namespace { { Friction, Command::Friction }, { Lua, Command::Lua } }); - - const int Axes = 10; - } // namespace using nlohmann::json; diff --git a/modules/space/rendering/renderableorbitalkepler.cpp b/modules/space/rendering/renderableorbitalkepler.cpp index 8b438ead27..5c2ef5427f 100644 --- a/modules/space/rendering/renderableorbitalkepler.cpp +++ b/modules/space/rendering/renderableorbitalkepler.cpp @@ -46,9 +46,6 @@ namespace { constexpr const char* ProgramName = "OrbitalKepler"; - constexpr const char* _loggerCat = "OrbitalKepler"; - constexpr const char* KeyFile = "Path"; - constexpr const char* KeyLineNum = "LineNumber"; // Fragile! Keep in sync with documentation const std::map RenderBinConversion = { @@ -366,11 +363,11 @@ double RenderableOrbitalKepler::epochFromYMDdSubstring(const std::string& epochS RenderableOrbitalKepler::RenderableOrbitalKepler(const ghoul::Dictionary& dict) : Renderable(dict) - , _segmentQuality(SegmentQualityInfo, 2, 1, 10) - , _path(PathInfo) , _upperLimit(UpperLimitInfo, 1000, 1, 1000000) + , _segmentQuality(SegmentQualityInfo, 2, 1, 10) , _startRenderIdx(StartRenderIdxInfo, 0, 0, 1) , _sizeRender(RenderSizeInfo, 1, 1, 2) + , _path(PathInfo) { documentation::testSpecificationAndThrow( Documentation(), @@ -525,13 +522,13 @@ void RenderableOrbitalKepler::updateBuffers() { size_t nVerticesTotal = 0; int numOrbits = static_cast(_data.size()); - for (size_t i = 0; i < numOrbits; ++i) { + for (int i = 0; i < numOrbits; ++i) { nVerticesTotal += _segmentSize[i] + 1; } _vertexBufferData.resize(nVerticesTotal); size_t vertexBufIdx = 0; - for (size_t orbitIdx = 0; orbitIdx < numOrbits; ++orbitIdx) { + for (int orbitIdx = 0; orbitIdx < numOrbits; ++orbitIdx) { const KeplerParameters& orbit = _data[orbitIdx]; _keplerTranslator.setKeplerElements( diff --git a/modules/space/rendering/renderableorbitalkepler.h b/modules/space/rendering/renderableorbitalkepler.h index 42c6a45848..5390af1a44 100644 --- a/modules/space/rendering/renderableorbitalkepler.h +++ b/modules/space/rendering/renderableorbitalkepler.h @@ -120,7 +120,6 @@ private: GLuint _vertexArray; GLuint _vertexBuffer; - GLuint _indexBuffer; void updateBuffers(); diff --git a/modules/space/rendering/renderablesatellites.cpp b/modules/space/rendering/renderablesatellites.cpp index f3c667a197..fc1d6ec66a 100644 --- a/modules/space/rendering/renderablesatellites.cpp +++ b/modules/space/rendering/renderablesatellites.cpp @@ -45,7 +45,6 @@ #include namespace { - constexpr const char* ProgramName = "RenderableSatellites"; constexpr const char* _loggerCat = "Satellites"; static const openspace::properties::Property::PropertyInfo PathInfo = { diff --git a/modules/space/rendering/renderablesatellites.h b/modules/space/rendering/renderablesatellites.h index d6e9112ecb..669b335f3d 100644 --- a/modules/space/rendering/renderablesatellites.h +++ b/modules/space/rendering/renderablesatellites.h @@ -41,7 +41,7 @@ namespace openspace { class RenderableSatellites : public RenderableOrbitalKepler { public: RenderableSatellites(const ghoul::Dictionary& dictionary); - void readDataFile(const std::string& filename); + virtual void readDataFile(const std::string& filename) override; static documentation::Documentation Documentation(); void initializeFileReading(); diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 24666a385f..1ce88f70bd 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -46,7 +46,6 @@ #include namespace { - constexpr const char* ProgramName = "RenderableSmallBody"; constexpr const char* _loggerCat = "SmallSolarSystemBody"; static const openspace::properties::Property::PropertyInfo PathInfo = { @@ -85,6 +84,26 @@ namespace { "Upper limit on the number of objects for this renderable, regardless of " "how many objects are contained in the data file" }; + + double importAngleValue(const std::string& angle) { + if (angle.empty()) { + return 0.0; + } + + double output = std::stod(angle); + output = std::fmod(output, 360.0); + if (output < 0.0) { + output += 360.0; + } + return output; + } + + std::string& formatObjectName(std::string& name) { + const std::string trimChars = "\t\n\v\f\r\" "; + name.erase(0, name.find_first_not_of(trimChars)); + name.erase(name.find_last_not_of(trimChars) + 1); + return name; + } } // namespace namespace openspace { @@ -398,24 +417,4 @@ void RenderableSmallBody::readOrbitalParamsFromThisLine(bool firstDataLine, ); } -static double importAngleValue(const std::string& angle) { - if (angle.empty()) { - return 0.0; - } - - double output = std::stod(angle); - output = std::fmod(output, 360.0); - if (output < 0.0) { - output += 360.0; - } - return output; -} - -static std::string& formatObjectName(std::string& name) { - const std::string trimChars = "\t\n\v\f\r\" "; - name.erase(0, name.find_first_not_of(trimChars)); - name.erase(name.find_last_not_of(trimChars) + 1); - return name; -} - } // namespace openspace diff --git a/modules/space/rendering/renderablesmallbody.h b/modules/space/rendering/renderablesmallbody.h index 6a68bb7e3e..5b47599e7f 100644 --- a/modules/space/rendering/renderablesmallbody.h +++ b/modules/space/rendering/renderablesmallbody.h @@ -38,8 +38,6 @@ namespace openspace { -static double importAngleValue(const std::string& angle); - class RenderableSmallBody : public RenderableOrbitalKepler { public: RenderableSmallBody(const ghoul::Dictionary& dictionary); @@ -59,9 +57,6 @@ private: std::vector _indexBufferData; }; -static double importAngleValue(const std::string& angle); -static std::string& formatObjectName(std::string& name); - } // namespace openspace #endif // __OPENSPACE_MODULE_SPACE___RENDERABLESMALLBODY___H__ diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index e3a5987a08..2219305f85 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -991,7 +991,7 @@ void RenderableStars::render(const RenderData& data, RendererTasks&) { glm::dmat4 modelMatrix = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * glm::dmat4(data.modelTransform.rotation) * - glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(data.modelTransform.scale))); + glm::scale(glm::dmat4(1.0), data.modelTransform.scale); glm::dmat4 projectionMatrix = glm::dmat4(data.camera.projectionMatrix()); diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp index e3a8f2d171..c389cd4ddb 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp @@ -275,7 +275,6 @@ void DashboardItemInstruments::render(glm::vec2& penPosition) { sequencer.activeInstruments(currentTime); glm::vec4 firing(0.58f - t, 1.f - t, 1.f - t, 1.f); - glm::vec4 notFiring(0.5f, 0.5f, 0.5f, 1.f); RenderFont( *_font, @@ -334,7 +333,6 @@ glm::vec2 DashboardItemInstruments::size() const { if (remaining > 0) { - using FR = ghoul::fontrendering::FontRenderer; std::string progress = progressToStr(25, t); size = addToBoundingbox( diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 8d5c76a77e..25b3a38e60 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -43,8 +43,6 @@ #include namespace { - constexpr const char* _loggerCat = "RenderableModelProjection"; - constexpr const char* keyGeometry = "Geometry"; constexpr const char* keyProjection = "Projection"; constexpr const char* keyBoundingSphereRadius = "BoundingSphereRadius"; diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index db387a547d..0d2ae2f198 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -161,9 +161,6 @@ bool HongKangParser::create() { std::string previousCamera; double captureStart = -1.0; - double captureStop = -1.0; - double scanStart = -1.0; - double scanStop = -1.0; std::string cameraTarget = "VOID"; std::string scannerTarget = "VOID"; @@ -220,7 +217,7 @@ bool HongKangParser::create() { _subsetMap[image.target]._range.include(time); } if (it->second->decoderType() == "SCANNER") { // SCANNER START - scanStart = time; + double scanStart = time; InstrumentDecoder* scanner = static_cast( it->second.get() @@ -235,7 +232,10 @@ bool HongKangParser::create() { getline(file, linePeek); if (linePeek.find(endNominal) != std::string::npos) { met = linePeek.substr(25, 9); - scanStop = ephemerisTimeFromMissionElapsedTime(met, _metRef); + double scanStop = ephemerisTimeFromMissionElapsedTime( + met, + _metRef + ); scannerTarget = findPlaybookSpecifiedTarget(line); TimeRange scanRange = { scanStart, scanStop }; @@ -264,10 +264,8 @@ bool HongKangParser::create() { // we have reached the end of a scan or consecutive capture // sequence! if (captureStart != -1) { - // end of capture sequence for camera, store end time of this - // sequence - captureStop = time; - TimeRange cameraRange = { captureStart, captureStop }; + // end of capture sequence for camera, store end time of this sequence + TimeRange cameraRange = { captureStart, time }; ghoul_assert(cameraRange.isDefined(), "Invalid time range!"); _instrumentTimes.emplace_back(previousCamera, cameraRange); captureStart = -1; diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index 847a45523c..efc015676a 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -1021,7 +1021,7 @@ std::shared_ptr ProjectionComponent::loadProjectionTextu ); texture->setFilter(Texture::FilterMode::LinearMipMap); } - return std::move(texture); + return texture; } bool ProjectionComponent::generateProjectionLayerTexture(const glm::ivec2& size) { diff --git a/modules/sync/tasks/syncassettask.cpp b/modules/sync/tasks/syncassettask.cpp index 5b69d7df55..87031d5462 100644 --- a/modules/sync/tasks/syncassettask.cpp +++ b/modules/sync/tasks/syncassettask.cpp @@ -45,7 +45,6 @@ namespace { constexpr const char* KeyAsset = "Asset"; - constexpr const char* _loggerCat = "SyncAssetTask"; constexpr std::chrono::milliseconds ProgressPollInterval(200); } // namespace diff --git a/modules/volume/rawvolume.inl b/modules/volume/rawvolume.inl index 5f95eee40f..4973d4a2da 100644 --- a/modules/volume/rawvolume.inl +++ b/modules/volume/rawvolume.inl @@ -48,11 +48,8 @@ void RawVolume::setDimensions(const glm::uvec3& dimensions) { template size_t RawVolume::nCells() const { - return static_cast( - static_cast(_dimensions.x) * - static_cast(_dimensions.y) * - static_cast(_dimensions.z) - ); + return static_cast(_dimensions.x) * static_cast(_dimensions.y) * + static_cast(_dimensions.z); } template diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71d71e97be..dd9966703f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -440,9 +440,9 @@ target_include_directories(openspace-core PUBLIC # In order to be able to include module files ${OPENSPACE_BASE_DIR} # In order to use the date library - ${OPENSPACE_BASE_DIR}/ext/date/include + SYSTEM ${OPENSPACE_BASE_DIR}/ext/date/include # In order to use the nlohmann JSON library - ${OPENSPACE_BASE_DIR}/ext + SYSTEM ${OPENSPACE_BASE_DIR}/ext # In order to be able to include the module_registration file ${CMAKE_BINARY_DIR}/_generated/include ) diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 174fa7f05a..53e7d973f1 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -46,13 +46,11 @@ namespace openspace::documentation { DocumentationEngine* DocumentationEngine::_instance = nullptr; DocumentationEngine::DuplicateDocumentationException::DuplicateDocumentationException( - Documentation documentation) + Documentation doc) : ghoul::RuntimeError(fmt::format( - "Duplicate Documentation with name '{}' and id '{}'", - documentation.name, - documentation.id + "Duplicate Documentation with name '{}' and id '{}'",doc.name, doc.id )) - , documentation(std::move(documentation)) + , documentation(std::move(doc)) {} DocumentationEngine::DocumentationEngine() diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index e1809f3bab..63751bdb66 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -292,9 +292,9 @@ std::string ReferencingVerifier::documentation() const { return "Referencing Documentation: '" + identifier + "'"; } -AndVerifier::AndVerifier(const std::vector values) { - ghoul_assert(!values.empty(), "values must not be empty"); - for (Verifier* v : values) { +AndVerifier::AndVerifier(const std::vector values_) { + ghoul_assert(!values_.empty(), "values must not be empty"); + for (Verifier* v : values_) { this->values.push_back(std::shared_ptr(v)); } } @@ -304,8 +304,8 @@ TestResult AndVerifier::operator()(const ghoul::Dictionary& dictionary, { std::vector res(values.size()); std::transform( - values.begin(), - values.end(), + values.cbegin(), + values.cend(), res.begin(), [dictionary, key](const std::shared_ptr& v) { return v->operator()(dictionary, key); @@ -313,9 +313,9 @@ TestResult AndVerifier::operator()(const ghoul::Dictionary& dictionary, ); const bool success = std::all_of( - res.begin(), - res.end(), - [](const TestResult& res) { return res.success; } + res.cbegin(), + res.cend(), + std::mem_fn(&TestResult::success) ); if (success) { @@ -330,10 +330,10 @@ std::string AndVerifier::type() const { // Dirty hack to get an "and " inserted before the last element std::vector types(values.size() - 1); std::transform( - values.begin(), - values.end() - 1, + values.cbegin(), + values.cend() - 1, types.begin(), - [](const std::shared_ptr& v) { return v->type(); } + std::mem_fn(&Verifier::type) ); types.push_back(std::string("and ") + values.back()->type()); @@ -344,19 +344,19 @@ std::string AndVerifier::documentation() const { // Dirty hack to get an "and " inserted before the last element std::vector documentations(values.size() - 1); std::transform( - values.begin(), - values.end() - 1, + values.cbegin(), + values.cend() - 1, documentations.begin(), - [](const std::shared_ptr& v) { return v->documentation(); } + std::mem_fn(&Verifier::documentation) ); documentations.push_back(std::string("and ") + values.back()->documentation()); return ghoul::join(documentations, ", "); } -OrVerifier::OrVerifier(const std::vector values) { - ghoul_assert(!values.empty(), "values must not be empty"); - for (Verifier* v : values) { +OrVerifier::OrVerifier(const std::vector values_) { + ghoul_assert(!values_.empty(), "values must not be empty"); + for (Verifier* v : values_) { this->values.push_back(std::shared_ptr(v)); } } @@ -366,8 +366,8 @@ TestResult OrVerifier::operator()(const ghoul::Dictionary& dictionary, { std::vector res(values.size()); std::transform( - values.begin(), - values.end(), + values.cbegin(), + values.cend(), res.begin(), [dictionary, key](const std::shared_ptr& v) { return v->operator()(dictionary, key); @@ -375,8 +375,8 @@ TestResult OrVerifier::operator()(const ghoul::Dictionary& dictionary, ); const bool success = std::any_of( - res.begin(), - res.end(), + res.cbegin(), + res.cend(), [](const TestResult& res) { return res.success; } ); @@ -392,10 +392,10 @@ std::string OrVerifier::type() const { // Dirty hack to get an "or " inserted before the last element std::vector types(values.size() - 1); std::transform( - values.begin(), - values.end() - 1, + values.cbegin(), + values.cend() - 1, types.begin(), - [](const std::shared_ptr& v) { return v->type(); } + std::mem_fn(&Verifier::type) ); types.push_back(std::string("or ") + values.back()->type()); @@ -406,10 +406,10 @@ std::string OrVerifier::documentation() const { // Dirty hack to get an "or " inserted before the last element std::vector documentations(values.size() - 1); std::transform( - values.begin(), - values.end() - 1, + values.cbegin(), + values.cend() - 1, documentations.begin(), - [](const std::shared_ptr& v) { return v->documentation(); } + std::mem_fn(&Verifier::documentation) ); documentations.push_back(std::string("or ") + values.back()->documentation()); diff --git a/src/interaction/externinteraction.cpp b/src/interaction/externinteraction.cpp index bb4641017b..8bef0341aa 100644 --- a/src/interaction/externinteraction.cpp +++ b/src/interaction/externinteraction.cpp @@ -39,35 +39,6 @@ #include -namespace { - constexpr const uint32_t ProtocolVersion = 3; - constexpr const size_t MaxLatencyDiffs = 64; - - constexpr openspace::properties::Property::PropertyInfo BufferTimeInfo = { - "BufferTime", - "Buffer Time", - "" // @TODO Missing documentation - }; - - constexpr openspace::properties::Property::PropertyInfo TimeKeyFrameInfo = { - "TimeKeyframeInterval", - "Time keyframe interval", - "" // @TODO Missing documentation - }; - - constexpr openspace::properties::Property::PropertyInfo CameraKeyFrameInfo = { - "CameraKeyframeInterval", - "Camera Keyframe interval", - "" // @TODO Missing documentation - }; - - constexpr openspace::properties::Property::PropertyInfo TimeToleranceInfo = { - "TimeTolerance", - "Time tolerance", - "" // @TODO Missing documentation - }; -} // namespace - namespace openspace { ExternInteraction::ExternInteraction() diff --git a/src/interaction/interactionmonitor.cpp b/src/interaction/interactionmonitor.cpp index 2b88c7bcc0..fa5b01bb83 100644 --- a/src/interaction/interactionmonitor.cpp +++ b/src/interaction/interactionmonitor.cpp @@ -29,8 +29,6 @@ #include namespace { - constexpr const char* _loggerCat = "InteractionMonitor"; - constexpr openspace::properties::Property::PropertyInfo IdleTimeInfo = { "IdleTime", "Idle Time", diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 700dc8d06d..ba2151a27f 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -138,19 +138,19 @@ NavigationHandler::NavigationState::NavigationState(const ghoul::Dictionary& dic } } -NavigationHandler::NavigationState::NavigationState(std::string anchor, std::string aim, - std::string referenceFrame, - glm::dvec3 position, - std::optional up, - double yaw, - double pitch) - : anchor(std::move(anchor)) - , aim(std::move(aim)) - , referenceFrame(std::move(referenceFrame)) - , position(std::move(position)) - , up(std::move(up)) - , yaw(yaw) - , pitch(pitch) +NavigationHandler::NavigationState::NavigationState(std::string anchor_, std::string aim_, + std::string referenceFrame_, + glm::dvec3 position_, + std::optional up_, + double yaw_, + double pitch_) + : anchor(std::move(anchor_)) + , aim(std::move(aim_)) + , referenceFrame(std::move(referenceFrame_)) + , position(std::move(position_)) + , up(std::move(up_)) + , yaw(yaw_) + , pitch(pitch_) {} NavigationHandler::NavigationHandler() @@ -295,7 +295,7 @@ void NavigationHandler::applyNavigationState(const NavigationHandler::Navigation } const glm::dvec3 cameraPositionWorld = anchorWorldPosition + - glm::dvec3(referenceFrameTransform * glm::dvec4(ns.position, 1.0)); + referenceFrameTransform * glm::dvec4(ns.position, 1.0); glm::dvec3 up = ns.up.has_value() ? glm::normalize(referenceFrameTransform * *ns.up) : diff --git a/src/interaction/navigationhandler_lua.inl b/src/interaction/navigationhandler_lua.inl index 4ccb59d75c..4e6db5e561 100644 --- a/src/interaction/navigationhandler_lua.inl +++ b/src/interaction/navigationhandler_lua.inl @@ -73,14 +73,14 @@ int getNavigationState(lua_State* L) { lua_settop(L, 0); - const auto pushVector = [](lua_State* L, const glm::dvec3& v) { - lua_newtable(L); - ghoul::lua::push(L, 1, v.x); - lua_rawset(L, -3); - ghoul::lua::push(L, 2, v.y); - lua_rawset(L, -3); - ghoul::lua::push(L, 3, v.z); - lua_rawset(L, -3); + const auto pushVector = [](lua_State* s, const glm::dvec3& v) { + lua_newtable(s); + ghoul::lua::push(s, 1, v.x); + lua_rawset(s, -3); + ghoul::lua::push(s, 2, v.y); + lua_rawset(s, -3); + ghoul::lua::push(s, 3, v.z); + lua_rawset(s, -3); }; lua_newtable(L); diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 06c54aecae..a1c34a91d1 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -103,13 +103,6 @@ namespace { "the sensitivity is the less impact a mouse motion will have." }; - constexpr openspace::properties::Property::PropertyInfo JoystickEnabledInfo = { - "JoystickEnabled", - "Joystick Control Enabled", - "If this is selected, a connected joystick will be used as an optional input " - "device. If this is deselected, any joystick input will be ignored" - }; - constexpr openspace::properties::Property::PropertyInfo JoystickSensitivityInfo = { "JoystickSensitivity", "Joystick Sensitivity", diff --git a/src/interaction/scriptcamerastates.cpp b/src/interaction/scriptcamerastates.cpp index e9e01b81dc..b76bcf64c9 100644 --- a/src/interaction/scriptcamerastates.cpp +++ b/src/interaction/scriptcamerastates.cpp @@ -26,11 +26,6 @@ #include -namespace { - const double SENSITIVITY_ADJUSTMENT_INCREASE = 8.0; - const double SENSITIVITY_ADJUSTMENT_DECREASE = 0.5; -} - namespace openspace::interaction { ScriptCameraStates::ScriptCameraStates() : CameraInteractionStates(1.0, 1.0) {} diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 4e5b9d8a93..5e35d79081 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -301,7 +301,8 @@ bool SessionRecording::startPlayback(std::string& filename, LERROR("Unknown data type in header (should be Ascii or Binary)"); cleanUpPlayback(); } - std::string throwawayNewlineChar = readHeaderElement(_playbackFile, 1); + // throwaway newline character + readHeaderElement(_playbackFile, 1); if (_recordingDataMode == DataMode::Binary) { //Close & re-open the file, starting from the beginning, and do dummy read @@ -704,7 +705,7 @@ void SessionRecording::preSynchronization() { if (_state != _lastState) { using K = const CallbackHandle; using V = StateChangeCallback; - for (const std::pair& it : _stateChangeCallbacks) { + for (const std::pair& it : _stateChangeCallbacks) { it.second(); } } @@ -754,9 +755,8 @@ bool SessionRecording::playbackAddEntriesToTimeline() { if (_recordingDataMode == DataMode::Binary) { unsigned char frameType; - bool fileReadOk = true; - while (parsingStatusOk && fileReadOk) { + while (parsingStatusOk) { frameType = readFromPlayback(_playbackFile); // Check if have reached EOF if (!_playbackFile) { @@ -764,7 +764,6 @@ bool SessionRecording::playbackAddEntriesToTimeline() { "Finished parsing {} entries from playback file {}", _playbackLineNum - 1, _playbackFilename )); - fileReadOk = false; break; } if (frameType == HeaderCameraBinary) { @@ -1768,9 +1767,8 @@ SessionRecording::DataMode SessionRecording::readModeFromHeader(std::string file mode = DataMode::Binary; } else { - LERROR("Unknown data type in header (should be Ascii or Binary)"); + throw ConversionError("Unknown data type in header (should be Ascii or Binary)"); } - inputFile.close(); return mode; } @@ -1917,9 +1915,8 @@ bool SessionRecording::convertEntries(std::string& inFilename, if (mode == DataMode::Binary) { unsigned char frameType; - bool fileReadOk = true; - while (conversionStatusOk && fileReadOk) { + while (conversionStatusOk) { frameType = readFromPlayback(inStream); // Check if have reached EOF if (!inStream) { @@ -1927,7 +1924,6 @@ bool SessionRecording::convertEntries(std::string& inFilename, "Finished converting {} entries from playback file {}", lineNum - 1, inFilename )); - fileReadOk = false; break; } if (frameType == HeaderCameraBinary) { @@ -2051,7 +2047,7 @@ std::string SessionRecording::getLegacyConversionResult(std::string filename, in } std::string SessionRecording_legacy_0085::getLegacyConversionResult(std::string filename, - int depth) + int) { //This method is overriden in each legacy subclass, but does nothing in this instance // as the oldest supported legacy version. diff --git a/src/interaction/tasks/convertrecfileversiontask.cpp b/src/interaction/tasks/convertrecfileversiontask.cpp index 2d444445a5..c8d8bb5e87 100644 --- a/src/interaction/tasks/convertrecfileversiontask.cpp +++ b/src/interaction/tasks/convertrecfileversiontask.cpp @@ -77,7 +77,7 @@ std::string ConvertRecFileVersionTask::description() { return description; } -void ConvertRecFileVersionTask::perform(const Task::ProgressCallback& progressCallback) { +void ConvertRecFileVersionTask::perform(const Task::ProgressCallback&) { convert(); } diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 9132449df0..da61a4bdbe 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -85,7 +85,7 @@ std::string ConvertRecFormatTask::description() { return description; } -void ConvertRecFormatTask::perform(const Task::ProgressCallback& progressCallback) { +void ConvertRecFormatTask::perform(const Task::ProgressCallback&) { convert(); } @@ -248,7 +248,6 @@ void ConvertRecFormatTask::convertToBinary() { char tmpType = SessionRecording::DataFormatBinaryTag; _oFile.write(&tmpType, 1); _oFile.write("\n", 1); - size_t idx = 0; while (std::getline(_iFile, lineContents)) { lineNum++; diff --git a/src/network/parallelserver.cpp b/src/network/parallelserver.cpp index a52caeb410..3994cfea35 100644 --- a/src/network/parallelserver.cpp +++ b/src/network/parallelserver.cpp @@ -259,12 +259,6 @@ void ParallelServer::handleHostshipRequest(std::shared_ptr peer, void ParallelServer::handleHostshipResignation(Peer& peer) { LINFO(fmt::format("Connection {} wants to resign its hostship", peer.id)); - size_t oldHostPeerId = 0; - { - std::lock_guard lock(_hostInfoMutex); - oldHostPeerId = _hostPeerId; - } - setToClient(peer); LINFO(fmt::format("Connection {} resigned as host", peer.id)); diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 0b0be17ca6..4d307297bf 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -142,7 +142,7 @@ namespace { buf.push_back('}'); //return json.str(); - }; + } } // namespace namespace openspace::properties { diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index 43bc3bb4c5..eafbd18e46 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -143,7 +143,7 @@ void Dashboard::render(glm::vec2& penPosition) { glm::vec2 Dashboard::getStartPositionOffset() { return _startPositionOffset.value(); -}; +} scripting::LuaLibrary Dashboard::luaLibrary() { return { diff --git a/src/rendering/helper.cpp b/src/rendering/helper.cpp index 3fa5195b0d..fd9afbf9c2 100644 --- a/src/rendering/helper.cpp +++ b/src/rendering/helper.cpp @@ -204,12 +204,12 @@ void initialize() { glBindVertexArray(vertexObjects.square.vao); glBindBuffer(GL_ARRAY_BUFFER, vertexObjects.square.vbo); - struct Vertex { + struct VertexXYUVRGBA { GLfloat xy[2]; GLfloat uv[2]; GLfloat rgba[4]; }; - Vertex data[] = { + VertexXYUVRGBA data[] = { // X Y U V R G B A -1.f, -1.f, 0.f, 0.f, 1.f, 1.f, 1.f, 1.f, -1.f, 1.f, 0.f, 1.f, 1.f, 1.f, 1.f, 1.f, @@ -219,16 +219,16 @@ void initialize() { 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, -1.f, 1.f, 0.f, 1.f, 1.f, 1.f, 1.f }; - glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(Vertex), data, GL_STATIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(VertexXYUVRGBA), data, GL_STATIC_DRAW); glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), nullptr); + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(VertexXYUVRGBA), nullptr); glEnableVertexAttribArray(1); - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), - reinterpret_cast(offsetof(Vertex, uv))); + glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(VertexXYUVRGBA), + reinterpret_cast(offsetof(VertexXYUVRGBA, uv))); glEnableVertexAttribArray(2); - glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex), - reinterpret_cast(offsetof(Vertex, rgba))); + glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, sizeof(VertexXYUVRGBA), + reinterpret_cast(offsetof(VertexXYUVRGBA, rgba))); glBindVertexArray(0); // diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index 441abc583b..f7b992552b 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -590,7 +590,7 @@ void LuaConsole::charCallback(unsigned int codepoint, return; } - addToCommand(std::string(1, static_cast(codepoint))); + addToCommand(std::string(1, static_cast(codepoint))); } void LuaConsole::update() { diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index afc0022b02..e6727a4db8 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -87,15 +87,6 @@ namespace { constexpr const char* KeyFontMono = "Mono"; constexpr const char* KeyFontLight = "Light"; - constexpr openspace::properties::Property::PropertyInfo PerformanceInfo = { - "PerformanceMeasurements", - "Performance Measurements", - "If this value is enabled, detailed performance measurements about the updates " - "and rendering of the scene graph nodes are collected each frame. These values " - "provide some information about the impact of individual nodes on the overall " - "performance." - }; - constexpr openspace::properties::Property::PropertyInfo ShowOverlaySlavesInfo = { "ShowOverlayOnSlaves", "Show Overlay Information on Slaves", @@ -283,7 +274,7 @@ RenderEngine::RenderEngine() , _hue(HueInfo, 0.f, 0.f, 360.f) , _saturation(SaturationInfo, 1.f, 0.0f, 2.f) , _value(ValueInfo, 1.f, 0.f, 2.f) - , _framerateLimit(FramerateLimitInfo, 0.f, 0.f, 500.f) + , _framerateLimit(FramerateLimitInfo, 0, 0, 500) , _horizFieldOfView(HorizFieldOfViewInfo, 80.f, 1.f, 179.f) , _globalRotation( GlobalRotationInfo, @@ -714,12 +705,12 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat std::string fn = std::to_string(_frameNumber); WindowDelegate::Frustum frustum = global::windowDelegate->frustumMode(); - std::string fr = [](WindowDelegate::Frustum frustum) -> std::string { - switch (frustum) { - case WindowDelegate::Frustum::Mono: return ""; - case WindowDelegate::Frustum::LeftEye: return "(left)"; + std::string fr = [](WindowDelegate::Frustum f) -> std::string { + switch (f) { + case WindowDelegate::Frustum::Mono: return ""; + case WindowDelegate::Frustum::LeftEye: return "(left)"; case WindowDelegate::Frustum::RightEye: return "(right)"; - default: throw std::logic_error("Unhandled case label"); + default: throw ghoul::MissingCaseException(); } }(frustum); @@ -727,9 +718,10 @@ void RenderEngine::render(const glm::mat4& sceneMatrix, const glm::mat4& viewMat std::string dt = std::to_string(global::windowDelegate->deltaTime()); std::string avgDt = std::to_string(global::windowDelegate->averageDeltaTime()); - std::string res = "Frame: " + fn + ' ' + fr + '\n' + - "Swap group frame: " + sgFn + '\n' + - "Dt: " + dt + '\n' + "Avg Dt: " + avgDt; + std::string res = fmt::format( + "Frame: {} {}\nSwap group frame: {}\nDt: {}\nAvg Dt: {}", + fn, fr, sgFn, dt, avgDt + ); RenderFont(*_fontFrameInfo, penPosition, res); } @@ -848,7 +840,6 @@ void RenderEngine::renderEndscreen() { glm::vec2(global::windowDelegate->currentSubwindowSize()) / dpiScaling; glViewport(0, 0, res.x, res.y); - using FR = ghoul::fontrendering::FontRenderer; const glm::vec2 size = _fontDate->boundingBox("Shutting down"); glm::vec2 penPosition = glm::vec2( fontResolution().x / 2 - size.x / 2, diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index c354a81eb4..c70ceee700 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -316,16 +316,16 @@ std::unique_ptr ScreenSpaceRenderable::createFromDictiona } std::string ScreenSpaceRenderable::makeUniqueIdentifier(std::string name) { - std::vector r = + std::vector rs = global::renderEngine->screenSpaceRenderables(); - auto nameTaken = [&r](const std::string& name) { - bool nameTaken = std::any_of( - r.begin(), - r.end(), - [&name](ScreenSpaceRenderable* r) { return r->identifier() == name; } + auto nameTaken = [&rs](const std::string& n) { + const bool taken = std::any_of( + rs.cbegin(), + rs.cend(), + [&n](ScreenSpaceRenderable* r) { return r->identifier() == n; } ); - return nameTaken; + return taken; }; std::string baseName = name; @@ -428,15 +428,12 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary } if (dictionary.hasKey(UsePerspectiveProjectionInfo.identifier)) { - _usePerspectiveProjection = static_cast( - dictionary.value(UsePerspectiveProjectionInfo.identifier) - ); + _usePerspectiveProjection = + dictionary.value(UsePerspectiveProjectionInfo.identifier); } if (dictionary.hasKey(FaceCameraInfo.identifier)) { - _faceCamera = static_cast( - dictionary.value(FaceCameraInfo.identifier) - ); + _faceCamera = dictionary.value(FaceCameraInfo.identifier); } if (dictionary.hasKeyAndValue(KeyTag)) { @@ -543,9 +540,7 @@ void ScreenSpaceRenderable::createShaders() { } glm::mat4 ScreenSpaceRenderable::scaleMatrix() { - glm::vec2 resolution = global::windowDelegate->currentDrawBufferResolution(); - - //to scale the plane + // to scale the plane float textureRatio = static_cast(_objectSize.y) / static_cast(_objectSize.x); diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index ee8d509ef9..e9386d1c22 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -308,7 +308,7 @@ bool AssetLoader::loadAsset(Asset* asset) { if (metaDict.hasKey(MetaInformationIdentifiers)) { ghoul::Dictionary iddict = metaDict.value(MetaInformationIdentifiers); - for (int i = 1; i <= iddict.size(); ++i) { + for (size_t i = 1; i <= iddict.size(); ++i) { std::string key = std::to_string(i); std::string identifier = iddict.value(key); meta.identifiers.push_back(identifier); @@ -333,7 +333,7 @@ void AssetLoader::unloadAsset(Asset* asset) { } _onDeinitializationFunctionRefs[asset].clear(); - for (const std::pair>& it : + for (std::pair> it : _onDependencyInitializationFunctionRefs[asset]) { for (int ref : it.second) { @@ -342,7 +342,7 @@ void AssetLoader::unloadAsset(Asset* asset) { } _onDependencyInitializationFunctionRefs.erase(asset); - for (const std::pair>& it : + for (std::pair> it : _onDependencyDeinitializationFunctionRefs[asset]) { for (int ref : it.second) { diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index b612cc8612..ed0065975d 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -40,8 +40,6 @@ namespace openspace { namespace { - constexpr const char* _loggerCat = "Profile"; - // Helper structs for the visitor pattern of the std::variant template struct overloaded : Ts... { using Ts::operator()...; }; template overloaded(Ts...) -> overloaded; diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index a822d94dd4..4e6c766067 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -640,16 +640,16 @@ int removeSceneGraphNodesFromRegex(lua_State* L) { // Add all the children std::function&)> markNode = - [&markNode](SceneGraphNode* node, std::vector& markedList) + [&markNode](SceneGraphNode* node, std::vector& marked) { std::vector children = node->children(); for (SceneGraphNode* child : children) { - markNode(child, markedList); + markNode(child, marked); } - auto it = std::find(markedList.begin(), markedList.end(), node); - if (it == markedList.end()) { - markedList.push_back(node); + const auto it = std::find(marked.cbegin(), marked.cend(), node); + if (it == marked.end()) { + marked.push_back(node); } }; for (SceneGraphNode* node : markedList) { diff --git a/src/util/blockplaneintersectiongeometry.cpp b/src/util/blockplaneintersectiongeometry.cpp index b2e6dd4d0c..31ff0e4b64 100644 --- a/src/util/blockplaneintersectiongeometry.cpp +++ b/src/util/blockplaneintersectiongeometry.cpp @@ -155,7 +155,7 @@ void BlockPlaneIntersectionGeometry::updateVertices() { ); glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), 0); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), nullptr); glBindVertexArray(0); } diff --git a/src/util/keys.cpp b/src/util/keys.cpp index a868be79a7..a01f7316fd 100644 --- a/src/util/keys.cpp +++ b/src/util/keys.cpp @@ -32,10 +32,6 @@ #include #include -namespace { - constexpr const char* _loggerCat = "Keys"; -} // namespace - namespace openspace { bool hasKeyModifier(KeyAction lhs, KeyAction rhs) { diff --git a/src/util/syncbuffer.cpp b/src/util/syncbuffer.cpp index edb19f7123..8f1fbc3211 100644 --- a/src/util/syncbuffer.cpp +++ b/src/util/syncbuffer.cpp @@ -42,7 +42,7 @@ void SyncBuffer::encode(const std::string& s) { int32_t anticpatedBufferSize = static_cast( _encodeOffset + (sizeof(char) * s.size()) + sizeof(int32_t) ); - if (anticpatedBufferSize >= _n) { + if (anticpatedBufferSize >= static_cast(_n)) { _dataStream.resize(anticpatedBufferSize); } @@ -79,6 +79,34 @@ void SyncBuffer::decode(std::string& s) { s = decode(); } +void SyncBuffer::decode(glm::quat& value) { + const size_t size = sizeof(glm::quat); + ghoul_assert(_decodeOffset + size < _n, ""); + std::memcpy(glm::value_ptr(value), _dataStream.data() + _decodeOffset, size); + _decodeOffset += size; +} + +void SyncBuffer::decode(glm::dquat& value) { + const size_t size = sizeof(glm::dquat); + ghoul_assert(_decodeOffset + size < _n, ""); + std::memcpy(glm::value_ptr(value), _dataStream.data() + _decodeOffset, size); + _decodeOffset += size; +} + +void SyncBuffer::decode(glm::vec3& value) { + const size_t size = sizeof(glm::vec3); + ghoul_assert(_decodeOffset + size < _n, ""); + std::memcpy(glm::value_ptr(value), _dataStream.data() + _decodeOffset, size); + _decodeOffset += size; +} + +void SyncBuffer::decode(glm::dvec3& value) { + const size_t size = sizeof(glm::dvec3); + ghoul_assert(_decodeOffset + size < _n, ""); + std::memcpy(glm::value_ptr(value), _dataStream.data() + _decodeOffset, size); + _decodeOffset += size; +} + void SyncBuffer::setData(std::vector data) { _dataStream = std::move(data); } diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index d9a9b526c8..7cbf5b878f 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -148,7 +148,7 @@ void TimeManager::preSynchronization(double dt) { ZoneScopedN("newTime != _lastTime") using K = const CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timeChangeCallbacks) { + for (const std::pair& it : _timeChangeCallbacks) { ZoneScopedN("tcc") it.second(); } @@ -160,7 +160,7 @@ void TimeManager::preSynchronization(double dt) { ZoneScopedN("delta time changed") using K = const CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _deltaTimeChangeCallbacks) { + for (const std::pair& it : _deltaTimeChangeCallbacks) { ZoneScopedN("dtcc") it.second(); } @@ -168,7 +168,7 @@ void TimeManager::preSynchronization(double dt) { if (_deltaTimeStepsChanged) { using K = const CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _deltaTimeStepsChangeCallbacks) { + for (const std::pair& it : _deltaTimeStepsChangeCallbacks) { it.second(); } } @@ -176,7 +176,7 @@ void TimeManager::preSynchronization(double dt) { ZoneScopedN("timeline changed") using K = const CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timelineChangeCallbacks) { + for (const std::pair& it : _timelineChangeCallbacks) { ZoneScopedN("tlcc") it.second(); } @@ -256,7 +256,7 @@ void TimeManager::progressTime(double dt) { using K = const CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timeJumpCallbacks) { + for (const std::pair& it : _timeJumpCallbacks) { it.second(); } return; diff --git a/src/util/touch.cpp b/src/util/touch.cpp index 0c3d7ce7c1..0484c5e1dc 100644 --- a/src/util/touch.cpp +++ b/src/util/touch.cpp @@ -30,13 +30,13 @@ namespace openspace { -TouchInput::TouchInput(size_t touchDeviceId, size_t fingerId, float x, float y, - double timestamp) - : touchDeviceId(touchDeviceId) - , fingerId(fingerId) - , x(x) - , y(y) - , timestamp(timestamp) +TouchInput::TouchInput(size_t touchDeviceId_, size_t fingerId_, float x_, float y_, + double timestamp_) + : touchDeviceId(touchDeviceId_) + , fingerId(fingerId_) + , x(x_) + , y(y_) + , timestamp(timestamp_) {} glm::vec2 TouchInput::screenCoordinates(glm::vec2 resolution) const { diff --git a/support/cppcheck/suppressions.txt b/support/cppcheck/suppressions.txt index 0fbf1a7945..cfe9971764 100644 --- a/support/cppcheck/suppressions.txt +++ b/support/cppcheck/suppressions.txt @@ -1,7 +1,5 @@ // This is not a memleak because the placement new operator does not // actually create any memory that could leak -//memleak:src/performance/performancemanager.cpp - - missingInclude noExplicitConstructor +useStlAlgorithm diff --git a/tests/test_latlonpatch.cpp b/tests/test_latlonpatch.cpp index df459ec25c..2554045cd2 100644 --- a/tests/test_latlonpatch.cpp +++ b/tests/test_latlonpatch.cpp @@ -71,72 +71,72 @@ TEST_CASE("LatLonPatch: Find Closest Corner 2", "[latlonpatch]") { } TEST_CASE("LatLonPatch: Spherical Clamp 1", "[latlonpatch]") { - using namespace openspace::globebrowsing; + //using namespace openspace::globebrowsing; - GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); + //GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); - // inside patch latitude-wise, east of patch longitude-wise - Geodetic2 point { glm::pi() / 6.0, glm::pi() / 4.0 - 0.01 }; + //// inside patch latitude-wise, east of patch longitude-wise + //Geodetic2 point { glm::pi() / 6.0, glm::pi() / 4.0 - 0.01 }; - Geodetic2 clampedPoint = patch.closestPoint(point); - Geodetic2 neCorner = patch.corner(NORTH_EAST); + //Geodetic2 clampedPoint = patch.closestPoint(point); + //Geodetic2 neCorner = patch.corner(NORTH_EAST); //REQUIRE(clampedPoint.lat == neCorner.lat); //REQUIRE(clampedPoint.lon == neCorner.lon); } TEST_CASE("LatLonPatch: Spherical Clamp 2", "[latlonpatch]") { - using namespace openspace::globebrowsing; + //using namespace openspace::globebrowsing; - GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); + //GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); - // inside patch latitude-wise, west of patch longitude-wise - Geodetic2 point { glm::pi() / 6.0, glm::pi() / 4.0 + 0.01 }; + //// inside patch latitude-wise, west of patch longitude-wise + //Geodetic2 point { glm::pi() / 6.0, glm::pi() / 4.0 + 0.01 }; - Geodetic2 clampedPoint = patch.closestPoint(point); - Geodetic2 nwCorner = patch.corner(NORTH_WEST); + //Geodetic2 clampedPoint = patch.closestPoint(point); + //Geodetic2 nwCorner = patch.corner(NORTH_WEST); //REQUIRE(clampedPoint.lat == nwCorner.lat); //REQUIRE(clampedPoint.lon == nwCorner.lon); } TEST_CASE("LatLonPatch: Spherical Clamp 3", "[latlonpatch]") { - using namespace openspace::globebrowsing; + //using namespace openspace::globebrowsing; - GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); + //GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); - // North east of patch - Geodetic2 point { glm::pi() / 3.0, glm::pi() / 4.0 - 0.01 }; + //// North east of patch + //Geodetic2 point { glm::pi() / 3.0, glm::pi() / 4.0 - 0.01 }; - Geodetic2 clampedPoint = patch.closestPoint(point); - Geodetic2 neCorner = patch.corner(NORTH_EAST); + //Geodetic2 clampedPoint = patch.closestPoint(point); + //Geodetic2 neCorner = patch.corner(NORTH_EAST); //REQUIRE(clampedPoint.lat == neCorner.lat); //REQUIRE(clampedPoint.lon == neCorner.lon); } TEST_CASE("LatLonPatch: Spherical Clamp 4", "[latlonpatch]") { - using namespace openspace::globebrowsing; + //using namespace openspace::globebrowsing; - GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); + //GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); - // South east of patch - Geodetic2 point { -glm::pi() / 3.0, glm::pi() / 4.0 - 0.01 }; + //// South east of patch + //Geodetic2 point { -glm::pi() / 3.0, glm::pi() / 4.0 - 0.01 }; - Geodetic2 clampedPoint = patch.closestPoint(point); - Geodetic2 seCorner = patch.corner(SOUTH_EAST); + //Geodetic2 clampedPoint = patch.closestPoint(point); + //Geodetic2 seCorner = patch.corner(SOUTH_EAST); //REQUIRE(clampedPoint.lat == seCorner.lat); //REQUIRE(clampedPoint.lon == seCorner.lon); } TEST_CASE("LatLonPatch: Spherical Clamp 5", "[latlonpatch]") { - using namespace openspace::globebrowsing; + //using namespace openspace::globebrowsing; - GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); + //GeodeticPatch patch(0, 0, glm::pi() / 4.f, glm::pi() / 4.f); - // South west of patch - Geodetic2 point { -glm::pi() / 3.0, 3 * glm::pi() / 4.0 + 0.01 }; + //// South west of patch + //Geodetic2 point { -glm::pi() / 3.0, 3 * glm::pi() / 4.0 + 0.01 }; - Geodetic2 clampedPoint = patch.closestPoint(point); - Geodetic2 swCorner = patch.corner(SOUTH_WEST); + //Geodetic2 clampedPoint = patch.closestPoint(point); + //Geodetic2 swCorner = patch.corner(SOUTH_WEST); //REQUIRE(clampedPoint.lat == swCorner.lat); //REQUIRE(clampedPoint.lon == swCorner.lon); } From d95c6c4a47baf0ff183926f8040e77a60aa9881d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 8 Dec 2020 00:24:24 +0100 Subject: [PATCH 046/147] Removing Clang on MacOS warnings. No longer create external control that doesn't work anymore --- .../rendering/renderablebillboardscloud.cpp | 4 ++-- modules/globebrowsing/src/tiletextureinitdata.cpp | 2 +- modules/imgui/src/guiiswacomponent.cpp | 2 +- modules/iswa/util/iswamanager.cpp | 6 +----- .../rendering/renderablemultiresvolume.cpp | 8 -------- .../rendering/renderablemultiresvolume.h | 4 ---- modules/touch/include/touchinteraction.h | 4 +--- modules/touch/src/touchinteraction.cpp | 10 ++-------- modules/webbrowser/src/screenspacebrowser.cpp | 1 - modules/webgui/webguimodule.cpp | 8 +++++--- scripts/configuration_helper.lua | 1 - 11 files changed, 13 insertions(+), 37 deletions(-) diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index ef9aaf92bd..c4fc3bc78a 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -477,9 +477,9 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di , _billboardMinSize(BillboardMinSizeInfo, 0.f, 0.f, 100.f) , _correctionSizeEndDistance(CorrectionSizeEndDistanceInfo, 17.f, 12.f, 25.f) , _correctionSizeFactor(CorrectionSizeFactorInfo, 8.f, 0.f, 20.f) - , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) - , _setRangeFromData(SetRangeFromData) , _useLinearFiltering(UseLinearFiltering, false) + , _setRangeFromData(SetRangeFromData) + , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/globebrowsing/src/tiletextureinitdata.cpp b/modules/globebrowsing/src/tiletextureinitdata.cpp index afdd8fff2a..f85d7e0814 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.cpp +++ b/modules/globebrowsing/src/tiletextureinitdata.cpp @@ -197,7 +197,7 @@ TileTextureInitData TileTextureInitData::operator=(TileTextureInitData&& rhs) { return *this; } - return rhs; + return std::move(rhs); } } // namespace openspace::globebrowsing diff --git a/modules/imgui/src/guiiswacomponent.cpp b/modules/imgui/src/guiiswacomponent.cpp index 21a7d366c1..4f30752e49 100644 --- a/modules/imgui/src/guiiswacomponent.cpp +++ b/modules/imgui/src/guiiswacomponent.cpp @@ -185,7 +185,7 @@ void GuiIswaComponent::render() { const std::map>& map = IswaManager::ref().cygnetInformation(); - for (const std::pair>& cygnetInfo : map) { + for (const std::pair>& cygnetInfo : map) { int id = cygnetInfo.first; CygnetInfo& info = *cygnetInfo.second; diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index 2d5cec6064..9e74e0694e 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -268,10 +268,8 @@ std::string IswaManager::iswaUrl(int id, double timestamp, const std::string& ty "window=-1&cygnetId="+ std::to_string(id) +"×tamp="; } - //std::string t = Time::ref().currentTimeUTC(); - std::string_view t = SpiceManager::ref().dateFromEphemerisTime(timestamp); std::stringstream ss; - ss << t; + ss << SpiceManager::ref().dateFromEphemerisTime(timestamp);; std::string token; std::getline(ss, token, ' '); @@ -483,8 +481,6 @@ std::string IswaManager::jsonSphereToLuaTable(MetadataFuture& data) { float updateTime = j["output_time_interval"]; float radius = j["radius"]; - glm::vec4 spatialScale(6.371f, 6.371f, 6.371f, 6); - glm::vec3 max( j["x"]["actual_max"], j["y"]["actual_max"], diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index b35de6e4ee..a80e6cfa7d 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -61,19 +61,11 @@ namespace { constexpr const char* _loggerCat = "RenderableMultiresVolume"; constexpr const char* KeyDataSource = "Source"; constexpr const char* KeyErrorHistogramsSource = "ErrorHistogramsSource"; - constexpr const char* KeyHints = "Hints"; constexpr const char* KeyTransferFunction = "TransferFunction"; - constexpr const char* KeyVolumeName = "VolumeName"; constexpr const char* KeyBrickSelector = "BrickSelector"; constexpr const char* KeyStartTime = "StartTime"; constexpr const char* KeyEndTime = "EndTime"; - constexpr const char* GlslHelpersPath = - "${MODULES}/multiresvolume/shaders/helpers_fs.glsl"; - constexpr const char* GlslHelperPath = - "${MODULES}/multiresvolume/shaders/helper.glsl"; - constexpr const char* GlslHeaderPath = - "${MODULES}/multiresvolume/shaders/header.glsl"; constexpr openspace::properties::Property::PropertyInfo StepSizeCoefficientInfo = { "StepSizeCoefficient", diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.h b/modules/multiresvolume/rendering/renderablemultiresvolume.h index d09eedaa7d..933c776aa0 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.h +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.h @@ -126,12 +126,8 @@ private: std::shared_ptr _transferFunction; - float _spatialTolerance; - float _temporalTolerance; - std::shared_ptr _tsp; std::vector _brickIndices; - int _atlasMapSize = 0; std::shared_ptr _atlasManager; diff --git a/modules/touch/include/touchinteraction.h b/modules/touch/include/touchinteraction.h index 7ef8e2867d..eed814c492 100644 --- a/modules/touch/include/touchinteraction.h +++ b/modules/touch/include/touchinteraction.h @@ -47,7 +47,7 @@ namespace openspace { class Camera; class SceneGraphNode; -//Class used for keeping track of the recent average frame time +// Class used for keeping track of the recent average frame time class FrameTimeAverage { public: //Update the circular buffer with the most recent frame time @@ -59,7 +59,6 @@ private: static const int TotalSamples = 10; int _nSamples = 0; double _samples[TotalSamples]; - double _runningTotal = 0.0; int _index = 0; }; @@ -205,7 +204,6 @@ private: double _currentRadius = 1.0; double _slerpdT = 10001.0; double _timeSlack = 0.0; - int _numOfTests = 0; std::chrono::milliseconds _time; bool _directTouchMode = false; bool _wasPrevModeDirectTouch = false; diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 2d0a8b0802..5de30dcf64 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -217,12 +217,6 @@ namespace { "" // @TODO Missing documentation }; - constexpr openspace::properties::Property::PropertyInfo PickingRadiusInfo = { - "PickingRadiusMinimum", - "Minimum radius for picking in NDC coordinates", - "" // @TODO Missing documentation - }; - constexpr openspace::properties::Property::PropertyInfo ZoomOutLimitInfo = { "ZoomOutLimit", "Zoom Out Limit", @@ -278,13 +272,13 @@ TouchInteraction::TouchInteraction() 0.25f ) , _zoomBoundarySphereMultiplier(ZoomBoundarySphereMultiplierInfo, 1.001f, 1.f, 1.01f) + , _zoomInLimit(ZoomInLimitInfo, -1.0, 0.0, std::numeric_limits::max()) , _zoomOutLimit( ZoomOutLimitInfo, std::numeric_limits::max(), 1000.0, std::numeric_limits::max() ) - , _zoomInLimit(ZoomInLimitInfo, -1.0, 0.0, std::numeric_limits::max()) , _inputStillThreshold(InputSensitivityInfo, 0.0005f, 0.f, 0.001f) // used to void wrongly interpreted roll interactions , _centroidStillThreshold(StationaryCentroidInfo, 0.0018f, 0.f, 0.01f) @@ -303,10 +297,10 @@ TouchInteraction::TouchInteraction() 0.f, 1.f ) + , _constTimeDecay_secs(ConstantTimeDecaySecsInfo, 1.75f, 0.1f, 4.0f) , _pinchInputs({ TouchInput(0, 0, 0.0, 0.0, 0.0), TouchInput(0, 0, 0.0, 0.0, 0.0) }) , _vel{ glm::dvec2(0.0), 0.0, 0.0, glm::dvec2(0.0) } , _sensitivity{ glm::dvec2(0.08, 0.045), 12.0, 2.75, glm::dvec2(0.08, 0.045) } - , _constTimeDecay_secs(ConstantTimeDecaySecsInfo, 1.75f, 0.1f, 4.0f) // calculated with two vectors with known diff in length, then // projDiffLength/diffLength. { diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index f1f3993294..6fb0d66494 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -34,7 +34,6 @@ #include namespace { - constexpr const char* KeyIdentifier = "Indentifier"; constexpr const char* _loggerCat = "ScreenSpaceBrowser"; const openspace::properties::Property::PropertyInfo DimensionsInfo = { diff --git a/modules/webgui/webguimodule.cpp b/modules/webgui/webguimodule.cpp index aa09e84e0b..650c80abea 100644 --- a/modules/webgui/webguimodule.cpp +++ b/modules/webgui/webguimodule.cpp @@ -194,8 +194,10 @@ void WebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) { _servedDirectories.onChange([this]() { std::unordered_map newEndpoints; std::vector list = _servedDirectories.value(); - for (int i = 0; i < list.size() - 1; i += 2) { - newEndpoints[list[i]] = newEndpoints[list[i + 1]]; + if (!list.empty()) { + for (size_t i = 0; i < list.size() - 1; i += 2) { + newEndpoints[list[i]] = newEndpoints[list[i + 1]]; + } } for (const std::pair& e : _endpoints) { if (newEndpoints.find(e.first) == newEndpoints.end()) { @@ -221,7 +223,7 @@ void WebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) { void WebGuiModule::notifyEndpointListeners(const std::string& endpoint, bool exists) { using K = CallbackHandle; using V = EndpointCallback; - for (const std::pair& it : _endpointChangeCallbacks) { + for (const std::pair& it : _endpointChangeCallbacks) { it.second(endpoint, exists); } } diff --git a/scripts/configuration_helper.lua b/scripts/configuration_helper.lua index 2fc3bf4c67..970314a89a 100644 --- a/scripts/configuration_helper.lua +++ b/scripts/configuration_helper.lua @@ -345,7 +345,6 @@ function generateCluster(arg) ]] .. (arg["settings"] or "") .. [[ From 3045bfc78b227e05dc675d7f9e2715936560fe7c Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Tue, 8 Dec 2020 05:15:17 -0500 Subject: [PATCH 047/147] Issue/1342 (#1354) * Fixing size flickering when moving towards the screen border. * First pass at adjusting DU scale/max size values Co-authored-by: Alexander Bock --- data/assets/scene/digitaluniverse/dwarfs.asset | 4 ++-- data/assets/scene/digitaluniverse/exoplanets.asset | 4 ++-- data/assets/scene/digitaluniverse/kepler.asset | 2 +- data/assets/scene/digitaluniverse/tully.asset | 4 ++-- modules/digitaluniverse/shaders/billboard_gs.glsl | 12 ++++-------- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/data/assets/scene/digitaluniverse/dwarfs.asset b/data/assets/scene/digitaluniverse/dwarfs.asset index 1efccea999..8641e25771 100644 --- a/data/assets/scene/digitaluniverse/dwarfs.asset +++ b/data/assets/scene/digitaluniverse/dwarfs.asset @@ -32,10 +32,10 @@ local object = { TextColor = { 0.5, 0.1, 0.2 }, TextSize = 14.6, TextMinSize = 10.0, - ScaleFactor = 370, + ScaleFactor = 372.1, --CorrectionSizeEndDistance = 16.1, --CorrectionSizeFactor = 7.75, - BillboardMaxSize = 18.0, + BillboardMaxSize = 20.0, EnablePixelSizeControl = true, Unit = "pc" }, diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset index 027f5de52e..61308beb8c 100644 --- a/data/assets/scene/digitaluniverse/exoplanets.asset +++ b/data/assets/scene/digitaluniverse/exoplanets.asset @@ -27,7 +27,7 @@ local object = { Texture = textures .. "/target-blue.png", File = speck .. "/expl.speck", LabelFile = speck .. "/expl.label", - ScaleFactor = 392.5, + ScaleFactor = 388.67923, TextColor = { 0.3, 0.3, 0.8 }, TextSize = 14.8, TextMaxSize = 200.0, @@ -35,7 +35,7 @@ local object = { CorrectionSizeEndDistance = 15.23, CorrectionSizeFactor = 13.3, Unit = "pc", - BillboardMaxSize = 52.0, + BillboardMaxSize = 75.0, EnablePixelSizeControl = true, }, GUI = { diff --git a/data/assets/scene/digitaluniverse/kepler.asset b/data/assets/scene/digitaluniverse/kepler.asset index 212071b5fe..04fc503c77 100644 --- a/data/assets/scene/digitaluniverse/kepler.asset +++ b/data/assets/scene/digitaluniverse/kepler.asset @@ -29,7 +29,7 @@ local object = { CorrectionSizeEndDistance = 15.86, CorrectionSizeFactor = 8.59, Unit = "pc", - BillboardMaxSize = 23.0, + BillboardMaxSize = 30.0, EnablePixelSizeControl = true }, GUI = { diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset index 2bc40a8ac4..42438baa5e 100644 --- a/data/assets/scene/digitaluniverse/tully.asset +++ b/data/assets/scene/digitaluniverse/tully.asset @@ -23,7 +23,7 @@ local tullyPoints = { Enabled = true, Color = { 1.0, 0.4, 0.2 }, Opacity = 0.99, - ScaleFactor = 500.0, + ScaleFactor = 504.0, File = speck .. "/tully.speck", Texture = textures .. "/point3A.png", --ColorMap = speck .. "/tully.cmap", @@ -46,7 +46,7 @@ local tullyPoints = { -- Fade in value in the same unit as "Unit" FadeInDistances = { 0.001, 1.0 }, -- Max size in pixels - BillboardMaxSize = 5, + BillboardMaxSize = 7, BillboardMinSize = 0, --CorrectionSizeEndDistance = 22.0, --CorrectionSizeFactor = 10.45 diff --git a/modules/digitaluniverse/shaders/billboard_gs.glsl b/modules/digitaluniverse/shaders/billboard_gs.glsl index 2ee4ea61cd..8a99969a0a 100644 --- a/modules/digitaluniverse/shaders/billboard_gs.glsl +++ b/modules/digitaluniverse/shaders/billboard_gs.glsl @@ -107,11 +107,11 @@ void main() { vec4 initialPosition, secondPosition, thirdPosition, crossCorner; - if (renderOption == 0) { + if (renderOption == 0) { // Camera View Direction scaledRight = scaleMultiply * right * 0.5f; scaledUp = scaleMultiply * up * 0.5f; } - else if (renderOption == 1) { + else if (renderOption == 1) { // Camera Position Normal vec3 normal = vec3(normalize(cameraPosition - dpos.xyz)); vec3 newRight = normalize(cross(cameraLookUp, normal)); vec3 newUp = cross(normal, newRight); @@ -144,12 +144,8 @@ void main() { // width and height vec2 sizes = abs(halfViewSize * (topRight - bottomLeft)); - if (enabledRectSizeControl && ((sizes.y > maxBillboardSize) || - (sizes.x > maxBillboardSize))) { - //Set maximum size as Carter's instructions - float correctionScale = - sizes.y > maxBillboardSize ? maxBillboardSize / sizes.y : - maxBillboardSize / sizes.x; + if (enabledRectSizeControl && (length(sizes) > maxBillboardSize)) { + float correctionScale = maxBillboardSize / length(sizes); scaledRight *= correctionScale; scaledUp *= correctionScale; From 49bd02f358f08db6091dbdecbb5085257d80653b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 8 Dec 2020 11:32:13 +0100 Subject: [PATCH 048/147] Extract multiverse from cmb asset - Instead of always loading the multiverse cmb files, separate them into a new file - Don't load the new file on default in the digital universe catalogue --- data/assets/base.asset | 39 ++++- data/assets/scene/digitaluniverse/6dF.asset | 2 +- .../digitaluniverse/backgroundradiation.asset | 140 +---------------- .../backgroundradiation_multiverse.asset | 141 ++++++++++++++++++ .../backgroundradiation_textures.asset | 8 + .../digitaluniverse/digitaluniverse.asset | 1 + 6 files changed, 194 insertions(+), 137 deletions(-) create mode 100644 data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset create mode 100644 data/assets/scene/digitaluniverse/backgroundradiation_textures.asset diff --git a/data/assets/base.asset b/data/assets/base.asset index ff0a537a19..989f888df3 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -24,7 +24,44 @@ asset.require('util/launcher_images') local assetHelper = asset.require('util/asset_helper') asset.require('scene/milkyway/exoplanets/exoplanets_data') asset.require('scene/milkyway/exoplanets/exoplanets_textures') -asset.require('scene/digitaluniverse/digitaluniverse') +asset.require('scene/digitaluniverse/2dF') +asset.require('scene/digitaluniverse/2mass') +asset.require('scene/digitaluniverse/6dF') +asset.require('scene/digitaluniverse/abell') +asset.require('scene/digitaluniverse/alternatestarlabels') +asset.require('scene/digitaluniverse/backgroundradiation') +-- asset.require('scene/digitaluniverse/backgroundradiation_multiverse') +asset.require('scene/digitaluniverse/clusters') +asset.require('scene/digitaluniverse/constellationbounds') +asset.require('scene/digitaluniverse/constellations') +asset.require('scene/digitaluniverse/deepsky') +asset.require('scene/digitaluniverse/dwarfs') +asset.require('scene/digitaluniverse/exoplanets') +asset.require('scene/digitaluniverse/globularclusters') +asset.require('scene/digitaluniverse/grids') +asset.require('scene/digitaluniverse/groups') +asset.require('scene/digitaluniverse/h2regions') +asset.require('scene/digitaluniverse/kepler') +asset.require('scene/digitaluniverse/localdwarfs') +asset.require('scene/digitaluniverse/milkyway') +asset.require('scene/digitaluniverse/milkyway_arm_labels') +asset.require('scene/digitaluniverse/milkyway_data') +asset.require('scene/digitaluniverse/milkyway_label') +asset.require('scene/digitaluniverse/milkyway_sphere') +asset.require('scene/digitaluniverse/obassociations') +asset.require('scene/digitaluniverse/openclusters') +asset.require('scene/digitaluniverse/planetarynebulae') +asset.require('scene/digitaluniverse/pulsars') +asset.require('scene/digitaluniverse/quasars') +asset.require('scene/digitaluniverse/sdss') +asset.require('scene/digitaluniverse/starlabels') +asset.require('scene/digitaluniverse/starorbits') +asset.require('scene/digitaluniverse/stars') +asset.require('scene/digitaluniverse/superclusters') +asset.require('scene/digitaluniverse/supernovaremnants') +asset.require('scene/digitaluniverse/tully') +asset.require('scene/digitaluniverse/voids') + asset.require('customization/globebrowsing') diff --git a/data/assets/scene/digitaluniverse/6dF.asset b/data/assets/scene/digitaluniverse/6dF.asset index a77c03fd11..c7871b5e69 100644 --- a/data/assets/scene/digitaluniverse/6dF.asset +++ b/data/assets/scene/digitaluniverse/6dF.asset @@ -30,7 +30,7 @@ local object = { ColorRange = { { 0.0, 0.075 }, { 1.0, 10.0 } }, Unit = "Mpc", ScaleFactor = 534.0, - BillboardMaxSize = 7.0, + BillboardMaxSize = 9.0, EnablePixelSizeControl = true, }, GUI = { diff --git a/data/assets/scene/digitaluniverse/backgroundradiation.asset b/data/assets/scene/digitaluniverse/backgroundradiation.asset index 1a7e4d7d44..fbe1002e5e 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation.asset @@ -1,13 +1,5 @@ local assetHelper = asset.require('util/asset_helper') - - - -local textures = asset.syncedResource({ - Name = "Background Radiation Textures", - Type = "HttpSynchronization", - Identifier = "digitaluniverse_backgroundradiation_textures", - Version = 2 -}) +local textures = asset.require('./backgroundradiation_textures').textures local speck = asset.syncedResource({ Name = "Background Radiation Speck Files", @@ -94,126 +86,6 @@ local planck = { } } -local multiverse_planck_1 = { - Identifier = "PlanckMultiverse1", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 0.0, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 1", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_2 = { - Identifier = "PlanckMultiverse2", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 2500E23, 0.0, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 2", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_3 = { - Identifier = "PlanckMultiverse3", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 2500E23, 5000E23, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 3", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_4 = { - Identifier = "PlanckMultiverse4", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 10000E23, 0.0 } - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 4", - Path = "/Universe/Cosmic Microwave Background" - } -} - local Halpha = { Identifier = "HAlpha", @@ -244,8 +116,7 @@ local Halpha = { assetHelper.registerSceneGraphNodesAndExport(asset, { - wmap, cbe, planck, multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, - multiverse_planck_4, Halpha + wmap, cbe, planck, Halpha }) @@ -254,12 +125,11 @@ asset.meta = { Version = "2.0", Description = [[Various AllSky images for the Milky Way and observable Universe. Included: Wilkinson Microwave Anisotropy Probe (WMAP), Cosmic Background Explorer, - Planck, Planck Multiverse 1-4, and H Alpha

Data Reference: Planck/ESA and - the Planck Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug + Planck, and H Alpha

Data Reference: Planck/ESA and the Planck + Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug Finkbeiner (Princeton)]], Author = "Brian Abbott (AMNH), OpenSpace Team", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", - Identifiers = {"WMAP", "CBE", "Planck", "PlanckMultiverse1", "PlanckMultiverse2", - "PlanckMultiverse3", "PlanckMultiverse4", "HAlpha"} + Identifiers = {"WMAP", "CBE", "Planck", "HAlpha"} } diff --git a/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset new file mode 100644 index 0000000000..69cbb46808 --- /dev/null +++ b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset @@ -0,0 +1,141 @@ +local assetHelper = asset.require('util/asset_helper') +local textures = asset.require('./backgroundradiation_textures').textures + +local multiverse_planck_1 = { + Identifier = "PlanckMultiverse1", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 1", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_2 = { + Identifier = "PlanckMultiverse2", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 2", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_3 = { + Identifier = "PlanckMultiverse3", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 5000E23, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 3", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_4 = { + Identifier = "PlanckMultiverse4", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 10000E23, 0.0 } + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 4", + Path = "/Universe/Cosmic Microwave Background" + } +} + + +assetHelper.registerSceneGraphNodesAndExport(asset, { + multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, multiverse_planck_4 +}) + + +asset.meta = { + Name = "Multiverse Background Radiation", + Version = "2.0", + Description = [[ Non-physical representation of the location of hypothetical + cosmic microwave background radiation images how they would be observed from other + locations in the universe.
This is not a measured dataset!]], + Author = "Brian Abbott (AMNH), OpenSpace Team", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe", + Identifiers = { "PlanckMultiverse1", "PlanckMultiverse2", + "PlanckMultiverse3", "PlanckMultiverse4" } +} diff --git a/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset b/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset new file mode 100644 index 0000000000..e58983b118 --- /dev/null +++ b/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset @@ -0,0 +1,8 @@ +local textures = asset.syncedResource({ + Name = "Background Radiation Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_backgroundradiation_textures", + Version = 2 +}) + +asset.export('textures', textures) diff --git a/data/assets/scene/digitaluniverse/digitaluniverse.asset b/data/assets/scene/digitaluniverse/digitaluniverse.asset index 9739bca03e..9bdf3c367a 100644 --- a/data/assets/scene/digitaluniverse/digitaluniverse.asset +++ b/data/assets/scene/digitaluniverse/digitaluniverse.asset @@ -4,6 +4,7 @@ asset.require('./6dF') asset.require('./abell') asset.require('./alternatestarlabels') asset.require('./backgroundradiation') +asset.require('./backgroundradiation_multiverse') asset.require('./clusters') asset.require('./constellationbounds') asset.require('./constellations') From d7f266cb01197ae8a6af5d366032b17a053520ff Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 8 Dec 2020 13:39:46 +0100 Subject: [PATCH 049/147] Update version string --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7343b90e4a..485d59b487 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ project(OpenSpace) set(OPENSPACE_VERSION_MAJOR 0) set(OPENSPACE_VERSION_MINOR 16) set(OPENSPACE_VERSION_PATCH 0) -set(OPENSPACE_VERSION_STRING "Beta-8 RC1") +set(OPENSPACE_VERSION_STRING "Beta-8") set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}") set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake") From e2da38747388878927b4cff71785b050cb2e96cf Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Tue, 8 Dec 2020 10:19:07 -0500 Subject: [PATCH 050/147] added spice frame info functions to spice manager (#1427) * Added spice frame info functions to spice manager --- include/openspace/util/spicemanager.h | 33 +++++++ src/util/spicemanager.cpp | 105 +++++++++++++++++++++ src/util/spicemanager_lua.inl | 127 ++++++++++++++++++++++++++ 3 files changed, 265 insertions(+) diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 6aefd5c52e..25e9db0e0c 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -226,6 +226,18 @@ public: */ bool hasSpkCoverage(const std::string& target, double et) const; + /** + * Returns a list of loaded SPK coverage intervals for \p target + * + * \param target The body to be examined. The target has to name a valid SPICE object + * with respect to the kernels that have been loaded + * \return \c list of SPK kernels for \p target , \c empty list if none loaded. + * + * \throw SpiceException If \p target does not name a valid SPICE object + * \pre \p target must not be empty. + */ + std::vector> spkCoverage(const std::string& target) const; + /** * Returns whether a given \p frame has a CK kernel covering it at the designated * \p et ephemeris time. @@ -242,6 +254,27 @@ public: */ bool hasCkCoverage(const std::string& frame, double et) const; + /** + * Returns a list of loaded CK coverage intervals for \p target + * + * \param target The body to be examined. The target has to name a valid SPICE object + * with respect to the kernels that have been loaded + * \return \c list of CK kernels for \p target , \c empty list if none loaded. + * + * \throw SpiceException If \p target does not name a valid SPICE object + * \pre \p target must not be empty. + */ + std::vector> ckCoverage(const std::string& target) const; + + /** + * Returns a list of loaded spice frames, + * + * \param builtInFrames Boolean representing if builtIn or LoadedFrames should be used + * \return \c list of Spice frames with ID(int) and Name(string). + * + */ + std::vector> spiceBodies(bool builtInFrames) const; + /** * Determines whether values exist for some \p item for any body, identified by its * \p naifId, in the kernel pool by passing it to the \c bodfnd_c function. diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 51ed9fdc47..61225cd0cd 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -342,6 +342,23 @@ bool SpiceManager::hasSpkCoverage(const std::string& target, double et) const { return false; } +std::vector> SpiceManager::spkCoverage( + const std::string& target) const +{ + ghoul_assert(!target.empty(), "Empty target"); + + const int id = naifId(target); + const auto it = _spkIntervals.find(id); + if (it != _spkIntervals.end()) { + return it->second; + } + else { + std::vector> emptyList; + return emptyList; + } +} + + bool SpiceManager::hasCkCoverage(const std::string& frame, double et) const { ghoul_assert(!frame.empty(), "Empty target"); @@ -358,6 +375,71 @@ bool SpiceManager::hasCkCoverage(const std::string& frame, double et) const { return false; } +std::vector> SpiceManager::ckCoverage( + const std::string& target) const +{ + ghoul_assert(!target.empty(), "Empty target"); + + int id = naifId(target); + const auto it = _ckIntervals.find(id); + if (it != _ckIntervals.end()) { + return it->second; + } + else { + id *= 1000; + const auto it = _ckIntervals.find(id); + if (it != _ckIntervals.end()) { + return it->second; + } + else { + std::vector> emptyList; + return emptyList; + } + } +} + +std::vector> SpiceManager::spiceBodies( + bool builtInFrames) const +{ + std::vector> bodies; + + constexpr const int Frnmln = 33; + constexpr const int Lnsize = 81; + SPICEINT_CELL(idset, 8192); + + SpiceChar frname[Frnmln]; + SpiceChar outlin[Lnsize]; + + for (SpiceInt i = 1; i <= 6; i++) { + if (i < 6) { + if (builtInFrames) { + bltfrm_c(i, &idset); + } + else { + kplfrm_c(i, &idset); + } + } + else { + if (builtInFrames) { + bltfrm_c(SPICE_FRMTYP_ALL, &idset); + } + else { + kplfrm_c(SPICE_FRMTYP_ALL, &idset); + } + } + + for (SpiceInt j = 0; j < card_c(&idset); j++) { + frmnam_c( + (reinterpret_cast(idset.data))[j], + Frnmln, + frname + ); + bodies.push_back(std::make_pair(((long)((SpiceInt*)idset.data)[j]), frname)); + } + } + return bodies; +} + bool SpiceManager::hasValue(int naifId, const std::string& item) const { return bodfnd_c(naifId, item.c_str()); } @@ -1250,7 +1332,30 @@ scripting::LuaLibrary SpiceManager::luaLibrary() { "{string, number}", "Unloads the provided SPICE kernel. The name can contain path tokens, " "which are automatically resolved" + }, + { + "getSpkCoverage", + &luascriptfunctions::spkCoverage, + {}, + "{string [, printValues]}", + "Returns a list of SPK coverage intervals for the target." + }, + { + "getCkCoverage", + & luascriptfunctions::ckCoverage, + {}, + "{string [, printValues]}", + "Returns a list of CK coverage intervals for the target." + }, + { + "getSpiceBodies", + &luascriptfunctions::spiceBodies, + {}, + "{builtInFrames [, printValues]}", + "Returns a list of Spice Bodies loaded into the system. Returns SPICE built in frames if builtInFrames" + "Returns User loaded frames if !builtInFrames" } + } }; } diff --git a/src/util/spicemanager_lua.inl b/src/util/spicemanager_lua.inl index 57e112ecd4..e53613ab12 100644 --- a/src/util/spicemanager_lua.inl +++ b/src/util/spicemanager_lua.inl @@ -23,6 +23,8 @@ ****************************************************************************************/ #include +#include +#include namespace openspace::luascriptfunctions { @@ -103,4 +105,129 @@ int unloadKernel(lua_State* L) { return 0; } +/** + * spiceBodies(): + * Returns the list of bodies loaded into the spicemanager + */ +int spiceBodies(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, { 1,2 }, "lua::getSpiceBodies"); + bool isBool = (lua_isboolean(L, 1) == 1); + const bool buildInBodies = isBool ? ghoul::lua::value(L, 1) : false; + + isBool = (lua_isboolean(L, 2) == 1); + bool printValues = isBool ? ghoul::lua::value(L, 2) : false; + lua_settop(L, 0); + std::vector> bodies = SpiceManager::ref().spiceBodies( + buildInBodies + ); + + lua_newtable(L); + int number = 1; + for (const std::pair& body : bodies) { + lua_newtable(L); + ghoul::lua::push(L, 1, body.first); + lua_rawset(L, -3); + ghoul::lua::push(L, 2, body.second); + lua_rawset(L, -3); + lua_rawseti(L, -2, number); + ++number; + + if (printValues) { + LINFO(fmt::format("Body id '{}' and name: {}", body.first, body.second)); + } + } + + return 1; +} + +//internal function for getSpk and getCk coverages +void buildLuaCoverageStack(lua_State* L, + const std::vector>& coverage, + bool printValues) +{ + lua_settop(L, 0); + lua_newtable(L); + int number = 1; + for (const std::pair& window : coverage) { + std::string start = SpiceManager::ref().dateFromEphemerisTime(window.first); + std::string end = SpiceManager::ref().dateFromEphemerisTime(window.second); + + if (printValues) { + LINFO(fmt::format( + "Coverage start {} and end: {}", + SpiceManager::ref().dateFromEphemerisTime(window.first), + SpiceManager::ref().dateFromEphemerisTime(window.second) + )); + } + + lua_newtable(L); + ghoul::lua::push(L, 1, start); + lua_rawset(L, -3); + ghoul::lua::push(L, 2, end); + lua_rawset(L, -3); + lua_rawseti(L, -2, number); + ++number; + } +} + +/** + * getSpkCoverage({string, bool(optional)}): + * Returns the spk coverage for given body + */ +int spkCoverage(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, { 1, 2 }, "lua::getSpkCoverage"); + const bool isString = (lua_isstring(L, 1) == 1); + const bool isBool = (lua_isboolean(L, 2) == 1); + + if (!isString) { + LERRORC( + "getSpkCoverage", + fmt::format( + "{}: Expected argument of type 'string'", + ghoul::lua::errorLocation(L) + ) + ); + lua_settop(L, 0); + ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); + return 0; + } + + std::string argument = ghoul::lua::value(L, 1); + + bool printValues = isBool ? ghoul::lua::value(L, 2) : false; + buildLuaCoverageStack(L, SpiceManager::ref().spkCoverage(argument), printValues); + + return 1; +} + +/** + * getCkCoverage({string, bool(optional)}): + * Returns the spk coverage for given body + */ +int ckCoverage(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, { 1, 2 }, "lua::getCkCoverage"); + + const bool isString = (lua_isstring(L, 1) == 1); + const bool isBool = (lua_isboolean(L, 2) == 1); + + if (!isString) { + LERRORC( + "getCkCoverage", + fmt::format( + "{}: Expected argument of type 'string'", + ghoul::lua::errorLocation(L) + ) + ); + lua_settop(L, 0); + ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); + return 0; + } + + std::string argument = ghoul::lua::value(L, 1); + bool printValues = isBool ? ghoul::lua::value(L, 2) : false; + buildLuaCoverageStack(L, SpiceManager::ref().ckCoverage(argument), printValues); + + return 1; +} + } // namespace openspace::luascriptfunctions From 3db2bf47ea7a14f4260ebf36c7aca83c4187161b Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Tue, 8 Dec 2020 10:29:49 -0500 Subject: [PATCH 051/147] Update for Jupiter moon shadows (#1426) --- .../solarsystem/planets/jupiter/jupiter.asset | 29 +- .../globebrowsing/shaders/renderer_fs.glsl | 559 +++++++++--------- modules/globebrowsing/src/renderableglobe.cpp | 3 + 3 files changed, 312 insertions(+), 279 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset index 520a72d840..aee35e5f44 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset @@ -17,7 +17,34 @@ local Jupiter = { Type = "RenderableGlobe", Radii = { 71492000.0, 71492000.0, 66854000.0 }, SegmentsPerPatch = 64, - Layers = {} + Layers = {}, + ShadowGroup = { + Source1 = { + Name = "Sun", + -- All radius in meters + Radius = 696.3E6 + }, + Caster1 = { + Name = "Ganymede", + -- All radius in meters + Radius = 2631000 + }, + Caster2 = { + Name = "Io", + -- All radius in meters + Radius = 1821600 + }, + Caster3 = { + Name = "Europa", + -- All radius in meters + Radius = 1560800 + }, + Caster4 = { + Name = "Callisto", + -- All radius in meters + Radius = 2410000 + }, + } }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { diff --git a/modules/globebrowsing/shaders/renderer_fs.glsl b/modules/globebrowsing/shaders/renderer_fs.glsl index 463ab78042..00a4da23ac 100644 --- a/modules/globebrowsing/shaders/renderer_fs.glsl +++ b/modules/globebrowsing/shaders/renderer_fs.glsl @@ -1,297 +1,300 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2020 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ + /***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ -#include "fragment.glsl" + #include "fragment.glsl" -#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl> -#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl> -#include <${MODULE_GLOBEBROWSING}/shaders/tileheight.hglsl> -#include "PowerScaling/powerScaling_fs.hglsl" + #include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl> + #include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl> + #include <${MODULE_GLOBEBROWSING}/shaders/tileheight.hglsl> + #include "PowerScaling/powerScaling_fs.hglsl" -// Below are all the tiles that are used for contributing the actual fragment color + // Below are all the tiles that are used for contributing the actual fragment color -#if USE_COLORTEXTURE -uniform Layer ColorLayers[NUMLAYERS_COLORTEXTURE]; -#endif // USE_COLORTEXTURE + #if USE_COLORTEXTURE + uniform Layer ColorLayers[NUMLAYERS_COLORTEXTURE]; + #endif // USE_COLORTEXTURE -#if USE_NIGHTTEXTURE -uniform Layer NightLayers[NUMLAYERS_NIGHTTEXTURE]; -#endif // USE_NIGHTTEXTURE + #if USE_NIGHTTEXTURE + uniform Layer NightLayers[NUMLAYERS_NIGHTTEXTURE]; + #endif // USE_NIGHTTEXTURE -#if USE_OVERLAY -uniform Layer Overlays[NUMLAYERS_OVERLAY]; -#endif // USE_OVERLAY + #if USE_OVERLAY + uniform Layer Overlays[NUMLAYERS_OVERLAY]; + #endif // USE_OVERLAY -#if USE_WATERMASK -uniform Layer WaterMasks[NUMLAYERS_WATERMASK]; -#endif // USE_WATERMASK + #if USE_WATERMASK + uniform Layer WaterMasks[NUMLAYERS_WATERMASK]; + #endif // USE_WATERMASK -#if SHOW_HEIGHT_RESOLUTION -uniform vec2 vertexResolution; -#endif - -//#if USE_NIGHTTEXTURE || USE_WATERMASK || PERFORM_SHADING -uniform vec3 lightDirectionCameraSpace; -//#endif - -#if PERFORM_SHADING -uniform float orenNayarRoughness; -#endif - -#if SHADOW_MAPPING_ENABLED - -#define NSSamplesMinusOne #{nShadowSamples} -#define NSSamples (NSSamplesMinusOne + 1) - -in vec4 shadowCoords; -uniform sampler2DShadow shadowMapTexture; -uniform float zFightingPercentage; -#endif - -#if USE_ECLIPSE_SHADOWS - -/******************************************************************************* - ***** ALL CALCULATIONS FOR ECLIPSE ARE IN METERS AND IN WORLD SPACE SYSTEM **** - *******************************************************************************/ -// JCC: Remove and use dictionary to -// decides the number of shadows -const uint numberOfShadows = 1; - -struct ShadowRenderingStruct { - double xu, xp; - double rs, rc; - dvec3 sourceCasterVec; - dvec3 casterPositionVec; - bool isShadowing; -}; - -// Eclipse shadow data -// JCC: Remove and use dictionary to -// decides the number of shadows -uniform ShadowRenderingStruct shadowDataArray[numberOfShadows]; -uniform int shadows; -uniform bool hardShadows; - -vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[numberOfShadows], - const dvec3 position, const bool ground) -{ - if (shadowInfoArray[0].isShadowing) { - dvec3 pc = shadowInfoArray[0].casterPositionVec - position; - dvec3 sc_norm = shadowInfoArray[0].sourceCasterVec; - dvec3 pc_proj = dot(pc, sc_norm) * sc_norm; - dvec3 d = pc - pc_proj; - - float length_d = float(length(d)); - double length_pc_proj = length(pc_proj); - - float r_p_pi = float(shadowInfoArray[0].rc * (length_pc_proj + shadowInfoArray[0].xp) / shadowInfoArray[0].xp); - float r_u_pi = float(shadowInfoArray[0].rc * (shadowInfoArray[0].xu - length_pc_proj) / shadowInfoArray[0].xu); - - if (length_d < r_u_pi) { // umbra - if (ground) { -#if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.2, 0.2, 0.2, 1.0); -#else - // butterworthFunc - return vec4(vec3(sqrt(r_u_pi / (r_u_pi + pow(length_d, 2.0)))), 1.0); -#endif - } - else { -#if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.5, 0.5, 0.5, 1.0); -#else - return vec4(vec3(length_d / r_p_pi), 1.0); -#endif - } - } - else if (length_d < r_p_pi) {// penumbra -#if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.5, 0.5, 0.5, 1.0); -#else - return vec4(vec3(length_d / r_p_pi), 1.0); -#endif - } - } - - return vec4(1.0); -} -#endif - -in vec4 fs_position; -in vec2 fs_uv; -in vec3 ellipsoidNormalCameraSpace; -in vec3 levelWeights; -in vec3 positionCameraSpace; - -#if USE_ACCURATE_NORMALS - in vec3 ellipsoidTangentThetaCameraSpace; - in vec3 ellipsoidTangentPhiCameraSpace; -#endif // USE_ACCURATE_NORMALS - -#if USE_ECLIPSE_SHADOWS -in vec3 positionWorldSpace; -#endif // USE_ECLIPSE_SHADOWS - - - -Fragment getFragment() { - Fragment frag; - frag.color = vec4(0.3, 0.3, 0.3, 1.0); - - vec3 normal = normalize(ellipsoidNormalCameraSpace); - -#if USE_ACCURATE_NORMALS - normal = getTileNormal( - fs_uv, - levelWeights, - normalize(ellipsoidNormalCameraSpace), - normalize(ellipsoidTangentThetaCameraSpace), - normalize(ellipsoidTangentPhiCameraSpace) - ); -#endif /// USE_ACCURATE_NORMALS - -#if USE_COLORTEXTURE - frag.color = calculateColor(frag.color, fs_uv, levelWeights, ColorLayers); -#endif // USE_COLORTEXTURE - -#if USE_WATERMASK - float waterReflectance = 0.0; - frag.color = calculateWater( - frag.color, - fs_uv, - levelWeights, - WaterMasks, - normal, - lightDirectionCameraSpace, // Should already be normalized - positionCameraSpace, - waterReflectance - ); - -#endif // USE_WATERMASK - -#if USE_NIGHTTEXTURE - frag.color = calculateNight( - frag.color, - fs_uv, - levelWeights, - NightLayers, - normalize(ellipsoidNormalCameraSpace), - lightDirectionCameraSpace // Should already be normalized - ); - -#endif // USE_NIGHTTEXTURE - -#if PERFORM_SHADING - frag.color = calculateShadedColor( - frag.color, - normal, - lightDirectionCameraSpace, - normalize(positionCameraSpace), - orenNayarRoughness - ); -#endif // PERFORM_SHADING - -#if USE_ECLIPSE_SHADOWS - frag.color *= calcShadow(shadowDataArray, dvec3(positionWorldSpace), true); -#endif - -#if USE_OVERLAY - frag.color = calculateOverlay(frag.color, fs_uv, levelWeights, Overlays); -#endif // USE_OVERLAY - -#if SHOW_HEIGHT_INTENSITIES - frag.color.rgb *= vec3(0.1); - - float untransformedHeight = getUntransformedTileVertexHeight(fs_uv, levelWeights); - float contourLine = fract(10.0 * untransformedHeight) > 0.98 ? 1.0 : 0.0; - frag.color.r += untransformedHeight; - frag.color.b = contourLine; -#endif - -#if SHOW_HEIGHT_RESOLUTION - frag.color += 0.0001 * calculateDebugColor(fs_uv, fs_position, vertexResolution); - #if USE_HEIGHTMAP - frag.color.r = min(frag.color.r, 0.8); - frag.color.r += tileResolution(fs_uv, HeightLayers[0].pile.chunkTile0) > 0.9 ? 1 : 0; + #if SHOW_HEIGHT_RESOLUTION + uniform vec2 vertexResolution; #endif -#endif - // Other data -#if USE_WATERMASK - // Water reflectance is added to the G-Buffer. - frag.gNormal.w = waterReflectance; -#else - frag.gNormal.w = 0.0; -#endif - // Normal is written View Space (Including SGCT View Matrix). - frag.gNormal.xyz = normal; + //#if USE_NIGHTTEXTURE || USE_WATERMASK || PERFORM_SHADING + uniform vec3 lightDirectionCameraSpace; + //#endif - if (dot(positionCameraSpace, vec3(1.0)) != 0.0) { - frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space - } - else { - frag.gPosition = vec4(1.0); // in Camera Rig Space - } + #if PERFORM_SHADING + uniform float orenNayarRoughness; + #endif - frag.depth = fs_position.w; + #if SHADOW_MAPPING_ENABLED -#if SHOW_CHUNK_EDGES - const float BorderSize = 0.005; - const vec3 BorderColor = vec3(1.0, 0.0, 0.0); + #define NSSamplesMinusOne #{nShadowSamples} + #define NSSamples (NSSamplesMinusOne + 1) - vec2 uvOffset = fs_uv - vec2(0.5); - float thres = 0.5 - BorderSize * 0.5; - bool isBorder = abs(uvOffset.x) > thres || abs(uvOffset.y) > thres; - if (isBorder) { - frag.color.rgb += BorderColor; - } -#endif // SHOW_CHUNK_EDGES + in vec4 shadowCoords; + uniform sampler2DShadow shadowMapTexture; + uniform float zFightingPercentage; + #endif -#if SHADOW_MAPPING_ENABLED - float shadow = 1.0; - if (shadowCoords.w > 1) { - vec4 normalizedShadowCoords = shadowCoords; - normalizedShadowCoords.z = normalizeFloat(zFightingPercentage * normalizedShadowCoords.w); - normalizedShadowCoords.xy = normalizedShadowCoords.xy / normalizedShadowCoords.w; - normalizedShadowCoords.w = 1.0; + #if USE_ECLIPSE_SHADOWS + + + #define NSEclipseShadowsMinusOne #{nEclipseShadows} + #define NSEclipseShadows (NSEclipseShadowsMinusOne + 1) + + /******************************************************************************* + ***** ALL CALCULATIONS FOR ECLIPSE ARE IN METERS AND IN WORLD SPACE SYSTEM **** + *******************************************************************************/ + struct ShadowRenderingStruct { + double xu, xp; + double rs, rc; + dvec3 sourceCasterVec; + dvec3 casterPositionVec; + bool isShadowing; + }; + + // Eclipse shadow data + // JCC: Remove and use dictionary to + // decides the number of shadows + uniform ShadowRenderingStruct shadowDataArray[NSEclipseShadows]; + uniform int shadows; + uniform bool hardShadows; + + vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[NSEclipseShadows], + const dvec3 position, const bool ground) + { + #for i in 0..#{nEclipseShadows} + if (shadowInfoArray[#{i}].isShadowing) { + dvec3 pc = shadowInfoArray[#{i}].casterPositionVec - position; + dvec3 sc_norm = shadowInfoArray[#{i}].sourceCasterVec; + dvec3 pc_proj = dot(pc, sc_norm) * sc_norm; + dvec3 d = pc - pc_proj; + + + float length_d = float(length(d)); + double length_pc_proj = length(pc_proj); + + float r_p_pi = float(shadowInfoArray[#{i}].rc * (length_pc_proj + shadowInfoArray[#{i}].xp) / shadowInfoArray[#{i}].xp); + float r_u_pi = float(shadowInfoArray[#{i}].rc * (shadowInfoArray[#{i}].xu - length_pc_proj) / shadowInfoArray[#{i}].xu); + + if (length_d < r_u_pi) { // umbra + if (ground) { + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.2, 0.2, 0.2, 1.0); + #else + // butterworthFunc + return vec4(vec3(sqrt(r_u_pi / (r_u_pi + pow(length_d, 2.0)))), 1.0); + #endif + } + else { + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.5, 0.5, 0.5, 1.0); + #else + return vec4(vec3(length_d / r_p_pi), 1.0); + #endif + } + } + else if (length_d < r_p_pi) {// penumbra + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.5, 0.5, 0.5, 1.0); + #else + return vec4(vec3(length_d / r_p_pi), 1.0); + #endif + } + } - float sum = 0; - #for i in 0..#{nShadowSamples} - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, 0)); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, NSSamples - #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , NSSamples - #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, 0)); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, NSSamples - #{i})); #endfor - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(0, 0)); - shadow = sum / (8.0 * NSSamples + 1.f); + return vec4(1.0); } - frag.color.xyz *= shadow < 0.99 ? clamp(shadow + 0.3, 0.0, 1.0) : shadow; -#endif + #endif - return frag; -} + in vec4 fs_position; + in vec2 fs_uv; + in vec3 ellipsoidNormalCameraSpace; + in vec3 levelWeights; + in vec3 positionCameraSpace; + + #if USE_ACCURATE_NORMALS + in vec3 ellipsoidTangentThetaCameraSpace; + in vec3 ellipsoidTangentPhiCameraSpace; + #endif // USE_ACCURATE_NORMALS + + #if USE_ECLIPSE_SHADOWS + in vec3 positionWorldSpace; + #endif // USE_ECLIPSE_SHADOWS + + + + Fragment getFragment() { + Fragment frag; + frag.color = vec4(0.3, 0.3, 0.3, 1.0); + + vec3 normal = normalize(ellipsoidNormalCameraSpace); + + #if USE_ACCURATE_NORMALS + normal = getTileNormal( + fs_uv, + levelWeights, + normalize(ellipsoidNormalCameraSpace), + normalize(ellipsoidTangentThetaCameraSpace), + normalize(ellipsoidTangentPhiCameraSpace) + ); + #endif /// USE_ACCURATE_NORMALS + + #if USE_COLORTEXTURE + frag.color = calculateColor(frag.color, fs_uv, levelWeights, ColorLayers); + #endif // USE_COLORTEXTURE + + #if USE_WATERMASK + float waterReflectance = 0.0; + frag.color = calculateWater( + frag.color, + fs_uv, + levelWeights, + WaterMasks, + normal, + lightDirectionCameraSpace, // Should already be normalized + positionCameraSpace, + waterReflectance + ); + + #endif // USE_WATERMASK + + #if USE_NIGHTTEXTURE + frag.color = calculateNight( + frag.color, + fs_uv, + levelWeights, + NightLayers, + normalize(ellipsoidNormalCameraSpace), + lightDirectionCameraSpace // Should already be normalized + ); + + #endif // USE_NIGHTTEXTURE + + #if PERFORM_SHADING + frag.color = calculateShadedColor( + frag.color, + normal, + lightDirectionCameraSpace, + normalize(positionCameraSpace), + orenNayarRoughness + ); + #endif // PERFORM_SHADING + + #if USE_ECLIPSE_SHADOWS + frag.color *= calcShadow(shadowDataArray, dvec3(positionWorldSpace), true); + #endif + + #if USE_OVERLAY + frag.color = calculateOverlay(frag.color, fs_uv, levelWeights, Overlays); + #endif // USE_OVERLAY + + #if SHOW_HEIGHT_INTENSITIES + frag.color.rgb *= vec3(0.1); + + float untransformedHeight = getUntransformedTileVertexHeight(fs_uv, levelWeights); + float contourLine = fract(10.0 * untransformedHeight) > 0.98 ? 1.0 : 0.0; + frag.color.r += untransformedHeight; + frag.color.b = contourLine; + #endif + + #if SHOW_HEIGHT_RESOLUTION + frag.color += 0.0001 * calculateDebugColor(fs_uv, fs_position, vertexResolution); + #if USE_HEIGHTMAP + frag.color.r = min(frag.color.r, 0.8); + frag.color.r += tileResolution(fs_uv, HeightLayers[0].pile.chunkTile0) > 0.9 ? 1 : 0; + #endif + #endif + + // Other data + #if USE_WATERMASK + // Water reflectance is added to the G-Buffer. + frag.gNormal.w = waterReflectance; + #else + frag.gNormal.w = 0.0; + #endif + // Normal is written View Space (Including SGCT View Matrix). + frag.gNormal.xyz = normal; + + if (dot(positionCameraSpace, vec3(1.0)) != 0.0) { + frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space + } + else { + frag.gPosition = vec4(1.0); // in Camera Rig Space + } + + frag.depth = fs_position.w; + + #if SHOW_CHUNK_EDGES + const float BorderSize = 0.005; + const vec3 BorderColor = vec3(1.0, 0.0, 0.0); + + vec2 uvOffset = fs_uv - vec2(0.5); + float thres = 0.5 - BorderSize * 0.5; + bool isBorder = abs(uvOffset.x) > thres || abs(uvOffset.y) > thres; + if (isBorder) { + frag.color.rgb += BorderColor; + } + #endif // SHOW_CHUNK_EDGES + + #if SHADOW_MAPPING_ENABLED + float shadow = 1.0; + if (shadowCoords.w > 1) { + vec4 normalizedShadowCoords = shadowCoords; + normalizedShadowCoords.z = normalizeFloat(zFightingPercentage * normalizedShadowCoords.w); + normalizedShadowCoords.xy = normalizedShadowCoords.xy / normalizedShadowCoords.w; + normalizedShadowCoords.w = 1.0; + + float sum = 0; + #for i in 0..#{nShadowSamples} + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, 0)); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, NSSamples - #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , NSSamples - #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, 0)); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, NSSamples - #{i})); + #endfor + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(0, 0)); + shadow = sum / (8.0 * NSSamples + 1.f); + } + frag.color.xyz *= shadow < 0.99 ? clamp(shadow + 0.3, 0.0, 1.0) : shadow; + #endif + + return frag; + } diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index 2c6b10e237..d2f20e0076 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -1810,6 +1810,9 @@ void RenderableGlobe::recompileShaders() { // Shadow Mapping Samples shaderDictionary.setValue("nShadowSamples", _generalProperties.nShadowSamples - 1); + // Exclise Shadow Samples + int nEclipseShadows = _ellipsoid.shadowConfigurationArray().size(); + shaderDictionary.setValue("nEclipseShadows", nEclipseShadows - 1); // // Create local shader // From 184d94094477cc568ddac217200e8eef0ad70d6b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 8 Dec 2020 16:37:25 +0100 Subject: [PATCH 052/147] A bit more code cleanup --- apps/OpenSpace/main.cpp | 2 +- modules/globebrowsing/src/renderableglobe.cpp | 4 ++-- src/rendering/screenspacerenderable.cpp | 2 +- src/util/spicemanager.cpp | 7 ++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index d4628cd9c6..7a47ddb140 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -1188,7 +1188,7 @@ int main(int argc, char** argv) { int qac = 0; QApplication app(qac, nullptr); #endif // __APPLE__ - + LauncherWindow win( !hasProfile, *global::configuration, diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index d2f20e0076..a41b095086 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -1690,11 +1690,11 @@ void RenderableGlobe::recompileShaders() { std::vector>& pairs = preprocessingData.keyValuePairs; - + const bool hasHeightLayer = !_layerManager.layerGroup( layergroupid::HeightLayers ).activeLayers().empty(); - + pairs.emplace_back("useAccurateNormals", std::to_string(_generalProperties.useAccurateNormals && hasHeightLayer) ); diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index c70ceee700..35a0b144bc 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -428,7 +428,7 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary } if (dictionary.hasKey(UsePerspectiveProjectionInfo.identifier)) { - _usePerspectiveProjection = + _usePerspectiveProjection = dictionary.value(UsePerspectiveProjectionInfo.identifier); } diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 61225cd0cd..0abe2cabc3 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -1351,9 +1351,10 @@ scripting::LuaLibrary SpiceManager::luaLibrary() { "getSpiceBodies", &luascriptfunctions::spiceBodies, {}, - "{builtInFrames [, printValues]}", - "Returns a list of Spice Bodies loaded into the system. Returns SPICE built in frames if builtInFrames" - "Returns User loaded frames if !builtInFrames" + "{ builtInFrames [, printValues] }", + "Returns a list of Spice Bodies loaded into the system. Returns SPICE " + "built in frames if builtInFrames. Returns User loaded frames if " + "!builtInFrames" } } From 1a193a0a73bfd5020e85cdc77ed374817f6b4b6a Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Tue, 8 Dec 2020 10:57:31 -0500 Subject: [PATCH 053/147] reworked decription and meta for orion nebula (#1429) * reworked decription and meta for orion nebula * update orion gui path * update gui path for transform --- .../objects/orionnebula/cluster.asset | 28 ++++++----- .../milkyway/objects/orionnebula/nebula.asset | 48 +++++++++++-------- .../objects/orionnebula/transforms.asset | 5 +- 3 files changed, 45 insertions(+), 36 deletions(-) diff --git a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset index 8a49c4bc33..d02f8c3a5f 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset @@ -23,18 +23,9 @@ local OrionClusterStars = { }, GUI = { Name = "Orion Nebula Star Cluster", - Path = "/Milky Way/Stars" - } -} - -assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars }) - - -asset.meta = { - Name = "Orion Nebula Star Cluster", - Version = "1.0", - Description = [[ In order to have an accurate depiction of the Orion nebula, we need -to include the star cluster that was birthed from it. We turned to a study of the + Path = "/Milky Way/Orion", + Description = [[ In order to have an accurate depiction of the Orion nebula, we +need to include the star cluster that was birthed from it. We turned to a study of the cluster's stellar population by Lynne Hillenbrand, who was working at the University of California, Berkeley at the time. The catalog from her paper contains more than 1500 stars, about half the stars in the actual cluster. The cluster is very crowded, with a @@ -45,7 +36,18 @@ Knowing the size of the cluster and approximating the shape to be roughly spheri placed each star along a line of sight through this imaginary sphere centered on the cluster. In this sense, these data are observed data and the view from Earth is accurate. But the distance of each star has been derived from this educated-guess approach for the -cluster distribution. ]], +cluster distribution. ]] + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars }) + + +asset.meta = { + Name = "Orion Nebula Star Cluster", + Version = "1.0", + Description = [[ Digital Universe asset for the Orion star cluster. To be used in + conjunction with nebula model. Use orionnebula.asset to include both.]], Author = "AMNH Digital Universe", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", diff --git a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset index 46a2303a5f..8c5a86cf8e 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset @@ -31,7 +31,20 @@ local NebulaHolder = { }, GUI = { Name = "Orion Nebula", - Path = "/Milky Way/Objects", + Path = "/Milky Way/Orion", + Description = [[ In the Digital Universe model of the Orion Nebula, we depict the +ionization front effectively as a terrain, with a flat Hubble image of the nebula mapped +on the undulating surface. In reality, the ionization front has a slight thickness to +it - about a third of a light year - but is quite thin compared to the overall size of +the nebula, which stretches about ten light years from side to side.

Close into +the center, we see small teardrop-shaped structures with their narrow ends pointing away +from the bright star: these are protoplanetary disks, or proplyds, of dense gas and dust +surrounding young stars. The larger formations that one sees farther away from the center +of the nebula take on a cup-like shape, with the narrow end pointing away from the +nebulas center. These enormous structures are bow shocks that delineate the region where +highspeed winds from the central star slow from supersonic to subsonic speeds. You can +think of an HII region as a sort of tremendous explosion, taking place over millennia, +and the bow shocks are part of the outward rush of material. ]] } } @@ -62,8 +75,9 @@ local OrionNebulaModel = { }, GUI = { Name = "Orion Nebula Model", - Path = "/Milky Way/Objects", - Hidden = true + Path = "/Milky Way/Orion", + Hidden = true, + Description = "Orion Nebula 3D model. See Orion Nebula for description." } } @@ -94,8 +108,9 @@ local OrionNebulaShocksModel = { }, GUI = { Name = "Orion Nebula Shocks", - Path = "/Milky Way/Objects", - Hidden = false + Path = "/Milky Way/Orion", + Hidden = false, + Description = "Orion Nebula Shocks 3D model. See Orion Nebula for description." } } @@ -126,8 +141,9 @@ local OrionNebulaProplydsModel = { }, GUI = { Name = "Orion Nebula Proplyds", - Path = "/Milky Way/Objects", - Hidden = false + Path = "/Milky Way/Orion", + Hidden = false, + Description = "Orion Nebula Proplyds 3D model. See Orion Nebula for description." } } @@ -142,22 +158,12 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { asset.meta = { Name = "Orion Nebula Model", Version = "1.0", - Description = [[ In the Digital Universe model of the Orion Nebula, we depict the -ionization front effectively as a terrain, with a flat Hubble image of the nebula mapped -on the undulating surface. In reality, the ionization front has a slight thickness to -it - about a third of a light year - but is quite thin compared to the overall size of -the nebula, which stretches about ten light years from side to side.

Close into -the center, we see small teardrop-shaped structures with their narrow ends pointing away -from the bright star: these are protoplanetary disks, or proplyds, of dense gas and dust -surrounding young stars. The larger formations that one sees farther away from the center -of the nebula take on a cup-like shape, with the narrow end pointing away from the -nebulas center. These enormous structures are bow shocks that delineate the region where -highspeed winds from the central star slow from supersonic to subsonic speeds. You can -think of an HII region as a sort of tremendous explosion, taking place over millennia, -and the bow shocks are part of the outward rush of material. ]], + Description = [[ Digital Universe asset for the Orion nebula 3D model. This asset + contains seperate models for the nebula, proplyds and shocks. To be used in + conjunction with orion star cluster. Use orionnebula.asset to include both.]], Author = "AMNH Digital Universe", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", - Identifiers = {"OrionNebulaModel", "OrionNebulaModel", "OrionNebulaProplydsModel", + Identifiers = {"OrionNebulaHolder", "OrionNebulaModel", "OrionNebulaProplydsModel", "OrionNebulaShocksModel"} } diff --git a/data/assets/scene/milkyway/objects/orionnebula/transforms.asset b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset index 15bc241234..3461943c80 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/transforms.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset @@ -18,8 +18,9 @@ local NebulaPosition = { }, GUI = { Name = "Orion Nebula Position", - Path = "/Milky Way/Objects", - Hidden = true + Path = "/Milky Way/Orion", + Hidden = true, + Description = "Static position for Orion Nebula" } } From 63160768d5f7797890eb785a1c8a0379bc9b2b20 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Tue, 8 Dec 2020 20:55:10 +0100 Subject: [PATCH 054/147] Exoplanets cleanup (#1428) * Remove name conversion to match speck file * Instead update the speck file so that the names are consistent between files * Tiny cleanup * Enable visualization of systems with a subset of planets missing data * Prevent overriding star information with non valid data --- .../scene/digitaluniverse/exoplanets.asset | 2 +- modules/exoplanets/exoplanetshelper.cpp | 61 ++----- modules/exoplanets/exoplanetshelper.h | 24 ++- modules/exoplanets/exoplanetsmodule_lua.inl | 168 +++++++++--------- .../tasks/exoplanetsdatapreparationtask.cpp | 13 +- 5 files changed, 119 insertions(+), 149 deletions(-) diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset index 61308beb8c..ec4e7e1c3a 100644 --- a/data/assets/scene/digitaluniverse/exoplanets.asset +++ b/data/assets/scene/digitaluniverse/exoplanets.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Exoplanets Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_exoplanets_speck", - Version = 1 + Version = 2 }) local object = { diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index dfc821c7e2..3a71287751 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -42,58 +42,21 @@ namespace { namespace openspace::exoplanets { -std::string_view speckStarName(std::string_view csvName) { - if (csvName == "MOA-2009-BLG-387L") { return "MOA 2009-BLG-387L"; } - if (csvName == "OGLE-2007-BLG-368L") { return "OGLE 2007-BLG-368L"; } - if (csvName == "OGLE-2005-BLG-169L") { return "OGLE 2005-BLG-169L"; } - if (csvName == "OGLE-2005-BLG-071L") { return "OGLE 2005-BLG-71L"; } - if (csvName == "OGLE-2003-BLG-235L") { return "OGLE 2003-BLG-235L"; } - if (csvName == "MOA-2008-BLG-310L") { return "MOA 2008-BLG-310L"; } - if (csvName == "OGLE-2006-BLG-109L") { return "OGLE 2006-BLG-109L"; } - if (csvName == "HD 137388") { return "HD 137388 A"; } - if (csvName == "MOA-2010-BLG-477L") { return "MOA 2010-BLG-477L"; } - if (csvName == "MOA-2009-BLG-266L") { return "MOA 2009-BLG-266L"; } - if (csvName == "iot Dra") { return "HIP 75458"; } - if (csvName == "MOA-2007-BLG-400L") { return "MOA 2007-BLG-400L"; } - if (csvName == "OGLE-2011-BLG-0251L") { return "OGLE 2011-BLG-251L"; } - if (csvName == "OGLE-2005-BLG-390L") { return "OGLE 2005-BLG-390L"; } - if (csvName == "MOA-2007-BLG-192L") { return "MOA 2007-BLG-192L"; } - if (csvName == "MOA-2009-BLG-319L") { return "MOA 2009-BLG-319L"; } - return csvName; +bool isValidPosition(const glm::vec3& pos) { + return !glm::any(glm::isnan(pos)); } -std::string_view csvStarName(std::string_view name) { - if (name == "MOA 2009-BLG-387L") { return "MOA-2009-BLG-387L"; } - if (name == "OGLE 2007-BLG-368L") { return "OGLE-2007-BLG-368L"; } - if (name == "OGLE 2005-BLG-169L") { return "OGLE-2005-BLG-169L"; } - if (name == "OGLE 2005-BLG-71L") { return "OGLE-2005-BLG-071L"; } - if (name == "OGLE 2003-BLG-235L") { return "OGLE-2003-BLG-235L"; } - if (name == "MOA 2008-BLG-310L") { return "MOA-2008-BLG-310L"; } - if (name == "OGLE 2006-BLG-109L") { return "OGLE-2006-BLG-109L"; } - if (name == "HD 137388 A") { return "HD 137388"; } - if (name == "MOA 2010-BLG-477L") { return "MOA-2010-BLG-477L"; } - if (name == "MOA 2009-BLG-266L") { return "MOA-2009-BLG-266L"; } - if (name == "HIP 75458") { return "iot Dra"; } - if (name == "MOA 2007-BLG-400L") { return "MOA-2007-BLG-400L"; } - if (name == "OGLE 2011-BLG-251L") { return "OGLE-2011-BLG-0251L"; } - if (name == "OGLE 2005-BLG-390L") { return "OGLE-2005-BLG-390L"; } - if (name == "MOA 2007-BLG-192L") { return "MOA-2007-BLG-192L"; } - if (name == "MOA 2009-BLG-319L") { return "MOA-2009-BLG-319L"; } - return name; -} - -bool hasSufficientData(const Exoplanet& p) { - bool invalidPos = std::isnan(p.positionX) - || std::isnan(p.positionY) - || std::isnan(p.positionZ); +bool hasSufficientData(const ExoplanetDataEntry& p) { + const glm::vec3 starPosition{ p.positionX , p.positionY, p.positionZ }; + bool validStarPosition = isValidPosition(starPosition); bool hasSemiMajorAxis = !std::isnan(p.a); bool hasOrbitalPeriod = !std::isnan(p.per); - return !invalidPos && hasSemiMajorAxis && hasOrbitalPeriod; + return validStarPosition && hasSemiMajorAxis && hasOrbitalPeriod; } -std::string starColor(float bv) { +glm::vec3 starColor(float bv) { std::ifstream colorMap(absPath(BvColormapPath), std::ios::in); if (!colorMap.good()) { @@ -101,7 +64,7 @@ std::string starColor(float bv) { "Failed to open colormap data file: '{}'", absPath(BvColormapPath) )); - return ""; + return glm::vec3(0.f, 0.f, 0.f); } const int t = static_cast(round(((bv + 0.4) / (2.0 + 0.4)) * 255)); @@ -112,12 +75,10 @@ std::string starColor(float bv) { colorMap.close(); std::istringstream colorStream(color); - std::string r, g, b; - getline(colorStream, r, ' '); - getline(colorStream, g, ' '); - getline(colorStream, b, ' '); + float r, g, b; + colorStream >> r >> g >> b; - return fmt::format("{{ {}, {}, {} }}", r, g, b); + return glm::vec3(r, g, b); } glm::dmat4 computeOrbitPlaneRotationMatrix(float i, float bigom, float omega) { diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 6b24ee6afd..6540f3db43 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -27,10 +27,11 @@ #include #include +#include namespace openspace::exoplanets { -struct Exoplanet { +struct ExoplanetDataEntry { float a; // Orbital semi-major axis in AU double aUpper; // Upper uncertainty of orbital semi-major axis double aLower; // Lower uncertainty of orbital semi-major axis @@ -69,17 +70,26 @@ struct Exoplanet { float positionZ = std::numeric_limits::quiet_NaN(); }; -// Convert csv-file specific names to the corresponding name in the speck data file -std::string_view speckStarName(std::string_view name); +struct StarData { + glm::vec3 position; // In parsec + float radius; // In solar radii + float bvColorIndex; +}; -// Convert speck-file specific names to the corresponding name in the csv data file -std::string_view csvStarName(std::string_view name); +struct ExoplanetSystem { + std::string starName; + StarData starData; + std::vector planetNames; + std::vector planetsData; +}; + +bool isValidPosition(const glm::vec3& pos); // Check if the exoplanet p has sufficient data for visualization -bool hasSufficientData(const Exoplanet& p); +bool hasSufficientData(const ExoplanetDataEntry& p); // Compute star color in RGB from b-v color index -std::string starColor(float bv); +glm::vec3 starColor(float bv); glm::dmat4 computeOrbitPlaneRotationMatrix(float i, float bigom, float omega); diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 5f40a768c1..8456c34c36 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -56,33 +56,15 @@ constexpr const char* NoDataTextureFile = constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; -void createExoplanetSystem(std::string_view starName) { - // If user have given name as in EOD, change it to speck-name - const std::string starNameSpeck = std::string(speckStarName(starName)); - - const std::string starIdentifier = createIdentifier(starNameSpeck); - - std::string sanitizedStarName = starNameSpeck; - sanitizeNameString(sanitizedStarName); - - const std::string guiPath = ExoplanetsGuiPath + sanitizedStarName; - - SceneGraphNode* existingStarNode = sceneGraphNode(starIdentifier); - if (existingStarNode) { - LERROR(fmt::format( - "Adding of exoplanet system '{}' failed. The system has already been added.", - starName - )); - return; - } +ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { + ExoplanetSystem system; std::ifstream data(absPath(ExoplanetsDataPath), std::ios::in | std::ios::binary); - if (!data.good()) { LERROR(fmt::format( "Failed to open exoplanets data file: '{}'", absPath(ExoplanetsDataPath) )); - return; + return ExoplanetSystem(); } std::ifstream lut(absPath(LookUpTablePath)); @@ -90,86 +72,110 @@ void createExoplanetSystem(std::string_view starName) { LERROR(fmt::format( "Failed to open exoplanets look-up table: '{}'", absPath(LookUpTablePath) )); - return; + return ExoplanetSystem(); } // 1. search lut for the starname and return the corresponding location // 2. go to that location in the data file // 3. read sizeof(exoplanet) bytes into an exoplanet object. - Exoplanet p; + ExoplanetDataEntry p; std::string line; - bool found = false; - - std::vector planetSystem; - std::vector planetNames; - while (getline(lut, line)) { std::istringstream ss(line); std::string name; getline(ss, name, ','); - if (name.compare(0, name.length() - 2, starNameSpeck) == 0) { + if (name.substr(0, name.length() - 2) == starName) { std::string location_s; getline(ss, location_s); long location = std::stol(location_s.c_str()); data.seekg(location); - data.read(reinterpret_cast(&p), sizeof(Exoplanet)); + data.read(reinterpret_cast(&p), sizeof(ExoplanetDataEntry)); sanitizeNameString(name); - planetNames.push_back(name); - planetSystem.push_back(p); - found = true; if (!hasSufficientData(p)) { - LERROR(fmt::format( - "Insufficient data available for exoplanet system: '{}'", - starName - )); - return; + LWARNING(fmt::format("Insufficient data for exoplanet: '{}'", name)); + continue; + } + + system.planetNames.push_back(name); + system.planetsData.push_back(p); + + // Star data - Should not vary between planets, but one data entry might + // lack data for the host star while another does not. So for every planet, + // update star data if needed + const glm::vec3 pos{ p.positionX, p.positionY, p.positionZ }; + if (system.starData.position != pos && isValidPosition(pos)) { + system.starData.position = pos; + } + if (system.starData.bvColorIndex != p.bmv && !std::isnan(p.bmv)) { + system.starData.bvColorIndex = p.bmv; + } + if (system.starData.radius != p.rStar && !std::isnan(p.rStar)) { + system.starData.radius = p.rStar; } } } - data.close(); - lut.close(); + system.starName = starName; + return std::move(system); +} - if (!found) { - LERROR(fmt::format("No star with the provided name was found: '{}'", starName)); +void createExoplanetSystem(const std::string& starName) { + const std::string starIdentifier = createIdentifier(starName); + + std::string sanitizedStarName = starName; + sanitizeNameString(sanitizedStarName); + + const std::string guiPath = ExoplanetsGuiPath + sanitizedStarName; + + SceneGraphNode* existingStarNode = sceneGraphNode(starIdentifier); + if (existingStarNode) { + LERROR(fmt::format( + "Adding of exoplanet system '{}' failed. The system has already been added", + starName + )); return; } - const glm::dvec3 starPosition = glm::dvec3( - p.positionX * distanceconstants::Parsec, - p.positionY * distanceconstants::Parsec, - p.positionZ * distanceconstants::Parsec - ); + ExoplanetSystem system = findExoplanetSystemInData(starName); + if (system.planetNames.empty()) { + LERROR(fmt::format("Exoplanet system '{}' could not be found", starName)); + return; + } - const glm::dmat3 exoplanetSystemRotation = computeSystemRotation(starPosition); + const glm::vec3 starPosInParsec = system.starData.position; + if (!isValidPosition(starPosInParsec)) { + LERROR(fmt::format( + "Insufficient data available for exoplanet system: '{}'. " + "Could not determine star position", starName + )); + return; + } + + const glm::dvec3 starPos = + static_cast(starPosInParsec) * distanceconstants::Parsec; + const glm::dmat3 exoplanetSystemRotation = computeSystemRotation(starPos); + const float solarRadius = static_cast(distanceconstants::SolarRadius); // Star - float radiusInMeter = static_cast(distanceconstants::SolarRadius); - if (!std::isnan(p.rStar)) { - radiusInMeter *= p.rStar; + float radiusInMeter = solarRadius; + if (!std::isnan(system.starData.radius)) { + radiusInMeter *= system.starData.radius; } std::string colorLayers; - if (!std::isnan(p.bmv)) { - // @TODO (emmbr, 2020-10-12) should also check the bv value for the siblings. - // The data on the planets is derived from different sources, so while this - // planet has a nan value, another might not - const std::string color = starColor(p.bmv); - - if (color.empty()) { - LERROR("Error occurred when computing star color"); - return; - } + const float bv = system.starData.bvColorIndex; + if (!std::isnan(bv)) { + const glm::vec3 color = starColor(bv); colorLayers = "{" "Identifier = 'StarColor'," "Type = 'SolidColor'," - "Color = " + color + "," + "Color = " + ghoul::to_string(color) + "," "BlendMode = 'Normal'," "Enabled = true" "}," @@ -213,7 +219,7 @@ void createExoplanetSystem(std::string_view starName) { "}," "Translation = {" "Type = 'StaticTranslation'," - "Position = " + ghoul::to_string(starPosition) + "" + "Position = " + ghoul::to_string(starPos) + "" "}" "}," "Tag = {'exoplanet_system'}," @@ -229,9 +235,9 @@ void createExoplanetSystem(std::string_view starName) { ); // Planets - for (size_t i = 0; i < planetSystem.size(); i++) { - Exoplanet planet = planetSystem[i]; - const std::string planetName = planetNames[i]; + for (size_t i = 0; i < system.planetNames.size(); i++) { + ExoplanetDataEntry planet = system.planetsData[i]; + const std::string planetName = system.planetNames[i]; if (std::isnan(planet.ecc)) { planet.ecc = 0.f; @@ -259,14 +265,12 @@ void createExoplanetSystem(std::string_view starName) { sEpoch = "2009-05-19T07:11:34.080"; } - float planetRadius; - std::string enabled; - const float astronomicalUnit = static_cast(distanceconstants::AstronomicalUnit); - const float solarRadius = static_cast(distanceconstants::SolarRadius); const float jupiterRadius = static_cast(distanceconstants::JupiterRadius); + float planetRadius; + std::string enabled; if (std::isnan(planet.r)) { if (std::isnan(planet.rStar)) { planetRadius = planet.a * 0.001f * astronomicalUnit; @@ -281,7 +285,7 @@ void createExoplanetSystem(std::string_view starName) { enabled = "true"; } - const float period = static_cast(planet.per * SecondsPerDay); + const float periodInSeconds = static_cast(planet.per * SecondsPerDay); const float semiMajorAxisInMeter = planet.a * astronomicalUnit; const float semiMajorAxisInKm = semiMajorAxisInMeter * 0.001f; @@ -296,7 +300,7 @@ void createExoplanetSystem(std::string_view starName) { "ArgumentOfPeriapsis = " + std::to_string(planet.omega) + "," "MeanAnomaly = 0.0," "Epoch = '" + sEpoch + "'," //TT. JD to YYYY MM DD hh:mm:ss - "Period = " + std::to_string(period) + "" + "Period = " + std::to_string(periodInSeconds) + "" "}"; const std::string planetNode = "{" @@ -306,7 +310,7 @@ void createExoplanetSystem(std::string_view starName) { "Renderable = {" "Type = 'RenderableGlobe'," "Enabled = " + enabled + "," - "Radii = " + std::to_string(planetRadius) + "," //R. in meters + "Radii = " + std::to_string(planetRadius) + "," // in meters "SegmentsPerPatch = 64," "PerformShading = false," "Layers = {}" @@ -328,11 +332,6 @@ void createExoplanetSystem(std::string_view starName) { trailResolution *= 2; } - openspace::global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + planetNode + ");", - scripting::ScriptEngine::RemoteScripting::Yes - ); - const std::string planetTrailNode = "{" "Identifier = '" + planetIdentifier + "_Trail'," "Parent = '" + starIdentifier + "'," @@ -351,8 +350,9 @@ void createExoplanetSystem(std::string_view starName) { "}"; openspace::global::scriptEngine->queueScript( - "openspace.addSceneGraphNode(" + planetTrailNode + ");", - openspace::scripting::ScriptEngine::RemoteScripting::Yes + "openspace.addSceneGraphNode(" + planetTrailNode + ");" + "openspace.addSceneGraphNode(" + planetNode + ");", + scripting::ScriptEngine::RemoteScripting::Yes ); bool hasUpperAUncertainty = !std::isnan(planet.aUpper); @@ -441,8 +441,7 @@ int removeExoplanetSystem(lua_State* L) { const int StringLocation = -1; const std::string starName = luaL_checkstring(L, StringLocation); - const std::string starNameSpeck = std::string(speckStarName(starName)); - const std::string starIdentifier = createIdentifier(starNameSpeck); + const std::string starIdentifier = createIdentifier(starName); openspace::global::scriptEngine->queueScript( "openspace.removeSceneGraphNode('" + starIdentifier + "');", @@ -477,7 +476,7 @@ std::vector hostStarsWithSufficientData() { lookupTableFile.seekg(0); names.reserve(nExoplanets); - Exoplanet p; + ExoplanetDataEntry p; while (getline(lookupTableFile, line)) { std::stringstream ss(line); std::string name; @@ -492,7 +491,7 @@ std::vector hostStarsWithSufficientData() { long location = std::stol(location_s.c_str()); data.seekg(location); - data.read(reinterpret_cast(&p), sizeof(Exoplanet)); + data.read(reinterpret_cast(&p), sizeof(ExoplanetDataEntry)); if (hasSufficientData(p)) { names.push_back(name); @@ -541,4 +540,5 @@ int listAvailableExoplanetSystems(lua_State* L) { return 0; } + } //namespace openspace::exoplanets::luascriptfunctions diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index a7ec330972..90918c46a1 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -153,7 +153,7 @@ void ExoplanetsDataPreparationTask::perform( return result; }; - Exoplanet p; + ExoplanetDataEntry p; std::string data; int exoplanetCount = 0; while (getline(inputDataFile, planetRow)) { @@ -161,7 +161,7 @@ void ExoplanetsDataPreparationTask::perform( progressCallback(static_cast(exoplanetCount) / static_cast(total)); std::string component; - std::string speckStarname; + std::string starName; float ra = std::numeric_limits::quiet_NaN(); // decimal degrees float dec = std::numeric_limits::quiet_NaN(); // decimal degrees @@ -248,9 +248,8 @@ void ExoplanetsDataPreparationTask::perform( } // Star - name and position else if (column == "hostname") { - std::string name = readStringData(data); - speckStarname = std::string(speckStarName(name)); - glm::vec3 position = starPosition(speckStarname); + starName = readStringData(data); + glm::vec3 position = starPosition(starName); p.positionX = position[0]; p.positionY = position[1]; p.positionZ = position[2]; @@ -308,10 +307,10 @@ void ExoplanetsDataPreparationTask::perform( // Create look-up table long pos = static_cast(binFile.tellp()); - std::string planetName = speckStarname + " " + component; + std::string planetName = starName + " " + component; lutFile << planetName << "," << pos << std::endl; - binFile.write(reinterpret_cast(&p), sizeof(Exoplanet)); + binFile.write(reinterpret_cast(&p), sizeof(ExoplanetDataEntry)); } progressCallback(1.f); From 8d3bf03db0f14153c7c1811e97427233c3f8c4f5 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 8 Dec 2020 23:44:24 +0100 Subject: [PATCH 055/147] Some work on DashboardItems - Add new DashboardItemText that displays a static text on screen (closes #1423) - Add the ability to change the format string to the DashboardItemDate, DashboardItemDistance, and DashboardItemSimulationIncrement --- include/openspace/util/spicemanager.h | 2 + modules/base/CMakeLists.txt | 2 + modules/base/basemodule.cpp | 2 + modules/base/dashboard/dashboarditemdate.cpp | 60 +++++++- modules/base/dashboard/dashboarditemdate.h | 2 + .../base/dashboard/dashboarditemdistance.cpp | 39 ++++- .../base/dashboard/dashboarditemdistance.h | 1 + .../dashboarditemsimulationincrement.cpp | 98 +++++++++--- .../dashboarditemsimulationincrement.h | 3 + modules/base/dashboard/dashboarditemtext.cpp | 143 ++++++++++++++++++ modules/base/dashboard/dashboarditemtext.h | 60 ++++++++ src/util/spicemanager.cpp | 16 ++ src/util/time.cpp | 3 +- 13 files changed, 394 insertions(+), 37 deletions(-) create mode 100644 modules/base/dashboard/dashboarditemtext.cpp create mode 100644 modules/base/dashboard/dashboarditemtext.h diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 25e9db0e0c..916dd64f2b 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -544,6 +544,8 @@ public: } } + std::string dateFromEphemerisTime(double ephemerisTime, const char* format); + /** * Returns the \p position of a \p target body relative to an \p observer in a * specific \p referenceFrame, optionally corrected for \p lightTime (planetary diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt index 386e50515f..0a2c4b4d53 100644 --- a/modules/base/CMakeLists.txt +++ b/modules/base/CMakeLists.txt @@ -34,6 +34,7 @@ set(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.h ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.h ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.h + ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemtext.h ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.h ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.h ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.h @@ -86,6 +87,7 @@ set(SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemtext.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.cpp ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.cpp ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.cpp diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index 830d528117..fca97888c9 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -120,6 +121,7 @@ void BaseModule::internalInitialize(const ghoul::Dictionary&) { "DashboardItemSimulationIncrement" ); fDashboard->registerClass("DashboardItemSpacing"); + fDashboard->registerClass("DashboardItemText"); fDashboard->registerClass("DashboardItemVelocity"); auto fRenderable = FactoryManager::ref().factory(); diff --git a/modules/base/dashboard/dashboarditemdate.cpp b/modules/base/dashboard/dashboarditemdate.cpp index 34b0dac408..cdd8e7ba52 100644 --- a/modules/base/dashboard/dashboarditemdate.cpp +++ b/modules/base/dashboard/dashboarditemdate.cpp @@ -27,10 +27,12 @@ #include #include #include +#include #include #include #include #include +#include #include namespace { @@ -49,6 +51,22 @@ namespace { "Font Size", "This value determines the size of the font that is used to render the date." }; + + constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { + "FormatString", + "Format String", + "The format text describing how this dashboard item renders it's text. This text " + "must contain exactly one {} which is a placeholder that will contain the date" + }; + + constexpr openspace::properties::Property::PropertyInfo TimeFormatInfo = { + "TimeFormat", + "Time Format", + "The format string used for formatting the date/time before being passed to the " + "string in FormatString. See " + "https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html for full " + "information about how to structure this format" + }; } // namespace namespace openspace { @@ -75,6 +93,18 @@ documentation::Documentation DashboardItemDate::Documentation() { new IntVerifier, Optional::Yes, FontSizeInfo.description + }, + { + FormatStringInfo.identifier, + new StringVerifier, + Optional::Yes, + FormatStringInfo.description + }, + { + TimeFormatInfo.identifier, + new StringVerifier, + Optional::Yes, + TimeFormatInfo.description } } }; @@ -84,6 +114,8 @@ DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) : DashboardItem(dictionary) , _fontName(FontNameInfo, KeyFontMono) , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + , _formatString(FormatStringInfo, "Date: {} UTC") + , _timeFormat(TimeFormatInfo, "YYYY MON DDTHR:MN:SC.### ::RND") { documentation::testSpecificationAndThrow( Documentation(), @@ -106,6 +138,16 @@ DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) _font = global::fontManager->font(_fontName, _fontSize); }); addProperty(_fontSize); + + if (dictionary.hasKey(FormatStringInfo.identifier)) { + _formatString = dictionary.value(FormatStringInfo.identifier); + } + addProperty(_formatString); + + if (dictionary.hasKey(TimeFormatInfo.identifier)) { + _timeFormat = dictionary.value(TimeFormatInfo.identifier); + } + addProperty(_timeFormat); _font = global::fontManager->font(_fontName, _fontSize); } @@ -113,20 +155,24 @@ DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) void DashboardItemDate::render(glm::vec2& penPosition) { ZoneScoped - RenderFont( - *_font, - penPosition, - fmt::format("Date: {} UTC", global::timeManager->time().UTC()) + std::string time = SpiceManager::ref().dateFromEphemerisTime( + global::timeManager->time().j2000Seconds(), + _timeFormat.value().c_str() ); + try { + RenderFont(*_font, penPosition, fmt::format(_formatString.value().c_str(), time)); + } + catch (const fmt::format_error&) { + LERRORC("DashboardItemDate", "Illegal format string"); + } penPosition.y -= _font->height(); } glm::vec2 DashboardItemDate::size() const { ZoneScoped - return _font->boundingBox( - fmt::format("Date: {} UTC", global::timeManager->time().UTC()) - ); + std::string_view time = global::timeManager->time().UTC(); + return _font->boundingBox(fmt::format(_formatString.value().c_str(), time)); } } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index 139b03477a..81e7c754e1 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -50,6 +50,8 @@ public: private: properties::StringProperty _fontName; properties::FloatProperty _fontSize; + properties::StringProperty _formatString; + properties::StringProperty _timeFormat; std::shared_ptr _font; }; diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index e8f83a77bd..1c36425646 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -101,6 +101,14 @@ namespace { "to convert the meters into." }; + constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { + "FormatString", + "Format String", + "The format string that is used for formatting the distance string. This format " + "receives four parameters: The name of the source, the name of the destination " + "the value of the distance and the unit of the distance" + }; + std::vector unitList() { std::vector res(openspace::DistanceUnits.size()); std::transform( @@ -179,6 +187,12 @@ documentation::Documentation DashboardItemDistance::Documentation() { new StringInListVerifier(unitList()), Optional::Yes, RequestedUnitInfo.description + }, + { + FormatStringInfo.identifier, + new StringVerifier, + Optional::Yes, + FormatStringInfo.description } } }; @@ -206,6 +220,7 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary properties::StringProperty(DestinationNodeNameInfo), nullptr } + , _formatString(FormatStringInfo, "Distance from {} to {}: {:f} {}") { documentation::testSpecificationAndThrow( Documentation(), @@ -358,6 +373,11 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary _requestedUnit.setVisibility(properties::Property::Visibility::Hidden); addProperty(_requestedUnit); + if (dictionary.hasKey(FormatStringInfo.identifier)) { + _formatString = dictionary.value(FormatStringInfo.identifier); + } + addProperty(_formatString); + _font = global::fontManager->font(_fontName, _fontSize); _buffer.resize(256); @@ -445,14 +465,19 @@ void DashboardItemDistance::render(glm::vec2& penPosition) { } std::fill(_buffer.begin(), _buffer.end(), 0); - char* end = fmt::format_to( - _buffer.data(), - "Distance from {} to {}: {:f} {}\0", - sourceInfo.second, destinationInfo.second, dist.first, dist.second - ); + try { + char* end = fmt::format_to( + _buffer.data(), + _formatString.value().c_str(), + sourceInfo.second, destinationInfo.second, dist.first, dist.second + ); - std::string_view text = std::string_view(_buffer.data(), end - _buffer.data()); - RenderFont(*_font, penPosition, text); + std::string_view text = std::string_view(_buffer.data(), end - _buffer.data()); + RenderFont(*_font, penPosition, text); + } + catch (const fmt::format_error&) { + LERRORC("DashboardItemDate", "Illegal format string"); + } penPosition.y -= _font->height(); } diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index f66cd745c4..8ac5d5f926 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -75,6 +75,7 @@ private: properties::FloatProperty _fontSize; properties::BoolProperty _doSimplification; properties::OptionProperty _requestedUnit; + properties::StringProperty _formatString; Component _source; Component _destination; diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index 503f178d98..0bf0decd45 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include namespace { @@ -66,6 +67,26 @@ namespace { "convert the seconds into." }; + constexpr openspace::properties::Property::PropertyInfo TransitionFormatInfo = { + "TransitionFormat", + "Transition Format", + "Format string used to format the text used while in a delta time transition, " + "that is if the current delta time is being interpolated to reach a target " + "delta time. This format gets five parameters in this order: The target delta " + "time value, the target delta time unit, the string 'Paused' if the delta time " + "is paused or the empty string otherwise, the current delta time value, and the " + "current delta time unit" + }; + + constexpr openspace::properties::Property::PropertyInfo RegularFormatInfo = { + "RegularFormat", + "Regular Format", + "The format string used to format the text if the target delta time is the same " + "as the current delta time. This format gets three parameters in this order: " + "The target delta value, the target delta unit, and the string 'Paused' if the " + "delta time is paused or the empty string otherwise" + }; + std::vector unitList() { std::vector res(openspace::TimeUnits.size()); std::transform( @@ -114,6 +135,18 @@ documentation::Documentation DashboardItemSimulationIncrement::Documentation() { new StringInListVerifier(unitList()), Optional::Yes, RequestedUnitInfo.description + }, + { + TransitionFormatInfo.identifier, + new StringVerifier, + Optional::Yes, + TransitionFormatInfo.description + }, + { + RegularFormatInfo.identifier, + new StringVerifier, + Optional::Yes, + RegularFormatInfo.description } } }; @@ -126,6 +159,11 @@ DashboardItemSimulationIncrement::DashboardItemSimulationIncrement( , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) , _doSimplification(SimplificationInfo, true) , _requestedUnit(RequestedUnitInfo, properties::OptionProperty::DisplayType::Dropdown) + , _transitionFormat( + TransitionFormatInfo, + "Simulation increment: {:.1f} {:s} / second{:s} (current: {:.1f} {:s})" + ) + , _regularFormat(RegularFormatInfo, "Simulation increment: {:.1f} {:s} / second{:s}") { documentation::testSpecificationAndThrow( Documentation(), @@ -173,6 +211,19 @@ DashboardItemSimulationIncrement::DashboardItemSimulationIncrement( _requestedUnit.setVisibility(properties::Property::Visibility::Hidden); addProperty(_requestedUnit); + if (dictionary.hasKey(TransitionFormatInfo.identifier)) { + _transitionFormat = dictionary.value( + TransitionFormatInfo.identifier + ); + } + addProperty(_transitionFormat); + + if (dictionary.hasKey(RegularFormatInfo.identifier)) { + _regularFormat = dictionary.value(RegularFormatInfo.identifier); + } + addProperty(_regularFormat); + + _font = global::fontManager->font(_fontName, _fontSize); } @@ -203,28 +254,33 @@ void DashboardItemSimulationIncrement::render(glm::vec2& penPosition) { std::string pauseText = global::timeManager->isPaused() ? " (Paused)" : ""; - if (targetDt != currentDt && !global::timeManager->isPaused()) { - // We are in the middle of a transition - RenderFont( - *_font, - penPosition, - fmt::format( - "Simulation increment: {:.1f} {:s} / second{:s} (current: {:.1f} {:s})", - targetDeltaTime.first, targetDeltaTime.second, - pauseText, - currentDeltaTime.first, currentDeltaTime.second - ) - ); + try { + if (targetDt != currentDt && !global::timeManager->isPaused()) { + // We are in the middle of a transition + RenderFont( + *_font, + penPosition, + fmt::format( + _transitionFormat.value().c_str(), + targetDeltaTime.first, targetDeltaTime.second, + pauseText, + currentDeltaTime.first, currentDeltaTime.second + ) + ); + } + else { + RenderFont( + *_font, + penPosition, + fmt::format( + _regularFormat.value().c_str(), + targetDeltaTime.first, targetDeltaTime.second, pauseText + ) + ); + } } - else { - RenderFont( - *_font, - penPosition, - fmt::format( - "Simulation increment: {:.1f} {:s} / second{:s}", - targetDeltaTime.first, targetDeltaTime.second, pauseText - ) - ); + catch (const fmt::format_error&) { + LERRORC("DashboardItemDate", "Illegal format string"); } penPosition.y -= _font->height(); } diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index 389778f0c2..3643856205 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -54,6 +54,9 @@ private: properties::BoolProperty _doSimplification; properties::OptionProperty _requestedUnit; + properties::StringProperty _transitionFormat; + properties::StringProperty _regularFormat; + std::shared_ptr _font; }; diff --git a/modules/base/dashboard/dashboarditemtext.cpp b/modules/base/dashboard/dashboarditemtext.cpp new file mode 100644 index 0000000000..2423aec13e --- /dev/null +++ b/modules/base/dashboard/dashboarditemtext.cpp @@ -0,0 +1,143 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace { + constexpr const char* KeyFontMono = "Mono"; + constexpr const float DefaultFontSize = 10.f; + + constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { + "FontName", + "Font Name", + "This value is the name of the font that is used. It can either refer to an " + "internal name registered previously, or it can refer to a path that is used." + }; + + constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { + "FontSize", + "Font Size", + "This value determines the size of the font that is used to render the date." + }; + + constexpr openspace::properties::Property::PropertyInfo TextInfo = { + "Text", + "Text", + "The text to be displayed" + }; +} // namespace + +namespace openspace { + +documentation::Documentation DashboardItemText::Documentation() { + using namespace documentation; + return { + "DashboardItem Text", + "base_dashboarditem_text", + { + { + "Type", + new StringEqualVerifier("DashboardItemText"), + Optional::No + }, + { + FontNameInfo.identifier, + new StringVerifier, + Optional::Yes, + FontNameInfo.description + }, + { + FontSizeInfo.identifier, + new IntVerifier, + Optional::Yes, + FontSizeInfo.description + }, + { + TextInfo.identifier, + new StringVerifier, + Optional::Yes, + TextInfo.description + } + } + }; +} + +DashboardItemText::DashboardItemText(const ghoul::Dictionary& dictionary) + : DashboardItem(dictionary) + , _fontName(FontNameInfo, KeyFontMono) + , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + , _text(TextInfo, "") +{ + documentation::testSpecificationAndThrow( + Documentation(), + dictionary, + "DashboardItemText" + ); + + if (dictionary.hasKey(FontNameInfo.identifier)) { + _fontName = dictionary.value(FontNameInfo.identifier); + } + _fontName.onChange([this]() { + _font = global::fontManager->font(_fontName, _fontSize); + }); + addProperty(_fontName); + + if (dictionary.hasKey(FontSizeInfo.identifier)) { + _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); + } + _fontSize.onChange([this]() { + _font = global::fontManager->font(_fontName, _fontSize); + }); + addProperty(_fontSize); + + if (dictionary.hasKey(TextInfo.identifier)) { + _text = dictionary.value(TextInfo.identifier); + }; + addProperty(_text); + + _font = global::fontManager->font(_fontName, _fontSize); +} + +void DashboardItemText::render(glm::vec2& penPosition) { + ZoneScoped + + RenderFont(*_font, penPosition, _text.value()); + penPosition.y -= _font->height(); +} + +glm::vec2 DashboardItemText::size() const { + ZoneScoped + + return _font->boundingBox(_text.value()); +} + +} // namespace openspace diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h new file mode 100644 index 0000000000..8215b52e7d --- /dev/null +++ b/modules/base/dashboard/dashboarditemtext.h @@ -0,0 +1,60 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2020 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __OPENSPACE_MODULE_BASE___DASHBOARDITEMTEXT___H__ +#define __OPENSPACE_MODULE_BASE___DASHBOARDITEMTEXT___H__ + +#include + +#include +#include + +namespace ghoul::fontrendering { class Font; } + +namespace openspace { + +namespace documentation { struct Documentation; } + +class DashboardItemText : public DashboardItem { +public: + DashboardItemText(const ghoul::Dictionary& dictionary); + virtual ~DashboardItemText() = default; + + void render(glm::vec2& penPosition) override; + + glm::vec2 size() const override; + + static documentation::Documentation Documentation(); + +private: + properties::StringProperty _fontName; + properties::FloatProperty _fontSize; + properties::StringProperty _text; + + std::shared_ptr _font; +}; + +} // namespace openspace + +#endif // __OPENSPACE_MODULE_BASE___DASHBOARDITEMTEXT___H__ diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 0abe2cabc3..6b1c86146b 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -571,6 +571,22 @@ double SpiceManager::ephemerisTimeFromDate(const char* timeString) const { return et; } +std::string SpiceManager::dateFromEphemerisTime(double ephemerisTime, const char* format) +{ + char Buffer[128]; + std::memset(Buffer, char(0), 128); + + timout_c(ephemerisTime, format, 128, Buffer); + if (failed_c()) { + throwSpiceError(fmt::format( + "Error converting ephemeris time '{}' to date with format '{}'", + ephemerisTime, format + )); + } + + return std::string(Buffer); +} + glm::dvec3 SpiceManager::targetPosition(const std::string& target, const std::string& observer, const std::string& referenceFrame, diff --git a/src/util/time.cpp b/src/util/time.cpp index a448438b19..117e487f84 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -97,8 +97,7 @@ std::string_view Time::UTC() const { std::memset(b, 0, 32); SpiceManager::ref().dateFromEphemerisTime(_time, b, 32, Format); - - return std::string_view(b, 32); + return std::string_view(b); } std::string_view Time::ISO8601() const { From 9c0aecba803205eaf686a41a859f646e93563db8 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 9 Dec 2020 00:39:06 +0100 Subject: [PATCH 056/147] Update credits file --- CREDITS.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 5e074cc2aa..c7201a953d 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -3,29 +3,38 @@ Alexander Bock Emil Axelsson Kalle Bladin Jonathas Costa +Gene Payne Jonas Strandstedt Michal Marcinkowski -Joakim Kilby -Gene Payne +Elon Olsson +Emma Broman Micah Acinapura +Joakim Kilby +Lovisa Hassler +Mikael Petterson Erik Sundén +Stefan Lindblad +Malin Ejdbo +Corrie Roe Eric Myers Sebastian Piwell Erik Broberg Jonathan Bosson Michael Nilsson -Elon Olsson Jonathan Franzen +Karin Reidarman Hans-Christian Helltegen Anton Arbring Oskar Carlbaum Matthew Territo Jonathan Grangien Klas Eskilson +Aniisa Bihi Tomas Forsyth Rosin Niclas Hultberg Rickard Lindtstedt +Ingela Rossing Michael Sjöström Michael Novén Christoffer Särevall @@ -35,8 +44,10 @@ Christoffer Särevall Anteige arfon DavidLaidlaw +johnriedel mik3caprio mingenuity nbartzokas nealmcb noahdasanaike +sa5bke From eb69d2219a58ca285a100d1a3dce8dcc5610310b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 9 Dec 2020 00:44:25 +0100 Subject: [PATCH 057/147] Restructure DashboardItems - Add a new class DashboardTextItem that is a DashboardItem that can render text with font --- include/openspace/rendering/dashboarditem.h | 19 +++++ modules/base/basemodule.cpp | 1 - modules/base/dashboard/dashboarditemangle.cpp | 51 +------------ modules/base/dashboard/dashboarditemangle.h | 9 +-- modules/base/dashboard/dashboarditemdate.cpp | 50 +------------ modules/base/dashboard/dashboarditemdate.h | 9 +-- .../base/dashboard/dashboarditemdistance.cpp | 52 +------------ .../base/dashboard/dashboarditemdistance.h | 9 +-- .../base/dashboard/dashboarditemframerate.cpp | 52 +------------ .../base/dashboard/dashboarditemframerate.h | 9 +-- .../base/dashboard/dashboarditemmission.cpp | 73 +----------------- modules/base/dashboard/dashboarditemmission.h | 15 +--- .../dashboarditemparallelconnection.cpp | 75 +------------------ .../dashboarditemparallelconnection.h | 15 +--- .../dashboard/dashboarditempropertyvalue.cpp | 50 +------------ .../dashboard/dashboarditempropertyvalue.h | 10 +-- .../dashboarditemsimulationincrement.cpp | 51 +------------ .../dashboarditemsimulationincrement.h | 9 +-- modules/base/dashboard/dashboarditemtext.cpp | 50 +------------ modules/base/dashboard/dashboarditemtext.h | 9 +-- .../base/dashboard/dashboarditemvelocity.cpp | 52 +------------ .../base/dashboard/dashboarditemvelocity.h | 10 +-- src/rendering/dashboarditem.cpp | 67 ++++++++++++++++- 23 files changed, 107 insertions(+), 640 deletions(-) diff --git a/include/openspace/rendering/dashboarditem.h b/include/openspace/rendering/dashboarditem.h index e33467a555..e51faf6a11 100644 --- a/include/openspace/rendering/dashboarditem.h +++ b/include/openspace/rendering/dashboarditem.h @@ -28,9 +28,12 @@ #include #include +#include +#include #include namespace ghoul { class Dictionary; } +namespace ghoul::fontrendering { class Font; } namespace openspace { @@ -55,6 +58,22 @@ protected: properties::BoolProperty _isEnabled; }; + + +class DashboardTextItem : public DashboardItem { +public: + static documentation::Documentation Documentation(); + + DashboardTextItem(const ghoul::Dictionary& dictionary, float fontSize = 10.f, + const std::string& fontName = "Mono"); + +protected: + properties::StringProperty _fontName; + properties::FloatProperty _fontSize; + + std::shared_ptr _font; +}; + } // openspace #endif // __OPENSPACE_CORE___DASHBOARDITEM___H__ diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index fca97888c9..13a9679993 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -195,7 +195,6 @@ std::vector BaseModule::documentations() const { DashboardItemDistance::Documentation(), DashboardItemFramerate::Documentation(), DashboardItemMission::Documentation(), - DashboardItemParallelConnection::Documentation(), DashboardItemSimulationIncrement::Documentation(), DashboardItemSpacing::Documentation(), DashboardItemVelocity::Documentation(), diff --git a/modules/base/dashboard/dashboarditemangle.cpp b/modules/base/dashboard/dashboarditemangle.cpp index 6ad0945c11..103ce82d57 100644 --- a/modules/base/dashboard/dashboarditemangle.cpp +++ b/modules/base/dashboard/dashboarditemangle.cpp @@ -40,23 +40,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo SourceTypeInfo = { "SourceType", "Source Type", @@ -118,18 +101,6 @@ documentation::Documentation DashboardItemAngle::Documentation() { new StringEqualVerifier("DashboardItemAngle"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { SourceTypeInfo.identifier, new StringInListVerifier({ @@ -177,7 +148,7 @@ documentation::Documentation DashboardItemAngle::Documentation() { } DashboardItemAngle::DashboardItemAngle(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) + : DashboardTextItem(dictionary) , _source{ properties::OptionProperty( SourceTypeInfo, @@ -202,8 +173,6 @@ DashboardItemAngle::DashboardItemAngle(const ghoul::Dictionary& dictionary) properties::StringProperty(DestinationNodeNameInfo), nullptr } - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) { documentation::testSpecificationAndThrow( Documentation(), @@ -211,23 +180,6 @@ DashboardItemAngle::DashboardItemAngle(const ghoul::Dictionary& dictionary) "DashboardItemAngle" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - - _fontName.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - _fontSize.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - _source.type.addOptions({ { Type::Node, "Node" }, { Type::Focus, "Focus" }, @@ -352,7 +304,6 @@ DashboardItemAngle::DashboardItemAngle(const ghoul::Dictionary& dictionary) } addProperty(_destination.nodeName); - _font = global::fontManager->font(_fontName, _fontSize); _buffer.resize(128); } diff --git a/modules/base/dashboard/dashboarditemangle.h b/modules/base/dashboard/dashboarditemangle.h index 111f1a8a79..f7f450c57f 100644 --- a/modules/base/dashboard/dashboarditemangle.h +++ b/modules/base/dashboard/dashboarditemangle.h @@ -29,18 +29,15 @@ #include #include -#include #include -namespace ghoul::fontrendering { class Font; } - namespace openspace { class SceneGraphNode; namespace documentation { struct Documentation; } -class DashboardItemAngle : public DashboardItem { +class DashboardItemAngle : public DashboardTextItem { public: DashboardItemAngle(const ghoul::Dictionary& dictionary); virtual ~DashboardItemAngle() = default; @@ -70,11 +67,7 @@ private: Component _reference; Component _destination; - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; - std::vector _buffer; - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemdate.cpp b/modules/base/dashboard/dashboarditemdate.cpp index cdd8e7ba52..1534e052af 100644 --- a/modules/base/dashboard/dashboarditemdate.cpp +++ b/modules/base/dashboard/dashboarditemdate.cpp @@ -36,22 +36,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 15.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { "FormatString", "Format String", @@ -82,18 +66,6 @@ documentation::Documentation DashboardItemDate::Documentation() { new StringEqualVerifier("DashboardItemDate"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { FormatStringInfo.identifier, new StringVerifier, @@ -111,9 +83,7 @@ documentation::Documentation DashboardItemDate::Documentation() { } DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary, 15.f) , _formatString(FormatStringInfo, "Date: {} UTC") , _timeFormat(TimeFormatInfo, "YYYY MON DDTHR:MN:SC.### ::RND") { @@ -123,22 +93,6 @@ DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) "DashboardItemDate" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - if (dictionary.hasKey(FormatStringInfo.identifier)) { _formatString = dictionary.value(FormatStringInfo.identifier); } @@ -148,8 +102,6 @@ DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary) _timeFormat = dictionary.value(TimeFormatInfo.identifier); } addProperty(_timeFormat); - - _font = global::fontManager->font(_fontName, _fontSize); } void DashboardItemDate::render(glm::vec2& penPosition) { diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index 81e7c754e1..80be357f13 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -28,15 +28,12 @@ #include #include -#include - -namespace ghoul::fontrendering { class Font; } namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemDate : public DashboardItem { +class DashboardItemDate : public DashboardTextItem { public: DashboardItemDate(const ghoul::Dictionary& dictionary); ~DashboardItemDate() = default; @@ -48,12 +45,8 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::StringProperty _formatString; properties::StringProperty _timeFormat; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index 1c36425646..38632b97ee 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -41,23 +41,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the distance." - }; - constexpr openspace::properties::Property::PropertyInfo SourceTypeInfo = { "SourceType", "Source Type", @@ -136,18 +119,6 @@ documentation::Documentation DashboardItemDistance::Documentation() { new StringEqualVerifier("DashboardItemDistance"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { SourceTypeInfo.identifier, new StringInListVerifier({ @@ -199,9 +170,7 @@ documentation::Documentation DashboardItemDistance::Documentation() { } DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _doSimplification(SimplificationInfo, true) , _requestedUnit(RequestedUnitInfo, properties::OptionProperty::DisplayType::Dropdown) , _source{ @@ -228,23 +197,6 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary "DashboardItemDistance" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - - _fontName.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - _fontSize.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - _source.type.addOptions({ { Type::Node, "Node" }, { Type::NodeSurface, "Node Surface" }, @@ -378,8 +330,6 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary } addProperty(_formatString); - _font = global::fontManager->font(_fontName, _fontSize); - _buffer.resize(256); } diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index 8ac5d5f926..6e95e097fc 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -30,18 +30,15 @@ #include #include #include -#include #include -namespace ghoul::fontrendering { class Font; } - namespace openspace { class SceneGraphNode; namespace documentation { struct Documentation; } -class DashboardItemDistance : public DashboardItem { +class DashboardItemDistance : public DashboardTextItem { public: DashboardItemDistance(const ghoul::Dictionary& dictionary); virtual ~DashboardItemDistance() = default; @@ -71,8 +68,6 @@ private: std::pair positionAndLabel(Component& mainComp, Component& otherComp) const; - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::BoolProperty _doSimplification; properties::OptionProperty _requestedUnit; properties::StringProperty _formatString; @@ -81,8 +76,6 @@ private: Component _destination; std::vector _buffer; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemframerate.cpp b/modules/base/dashboard/dashboarditemframerate.cpp index 8453ce627a..1f38996ffb 100644 --- a/modules/base/dashboard/dashboarditemframerate.cpp +++ b/modules/base/dashboard/dashboarditemframerate.cpp @@ -34,22 +34,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo FrametimeInfo = { "FrametimeType", "Type of the frame time display", @@ -165,18 +149,6 @@ documentation::Documentation DashboardItemFramerate::Documentation() { new StringEqualVerifier("DashboardItemFramerate"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { FrametimeInfo.identifier, new StringInListVerifier({ ValueDtAvg, ValueDtExtremes, @@ -190,9 +162,7 @@ documentation::Documentation DashboardItemFramerate::Documentation() { } DashboardItemFramerate::DashboardItemFramerate(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _frametimeType(FrametimeInfo, properties::OptionProperty::DisplayType::Dropdown) , _clearCache(ClearCacheInfo) { @@ -202,24 +172,6 @@ DashboardItemFramerate::DashboardItemFramerate(const ghoul::Dictionary& dictiona "DashboardItemFramerate" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast( - dictionary.value(FontSizeInfo.identifier) - ); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - _frametimeType.addOptions({ { static_cast(FrametimeType::DtTimeAvg), ValueDtAvg }, { static_cast(FrametimeType::DtTimeExtremes), ValueDtExtremes }, @@ -272,8 +224,6 @@ DashboardItemFramerate::DashboardItemFramerate(const ghoul::Dictionary& dictiona }); addProperty(_clearCache); - _font = global::fontManager->font(_fontName, _fontSize); - _buffer.resize(128); } diff --git a/modules/base/dashboard/dashboarditemframerate.h b/modules/base/dashboard/dashboarditemframerate.h index 8fc952f537..629a571c1b 100644 --- a/modules/base/dashboard/dashboarditemframerate.h +++ b/modules/base/dashboard/dashboarditemframerate.h @@ -28,18 +28,15 @@ #include #include -#include #include -#include namespace ghoul { class Dictionary; } -namespace ghoul::fontrendering { class Font; } namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemFramerate : public DashboardItem { +class DashboardItemFramerate : public DashboardTextItem { public: enum class FrametimeType { DtTimeAvg = 0, @@ -58,13 +55,9 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::OptionProperty _frametimeType; properties::TriggerProperty _clearCache; - std::shared_ptr _font; - double _minDeltaTimeCache = 1.0; double _maxDeltaTimeCache = -1.0; bool _shouldClearCache = true; diff --git a/modules/base/dashboard/dashboarditemmission.cpp b/modules/base/dashboard/dashboarditemmission.cpp index 881a12b953..820df4032f 100644 --- a/modules/base/dashboard/dashboarditemmission.cpp +++ b/modules/base/dashboard/dashboarditemmission.cpp @@ -37,22 +37,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 15.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - std::string progressToStr(int size, double t) { std::string progress = "|"; int g = static_cast((t * (size - 1)) + 1); @@ -72,62 +56,9 @@ namespace { namespace openspace { -documentation::Documentation DashboardItemMission::Documentation() { - using namespace documentation; - return { - "DashboardItem Mission", - "base_dashboarditem_mission", - { - { - "Type", - new StringEqualVerifier("DashboardItemMission"), - Optional::No - }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - } - } - }; -} - DashboardItemMission::DashboardItemMission(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) -{ - documentation::testSpecificationAndThrow( - Documentation(), - dictionary, - "DashboardItemMission" - ); - - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - - _font = global::fontManager->font(_fontName, _fontSize); -} + : DashboardTextItem(dictionary, 15.f) +{} void DashboardItemMission::render(glm::vec2& penPosition) { ZoneScoped diff --git a/modules/base/dashboard/dashboarditemmission.h b/modules/base/dashboard/dashboarditemmission.h index bce6364865..6a610b83ce 100644 --- a/modules/base/dashboard/dashboarditemmission.h +++ b/modules/base/dashboard/dashboarditemmission.h @@ -27,16 +27,11 @@ #include -#include -#include - -namespace ghoul::fontrendering { class Font; } - namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemMission : public DashboardItem { +class DashboardItemMission : public DashboardTextItem { public: DashboardItemMission(const ghoul::Dictionary& dictionary); virtual ~DashboardItemMission() = default; @@ -44,14 +39,6 @@ public: void render(glm::vec2& penPosition) override; glm::vec2 size() const override; - - static documentation::Documentation Documentation(); - -private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index f2612c6641..8d2d1e3cad 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -36,83 +36,12 @@ #include #include -namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; -} // namespace - namespace openspace { -documentation::Documentation DashboardItemParallelConnection::Documentation() { - using namespace documentation; - return { - "DashboardItem Parallel Connection", - "base_dashboarditem_parallelconnection", - { - { - "Type", - new StringEqualVerifier("DashboardItemParallelConnection"), - Optional::No - }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - } - } - }; -} - DashboardItemParallelConnection::DashboardItemParallelConnection( const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) -{ - documentation::testSpecificationAndThrow( - Documentation(), - dictionary, - "DashboardItemParallelConnection" - ); - - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - - _font = global::fontManager->font(_fontName, _fontSize); -} + : DashboardTextItem(dictionary) +{} void DashboardItemParallelConnection::render(glm::vec2& penPosition) { ZoneScoped diff --git a/modules/base/dashboard/dashboarditemparallelconnection.h b/modules/base/dashboard/dashboarditemparallelconnection.h index 5c0bb7f1f5..27817b20ce 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.h +++ b/modules/base/dashboard/dashboarditemparallelconnection.h @@ -27,16 +27,11 @@ #include -#include -#include - -namespace ghoul::fontrendering { class Font; } - namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemParallelConnection : public DashboardItem { +class DashboardItemParallelConnection : public DashboardTextItem { public: DashboardItemParallelConnection(const ghoul::Dictionary& dictionary); virtual ~DashboardItemParallelConnection() = default; @@ -44,14 +39,6 @@ public: void render(glm::vec2& penPosition) override; glm::vec2 size() const override; - - static documentation::Documentation Documentation(); - -private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditempropertyvalue.cpp b/modules/base/dashboard/dashboarditempropertyvalue.cpp index 7040b00a07..78893a791a 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.cpp +++ b/modules/base/dashboard/dashboarditempropertyvalue.cpp @@ -35,22 +35,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo PropertyUriInfo = { "URI", "Property URI", @@ -79,18 +63,6 @@ documentation::Documentation DashboardItemPropertyValue::Documentation() { new StringEqualVerifier("DashboardItemPropertyValue"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { PropertyUriInfo.identifier, new StringVerifier, @@ -109,9 +81,7 @@ documentation::Documentation DashboardItemPropertyValue::Documentation() { DashboardItemPropertyValue::DashboardItemPropertyValue( const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _propertyUri(PropertyUriInfo) , _displayString(DisplayStringInfo) { @@ -121,22 +91,6 @@ DashboardItemPropertyValue::DashboardItemPropertyValue( "DashboardItemPropertyValue" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - if (dictionary.hasKey(PropertyUriInfo.identifier)) { _propertyUri = dictionary.value(PropertyUriInfo.identifier); } @@ -147,8 +101,6 @@ DashboardItemPropertyValue::DashboardItemPropertyValue( _displayString = dictionary.value(DisplayStringInfo.identifier); } addProperty(_displayString); - - _font = global::fontManager->font(_fontName, _fontSize); } void DashboardItemPropertyValue::render(glm::vec2& penPosition) { diff --git a/modules/base/dashboard/dashboarditempropertyvalue.h b/modules/base/dashboard/dashboarditempropertyvalue.h index 0f5a475e02..0986082a07 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.h +++ b/modules/base/dashboard/dashboarditempropertyvalue.h @@ -28,9 +28,6 @@ #include #include -#include - -namespace ghoul::fontrendering { class Font; } namespace openspace { @@ -38,7 +35,7 @@ namespace properties { class Property; } namespace documentation { struct Documentation; } -class DashboardItemPropertyValue : public DashboardItem { +class DashboardItemPropertyValue : public DashboardTextItem { public: DashboardItemPropertyValue(const ghoul::Dictionary& dictionary); ~DashboardItemPropertyValue() = default; @@ -50,16 +47,11 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; - properties::Property* _property = nullptr; bool _propertyIsDirty = true; properties::StringProperty _propertyUri; properties::StringProperty _displayString; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index 0bf0decd45..ec5bdd3152 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -36,22 +36,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = { "Simplification", "Time Simplification", @@ -112,18 +96,6 @@ documentation::Documentation DashboardItemSimulationIncrement::Documentation() { new StringEqualVerifier("DashboardItemSimulationIncrement"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { SimplificationInfo.identifier, new BoolVerifier, @@ -154,9 +126,7 @@ documentation::Documentation DashboardItemSimulationIncrement::Documentation() { DashboardItemSimulationIncrement::DashboardItemSimulationIncrement( const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _doSimplification(SimplificationInfo, true) , _requestedUnit(RequestedUnitInfo, properties::OptionProperty::DisplayType::Dropdown) , _transitionFormat( @@ -171,22 +141,6 @@ DashboardItemSimulationIncrement::DashboardItemSimulationIncrement( "DashboardItemSimulationIncrement" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this](){ - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - if (dictionary.hasKey(SimplificationInfo.identifier)) { _doSimplification = dictionary.value(SimplificationInfo.identifier); } @@ -222,9 +176,6 @@ DashboardItemSimulationIncrement::DashboardItemSimulationIncrement( _regularFormat = dictionary.value(RegularFormatInfo.identifier); } addProperty(_regularFormat); - - - _font = global::fontManager->font(_fontName, _fontSize); } void DashboardItemSimulationIncrement::render(glm::vec2& penPosition) { diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index 3643856205..cb2897dec9 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -30,15 +30,12 @@ #include #include #include -#include - -namespace ghoul::fontrendering { class Font; } namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemSimulationIncrement : public DashboardItem { +class DashboardItemSimulationIncrement : public DashboardTextItem { public: DashboardItemSimulationIncrement(const ghoul::Dictionary& dictionary); virtual ~DashboardItemSimulationIncrement() = default; @@ -49,15 +46,11 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::BoolProperty _doSimplification; properties::OptionProperty _requestedUnit; properties::StringProperty _transitionFormat; properties::StringProperty _regularFormat; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemtext.cpp b/modules/base/dashboard/dashboarditemtext.cpp index 2423aec13e..68eda26a3d 100644 --- a/modules/base/dashboard/dashboarditemtext.cpp +++ b/modules/base/dashboard/dashboarditemtext.cpp @@ -33,22 +33,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the date." - }; - constexpr openspace::properties::Property::PropertyInfo TextInfo = { "Text", "Text", @@ -69,18 +53,6 @@ documentation::Documentation DashboardItemText::Documentation() { new StringEqualVerifier("DashboardItemText"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { TextInfo.identifier, new StringVerifier, @@ -92,9 +64,7 @@ documentation::Documentation DashboardItemText::Documentation() { } DashboardItemText::DashboardItemText(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _text(TextInfo, "") { documentation::testSpecificationAndThrow( @@ -103,28 +73,10 @@ DashboardItemText::DashboardItemText(const ghoul::Dictionary& dictionary) "DashboardItemText" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - _fontName.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - _fontSize.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - if (dictionary.hasKey(TextInfo.identifier)) { _text = dictionary.value(TextInfo.identifier); }; addProperty(_text); - - _font = global::fontManager->font(_fontName, _fontSize); } void DashboardItemText::render(glm::vec2& penPosition) { diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h index 8215b52e7d..8ccdf89263 100644 --- a/modules/base/dashboard/dashboarditemtext.h +++ b/modules/base/dashboard/dashboarditemtext.h @@ -28,15 +28,12 @@ #include #include -#include - -namespace ghoul::fontrendering { class Font; } namespace openspace { namespace documentation { struct Documentation; } -class DashboardItemText : public DashboardItem { +class DashboardItemText : public DashboardTextItem { public: DashboardItemText(const ghoul::Dictionary& dictionary); virtual ~DashboardItemText() = default; @@ -48,11 +45,7 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::StringProperty _text; - - std::shared_ptr _font; }; } // namespace openspace diff --git a/modules/base/dashboard/dashboarditemvelocity.cpp b/modules/base/dashboard/dashboarditemvelocity.cpp index 5431ba92a0..acc9b4a4a2 100644 --- a/modules/base/dashboard/dashboarditemvelocity.cpp +++ b/modules/base/dashboard/dashboarditemvelocity.cpp @@ -41,23 +41,6 @@ #include namespace { - constexpr const char* KeyFontMono = "Mono"; - - constexpr const float DefaultFontSize = 10.f; - - constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { - "FontName", - "Font Name", - "This value is the name of the font that is used. It can either refer to an " - "internal name registered previously, or it can refer to a path that is used." - }; - - constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { - "FontSize", - "Font Size", - "This value determines the size of the font that is used to render the velocity." - }; - constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = { "Simplification", "Simplification", @@ -100,18 +83,6 @@ documentation::Documentation DashboardItemVelocity::Documentation() { new StringEqualVerifier("DashboardItemVelocity"), Optional::No }, - { - FontNameInfo.identifier, - new StringVerifier, - Optional::Yes, - FontNameInfo.description - }, - { - FontSizeInfo.identifier, - new IntVerifier, - Optional::Yes, - FontSizeInfo.description - }, { SimplificationInfo.identifier, new BoolVerifier, @@ -129,9 +100,7 @@ documentation::Documentation DashboardItemVelocity::Documentation() { } DashboardItemVelocity::DashboardItemVelocity(const ghoul::Dictionary& dictionary) - : DashboardItem(dictionary) - , _fontName(FontNameInfo, KeyFontMono) - , _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f) + : DashboardTextItem(dictionary) , _doSimplification(SimplificationInfo, true) , _requestedUnit(RequestedUnitInfo, properties::OptionProperty::DisplayType::Dropdown) { @@ -141,23 +110,6 @@ DashboardItemVelocity::DashboardItemVelocity(const ghoul::Dictionary& dictionary "DashboardItemVelocity" ); - if (dictionary.hasKey(FontNameInfo.identifier)) { - _fontName = dictionary.value(FontNameInfo.identifier); - } - if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); - } - - _fontName.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontName); - - _fontSize.onChange([this]() { - _font = global::fontManager->font(_fontName, _fontSize); - }); - addProperty(_fontSize); - if (dictionary.hasKey(SimplificationInfo.identifier)) { _doSimplification = dictionary.value(SimplificationInfo.identifier); } @@ -183,8 +135,6 @@ DashboardItemVelocity::DashboardItemVelocity(const ghoul::Dictionary& dictionary } _requestedUnit.setVisibility(properties::Property::Visibility::Hidden); addProperty(_requestedUnit); - - _font = global::fontManager->font(_fontName, _fontSize); } void DashboardItemVelocity::render(glm::vec2& penPosition) { diff --git a/modules/base/dashboard/dashboarditemvelocity.h b/modules/base/dashboard/dashboarditemvelocity.h index 2fcfa4ef16..571c5ffcac 100644 --- a/modules/base/dashboard/dashboarditemvelocity.h +++ b/modules/base/dashboard/dashboarditemvelocity.h @@ -28,20 +28,16 @@ #include #include -#include #include -#include #include -namespace ghoul::fontrendering { class Font; } - namespace openspace { class SceneGraphNode; namespace documentation { struct Documentation; } -class DashboardItemVelocity : public DashboardItem { +class DashboardItemVelocity : public DashboardTextItem { public: DashboardItemVelocity(const ghoul::Dictionary& dictionary); virtual ~DashboardItemVelocity() = default; @@ -53,14 +49,10 @@ public: static documentation::Documentation Documentation(); private: - properties::StringProperty _fontName; - properties::FloatProperty _fontSize; properties::BoolProperty _doSimplification; properties::OptionProperty _requestedUnit; glm::dvec3 _prevPosition = glm::dvec3(0.0); - - std::shared_ptr _font; }; } // namespace openspace diff --git a/src/rendering/dashboarditem.cpp b/src/rendering/dashboarditem.cpp index a075d500ed..183f3e2b06 100644 --- a/src/rendering/dashboarditem.cpp +++ b/src/rendering/dashboarditem.cpp @@ -24,9 +24,11 @@ #include -#include +#include #include #include +#include +#include #include namespace { @@ -124,4 +126,67 @@ bool DashboardItem::isEnabled() const { return _isEnabled; } + +namespace { + constexpr openspace::properties::Property::PropertyInfo FontNameInfo = { + "FontName", + "Font Name", + "This value is the name of the font that is used. It can either refer to an " + "internal name registered previously, or it can refer to a path that is used." + }; + + constexpr openspace::properties::Property::PropertyInfo FontSizeInfo = { + "FontSize", + "Font Size", + "This value determines the size of the font that is used to render the distance." + }; +} // namespace + +documentation::Documentation DashboardTextItem::Documentation() { + using namespace documentation; + return { + "DashboardTextItem", + "dashboardtextitem", + { + { + FontNameInfo.identifier, + new StringVerifier, + Optional::Yes, + FontNameInfo.description + }, + { + FontSizeInfo.identifier, + new IntVerifier, + Optional::Yes, + FontSizeInfo.description + } + } + }; +} + +DashboardTextItem::DashboardTextItem(const ghoul::Dictionary& dictionary, float fontSize, + const std::string& fontName) + : DashboardItem(dictionary) + , _fontName(FontNameInfo, fontName) + , _fontSize(FontSizeInfo, fontSize, 6.f, 144.f, 1.f) +{ + if (dictionary.hasKey(FontNameInfo.identifier)) { + _fontName = dictionary.value(FontNameInfo.identifier); + } + _fontName.onChange([this]() { + _font = global::fontManager->font(_fontName, _fontSize); + }); + addProperty(_fontName); + + if (dictionary.hasKey(FontSizeInfo.identifier)) { + _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); + } + _fontSize.onChange([this]() { + _font = global::fontManager->font(_fontName, _fontSize); + }); + addProperty(_fontSize); + + _font = global::fontManager->font(_fontName, _fontSize); +} + } // namespace openspace From c13b211add7b1bc4336de34ee6cb4f6064420242 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 9 Dec 2020 12:36:23 -0500 Subject: [PATCH 058/147] Fixed issue 1432: globebrowsing and shadow mapping. (#1433) --- modules/globebrowsing/src/renderableglobe.cpp | 14 ++++++++ modules/globebrowsing/src/ringscomponent.cpp | 2 +- modules/globebrowsing/src/shadowcomponent.cpp | 34 ++++++++++++++++++- modules/globebrowsing/src/shadowcomponent.h | 6 ++++ 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index a41b095086..d8f8bbbcae 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -1399,6 +1399,13 @@ void RenderableGlobe::renderChunkGlobally(const Chunk& chunk, const RenderData& program.setUniform("shadowMapTexture", shadowMapUnit); program.setUniform("zFightingPercentage", _generalProperties.zFightingPercentage); } + else if (_generalProperties.shadowMapping) { + shadowMapUnit.activate(); + // JCC: Avoiding a to recompiling the shaders or having more than one + // set of shaders for this step. + glBindTexture(GL_TEXTURE_2D, _shadowComponent.dDepthTexture()); + program.setUniform("shadowMapTexture", shadowMapUnit); + } glEnable(GL_DEPTH_TEST); @@ -1530,6 +1537,13 @@ void RenderableGlobe::renderChunkLocally(const Chunk& chunk, const RenderData& d program.setUniform("shadowMapTexture", shadowMapUnit); program.setUniform("zFightingPercentage", _generalProperties.zFightingPercentage); + } + else if (_generalProperties.shadowMapping) { + shadowMapUnit.activate(); + // JCC: Avoiding a to recompiling the shaders or having more than one + // set of shaders for this step. + glBindTexture(GL_TEXTURE_2D, _shadowComponent.dDepthTexture()); + program.setUniform("shadowMapTexture", shadowMapUnit); } glEnable(GL_DEPTH_TEST); diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp index 53f0e08ec9..20134f04d0 100644 --- a/modules/globebrowsing/src/ringscomponent.cpp +++ b/modules/globebrowsing/src/ringscomponent.cpp @@ -364,7 +364,7 @@ void RingsComponent::draw(const RenderData& data, ringTextureUnit.activate(); _texture->bind(); - _shader->setUniform(_geomUniformCache.ringTexture, ringTextureUnit); + _geometryOnlyShader->setUniform(_geomUniformCache.ringTexture, ringTextureUnit); } glEnable(GL_DEPTH_TEST); diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index ab84f32c50..33ecbb05bf 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -220,7 +220,9 @@ ShadowComponent::ShadowComponent(const ghoul::Dictionary& dictionary) addProperty(_distanceFraction); } -void ShadowComponent::initialize() {} +void ShadowComponent::initialize() { + buildDDepthTexture(); +} bool ShadowComponent::isReady() const { return true; @@ -236,6 +238,7 @@ void ShadowComponent::initializeGL() { void ShadowComponent::deinitializeGL() { glDeleteTextures(1, &_shadowDepthTexture); glDeleteTextures(1, &_positionInLightSpaceTexture); + glDeleteTextures(1, &_dDepthTexture); glDeleteFramebuffers(1, &_shadowFBO); } @@ -544,6 +547,31 @@ void ShadowComponent::updateDepthTexture() { glBindTexture(GL_TEXTURE_2D, 0); } +void ShadowComponent::buildDDepthTexture() { + glGenTextures(1, &_dDepthTexture); + glBindTexture(GL_TEXTURE_2D, _dDepthTexture); + glTexImage2D( + GL_TEXTURE_2D, + 0, + GL_DEPTH_COMPONENT32F, + 1, + 1, + 0, + GL_DEPTH_COMPONENT, + GL_FLOAT, + nullptr + ); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); + + glBindTexture(GL_TEXTURE_2D, 0); +} + void ShadowComponent::saveDepthBuffer() { int size = _shadowDepthTextureWidth * _shadowDepthTextureHeight; std::vector buffer(size); @@ -652,4 +680,8 @@ void ShadowComponent::setViewDepthMap(bool enable) { _viewDepthMap = enable; } +GLuint ShadowComponent::dDepthTexture() const { + return _dDepthTexture; +} + } // namespace openspace diff --git a/modules/globebrowsing/src/shadowcomponent.h b/modules/globebrowsing/src/shadowcomponent.h index 3c39293697..5e0a388f10 100644 --- a/modules/globebrowsing/src/shadowcomponent.h +++ b/modules/globebrowsing/src/shadowcomponent.h @@ -79,10 +79,13 @@ public: void setViewDepthMap(bool enable); + GLuint dDepthTexture() const; + private: void createDepthTexture(); void createShadowFBO(); void updateDepthTexture(); + void buildDDepthTexture(); // Debug void saveDepthBuffer(); @@ -109,6 +112,9 @@ private: bool _dynamicDepthTextureRes = true; GLuint _shadowDepthTexture = 0; + // JCC: Used to avoid recompilation of Globebrowsing's shaders + // and incorrect binding of texture type + GLuint _dDepthTexture = 0; GLuint _positionInLightSpaceTexture = 0; GLuint _shadowFBO = 0; GLint _defaultFBO = 0; From 61b7c10d3afa7a0e208c42241d5968a6c36d4ea0 Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Wed, 9 Dec 2020 17:43:21 -0500 Subject: [PATCH 059/147] removing fxaa disable on macos --- src/rendering/renderengine.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index e6727a4db8..fb4e01ee31 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -301,12 +301,6 @@ RenderEngine::RenderEngine() addProperty(_showVersionInfo); addProperty(_showCameraInfo); - // @TODO (maci 2019-08-23) disabling FXAA on - // MacOS for now until we have fix or MSAA option. -#ifdef __APPLE__ - _enableFXAA = false; -#endif - _enableFXAA.onChange([this]() { if (_renderer) { _renderer->enableFXAA(_enableFXAA); From 37761dde2acc7ee637b03fce1eaac47313ba4352 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 11 Dec 2020 11:29:48 +0100 Subject: [PATCH 060/147] Avoid potential problems with non initialized nan values --- modules/exoplanets/exoplanetshelper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 6540f3db43..97001e9ff1 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -71,9 +71,9 @@ struct ExoplanetDataEntry { }; struct StarData { - glm::vec3 position; // In parsec - float radius; // In solar radii - float bvColorIndex; + glm::vec3 position = glm::vec3(std::numeric_limits::quiet_NaN()); // In parsec + float radius = std::numeric_limits::quiet_NaN(); // In solar radii + float bvColorIndex = std::numeric_limits::quiet_NaN(); }; struct ExoplanetSystem { From 778b4e61b38e0bdd0477e0cd7799bb3ceed5b4d3 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 11 Dec 2020 12:30:05 +0100 Subject: [PATCH 061/147] Revert "Better handle interpolation when setting interpolation time to 0" This reverts commit 8cf5f9639271d01b275e537e6d26d1ace3cdcd05. --- include/openspace/interaction/interpolator.h | 1 - include/openspace/interaction/interpolator.inl | 18 +++--------------- src/interaction/orbitalnavigator.cpp | 7 +------ 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/include/openspace/interaction/interpolator.h b/include/openspace/interaction/interpolator.h index 9b52cef505..d872e1706d 100644 --- a/include/openspace/interaction/interpolator.h +++ b/include/openspace/interaction/interpolator.h @@ -51,7 +51,6 @@ public: private: std::function _transferFunction; - bool _isInterpolating = false; float _t = 1.f; float _interpolationTime = 1.f; float _scaledDeltaTime = 0.f; diff --git a/include/openspace/interaction/interpolator.inl b/include/openspace/interaction/interpolator.inl index 3b2588fac3..d28f07f573 100644 --- a/include/openspace/interaction/interpolator.inl +++ b/include/openspace/interaction/interpolator.inl @@ -34,28 +34,16 @@ Interpolator::Interpolator() template void Interpolator::start() { _t = 0.f; - _isInterpolating = true; } template void Interpolator::end() { _t = 1.f; - _isInterpolating = false; } template void Interpolator::setDeltaTime(float deltaTime) { - if (_interpolationTime > 0.f) { - _scaledDeltaTime = deltaTime / _interpolationTime; - } - else { - if (deltaTime > 0.f) { - _scaledDeltaTime = 1.f; - } - else { - _scaledDeltaTime = -1.f; - } - } + _scaledDeltaTime = deltaTime / _interpolationTime; } template @@ -71,7 +59,7 @@ void Interpolator::setInterpolationTime(float interpolationTime) { template void Interpolator::step() { _t += _scaledDeltaTime; - _t = glm::clamp(_t, 0.f, 1.f); + _t = glm::clamp(_t, 0.0f, 1.0f); } template @@ -86,7 +74,7 @@ T Interpolator::value() const { template bool Interpolator::isInterpolating() const { - return _isInterpolating; + return (_t < 1.f) && (_t >= 0.f); } } // namespace openspace::interaction diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index a1c34a91d1..6e7e9f7baa 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -1275,12 +1275,7 @@ glm::dvec3 OrbitalNavigator::moveCameraAlongVector(const glm::dvec3& camPos, velocity = 1.0 - destination / distFromCameraToFocus; } else { // When flying away from anchor - if (destination == 0.0) { - velocity = -1.0; - } - else { - velocity = distFromCameraToFocus / destination - 1.0; - } + velocity = distFromCameraToFocus / destination - 1.0; } velocity *= _velocitySensitivity * deltaTime; From 51869784fdef607a24df04dc5df23cdac8102f0c Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 9 Dec 2020 13:41:03 +0100 Subject: [PATCH 062/147] Add some additional data about the star --- modules/exoplanets/exoplanetshelper.h | 19 +++++-- modules/exoplanets/exoplanetsmodule_lua.inl | 14 +++-- .../tasks/exoplanetsdatapreparationtask.cpp | 54 +++++++++++++++---- 3 files changed, 67 insertions(+), 20 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 97001e9ff1..58e6a2adbc 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -39,14 +39,15 @@ struct ExoplanetDataEntry { float bigOmegaUpper; // Upper uncertainty of longitude of ascending node float bigOmegaLower; // Lower uncertainty of longitude of ascending node bool binary; // Star known to be binary? - float bmv; // B − V color + float bmv; // Star B − V color float ecc; // Orbital eccentricity float eccUpper; // Upper uncertainty of orbital eccentricity float eccLower; // Lower uncertainty of orbital eccentricity float i; // Orbital inclination in degrees (for transiting systems only) float iUpper; // Upper uncertainty of orbital inclination float iLower; // Lower uncertainty of orbital inclination - int nComp; // Number of planetary companions known + int nPlanets; // Number of known planets in the planetary system + int nStars; // Number of stars in the planetary system float omega; // Argument of periastron in degrees float omegaUpper; // Upper uncertainty of argument of periastron float omegaLower; // Lower uncertainty of argument of periastron @@ -59,6 +60,12 @@ struct ExoplanetDataEntry { float rStar; // Estimated radius of the star in solar radii float rStarUpper; // Upper uncertainty of estimated star radius float rStarLower; // Lower uncertainty of estimated star radius + float luminosity; // Star luminosity, in units of solar luminosities [log(Solar)] + float luminosityUpper; // Upper uncertainty of star luminosity [log(Solar)] + float luminosityLower; // Lower uncertainty of star luminosity [log(Solar)] + float teff; // Star's effective temperature in Kelvin + float teffUpper; // Upper uncertainty of effective temperature + float teffLower; // Lower uncertainty of effective temperature double tt; // Epoch of transit center in HJD-2440000 float ttUpper; // Upper uncertainty of epoch of transit center float ttLower; // Lower uncertainty of epoch of transit center @@ -71,9 +78,11 @@ struct ExoplanetDataEntry { }; struct StarData { - glm::vec3 position = glm::vec3(std::numeric_limits::quiet_NaN()); // In parsec - float radius = std::numeric_limits::quiet_NaN(); // In solar radii - float bvColorIndex = std::numeric_limits::quiet_NaN(); + glm::vec3 position = glm::vec3(std::numeric_limits::quiet_NaN()); // In parsec + float radius = std::numeric_limits::quiet_NaN(); // In solar radii + float bv = std::numeric_limits::quiet_NaN(); + float teff = std::numeric_limits::quiet_NaN(); // In Kelvin + float luminosity = std::numeric_limits::quiet_NaN(); // In log(Solar) }; struct ExoplanetSystem { diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 8456c34c36..a6072dd936 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -110,12 +110,18 @@ ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { if (system.starData.position != pos && isValidPosition(pos)) { system.starData.position = pos; } - if (system.starData.bvColorIndex != p.bmv && !std::isnan(p.bmv)) { - system.starData.bvColorIndex = p.bmv; - } if (system.starData.radius != p.rStar && !std::isnan(p.rStar)) { system.starData.radius = p.rStar; } + if (system.starData.bv != p.bmv && !std::isnan(p.bmv)) { + system.starData.bv = p.bmv; + } + if (system.starData.teff != p.teff && !std::isnan(p.teff)) { + system.starData.teff = p.teff; + } + if (system.starData.luminosity != p.luminosity && !std::isnan(p.luminosity)) { + system.starData.luminosity = p.luminosity; + } } } @@ -167,7 +173,7 @@ void createExoplanetSystem(const std::string& starName) { } std::string colorLayers; - const float bv = system.starData.bvColorIndex; + const float bv = system.starData.bv; if (!std::isnan(bv)) { const glm::vec3 color = starColor(bv); diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 90918c46a1..190b31baab 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -88,12 +88,20 @@ void ExoplanetsDataPreparationTask::perform( int version = 1; binFile.write(reinterpret_cast(&version), sizeof(int)); - std::string planetRow; - getline(inputDataFile, planetRow); // The first line, containing the data names + auto readFirstDataRow = [](std::ifstream& file, std::string& line) -> void { + while (getline(file, line)) { + bool shouldSkip = line[0] == '#' || line.empty(); + if (!shouldSkip) break; + } + }; + + // Find the line containing the data names + std::string columnNamesRow; + readFirstDataRow(inputDataFile, columnNamesRow); // Read column names into a vector, for later access std::vector columnNames; - std::stringstream sStream(planetRow); + std::stringstream sStream(columnNamesRow); std::string colName; while (getline(sStream, colName, ',')) { columnNames.push_back(colName); @@ -101,12 +109,15 @@ void ExoplanetsDataPreparationTask::perform( // Read total number of items int total = 0; - while (getline(inputDataFile, planetRow)) { + std::string row; + while (getline(inputDataFile, row)) { ++total; } inputDataFile.clear(); inputDataFile.seekg(0); - getline(inputDataFile, planetRow); // The first line, containing the data names + + // Read past the first line, containing the data names + readFirstDataRow(inputDataFile, row); LINFO(fmt::format("Loading {} exoplanets", total)); @@ -156,7 +167,7 @@ void ExoplanetsDataPreparationTask::perform( ExoplanetDataEntry p; std::string data; int exoplanetCount = 0; - while (getline(inputDataFile, planetRow)) { + while (getline(inputDataFile, row)) { ++exoplanetCount; progressCallback(static_cast(exoplanetCount) / static_cast(total)); @@ -167,7 +178,7 @@ void ExoplanetsDataPreparationTask::perform( float dec = std::numeric_limits::quiet_NaN(); // decimal degrees float distanceInParsec = std::numeric_limits::quiet_NaN(); - std::istringstream lineStream(planetRow); + std::istringstream lineStream(row); int columnIndex = 0; while (getline(lineStream, data, ',')) { const std::string& column = columnNames[columnIndex]; @@ -273,18 +284,39 @@ void ExoplanetsDataPreparationTask::perform( else if (column == "st_raderr2") { p.rStarLower = -readFloatData(data); } - // Color of star (B-V color index computed from star's effective temperature) + // Effective temperature and color of star + // (B-V color index computed from star's effective temperature) else if (column == "st_teff") { - float teff = readFloatData(data); - p.bmv = bvFromTeff(teff); + p.teff = readFloatData(data); + p.bmv = bvFromTeff(p.teff); + } + else if (column == "st_tefferr1") { + p.teffUpper = readFloatData(data); + } + else if (column == "st_tefferr2") { + p.teffLower = -readFloatData(data); + } + // Star luminosity + else if (column == "st_lum") { + p.luminosity = readFloatData(data); + } + else if (column == "st_lumerr1") { + p.luminosityUpper = readFloatData(data); + } + else if (column == "st_lumerr2") { + p.luminosityLower = -readFloatData(data); } // Is the planet orbiting a binary system? else if (column == "cb_flag") { p.binary = static_cast(readIntegerData(data)); } + // Number of stars in the system + else if (column == "sy_snum") { + p.nStars = readIntegerData(data); + } // Number of planets in the system else if (column == "sy_pnum") { - p.nComp = readIntegerData(data); + p.nPlanets = readIntegerData(data); } } From 05651d1aa35469f93bd5fa4362dbcd349cd27f43 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 11 Dec 2020 13:48:56 +0100 Subject: [PATCH 063/147] Add habitable zone representation for exoplanet systems --- modules/exoplanets/exoplanetshelper.cpp | 35 ++++++++ modules/exoplanets/exoplanetshelper.h | 27 ++++-- modules/exoplanets/exoplanetsmodule_lua.inl | 88 +++++++++++++++---- .../tasks/exoplanetsdatapreparationtask.cpp | 9 +- 4 files changed, 134 insertions(+), 25 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index 3a71287751..f0279344c3 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -136,6 +136,41 @@ glm::dmat3 computeSystemRotation(glm::dvec3 starPosition) { ); } +std::optional computeHabitableZone(float teff, float luminosity) { + // The formula only consider stars with teff in range [2600, 7200] K + if (teff > 7200.f || teff < 2600.f) { + return std::nullopt; + } + + struct Coefficients { + float seffSun; + float a, b, c, d; + }; + + // Coefficients for planets of 1 Earth mass. Received from: + // https://depts.washington.edu/naivpl/sites/default/files/HZ_coefficients.dat + constexpr Coefficients coefficients[] = { + // Inner boundary - Runaway greenhouse + {1.10700E+00, 1.33200E-04, 1.58000E-08, -8.30800E-12, -1.93100E-15}, + // Outer boundary - Maximum greenhouse + {3.56000E-01, 6.17100E-05, 1.69800E-09, -3.19800E-12, -5.57500E-16} + }; + + const float tstar = teff - 5780.f; + const float tstar2 = tstar * tstar; + + glm::vec2 distances; + for (int i = 0; i < 2; ++i) { + const Coefficients& coeffs = coefficients[i]; + float seff = coeffs.seffSun + (coeffs.a * tstar) + (coeffs.b * tstar2) + + (coeffs.c * tstar * tstar2) + (coeffs.d * tstar2 * tstar2); + + distances[i] = std::pow(luminosity / seff, 0.5f); + } + + return std::optional(std::move(distances)); +} + std::string createIdentifier(std::string name) { std::replace(name.begin(), name.end(), ' ', '_'); std::replace(name.begin(), name.end(), '.', '-'); diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 58e6a2adbc..e43322ebf4 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSHELPER___H__ #include +#include #include #include @@ -60,9 +61,9 @@ struct ExoplanetDataEntry { float rStar; // Estimated radius of the star in solar radii float rStarUpper; // Upper uncertainty of estimated star radius float rStarLower; // Lower uncertainty of estimated star radius - float luminosity; // Star luminosity, in units of solar luminosities [log(Solar)] - float luminosityUpper; // Upper uncertainty of star luminosity [log(Solar)] - float luminosityLower; // Lower uncertainty of star luminosity [log(Solar)] + float luminosity; // Star luminosity, in units of solar luminosities + float luminosityUpper; // Upper uncertainty of star luminosity + float luminosityLower; // Lower uncertainty of star luminosity float teff; // Star's effective temperature in Kelvin float teffUpper; // Upper uncertainty of effective temperature float teffLower; // Lower uncertainty of effective temperature @@ -79,10 +80,10 @@ struct ExoplanetDataEntry { struct StarData { glm::vec3 position = glm::vec3(std::numeric_limits::quiet_NaN()); // In parsec - float radius = std::numeric_limits::quiet_NaN(); // In solar radii + float radius = std::numeric_limits::quiet_NaN(); // In solar radii float bv = std::numeric_limits::quiet_NaN(); - float teff = std::numeric_limits::quiet_NaN(); // In Kelvin - float luminosity = std::numeric_limits::quiet_NaN(); // In log(Solar) + float teff = std::numeric_limits::quiet_NaN(); // In Kelvin + float luminosity = std::numeric_limits::quiet_NaN(); // In solar luminosities }; struct ExoplanetSystem { @@ -100,12 +101,24 @@ bool hasSufficientData(const ExoplanetDataEntry& p); // Compute star color in RGB from b-v color index glm::vec3 starColor(float bv); -glm::dmat4 computeOrbitPlaneRotationMatrix(float i, float bigom, float omega); +glm::dmat4 computeOrbitPlaneRotationMatrix(float i, float bigom = 180.f, + float omega = 90.f); // Rotate the original coordinate system (where x is pointing to First Point of Aries) // so that x is pointing from star to the sun. glm::dmat3 computeSystemRotation(glm::dvec3 starPosition); +/** + * Compute the inner and outer boundary of the habitable zone of a star, accordring to + * formula and coefficients by Kopparapu et al. (2015) https://arxiv.org/abs/1404.5292 + * + * \param teff The effective temperature of the star, in Kelvin + * \param luminosity The luminosity of the star, in solar luminosities + * \return A vec2 with the lower and upper boundary in atronomical units, if a habitable + zone could be computed. Otherwise an std::nullopt + */ +std::optional computeHabitableZone(float teff, float luminosity); + // Create an identifier without whitespaces std::string createIdentifier(std::string name); diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index a6072dd936..f82db2f959 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -55,6 +55,12 @@ constexpr const char* NoDataTextureFile = "${SYNC}/http/exoplanets_textures/1/grid-32.png"; constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; +constexpr const char* HabitableZoneTextureFile = + "${SYNC}/http/exoplanets_textures/1/hz_disc_texture.png"; + +const float AstronomicalUnit = static_cast(distanceconstants::AstronomicalUnit); +const float SolarRadius = static_cast(distanceconstants::SolarRadius); +const float JupiterRadius = static_cast(distanceconstants::JupiterRadius); ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { ExoplanetSystem system; @@ -164,10 +170,9 @@ void createExoplanetSystem(const std::string& starName) { const glm::dvec3 starPos = static_cast(starPosInParsec) * distanceconstants::Parsec; const glm::dmat3 exoplanetSystemRotation = computeSystemRotation(starPos); - const float solarRadius = static_cast(distanceconstants::SolarRadius); // Star - float radiusInMeter = solarRadius; + float radiusInMeter = SolarRadius; if (!std::isnan(system.starData.radius)) { radiusInMeter *= system.starData.radius; } @@ -242,7 +247,7 @@ void createExoplanetSystem(const std::string& starName) { // Planets for (size_t i = 0; i < system.planetNames.size(); i++) { - ExoplanetDataEntry planet = system.planetsData[i]; + ExoplanetDataEntry& planet = system.planetsData[i]; const std::string planetName = system.planetNames[i]; if (std::isnan(planet.ecc)) { @@ -271,28 +276,24 @@ void createExoplanetSystem(const std::string& starName) { sEpoch = "2009-05-19T07:11:34.080"; } - const float astronomicalUnit = - static_cast(distanceconstants::AstronomicalUnit); - const float jupiterRadius = static_cast(distanceconstants::JupiterRadius); - float planetRadius; std::string enabled; if (std::isnan(planet.r)) { if (std::isnan(planet.rStar)) { - planetRadius = planet.a * 0.001f * astronomicalUnit; + planetRadius = planet.a * 0.001f * AstronomicalUnit; } else { - planetRadius = planet.rStar * 0.1f * solarRadius; + planetRadius = planet.rStar * 0.1f * SolarRadius; } enabled = "false"; } else { - planetRadius = static_cast(planet.r) * jupiterRadius; + planetRadius = static_cast(planet.r) * JupiterRadius; enabled = "true"; } const float periodInSeconds = static_cast(planet.per * SecondsPerDay); - const float semiMajorAxisInMeter = planet.a * astronomicalUnit; + const float semiMajorAxisInMeter = planet.a * AstronomicalUnit; const float semiMajorAxisInKm = semiMajorAxisInMeter * 0.001f; const std::string planetIdentifier = createIdentifier(planetName); @@ -365,13 +366,12 @@ void createExoplanetSystem(const std::string& starName) { bool hasLowerAUncertainty = !std::isnan(planet.aLower); if (hasUpperAUncertainty && hasLowerAUncertainty) { - // Get the orbit plane of the planet trail orbit from the KeplerTranslation - const glm::dmat4 orbitPlaneRotationMatrix = computeOrbitPlaneRotationMatrix( + const glm::dmat4 rotation = computeOrbitPlaneRotationMatrix( planet.i, planet.bigOmega, planet.omega ); - const glm::dmat3 rotation = orbitPlaneRotationMatrix; + const glm::dmat3 rotationMat3 = static_cast(rotation); const std::string discNode = "{" "Identifier = '" + planetIdentifier + "_Disc'," @@ -391,7 +391,7 @@ void createExoplanetSystem(const std::string& starName) { "Transform = {" "Rotation = {" "Type = 'StaticRotation'," - "Rotation = " + ghoul::to_string(rotation) + "" + "Rotation = " + ghoul::to_string(rotationMat3) + "" "}" "}," "GUI = {" @@ -406,6 +406,64 @@ void createExoplanetSystem(const std::string& starName) { ); } } + + // Habitable Zone + bool hasTeff = !std::isnan(system.starData.teff); + bool hasLuminosity = !std::isnan(system.starData.luminosity); + std::optional zone = std::nullopt; + + if (hasTeff && hasLuminosity) { + zone = computeHabitableZone(system.starData.teff, system.starData.luminosity); + } + + if (zone.has_value()) { + float meanInclination = 0.f; + for (const ExoplanetDataEntry& p : system.planetsData) { + meanInclination += p.i; + } + meanInclination /= static_cast(system.planetsData.size()); + const glm::dmat4 rotation = computeOrbitPlaneRotationMatrix(meanInclination); + const glm::dmat3 rotationMat3 = static_cast(rotation); + + glm::vec2 limits = zone.value(); + float half = 0.5f * (limits[1] - limits[0]); + float center = limits[0] + half; + const std::string zoneDiscNode = "{" + "Identifier = '" + starIdentifier + "_HZ_Disc'," + "Parent = '" + starIdentifier + "'," + "Enabled = true," + "Renderable = {" + "Type = 'RenderableOrbitDisc'," + "Rotation = {" + "Type = 'StaticRotation'," + "Rotation = " + ghoul::to_string(rotationMat3) + "" + "}," + "Texture = openspace.absPath('" + HabitableZoneTextureFile + "')," + "Size = " + std::to_string(center * AstronomicalUnit) + "," + "Eccentricity = 0," + "Offset = { " + + std::to_string(half) + ", " + + std::to_string(half) + + "}," //min / max extend + "Opacity = 0.05" + "}," + "Transform = {" + "Rotation = {" + "Type = 'StaticRotation'," + "Rotation = " + ghoul::to_string(rotationMat3) + "" + "}" + "}," + "GUI = {" + "Name = '" + starName + " Habitable Zone'," + "Path = '" + guiPath + "'" + "}" + "}"; + + openspace::global::scriptEngine->queueScript( + "openspace.addSceneGraphNode(" + zoneDiscNode + ");", + scripting::ScriptEngine::RemoteScripting::Yes + ); + } } int addExoplanetSystem(lua_State* L) { diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 190b31baab..369dea2b4a 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -298,13 +298,16 @@ void ExoplanetsDataPreparationTask::perform( } // Star luminosity else if (column == "st_lum") { - p.luminosity = readFloatData(data); + float dataInLogSolar = readFloatData(data); + p.luminosity = std::pow(10, dataInLogSolar); } else if (column == "st_lumerr1") { - p.luminosityUpper = readFloatData(data); + float dataInLogSolar = readFloatData(data); + p.luminosityUpper = std::pow(10, dataInLogSolar); } else if (column == "st_lumerr2") { - p.luminosityLower = -readFloatData(data); + float dataInLogSolar = readFloatData(data); + p.luminosityLower = -std::pow(10, dataInLogSolar); } // Is the planet orbiting a binary system? else if (column == "cb_flag") { From 92085847f2137d57bd47f828f22a04185fc2546e Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 11 Dec 2020 14:13:36 +0100 Subject: [PATCH 064/147] Try to make RenderableOrbitDisc more intuitive * The size now matches the semi-major axis * Avoid re-setting size value in constructor * Avoid inconsistent units for offsets and size (previously AU and meter) --- modules/exoplanets/exoplanetsmodule_lua.inl | 27 +++++++++++-------- .../rendering/renderableorbitdisc.cpp | 26 +++++++++--------- .../rendering/renderableorbitdisc.h | 4 +-- modules/exoplanets/shaders/orbitdisc_fs.glsl | 27 ++++++++++--------- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index f82db2f959..c6673e021a 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -58,7 +58,7 @@ constexpr const char* DiscTextureFile = constexpr const char* HabitableZoneTextureFile = "${SYNC}/http/exoplanets_textures/1/hz_disc_texture.png"; -const float AstronomicalUnit = static_cast(distanceconstants::AstronomicalUnit); +const float AU = static_cast(distanceconstants::AstronomicalUnit); const float SolarRadius = static_cast(distanceconstants::SolarRadius); const float JupiterRadius = static_cast(distanceconstants::JupiterRadius); @@ -280,7 +280,7 @@ void createExoplanetSystem(const std::string& starName) { std::string enabled; if (std::isnan(planet.r)) { if (std::isnan(planet.rStar)) { - planetRadius = planet.a * 0.001f * AstronomicalUnit; + planetRadius = planet.a * 0.001f * AU; } else { planetRadius = planet.rStar * 0.1f * SolarRadius; @@ -293,7 +293,7 @@ void createExoplanetSystem(const std::string& starName) { } const float periodInSeconds = static_cast(planet.per * SecondsPerDay); - const float semiMajorAxisInMeter = planet.a * AstronomicalUnit; + const float semiMajorAxisInMeter = planet.a * AU; const float semiMajorAxisInKm = semiMajorAxisInMeter * 0.001f; const std::string planetIdentifier = createIdentifier(planetName); @@ -373,6 +373,9 @@ void createExoplanetSystem(const std::string& starName) { ); const glm::dmat3 rotationMat3 = static_cast(rotation); + const float lowerOffset = planet.aLower / planet.a; + const float upperOffset = planet.aUpper / planet.a; + const std::string discNode = "{" "Identifier = '" + planetIdentifier + "_Disc'," "Parent = '" + starIdentifier + "'," @@ -383,8 +386,8 @@ void createExoplanetSystem(const std::string& starName) { "Size = " + std::to_string(semiMajorAxisInMeter) + "," "Eccentricity = " + std::to_string(planet.ecc) + "," "Offset = { " + - std::to_string(planet.aLower) + ", " + - std::to_string(planet.aUpper) + + std::to_string(lowerOffset) + ", " + + std::to_string(upperOffset) + "}," //min / max extend "Opacity = 0.3" "}," @@ -425,9 +428,11 @@ void createExoplanetSystem(const std::string& starName) { const glm::dmat4 rotation = computeOrbitPlaneRotationMatrix(meanInclination); const glm::dmat3 rotationMat3 = static_cast(rotation); - glm::vec2 limits = zone.value(); - float half = 0.5f * (limits[1] - limits[0]); - float center = limits[0] + half; + glm::vec2 limitsInMeter = zone.value() * AU; + float half = 0.5f * (limitsInMeter[1] - limitsInMeter[0]); + float center = limitsInMeter[0] + half; + float relativeOffset = half / center; + const std::string zoneDiscNode = "{" "Identifier = '" + starIdentifier + "_HZ_Disc'," "Parent = '" + starIdentifier + "'," @@ -439,11 +444,11 @@ void createExoplanetSystem(const std::string& starName) { "Rotation = " + ghoul::to_string(rotationMat3) + "" "}," "Texture = openspace.absPath('" + HabitableZoneTextureFile + "')," - "Size = " + std::to_string(center * AstronomicalUnit) + "," + "Size = " + std::to_string(center) + "," "Eccentricity = 0," "Offset = { " + - std::to_string(half) + ", " + - std::to_string(half) + + std::to_string(relativeOffset) + ", " + + std::to_string(relativeOffset) + "}," //min / max extend "Opacity = 0.05" "}," diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 319b78b3b0..4e74e8526c 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -50,7 +50,7 @@ namespace { static const openspace::properties::Property::PropertyInfo SizeInfo = { "Size", "Size", - "This value specifies the semi-major axis of the orbit in meter." + "This value specifies the semi-major axis of the orbit, in meter." }; static const openspace::properties::Property::PropertyInfo EccentricityInfo = { @@ -63,8 +63,10 @@ namespace { static const openspace::properties::Property::PropertyInfo OffsetInfo = { "Offset", "Offset", - "This value is used to limit the width of the rings. Each of the two values is " - "the lower and the upper uncertainties of the semi-major axis. " + "This property determines the width of the disc. The values specify the lower " + "and upper deviation from the semi major axis, respectively. The values are " + "relative to the size of the semi-major axis. That is, 0 means no deviation " + "from the semi-major axis and 1 is a whole semi-major axis's worth of deviation." }; } // namespace @@ -114,7 +116,7 @@ RenderableOrbitDisc::RenderableOrbitDisc(const ghoul::Dictionary& dictionary) , _texturePath(TextureInfo) , _size(SizeInfo, 1.f, 0.f, 3.0e12f) , _eccentricity(EccentricityInfo, 0.f, 0.f, 1.f) - , _offset(OffsetInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(1.f)) + , _offset(OffsetInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(1.f)) { using ghoul::filesystem::File; @@ -127,16 +129,15 @@ RenderableOrbitDisc::RenderableOrbitDisc(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(OffsetInfo.identifier)) { _offset = dictionary.value(OffsetInfo.identifier); } + _offset.onChange([&]() { _planeIsDirty = true; }); addProperty(_offset); _size = static_cast(dictionary.value(SizeInfo.identifier)); - _size = static_cast( - _size + (_offset.value().y * distanceconstants::AstronomicalUnit) - ); - setBoundingSphere(_size); _size.onChange([&]() { _planeIsDirty = true; }); addProperty(_size); + setBoundingSphere(_size + _offset.value().y * _size); + _texturePath = absPath(dictionary.value(TextureInfo.identifier)); _textureFile = std::make_unique(_texturePath); @@ -168,7 +169,7 @@ void RenderableOrbitDisc::initializeGL() { _uniformCache.modelViewProjection = _shader->uniformLocation( "modelViewProjectionTransform" ); - _uniformCache.textureOffset = _shader->uniformLocation("textureOffset"); + _uniformCache.offset = _shader->uniformLocation("offset"); _uniformCache.opacity = _shader->uniformLocation("opacity"); _uniformCache.texture = _shader->uniformLocation("discTexture"); _uniformCache.eccentricity = _shader->uniformLocation("eccentricity"); @@ -209,7 +210,7 @@ void RenderableOrbitDisc::render(const RenderData& data, RendererTasks&) { _uniformCache.modelViewProjection, data.camera.projectionMatrix() * glm::mat4(modelViewTransform) ); - _shader->setUniform(_uniformCache.textureOffset, _offset); + _shader->setUniform(_uniformCache.offset, _offset); _shader->setUniform(_uniformCache.opacity, _opacity); _shader->setUniform(_uniformCache.eccentricity, _eccentricity); _shader->setUniform(_uniformCache.semiMajorAxis, _size); @@ -241,7 +242,7 @@ void RenderableOrbitDisc::update(const UpdateData&) { _uniformCache.modelViewProjection = _shader->uniformLocation( "modelViewProjectionTransform" ); - _uniformCache.textureOffset = _shader->uniformLocation("textureOffset"); + _uniformCache.offset = _shader->uniformLocation("offset"); _uniformCache.opacity = _shader->uniformLocation("opacity"); _uniformCache.texture = _shader->uniformLocation("discTexture"); _uniformCache.eccentricity = _shader->uniformLocation("eccentricity"); @@ -283,7 +284,8 @@ void RenderableOrbitDisc::loadTexture() { } void RenderableOrbitDisc::createPlane() { - const GLfloat size = _size * (1.f + _eccentricity); + const GLfloat outerDistance = (_size + _offset.value().y * _size); + const GLfloat size = outerDistance * (1.f + _eccentricity); struct VertexData { GLfloat x; diff --git a/modules/exoplanets/rendering/renderableorbitdisc.h b/modules/exoplanets/rendering/renderableorbitdisc.h index b7d55b6268..b0f1735d4d 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.h +++ b/modules/exoplanets/rendering/renderableorbitdisc.h @@ -66,8 +66,8 @@ private: properties::Vec2Property _offset; std::unique_ptr _shader = nullptr; - UniformCache(modelViewProjection, textureOffset, opacity, - texture, eccentricity, semiMajorAxis) _uniformCache; + UniformCache(modelViewProjection, offset, opacity, texture, + eccentricity, semiMajorAxis) _uniformCache; std::unique_ptr _texture = nullptr; std::unique_ptr _textureFile; diff --git a/modules/exoplanets/shaders/orbitdisc_fs.glsl b/modules/exoplanets/shaders/orbitdisc_fs.glsl index bf8cb01c5c..8032095f44 100644 --- a/modules/exoplanets/shaders/orbitdisc_fs.glsl +++ b/modules/exoplanets/shaders/orbitdisc_fs.glsl @@ -29,12 +29,11 @@ in vec2 vs_st; in vec4 vs_position; uniform sampler1D discTexture; -uniform vec2 textureOffset; +uniform vec2 offset; // relative to semi major axis uniform float opacity; uniform float eccentricity; uniform float semiMajorAxis; -const float AstronomicalUnit = 149597870700.0; // m const float Epsilon = 0.0000001; // Compute semi minor axis from major axis, a, and eccentricity, e @@ -56,16 +55,15 @@ Fragment getFragment() { // Moving the origin to the center vec2 st = (vs_st - vec2(0.5)) * 2.0; - float offsetLower = textureOffset.x; - float offsetUpper = textureOffset.y; - float offsetIntervalSize = offsetLower + offsetUpper; + float offsetLower = offset.x * semiMajorAxis; + float offsetUpper = offset.y * semiMajorAxis; - float AUpper = semiMajorAxis; + float AUpper = semiMajorAxis + offsetUpper; float BUpper = semiMinorAxis(AUpper, eccentricity); float CUpper = sqrt(AUpper*AUpper - BUpper*BUpper); float outerApoapsisDistance = AUpper * (1 + eccentricity); - float ALower = AUpper - AstronomicalUnit * offsetIntervalSize; + float ALower = semiMajorAxis - offsetLower; float BLower = semiMinorAxis(ALower, eccentricity); float CLower = sqrt(ALower*ALower - BLower*BLower); float innerApoapsisDistance = ALower * (1 + eccentricity); @@ -106,16 +104,19 @@ Fragment getFragment() { float discWidth = distance(outerPoint, innerPoint); float distanceFromOuterEdge = distance(outerPoint, st); - float textureCoord = distanceFromOuterEdge / discWidth; + float relativeDistance = distanceFromOuterEdge / discWidth; - // Scale texture coordinate to handle asymmetric offset intervals - float textureMid = offsetUpper / offsetIntervalSize; + // Compute texture coordinate based on the distance to outer edge + float textureCoord = 0.0; - if(textureCoord > textureMid) { - textureCoord = 0.5 + 0.5 * (textureCoord - textureMid) / (1.0 - textureMid); + // The midpoint (textureCoord = 0.5) depends on the ratio between the offsets + // (Note that the texture goes from outer to inner edge of disc) + float midPoint = offsetUpper / (offsetUpper + offsetLower); + if(relativeDistance > midPoint) { + textureCoord = 0.5 + 0.5 * (relativeDistance - midPoint) / (1.0 - midPoint); } else { - textureCoord = 0.5 * textureCoord / textureMid; + textureCoord = 0.5 * (relativeDistance / midPoint); } vec4 diffuse = texture(discTexture, textureCoord); From 9898714478f6a721836dac2e005e6bf09e41484a Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 14 Dec 2020 10:10:35 +0100 Subject: [PATCH 065/147] Update boundary cases for habitable zone --- modules/exoplanets/exoplanetshelper.cpp | 20 +++++++++++++------- modules/exoplanets/exoplanetshelper.h | 2 +- modules/exoplanets/exoplanetsmodule_lua.inl | 10 +++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index f0279344c3..5d2acdc2ef 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -136,10 +136,16 @@ glm::dmat3 computeSystemRotation(glm::dvec3 starPosition) { ); } -std::optional computeHabitableZone(float teff, float luminosity) { - // The formula only consider stars with teff in range [2600, 7200] K - if (teff > 7200.f || teff < 2600.f) { - return std::nullopt; +glm::vec2 computeHabitableZone(float teff, float luminosity) { + // Kopparapu's formula only considers stars with teff in range [2600, 7200] K. + // However, we want to use the formula for more stars, so add some flexibility to + // the teff boundaries + if (teff > 8000.f || teff < 2000.f) { + // For the other stars, use a method by Tom E. Morris: + // https://www.planetarybiology.com/calculating_habitable_zone.html + float inner = sqrtf(luminosity / 1.1f); + float outer = sqrtf(luminosity / 0.53f); + return glm::vec2(inner, outer); } struct Coefficients { @@ -151,9 +157,9 @@ std::optional computeHabitableZone(float teff, float luminosity) { // https://depts.washington.edu/naivpl/sites/default/files/HZ_coefficients.dat constexpr Coefficients coefficients[] = { // Inner boundary - Runaway greenhouse - {1.10700E+00, 1.33200E-04, 1.58000E-08, -8.30800E-12, -1.93100E-15}, + {1.10700E+00f, 1.33200E-04f, 1.58000E-08f, -8.30800E-12f, -1.93100E-15f}, // Outer boundary - Maximum greenhouse - {3.56000E-01, 6.17100E-05, 1.69800E-09, -3.19800E-12, -5.57500E-16} + {3.56000E-01f, 6.17100E-05f, 1.69800E-09f, -3.19800E-12f, -5.57500E-16f} }; const float tstar = teff - 5780.f; @@ -168,7 +174,7 @@ std::optional computeHabitableZone(float teff, float luminosity) { distances[i] = std::pow(luminosity / seff, 0.5f); } - return std::optional(std::move(distances)); + return distances; } std::string createIdentifier(std::string name) { diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index e43322ebf4..378afd2979 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -117,7 +117,7 @@ glm::dmat3 computeSystemRotation(glm::dvec3 starPosition); * \return A vec2 with the lower and upper boundary in atronomical units, if a habitable zone could be computed. Otherwise an std::nullopt */ -std::optional computeHabitableZone(float teff, float luminosity); +glm::vec2 computeHabitableZone(float teff, float luminosity); // Create an identifier without whitespaces std::string createIdentifier(std::string name); diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index c6673e021a..9fdd5eb45b 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -413,13 +413,13 @@ void createExoplanetSystem(const std::string& starName) { // Habitable Zone bool hasTeff = !std::isnan(system.starData.teff); bool hasLuminosity = !std::isnan(system.starData.luminosity); - std::optional zone = std::nullopt; if (hasTeff && hasLuminosity) { - zone = computeHabitableZone(system.starData.teff, system.starData.luminosity); - } + const glm::vec2 zone = computeHabitableZone( + system.starData.teff, + system.starData.luminosity + ); - if (zone.has_value()) { float meanInclination = 0.f; for (const ExoplanetDataEntry& p : system.planetsData) { meanInclination += p.i; @@ -428,7 +428,7 @@ void createExoplanetSystem(const std::string& starName) { const glm::dmat4 rotation = computeOrbitPlaneRotationMatrix(meanInclination); const glm::dmat3 rotationMat3 = static_cast(rotation); - glm::vec2 limitsInMeter = zone.value() * AU; + glm::vec2 limitsInMeter = zone * AU; float half = 0.5f * (limitsInMeter[1] - limitsInMeter[0]); float center = limitsInMeter[0] + half; float relativeOffset = half / center; From e525c55ecf9d856c40438c7e478e9dae42feb649 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 14 Dec 2020 11:28:53 +0100 Subject: [PATCH 066/147] Update data files and generate habitable zone texture on demand --- .../milkyway/exoplanets/exoplanets_data.asset | 2 +- modules/exoplanets/exoplanetsmodule_lua.inl | 10 +-- src/engine/openspaceengine.cpp | 11 +++ src/engine/openspaceengine_lua.inl | 69 +++++++++++++++++++ 4 files changed, 86 insertions(+), 6 deletions(-) diff --git a/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset b/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset index b49f091844..b75b5aa1a5 100644 --- a/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset +++ b/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset @@ -2,6 +2,6 @@ local DataPath = asset.syncedResource({ Name = "Exoplanet Data Files", Type = "HttpSynchronization", Identifier = "exoplanets_data", - Version = 1 + Version = 2 }) asset.export("DataPath", DataPath) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 9fdd5eb45b..af0f07e67a 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -46,17 +46,15 @@ namespace openspace::exoplanets::luascriptfunctions { constexpr const char* ExoplanetsGuiPath = "/Milky Way/Exoplanets/Exoplanet Systems/"; -constexpr const char* LookUpTablePath = "${SYNC}/http/exoplanets_data/1/lookup.txt"; +constexpr const char* LookUpTablePath = "${SYNC}/http/exoplanets_data/2/lookup.txt"; constexpr const char* ExoplanetsDataPath = - "${SYNC}/http/exoplanets_data/1/exoplanets_data.bin"; + "${SYNC}/http/exoplanets_data/2/exoplanets_data.bin"; constexpr const char* StarTextureFile = "${SYNC}/http/exoplanets_textures/1/sun.jpg"; constexpr const char* NoDataTextureFile = "${SYNC}/http/exoplanets_textures/1/grid-32.png"; constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; -constexpr const char* HabitableZoneTextureFile = - "${SYNC}/http/exoplanets_textures/1/hz_disc_texture.png"; const float AU = static_cast(distanceconstants::AstronomicalUnit); const float SolarRadius = static_cast(distanceconstants::SolarRadius); @@ -443,7 +441,9 @@ void createExoplanetSystem(const std::string& starName) { "Type = 'StaticRotation'," "Rotation = " + ghoul::to_string(rotationMat3) + "" "}," - "Texture = openspace.absPath('" + HabitableZoneTextureFile + "')," + "Texture = openspace.absPath(" + "openspace.createPixelImage('exo_habitable_zone', {0, 0.92, 0.81})" + ")," "Size = " + std::to_string(center) + "," "Eccentricity = 0," "Offset = { " + diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index d51f322e91..da16976af6 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1543,6 +1543,17 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() { "string, string", "Removes a tag (second argument) from a scene graph node (first argument)" }, + { + "createPixelImage", + &luascriptfunctions::createPixelImage, + {}, + "string, vec3", + "Creates a 1 pixel image with a certain color in the cache folder and " + "returns the path to the file. If a cached file with the given name " + "already exists, the path to that file is returned. The first argument " + "is the name of the file, without extension. The second is the RGB " + "color, given as {r, g, b} with values between 0 and 1." + }, { "isMaster", &luascriptfunctions::isMaster, diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index e9e647296c..19cf96a6f7 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -22,11 +22,15 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include #include #include #include #include #include +#include +#include #include namespace openspace::luascriptfunctions { @@ -288,6 +292,71 @@ int downloadFile(lua_State* L) { return 0; } +/** +* \ingroup LuaScripts +* createPixelImage(): +* Creates a one pixel image with a given color and returns the p +*/ +int createPixelImage(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, 2, "lua::createPixelImage"); + + const std::string& name = ghoul::lua::value(L, 1); + const ghoul::Dictionary& d = ghoul::lua::value(L, 2); + + using namespace openspace::documentation; + const std::string& key = "color"; + ghoul::Dictionary colorDict = {{ key, d }}; + TestResult res = DoubleVector3Verifier()(colorDict, key); + + if (!res.success) { + return ghoul::lua::luaError(L, + "Invalid color. Expected three double values {r, g, b} in range 0 to 1" + ); + } + + const glm::vec3 color = colorDict.value(key); + + const std::string& fileName = FileSys.cacheManager()->cachedFilename( + fmt::format("{}.ppm", name), + "", + ghoul::filesystem::CacheManager::Persistent::Yes + ); + + const bool hasCachedFile = FileSys.fileExists(fileName); + if (hasCachedFile) { + LDEBUGC("OpenSpaceEngine", fmt::format("Cached file '{}' used", fileName)); + ghoul::lua::push(L, fileName); + return 1; + } + else { + // Write the color to a ppm file + static std::mutex fileMutex; + std::lock_guard guard(fileMutex); + std::ofstream ppmFile(fileName, std::ofstream::binary | std::ofstream::trunc); + + unsigned int width = 1; + unsigned int height = 1; + unsigned int size = width * height; + std::vector img(size * 3); + img[0] = static_cast(255 * color.r); + img[1] = static_cast(255 * color.g); + img[2] = static_cast(255 * color.b); + + if (ppmFile.is_open()) { + ppmFile << "P6" << std::endl; + ppmFile << width << " " << height << std::endl; + ppmFile << 255 << std::endl; + ppmFile.write(reinterpret_cast(&img[0]), size * 3); + ppmFile.close(); + ghoul::lua::push(L, fileName); + return 1; + } + else { + return ghoul::lua::luaError(L, "Could not open ppm file for writing."); + } + } +} + int isMaster(lua_State* L) { ghoul::lua::checkArgumentsAndThrow(L, 0, "lua::isMaster"); ghoul::lua::push(L, global::windowDelegate->isMaster()); From a79363fdd87ac90ccdd3097b924659563b4dd6d4 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Tue, 15 Dec 2020 09:21:21 +0100 Subject: [PATCH 067/147] Add habitable zone description --- modules/exoplanets/exoplanetsmodule_lua.inl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index af0f07e67a..0f7de105c4 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -371,8 +371,8 @@ void createExoplanetSystem(const std::string& starName) { ); const glm::dmat3 rotationMat3 = static_cast(rotation); - const float lowerOffset = planet.aLower / planet.a; - const float upperOffset = planet.aUpper / planet.a; + const float lowerOffset = static_cast(planet.aLower / planet.a); + const float upperOffset = static_cast(planet.aUpper / planet.a); const std::string discNode = "{" "Identifier = '" + planetIdentifier + "_Disc'," @@ -431,6 +431,16 @@ void createExoplanetSystem(const std::string& starName) { float center = limitsInMeter[0] + half; float relativeOffset = half / center; + constexpr const char* description = + "The habitable zone is the region around a star in which an Earth-like " + "planet can potentially have liquid water on its surface." + "

" + "The inner boundary is where the greenhouse gases in the atmosphere " + "would trap any incoming infrared radiation, leading to the planet " + "surface becoming so hot that water boils away. The outer boundary is where " + "the greenhouse effect would not be able to maintain surface temperature " + "above freezing anywhere on the planet."; + const std::string zoneDiscNode = "{" "Identifier = '" + starIdentifier + "_HZ_Disc'," "Parent = '" + starIdentifier + "'," @@ -460,7 +470,8 @@ void createExoplanetSystem(const std::string& starName) { "}," "GUI = {" "Name = '" + starName + " Habitable Zone'," - "Path = '" + guiPath + "'" + "Path = '" + guiPath + "'," + "Description = '" + description + "'" "}" "}"; From 4370b26a685343759011703ced0871137b1d7fae Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Fri, 18 Dec 2020 11:39:33 +0100 Subject: [PATCH 068/147] Address review comments --- modules/exoplanets/exoplanetshelper.cpp | 11 ++++-- modules/exoplanets/exoplanetshelper.h | 10 ++--- modules/exoplanets/exoplanetsmodule_lua.inl | 26 ++++++------- .../rendering/renderableorbitdisc.cpp | 23 ++++------- .../tasks/exoplanetsdatapreparationtask.cpp | 38 +++++++++---------- src/engine/openspaceengine_lua.inl | 5 ++- 6 files changed, 53 insertions(+), 60 deletions(-) diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index 5d2acdc2ef..87f0c51217 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -143,19 +143,22 @@ glm::vec2 computeHabitableZone(float teff, float luminosity) { if (teff > 8000.f || teff < 2000.f) { // For the other stars, use a method by Tom E. Morris: // https://www.planetarybiology.com/calculating_habitable_zone.html - float inner = sqrtf(luminosity / 1.1f); - float outer = sqrtf(luminosity / 0.53f); + float inner = std::sqrt(luminosity / 1.1f); + float outer = std::sqrt(luminosity / 0.53f); return glm::vec2(inner, outer); } struct Coefficients { float seffSun; - float a, b, c, d; + float a; + float b; + float c; + float d; }; // Coefficients for planets of 1 Earth mass. Received from: // https://depts.washington.edu/naivpl/sites/default/files/HZ_coefficients.dat - constexpr Coefficients coefficients[] = { + constexpr const Coefficients coefficients[] = { // Inner boundary - Runaway greenhouse {1.10700E+00f, 1.33200E-04f, 1.58000E-08f, -8.30800E-12f, -1.93100E-15f}, // Outer boundary - Maximum greenhouse diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 378afd2979..1b3e4bccc8 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -80,10 +80,10 @@ struct ExoplanetDataEntry { struct StarData { glm::vec3 position = glm::vec3(std::numeric_limits::quiet_NaN()); // In parsec - float radius = std::numeric_limits::quiet_NaN(); // In solar radii - float bv = std::numeric_limits::quiet_NaN(); - float teff = std::numeric_limits::quiet_NaN(); // In Kelvin - float luminosity = std::numeric_limits::quiet_NaN(); // In solar luminosities + float radius = std::numeric_limits::quiet_NaN(); // In solar radii + float bv = std::numeric_limits::quiet_NaN(); + float teff = std::numeric_limits::quiet_NaN(); // In Kelvin + float luminosity = std::numeric_limits::quiet_NaN(); // In solar luminosities }; struct ExoplanetSystem { @@ -102,7 +102,7 @@ bool hasSufficientData(const ExoplanetDataEntry& p); glm::vec3 starColor(float bv); glm::dmat4 computeOrbitPlaneRotationMatrix(float i, float bigom = 180.f, - float omega = 90.f); + float omega = 90.f); // Rotate the original coordinate system (where x is pointing to First Point of Aries) // so that x is pointing from star to the sun. diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 0f7de105c4..48574d54f0 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -56,9 +56,9 @@ constexpr const char* NoDataTextureFile = constexpr const char* DiscTextureFile = "${SYNC}/http/exoplanets_textures/1/disc_texture.png"; -const float AU = static_cast(distanceconstants::AstronomicalUnit); -const float SolarRadius = static_cast(distanceconstants::SolarRadius); -const float JupiterRadius = static_cast(distanceconstants::JupiterRadius); +constexpr const float AU = static_cast(distanceconstants::AstronomicalUnit); +constexpr const float SolarRadius = static_cast(distanceconstants::SolarRadius); +constexpr const float JupiterRadius = static_cast(distanceconstants::JupiterRadius); ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { ExoplanetSystem system; @@ -84,14 +84,14 @@ ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { // 3. read sizeof(exoplanet) bytes into an exoplanet object. ExoplanetDataEntry p; std::string line; - while (getline(lut, line)) { + while (std::getline(lut, line)) { std::istringstream ss(line); std::string name; - getline(ss, name, ','); + std::getline(ss, name, ','); if (name.substr(0, name.length() - 2) == starName) { std::string location_s; - getline(ss, location_s); + std::getline(ss, location_s); long location = std::stol(location_s.c_str()); data.seekg(location); @@ -151,7 +151,7 @@ void createExoplanetSystem(const std::string& starName) { } ExoplanetSystem system = findExoplanetSystemInData(starName); - if (system.planetNames.empty()) { + if (system.planetsData.empty()) { LERROR(fmt::format("Exoplanet system '{}' could not be found", starName)); return; } @@ -447,10 +447,6 @@ void createExoplanetSystem(const std::string& starName) { "Enabled = true," "Renderable = {" "Type = 'RenderableOrbitDisc'," - "Rotation = {" - "Type = 'StaticRotation'," - "Rotation = " + ghoul::to_string(rotationMat3) + "" - "}," "Texture = openspace.absPath(" "openspace.createPixelImage('exo_habitable_zone', {0, 0.92, 0.81})" ")," @@ -549,7 +545,7 @@ std::vector hostStarsWithSufficientData() { // Read number of lines int nExoplanets = 0; - while (getline(lookupTableFile, line)) { + while (std::getline(lookupTableFile, line)) { ++nExoplanets; } lookupTableFile.clear(); @@ -557,17 +553,17 @@ std::vector hostStarsWithSufficientData() { names.reserve(nExoplanets); ExoplanetDataEntry p; - while (getline(lookupTableFile, line)) { + while (std::getline(lookupTableFile, line)) { std::stringstream ss(line); std::string name; - getline(ss, name, ','); + std::getline(ss, name, ','); // Remove the last two characters, that specify the planet name = name.substr(0, name.size() - 2); // Don't want to list systems where there is not enough data to visualize. // So, test if there is before adding the name to the list. std::string location_s; - getline(ss, location_s); + std::getline(ss, location_s); long location = std::stol(location_s.c_str()); data.seekg(location); diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 4e74e8526c..57e5486e49 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -40,6 +40,11 @@ #include namespace { + constexpr const std::array UniformNames = { + "modelViewProjectionTransform", "offset", "opacity", + "discTexture", "eccentricity", "semiMajorAxis" + }; + static const openspace::properties::Property::PropertyInfo TextureInfo = { "Texture", "Texture", @@ -166,14 +171,7 @@ void RenderableOrbitDisc::initializeGL() { absPath("${BASE}/modules/exoplanets/shaders/orbitdisc_fs.glsl") ); - _uniformCache.modelViewProjection = _shader->uniformLocation( - "modelViewProjectionTransform" - ); - _uniformCache.offset = _shader->uniformLocation("offset"); - _uniformCache.opacity = _shader->uniformLocation("opacity"); - _uniformCache.texture = _shader->uniformLocation("discTexture"); - _uniformCache.eccentricity = _shader->uniformLocation("eccentricity"); - _uniformCache.semiMajorAxis = _shader->uniformLocation("semiMajorAxis"); + ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames); glGenVertexArrays(1, &_quad); glGenBuffers(1, &_vertexPositionBuffer); @@ -239,14 +237,7 @@ void RenderableOrbitDisc::render(const RenderData& data, RendererTasks&) { void RenderableOrbitDisc::update(const UpdateData&) { if (_shader->isDirty()) { _shader->rebuildFromFile(); - _uniformCache.modelViewProjection = _shader->uniformLocation( - "modelViewProjectionTransform" - ); - _uniformCache.offset = _shader->uniformLocation("offset"); - _uniformCache.opacity = _shader->uniformLocation("opacity"); - _uniformCache.texture = _shader->uniformLocation("discTexture"); - _uniformCache.eccentricity = _shader->uniformLocation("eccentricity"); - _uniformCache.semiMajorAxis = _shader->uniformLocation("semiMajorAxis"); + ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames); } if (_planeIsDirty) { diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 369dea2b4a..181b4aa323 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -89,7 +89,7 @@ void ExoplanetsDataPreparationTask::perform( binFile.write(reinterpret_cast(&version), sizeof(int)); auto readFirstDataRow = [](std::ifstream& file, std::string& line) -> void { - while (getline(file, line)) { + while (std::getline(file, line)) { bool shouldSkip = line[0] == '#' || line.empty(); if (!shouldSkip) break; } @@ -103,14 +103,14 @@ void ExoplanetsDataPreparationTask::perform( std::vector columnNames; std::stringstream sStream(columnNamesRow); std::string colName; - while (getline(sStream, colName, ',')) { + while (std::getline(sStream, colName, ',')) { columnNames.push_back(colName); } // Read total number of items int total = 0; std::string row; - while (getline(inputDataFile, row)) { + while (std::getline(inputDataFile, row)) { ++total; } inputDataFile.clear(); @@ -167,20 +167,20 @@ void ExoplanetsDataPreparationTask::perform( ExoplanetDataEntry p; std::string data; int exoplanetCount = 0; - while (getline(inputDataFile, row)) { + while (std::getline(inputDataFile, row)) { ++exoplanetCount; progressCallback(static_cast(exoplanetCount) / static_cast(total)); std::string component; std::string starName; - float ra = std::numeric_limits::quiet_NaN(); // decimal degrees - float dec = std::numeric_limits::quiet_NaN(); // decimal degrees + float ra = std::numeric_limits::quiet_NaN(); // decimal degrees + float dec = std::numeric_limits::quiet_NaN(); // decimal degrees float distanceInParsec = std::numeric_limits::quiet_NaN(); std::istringstream lineStream(row); int columnIndex = 0; - while (getline(lineStream, data, ',')) { + while (std::getline(lineStream, data, ',')) { const std::string& column = columnNames[columnIndex]; columnIndex++; @@ -299,15 +299,15 @@ void ExoplanetsDataPreparationTask::perform( // Star luminosity else if (column == "st_lum") { float dataInLogSolar = readFloatData(data); - p.luminosity = std::pow(10, dataInLogSolar); + p.luminosity = static_cast(std::pow(10, dataInLogSolar)); } else if (column == "st_lumerr1") { float dataInLogSolar = readFloatData(data); - p.luminosityUpper = std::pow(10, dataInLogSolar); + p.luminosityUpper = static_cast(std::pow(10, dataInLogSolar)); } else if (column == "st_lumerr2") { float dataInLogSolar = readFloatData(data); - p.luminosityLower = -std::pow(10, dataInLogSolar); + p.luminosityLower = static_cast(-std::pow(10, dataInLogSolar)); } // Is the planet orbiting a binary system? else if (column == "cb_flag") { @@ -360,7 +360,7 @@ glm::vec3 ExoplanetsDataPreparationTask::starPosition(const std::string& starNam glm::vec3 position{ std::numeric_limits::quiet_NaN() }; std::string line; - while (getline(exoplanetsFile, line)) { + while (std::getline(exoplanetsFile, line)) { bool shouldSkipLine = ( line.empty() || line[0] == '#' || line.substr(0, 7) == "datavar" || line.substr(0, 10) == "texturevar" || line.substr(0, 7) == "texture" @@ -373,18 +373,18 @@ glm::vec3 ExoplanetsDataPreparationTask::starPosition(const std::string& starNam std::string data; std::string name; std::istringstream linestream(line); - getline(linestream, data, '#'); - getline(linestream, name); + std::getline(linestream, data, '#'); + std::getline(linestream, name); name.erase(0, 1); std::string coord; if (name == starName) { std::stringstream dataStream(data); - getline(dataStream, coord, ' '); + std::getline(dataStream, coord, ' '); position[0] = std::stof(coord.c_str(), nullptr); - getline(dataStream, coord, ' '); + std::getline(dataStream, coord, ' '); position[1] = std::stof(coord.c_str(), nullptr); - getline(dataStream, coord, ' '); + std::getline(dataStream, coord, ' '); position[2] = std::stof(coord.c_str(), nullptr); break; } @@ -410,12 +410,12 @@ float ExoplanetsDataPreparationTask::bvFromTeff(float teff) { float teffLower; float teffUpper; std::string row; - while (getline(teffToBvFile, row)) { + while (std::getline(teffToBvFile, row)) { std::istringstream lineStream(row); std::string teffString; - getline(lineStream, teffString, ','); + std::getline(lineStream, teffString, ','); std::string bvString; - getline(lineStream, bvString); + std::getline(lineStream, bvString); float teffCurrent = std::stof(teffString.c_str(), nullptr); float bvCurrent = std::stof(bvString.c_str(), nullptr); diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 19cf96a6f7..03fb68b151 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -303,13 +303,16 @@ int createPixelImage(lua_State* L) { const std::string& name = ghoul::lua::value(L, 1); const ghoul::Dictionary& d = ghoul::lua::value(L, 2); + // @TODO (emmbr 2020-12-18) Verify that the input dictionary is a vec3 + // Would like to clean this up with a more direct use of the Verifier in the future using namespace openspace::documentation; const std::string& key = "color"; ghoul::Dictionary colorDict = {{ key, d }}; TestResult res = DoubleVector3Verifier()(colorDict, key); if (!res.success) { - return ghoul::lua::luaError(L, + return ghoul::lua::luaError( + L, "Invalid color. Expected three double values {r, g, b} in range 0 to 1" ); } From 7b9aa7a64c08de3fa67508ac8916ecb7db352d3b Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Fri, 18 Dec 2020 11:12:22 -0700 Subject: [PATCH 069/147] Restored missing global::create call to tests app --- tests/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/main.cpp b/tests/main.cpp index 11e7afe2d8..c8ab41328a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -43,7 +43,8 @@ int main(int argc, char** argv) { using namespace openspace; ghoul::initialize(); - + global::create(); + // Register the path of the executable, // to make it possible to find other files in the same directory. FileSys.registerPathToken( From feb30786419184816e5cb87696d143a514fb80ec Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 19 Dec 2020 21:19:35 +0100 Subject: [PATCH 070/147] Update slide_deck_helper.asset Rename `Alpha` to `Opacity` (closes #1441) --- data/assets/util/slide_deck_helper.asset | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/assets/util/slide_deck_helper.asset b/data/assets/util/slide_deck_helper.asset index b434466ddf..4698b7c178 100644 --- a/data/assets/util/slide_deck_helper.asset +++ b/data/assets/util/slide_deck_helper.asset @@ -60,9 +60,9 @@ local setCurrentSlide = function (deck, index, interpolationDuration) opacity = 1 end if interpolationDuration == 0 then - openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Alpha", opacity) + openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Opacity", opacity) else - openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Alpha", opacity, interpolationDuration, "QuadraticEaseOut") + openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Opacity", opacity, interpolationDuration, "QuadraticEaseOut") end end end @@ -84,13 +84,13 @@ local toggleSlides = function (deck, interpolationDuration) opacity = 1 end openspace.setPropertyValueSingle( - "ScreenSpace." .. identifier .. ".Alpha", opacity, + "ScreenSpace." .. identifier .. ".Opacity", opacity, interpolationDuration, "QuadraticEaseOut") end else for i, identifier in pairs(deck.SlideIdentifiers) do openspace.setPropertyValueSingle( - "ScreenSpace." .. identifier .. ".Alpha", 0, + "ScreenSpace." .. identifier .. ".Opacity", 0, interpolationDuration, "QuadraticEaseOut") end end From ad8af3ffeb8dd63d73d661459e27e06c05138315 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 28 Dec 2020 18:26:57 +0100 Subject: [PATCH 071/147] Feature/CMake (#1443) General CMake cleanup/overhaul * Enable precompiled headers for all projects * Move specifications itto separate CMakeLists files * Add openspace-core as a subdirectory * Move handle_modules functionality into modules/CMakeLists.txt * Move handleapplications logic into apps/CMakeLists.txt * Introduce openspace-module-collection interface library to simplify inclusion of modules in applications * Turn module initialization into a two-step process to adapt to the new minimal dependency scenario * Compile time speedup * Remove circular dependencies between modules and core preventing multithreaded compilation on MSVC * Build Spice multithreaded and as static library * Remove dependency from core to module-webbrowser * Remove unused dependency from kameleon * Remove additional unnecessary dependencies * Cleanup volume/kameleon/kameleonvolume modules * Fix visibility issues. Restrict include paths * Compile kameleon in parallel * Other cleanup * Only copy CEF files from one target (hard-coded to OpenSpace right now) * Remove unused instrumentation code * Remove the ability to render AABB for globes as it caused a circular dependency between GlobeBrowsing and Debugging * Removing compiler and cppcheck warnings * Turn almost all includes into non-system includes * Don't warn on deprecrated copy * Updated submodules --- CMakeLists.txt | 107 +--- Jenkinsfile | 26 +- .../CMakeLists.txt | 100 ++-- apps/OpenSpace/CMakeLists.txt | 36 +- apps/OpenSpace/ext/sgct | 2 +- apps/OpenSpace/main.cpp | 6 +- apps/Sync/CMakeLists.txt | 2 +- apps/TaskRunner/CMakeLists.txt | 2 +- apps/Wormhole/CMakeLists.txt | 2 +- ext/CMakeLists.txt | 76 +++ ext/ghoul | 2 +- ext/spice | 2 +- include/openspace/engine/moduleengine.h | 3 +- include/openspace/json.h | 2 +- include/openspace/network/messagestructures.h | 2 +- include/openspace/rendering/renderengine.h | 14 - .../openspace/rendering/transferfunction.h | 5 +- include/openspace/util/openspacemodule.h | 6 +- include/openspace/util/spicemanager.h | 15 + modules/CMakeLists.txt | 389 ++++++++++++++ modules/atmosphere/CMakeLists.txt | 64 +-- .../rendering/atmospheredeferredcaster.cpp | 20 +- .../rendering/renderableatmosphere.cpp | 4 +- modules/base/CMakeLists.txt | 228 ++++---- modules/base/dashboard/dashboarditemangle.cpp | 2 +- .../base/dashboard/dashboarditemdistance.cpp | 6 +- .../base/dashboard/dashboarditemframerate.cpp | 2 +- .../dashboarditemparallelconnection.cpp | 10 +- modules/base/rendering/renderablelabels.cpp | 5 - modules/base/rotation/fixedrotation.cpp | 6 +- modules/cefwebgui/CMakeLists.txt | 2 - modules/cefwebgui/include.cmake | 2 - modules/debugging/CMakeLists.txt | 12 +- modules/debugging/rendering/debugrenderer.cpp | 20 - modules/debugging/rendering/debugrenderer.h | 13 - modules/digitaluniverse/CMakeLists.txt | 48 +- .../rendering/renderablebillboardscloud.cpp | 4 +- modules/exoplanets/CMakeLists.txt | 22 +- modules/exoplanets/exoplanetsmodule_lua.inl | 2 +- modules/fieldlines/CMakeLists.txt | 10 +- modules/fieldlines/include.cmake | 4 - modules/fieldlinessequence/CMakeLists.txt | 20 +- modules/fieldlinessequence/include.cmake | 2 +- .../renderablefieldlinessequence.cpp | 2 +- modules/fitsfilereader/CMakeLists.txt | 12 +- modules/fitsfilereader/src/fitsfilereader.cpp | 21 +- modules/gaia/CMakeLists.txt | 54 +- modules/gaia/include.cmake | 1 - modules/gaia/rendering/octreemanager.cpp | 8 +- modules/gaia/tasks/readfilejob.cpp | 12 +- modules/galaxy/CMakeLists.txt | 38 +- modules/galaxy/include.cmake | 5 - modules/galaxy/rendering/galaxyraycaster.cpp | 1 - modules/globebrowsing/CMakeLists.txt | 166 +++--- modules/globebrowsing/globebrowsingmodule.cpp | 9 +- modules/globebrowsing/include.cmake | 7 +- .../src/asynctiledataprovider.cpp | 2 - .../globebrowsing/src/asynctiledataprovider.h | 3 - .../src/dashboarditemglobelocation.cpp | 2 +- modules/globebrowsing/src/gdalwrapper.cpp | 8 - modules/globebrowsing/src/gdalwrapper.h | 12 - .../src/globelabelscomponent.cpp | 4 +- modules/globebrowsing/src/rawtile.cpp | 38 -- modules/globebrowsing/src/rawtile.h | 2 - .../globebrowsing/src/rawtiledatareader.cpp | 1 - modules/globebrowsing/src/renderableglobe.cpp | 25 +- modules/globebrowsing/src/renderableglobe.h | 3 +- modules/globebrowsing/src/tileprovider.cpp | 6 +- modules/globebrowsing/src/timequantizer.cpp | 6 +- modules/imgui/CMakeLists.txt | 75 ++- modules/imgui/include/imgui_include.h | 3 +- .../imgui/src/guiglobebrowsingcomponent.cpp | 12 +- modules/imgui/src/guipropertycomponent.cpp | 2 +- modules/iswa/CMakeLists.txt | 74 +-- modules/iswa/include.cmake | 4 +- modules/iswa/util/dataprocessor.cpp | 9 +- modules/kameleon/CMakeLists.txt | 41 +- modules/kameleon/ext/kameleon | 2 +- modules/kameleon/include.cmake | 3 - modules/kameleon/include/kameleonwrapper.h | 3 +- modules/kameleon/src/kameleonhelper.cpp | 3 +- modules/kameleon/src/kameleonwrapper.cpp | 14 +- modules/kameleonvolume/CMakeLists.txt | 20 +- modules/kameleonvolume/kameleonvolumemodule.h | 1 + .../kameleonvolume/kameleonvolumereader.cpp | 55 +- modules/kameleonvolume/kameleonvolumereader.h | 23 +- .../rendering/renderablekameleonvolume.cpp | 6 +- .../rendering/renderablekameleonvolume.h | 9 +- .../tasks/kameleondocumentationtask.cpp | 1 - .../tasks/kameleonvolumetorawtask.cpp | 1 + modules/multiresvolume/CMakeLists.txt | 58 +- modules/multiresvolume/include.cmake | 3 - .../multiresvolume/rendering/atlasmanager.cpp | 2 +- .../rendering/errorhistogrammanager.cpp | 2 +- .../rendering/localerrorhistogrammanager.cpp | 6 +- .../rendering/localtfbrickselector.cpp | 3 - .../rendering/multiresvolumeraycaster.cpp | 4 +- .../rendering/renderablemultiresvolume.cpp | 1 - modules/multiresvolume/rendering/tsp.cpp | 12 +- modules/space/CMakeLists.txt | 70 +-- .../space/rendering/renderablesmallbody.cpp | 8 +- modules/space/rendering/renderablesmallbody.h | 2 +- modules/space/rendering/renderablestars.cpp | 26 +- .../space/translation/horizonstranslation.cpp | 9 +- .../space/translation/keplertranslation.cpp | 3 +- modules/spacecraftinstruments/CMakeLists.txt | 98 ++-- modules/spacecraftinstruments/include.cmake | 4 - .../rendering/renderablefov.cpp | 157 +++--- .../util/hongkangparser.cpp | 3 +- modules/spout/CMakeLists.txt | 12 +- modules/spout/include.cmake | 4 - modules/sync/CMakeLists.txt | 16 +- modules/touch/CMakeLists.txt | 31 +- modules/touch/ext/CMakeLists.txt | 86 +-- modules/touch/src/touchinteraction.cpp | 4 +- modules/toyvolume/CMakeLists.txt | 8 +- modules/toyvolume/include.cmake | 4 - modules/vislab/CMakeLists.txt | 10 +- modules/volume/CMakeLists.txt | 82 +-- modules/volume/envelope.cpp | 4 +- modules/volume/include.cmake | 4 - modules/volume/linearlrucache.h | 1 - modules/volume/lrucache.h | 7 +- modules/volume/rawvolume.h | 2 +- modules/volume/rawvolumemetadata.cpp | 3 +- modules/volume/rawvolumemetadata.h | 5 +- modules/volume/rawvolumereader.h | 1 - .../volume/rendering/basicvolumeraycaster.cpp | 13 +- .../volume/rendering/basicvolumeraycaster.h | 11 +- .../rendering/renderabletimevaryingvolume.cpp | 1 + .../rendering/renderabletimevaryingvolume.h | 14 +- .../volume/tasks/generaterawvolumetask.cpp | 12 +- modules/volume/tasks/generaterawvolumetask.h | 7 +- modules/volume/transferfunction.h | 2 +- modules/webbrowser/CMakeLists.txt | 6 +- modules/webbrowser/cmake/cef_support.cmake | 50 +- .../webbrowser/cmake/webbrowser_helpers.cmake | 185 ++++--- modules/webbrowser/include/webrenderhandler.h | 5 + modules/webbrowser/webbrowsermodule.cpp | 16 +- modules/webbrowser/webbrowsermodule.h | 6 +- modules/webgui/CMakeLists.txt | 2 - modules/webgui/cmake/nodejs_support.cmake | 80 ++- modules/webgui/include.cmake | 3 - src/CMakeLists.txt | 61 ++- src/documentation/documentation.cpp | 3 +- src/documentation/verifier.cpp | 2 +- src/engine/globals.cpp | 2 +- src/engine/globalscallbacks.cpp | 3 +- src/engine/moduleengine.cpp | 18 +- src/engine/openspaceengine.cpp | 10 +- src/engine/openspaceengine_lua.inl | 4 +- src/interaction/keyframenavigator.cpp | 8 +- src/interaction/navigationhandler_lua.inl | 2 +- src/interaction/sessionrecording.cpp | 4 +- src/network/parallelconnection.cpp | 4 +- src/network/parallelpeer.cpp | 4 - src/properties/stringproperty.cpp | 2 - src/rendering/dashboard_lua.inl | 1 - src/rendering/framebufferrenderer.cpp | 40 +- src/rendering/loadingscreen.cpp | 7 +- src/rendering/renderengine.cpp | 48 -- src/rendering/transferfunction.cpp | 2 +- src/scene/scene.cpp | 2 + src/scene/scene_lua.inl | 5 +- src/scripting/scriptengine_lua.inl | 2 +- src/scripting/systemcapabilitiesbinding.cpp | 2 +- src/util/keys.cpp | 4 +- src/util/openspacemodule.cpp | 9 +- src/util/spicemanager.cpp | 15 +- src/util/time_lua.inl | 2 +- src/util/timemanager.cpp | 20 +- support/cmake/application_definition.cmake | 48 +- support/cmake/handle_modules.cmake | 369 ------------- support/cmake/module_common.cmake | 26 +- support/cmake/module_definition.cmake | 148 +++--- support/cmake/openspace_header.template | 6 +- support/cmake/packaging.cmake | 98 ++-- .../set_openspace_compile_settings.cmake | 497 ++++++++---------- support/cppcheck/suppressions.txt | 9 +- tests/CMakeLists.txt | 11 +- tests/test_concurrentjobmanager.cpp | 8 +- 181 files changed, 2250 insertions(+), 2540 deletions(-) rename support/cmake/handle_applications.cmake => apps/CMakeLists.txt (52%) create mode 100644 ext/CMakeLists.txt create mode 100644 modules/CMakeLists.txt delete mode 100644 modules/fieldlines/include.cmake delete mode 100644 modules/globebrowsing/src/rawtile.cpp delete mode 100644 modules/kameleon/include.cmake delete mode 100644 modules/multiresvolume/include.cmake delete mode 100644 support/cmake/handle_modules.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 485d59b487..a67edff2d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,14 +37,11 @@ set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul") include(${OPENSPACE_CMAKE_EXT_DIR}/module_common.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) -include(${OPENSPACE_CMAKE_EXT_DIR}/handle_applications.cmake) -include(${OPENSPACE_CMAKE_EXT_DIR}/handle_modules.cmake) include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake) include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake) include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) begin_header("Configuring OpenSpace project") -message(STATUS "CMake version: ${CMAKE_VERSION}") # Bail out if the user tries to generate a 32 bit project. if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) @@ -55,26 +52,28 @@ endif () # Cleanup project # ########################################################################################## set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps") -set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext") -if (NOT EXISTS ${OPENSPACE_EXT_DIR}/ghoul/CMakeLists.txt) - message(FATAL_ERROR "Git submodules are missing. Please run \n" - "git submodule update --init --recursive \n" - "to download the missing dependencies." +if (NOT EXISTS "${OPENSPACE_BASE_DIR}/ext/ghoul/CMakeLists.txt") + message(FATAL_ERROR "Git submodules are missing. Please run " + "git submodule update --init --recursive to download the missing dependencies." ) endif () -set_property(GLOBAL PROPERTY USE_FOLDERS On) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER CMake) mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POSTFIX CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET - CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX) + CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX +) # Set build output directories set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BASE_DIR}/bin) +# "OpenSpace Helper" is not a valid CMake target name under OLD +cmake_policy(SET CMP0037 NEW) + ########################################################################################## # Main # ########################################################################################## @@ -103,7 +102,7 @@ execute_process( ) if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0) set(OPENSPACE_GIT_STATUS "uncommitted changes") -else() +else () set(OPENSPACE_GIT_STATUS "") endif () @@ -133,62 +132,18 @@ if (MSVC) set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE) endif () +option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF) + if (UNIX AND 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") endif () -include(src/CMakeLists.txt) +# Add external dependencies +add_subdirectory(${OPENSPACE_BASE_DIR}/ext) -########################################################################################## -# Add external dependencies # -########################################################################################## -# System libraries -if (APPLE) - begin_dependency("Core Libraries") - target_include_directories(openspace-core PUBLIC "/Developer/Headers/FlatCarbon") - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Carbon) - find_library(APP_SERVICES_LIBRARY ApplicationServices) - mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) - target_link_libraries(openspace-core PUBLIC ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} - ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) - end_dependency() -endif () - -# Ghoul -add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul) -target_link_libraries(openspace-core PUBLIC Ghoul) -set_openspace_compile_settings(Ghoul) -set_folder_location(Lua "External") -set_folder_location(lz4 "External") -set_folder_location(GhoulTest "Unit Tests") -link_directories("${GHOUL_LIBRARY_DIRS}") - -# Spice -begin_dependency("Spice") -add_subdirectory(${OPENSPACE_EXT_DIR}/spice) -target_link_libraries(openspace-core PUBLIC Spice) -set_folder_location(Spice "External") -end_dependency() - -# Curl -begin_dependency("CURL") -if (WIN32) - set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl") - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include) - target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") -else () - find_package(CURL) - if (CURL_FOUND) - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS}) - target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES}) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED") - endif () -endif () -end_dependency() +# include(src/CMakeLists.txt) +add_subdirectory(src) # Qt # Unfortunately, we have to set this value manually; sigh @@ -202,6 +157,7 @@ if (APPLE) "~/Qt/5.10/clang_64/lib/cmake" "~/Qt/5.11/clang_64/lib/cmake" "~/Qt/5.12/clang_64/lib/cmake" + "~/Qt/5.15.1/clang_64/lib/cmake" ) endif () @@ -217,20 +173,17 @@ if (MSVC) endif () begin_header("Configuring Modules") -set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules") -handle_modules("${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_EXTERNAL_MODULES_PATHS}") +add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/modules") end_header("End: Configuring Modules") -message(STATUS "") begin_header("Configuring Applications") -handle_applications() +add_subdirectory("${OPENSPACE_APPS_DIR}") end_header("End: Configuring Applications") -message(STATUS "") option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON) if (OPENSPACE_HAVE_TESTS) begin_header("Generating OpenSpace unit test") - add_subdirectory("${OPENSPACE_BASE_DIR}/tests") + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests") end_header() endif (OPENSPACE_HAVE_TESTS) @@ -252,29 +205,13 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) # find CEF to initialize it properly. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") include(webbrowser_helpers) -elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") +elseif () + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again") endif () ########################################################################################## # Misc settings # ########################################################################################## -option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF) -if (OPENSPACE_WITH_ABUFFER_RENDERER) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER") -endif () - -option(OPENSPACE_WITH_INSTRUMENTATION "Add instrumentation options" OFF) -if (OPENSPACE_WITH_INSTRUMENTATION) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_INSTRUMENTATION") -endif () - - -# Just in case, create the bin directory -add_custom_command( - TARGET openspace-core - PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} -) # Manage the CPack packaging include(${OPENSPACE_CMAKE_EXT_DIR}/packaging.cmake) diff --git a/Jenkinsfile b/Jenkinsfile index cee2734009..f4de007c31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -183,20 +183,18 @@ linux_clang_ninja: { windows_msvc: { if (env.USE_BUILD_OS_WINDOWS == 'true') { node('windows') { - ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { - stage('windows-msvc/scm') { - deleteDir(); - gitHelper.checkoutGit(url, branch); - } - stage('windows-msvc/build') { - compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-msvc'); - compileHelper.recordCompileIssues(compileHelper.VisualStudio()); - } - stage('windows-msvc/test') { - // Currently, the unit tests are failing on Windows - // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') - } - } // node('windows') + stage('windows-msvc/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('windows-msvc/build') { + compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-msvc'); + compileHelper.recordCompileIssues(compileHelper.VisualStudio()); + } + stage('windows-msvc/test') { + // Currently, the unit tests are failing on Windows + // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') + } cleanWs() } // node('windows') } diff --git a/support/cmake/handle_applications.cmake b/apps/CMakeLists.txt similarity index 52% rename from support/cmake/handle_applications.cmake rename to apps/CMakeLists.txt index 45db49da6b..9e5f74234a 100644 --- a/support/cmake/handle_applications.cmake +++ b/apps/CMakeLists.txt @@ -22,63 +22,51 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## - -function (handle_applications) - # Get a list of all of the application directories - file(GLOB appDirs RELATIVE ${OPENSPACE_APPS_DIR} ${OPENSPACE_APPS_DIR}/*) - # Remove the .DS_Store present on Mac - list(REMOVE_ITEM appDirs ".DS_Store") - - # Print all the enabled modules - # message(STATUS "Enabled modules:") - # list(LENGTH enabled_module_names enabled_module_count) - # math(EXPR enabled_module_count "${enabled_module_count} - 1") - # foreach (val RANGE ${enabled_module_count}) - # list(GET enabled_module_names ${val} name) - # list(GET enabled_module_paths ${val} path) - - # message(STATUS "\t${name} (${path})") - # endforeach () - - message(STATUS "Enabled applications:") - foreach (app ${appDirs}) - string(TOUPPER ${app} upper_app) - if (OPENSPACE_APPLICATION_${upper_app}) - message(STATUS "\t${app} (${OPENSPACE_APPS_DIR}/${app})") - endif () - endforeach () - - - # First create all of the options for the applications. In case that one of the - # applications fail to include later, we still want all of them listed - foreach (app ${appDirs}) - set(app_dir "${OPENSPACE_APPS_DIR}/${app}") - string(TOUPPER ${app} upper_app) - - get_application_attribute_default(${app_dir} is_default_application) - option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) - endforeach () - - foreach (app ${appDirs}) - set(app_dir "${OPENSPACE_APPS_DIR}/${app}") - string(TOUPPER ${app} upper_app) - if (OPENSPACE_APPLICATION_${upper_app}) - begin_header("Application: ${app}") - add_subdirectory(${app_dir}) - end_header("End: Application: ${app}") - endif () - endforeach () -endfunction() - - # Returns whether the application located at 'path' is a default application or not function (get_application_attribute_default path result) - set(${result} OFF PARENT_SCOPE) - if (EXISTS "${path}/include.cmake") - unset(DEFAULT_APPLICATION) - include(${path}/include.cmake) - if (DEFINED DEFAULT_APPLICATION) - set(${result} ${DEFAULT_APPLICATION} PARENT_SCOPE) - endif () + set(${result} OFF PARENT_SCOPE) + if (EXISTS "${path}/include.cmake") + unset(DEFAULT_APPLICATION) + include(${path}/include.cmake) + if (DEFINED DEFAULT_APPLICATION) + set(${result} ${DEFAULT_APPLICATION} PARENT_SCOPE) endif () + endif () endfunction() + +# Get a list of all of the application directories +file(GLOB app_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) +# Remove the .DS_Store present on Mac +list(REMOVE_ITEM app_dirs ".DS_Store") +list(REMOVE_ITEM app_dirs "CMakeLists.txt") + + + + +message(STATUS "Enabled applications:") +foreach (app ${app_dirs}) + string(TOUPPER ${app} upper_app) + if (OPENSPACE_APPLICATION_${upper_app}) + message(STATUS "\t${app} (${CMAKE_CURRENT_SOURCE_DIR}/${app})") + endif () +endforeach () + +# First create all of the options for the applications. In case that one of the +# applications fail to include later, we still want all of them listed +foreach (app ${app_dirs}) + set(app_dir "${CMAKE_CURRENT_SOURCE_DIR}/${app}") + string(TOUPPER ${app} upper_app) + + get_application_attribute_default(${app_dir} is_default_application) + option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) +endforeach () + +foreach (app ${app_dirs}) + set(app_dir "${CMAKE_CURRENT_SOURCE_DIR}/${app}") + string(TOUPPER ${app} upper_app) + if (OPENSPACE_APPLICATION_${upper_app}) + begin_header("Application: ${app}") + add_subdirectory(${app_dir}) + end_header("End: Application: ${app}") + endif () +endforeach () diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 6df54e9086..0e7c35c378 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -27,6 +27,9 @@ include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) +# We are getting all_enabled_modules from the handle_applications.cmake file which gets +# it from the main CMakeLists file + ##### # OpenVR ##### @@ -34,8 +37,6 @@ option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support if (OPENSPACE_OPENVR_SUPPORT) begin_header("Dependency: OpenVR") - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/") - find_package(OpenVR REQUIRED) set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT) @@ -43,14 +44,14 @@ if (OPENSPACE_OPENVR_SUPPORT) if (WIN32) find_path(SGCT_OPENVR_INCLUDE_DIRECTORY NAMES SGCTOpenVR.h - PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH + PATHS ${OPENSPACE_BASE_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_EXT_DIR}/sgct/additional_includes/openvr + PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr REQUIRED ) endif () @@ -89,10 +90,7 @@ create_new_application(OpenSpace ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" -) +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") target_include_directories( OpenSpace PRIVATE @@ -101,7 +99,7 @@ target_include_directories( ${SPOUT_INCLUDE_DIRS} ) -target_link_libraries(OpenSpace PUBLIC openspace-core ${OPENVR_LIBRARY} ${SPOUT_LIBRARY}) +target_link_libraries(OpenSpace PRIVATE openspace-core openspace-module-collection ${OPENVR_LIBRARY} ${SPOUT_LIBRARY}) target_compile_definitions(OpenSpace PRIVATE ${SGCT_OPENVR_DEFINITIONS} @@ -115,8 +113,7 @@ set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE) set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct) -target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct/include) -target_link_libraries(OpenSpace PUBLIC sgct) +target_link_libraries(OpenSpace PRIVATE sgct) set_folder_location(sgct "External") set_folder_location(glfw "External/SGCT") @@ -128,15 +125,14 @@ set_folder_location(vrpn "External/SGCT") set_folder_location(zlibstatic "External/SGCT") if (UNIX AND (NOT APPLE)) - target_link_libraries(OpenSpace PUBLIC Xcursor Xinerama X11) + target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11) endif () end_header("Dependency: SGCT") begin_header("Dependency: Profile Editor") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/launcher) -# target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/launcher/include) -target_link_libraries(OpenSpace PUBLIC openspace-ui-launcher) +target_link_libraries(OpenSpace PRIVATE openspace-ui-launcher) end_header("Dependency: Profile Editor") @@ -158,17 +154,23 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) set_cef_targets("${CEF_ROOT}" OpenSpace) run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") -elseif (OPENSPACE_MODULE_WEBBROWSER) + + # @TODO (abock, 2020-12-12) This should be handled more gracefully. Right now we *have* + # to build OpenSpace or otherwise the necessary files will not be copied over + # Copy binary and resource files to the target output directory. + copy_files("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "$") + copy_files("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "$") +elseif () message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () if (MSVC) begin_header("Dependency: Dbghelp") # This library is used for being able to output the callstack if an exception escapes - target_link_libraries(OpenSpace PUBLIC Dbghelp.lib) + target_link_libraries(OpenSpace PRIVATE Dbghelp.lib) end_header() endif () if (OPENSPACE_NVTOOLS_ENABLED) - target_link_libraries(OpenSpace "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib") + target_link_libraries(OpenSpace PRIVATE "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib") endif () diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 4a3882d46c..930239ffee 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 4a3882d46cbcaec9675396e9d61bcb985c055323 +Subproject commit 930239ffee6356ce277ad3949ca406b75b8db088 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 7a47ddb140..fc36b9fc21 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -43,10 +43,8 @@ #include //#include #include -#ifdef _WIN32 +#ifdef WIN32 #define GLFW_EXPOSE_NATIVE_WIN32 -#else -#define GLFW_INCLUDE_NONE #endif #include #include @@ -1014,7 +1012,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC return config; } -int main(int argc, char** argv) { +int main(int argc, char* argv[]) { #ifdef WIN32 SetUnhandledExceptionFilter(generateMiniDump); diff --git a/apps/Sync/CMakeLists.txt b/apps/Sync/CMakeLists.txt index 71bfbf3859..b42b225459 100644 --- a/apps/Sync/CMakeLists.txt +++ b/apps/Sync/CMakeLists.txt @@ -37,7 +37,7 @@ create_new_application(Sync MACOSX_BUNDLE ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(Sync PUBLIC openspace-core) +target_link_libraries(Sync PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/apps/TaskRunner/CMakeLists.txt b/apps/TaskRunner/CMakeLists.txt index 8fa2b9bbd1..d7265796fc 100644 --- a/apps/TaskRunner/CMakeLists.txt +++ b/apps/TaskRunner/CMakeLists.txt @@ -37,7 +37,7 @@ create_new_application(TaskRunner MACOSX_BUNDLE ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(TaskRunner PUBLIC openspace-core) +target_link_libraries(TaskRunner PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/apps/Wormhole/CMakeLists.txt b/apps/Wormhole/CMakeLists.txt index a268c81d2c..70f356153b 100644 --- a/apps/Wormhole/CMakeLists.txt +++ b/apps/Wormhole/CMakeLists.txt @@ -38,7 +38,7 @@ create_new_application( ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(Wormhole PUBLIC openspace-core) +target_link_libraries(Wormhole PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt new file mode 100644 index 0000000000..67b61476fe --- /dev/null +++ b/ext/CMakeLists.txt @@ -0,0 +1,76 @@ +########################################################################################## +# # +# OpenSpace # +# # +# Copyright (c) 2014-2020 # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of this # +# software and associated documentation files (the "Software"), to deal in the Software # +# without restriction, including without limitation the rights to use, copy, modify, # +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the following # +# conditions: # +# # +# The above copyright notice and this permission notice shall be included in all copies # +# or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +########################################################################################## + +include(${OPENSPACE_CMAKE_EXT_DIR}/set_openspace_compile_settings.cmake) + +# System libraries +if (APPLE) + begin_dependency("Core Libraries") + add_library(external-system-apple INTERFACE) + + target_include_directories(external-system-apple INTERFACE "/Developer/Headers/FlatCarbon") + find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) + find_library(CARBON_LIBRARY Carbon REQUIRED) + find_library(COCOA_LIBRARY Cocoa REQUIRED) # This was Carbon before + find_library(APP_SERVICES_LIBRARY ApplicationServices REQUIRED) + find_library(APPKIT_LIBRARY AppKit REQUIRED) + mark_as_advanced(COREFOUNDATION_LIBRARY CARBON_LIBRARY COCOA_LIBRARY + APP_SERVICES_LIBRARY APPKIT_LIBRARY + ) + target_link_libraries(external-system-apple INTERFACE # This was PUBLIC before + ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY} + ${APPKIT_LIBRARY} + ) + end_dependency() +endif () + +# Ghoul +add_subdirectory(ghoul) +set_folder_location(Lua "External") +set_folder_location(lz4 "External") +set_folder_location(GhoulTest "Unit Tests") + +# Spice +begin_dependency("Spice") +add_subdirectory(spice) +set_folder_location(spice "External") +end_dependency() + +# Curl +begin_dependency("CURL") +add_library(external-curl INTERFACE) +if (WIN32) + target_include_directories(external-curl INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/curl/include") + target_link_libraries(external-curl INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/curl/lib/libcurl.lib") + target_compile_definitions(external-curl INTERFACE "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") +else () + find_package(CURL) + if (CURL_FOUND) + target_include_directories(external-curl INTERFACE ${CURL_INCLUDE_DIRS}) + target_link_libraries(external-curl INTERFACE ${CURL_LIBRARIES}) + target_compile_definitions(external-curl INTERFACE "OPENSPACE_CURL_ENABLED") + endif () +endif () +end_dependency() diff --git a/ext/ghoul b/ext/ghoul index 4ca4101a7a..c59ca6051e 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 4ca4101a7a12fc029ace1a2b47702733c9cb2a02 +Subproject commit c59ca6051e5dbf749a6b29a9c3ff7f856d60c308 diff --git a/ext/spice b/ext/spice index 63e382ac76..ba40ad2c25 160000 --- a/ext/spice +++ b/ext/spice @@ -1 +1 @@ -Subproject commit 63e382ac76e0ef37d46a8a0ec3d1980e480f3f88 +Subproject commit ba40ad2c25fe81e152a733b4a6afe53868388206 diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h index d12cf5189f..fb2c14c00b 100644 --- a/include/openspace/engine/moduleengine.h +++ b/include/openspace/engine/moduleengine.h @@ -88,8 +88,7 @@ public: * previously * \pre \p module must not be nullptr */ - void registerModule(std::unique_ptr module, - const ghoul::Dictionary& configuration); + void registerModule(std::unique_ptr module); /** * Returns a list of all registered OpenSpaceModule%s that have been registered with diff --git a/include/openspace/json.h b/include/openspace/json.h index 11faafa5cf..8a3a645ced 100644 --- a/include/openspace/json.h +++ b/include/openspace/json.h @@ -36,7 +36,7 @@ #pragma GCC diagnostic ignored "-Wuseless-cast" #endif // __GNUC__ -#include +#include #if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic pop diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index 5d19824f83..3fe350ddab 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -25,9 +25,9 @@ #ifndef __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ #define __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ +#include #include #include -#include #include #include #include diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 59b03d02b0..0762e54043 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -202,20 +202,6 @@ private: properties::BoolProperty _applyWarping; properties::BoolProperty _showFrameInformation; -#ifdef OPENSPACE_WITH_INSTRUMENTATION - struct FrameInfo { - uint64_t iFrame; - double deltaTime; - double avgDeltaTime; - }; - - struct { - std::vector frames; - uint64_t lastSavedFrame = 0; - uint16_t saveEveryNthFrame = 2048; - } _frameInfo; - properties::BoolProperty _saveFrameInformation; -#endif // OPENSPACE_WITH_INSTRUMENTATION properties::BoolProperty _disableMasterRendering; properties::FloatProperty _globalBlackOutFactor; diff --git a/include/openspace/rendering/transferfunction.h b/include/openspace/rendering/transferfunction.h index 43edecbd53..a65f746415 100644 --- a/include/openspace/rendering/transferfunction.h +++ b/include/openspace/rendering/transferfunction.h @@ -52,12 +52,9 @@ public: glm::vec4 sample(size_t offset); size_t width(); void setCallback(TfChangedCallback callback); - void setTextureFromTxt(std::shared_ptr ptr); + void setTextureFromTxt(); private: - void setTextureFromTxt() { - setTextureFromTxt(_texture); - } void setTextureFromImage(); void uploadTexture(); diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index c1f5a2603e..78918d05b1 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -66,8 +66,7 @@ public: * is set in the OpenSpaceModule constructor. This method will call the * internalInitialize method for further customization for each subclass. */ - void initialize(const ModuleEngine* moduleEngine, - const ghoul::Dictionary& configuration); + void initialize(const ghoul::Dictionary& configuration); /** * This method calls the internalInitializeGL method for further customization for @@ -168,9 +167,6 @@ protected: * Returns a const pointer to the module engine */ const ModuleEngine* moduleEngine() const; - -private: - const ModuleEngine* _moduleEngine = nullptr; }; } // namespace openspace diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 916dd64f2b..3c2cada852 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -35,9 +35,24 @@ #include #include #include + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wold-style-cast" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + #include "SpiceUsr.h" #include "SpiceZpr.h" +#ifdef __clang__ +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace openspace { namespace scripting { struct LuaLibrary; } diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt new file mode 100644 index 0000000000..3c8e3b2c03 --- /dev/null +++ b/modules/CMakeLists.txt @@ -0,0 +1,389 @@ +########################################################################################## +# # +# OpenSpace # +# # +# Copyright (c) 2014-2020 # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of this # +# software and associated documentation files (the "Software"), to deal in the Software # +# without restriction, including without limitation the rights to use, copy, modify, # +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the following # +# conditions: # +# # +# The above copyright notice and this permission notice shall be included in all copies # +# or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +########################################################################################## + +include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) +include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) + + +# This function takes a list of module paths and returns the list of include paths that +# need to be added to the moduleregistration file. Each module files parent directory is +# considered, but with the internal module path ignored +function (get_unique_include_paths module_paths internal_module_path result) + set(res "") + foreach (p ${all_module_paths}) + get_filename_component(base_dir_parent "${p}/.." ABSOLUTE) + get_filename_component(base_dir_grandparent "${p}/../.." ABSOLUTE) + get_filename_component(int_dir "${internal_module_path}/.." ABSOLUTE) + if (NOT ${base_dir_grandparent} STREQUAL ${int_dir}) + # We need to add both parent and grantparent directory: + # The grandparent has to be added if we have an external module in the path + # x/modules/name and we need to add 'x' to the module search path such that + # people can write #include + # + # The parent needs to be included for modules in subdirectories of the form + # openspace/modules/dir/name such that 'dir' is included in the search path + list(APPEND res ${base_dir_parent}) + list(APPEND res ${base_dir_grandparent}) + endif () + endforeach () + + list(REMOVE_DUPLICATES res) + set(${result} ${res} PARENT_SCOPE) +endfunction () + + +# Returns whether the module located at 'path' is a default module or not +function (get_module_attribute_default path result) + set(${result} OFF PARENT_SCOPE) + if (EXISTS "${path}/include.cmake") + unset(DEFAULT_MODULE) + include(${path}/include.cmake) + if (DEFINED DEFAULT_MODULE) + set(${result} ${DEFAULT_MODULE} PARENT_SCOPE) + endif () + endif () +endfunction() + + +# Returns the list of dependencies of the module located at 'path' +function (get_module_attribute_dependencies path result) + set(${result} "" PARENT_SCOPE) + if (EXISTS "${path}/include.cmake") + unset(OPENSPACE_DEPENDENCIES) + include(${path}/${dir}/include.cmake) + if (DEFINED OPENSPACE_DEPENDENCIES) + set(${result} ${OPENSPACE_DEPENDENCIES} PARENT_SCOPE) + endif () + endif () +endfunction() + +# Returns the state whether the module located at 'path' is supported on this machine +function (get_module_attribute_supported path result) + set(${result} ON PARENT_SCOPE) + if (EXISTS "${path}/include.cmake") + unset(SUPPORTED) + include(${path}/${dir}/include.cmake) + if (DEFINED SUPPORTED) + set(${result} ${SUPPORTED} PARENT_SCOPE) + endif () + endif () +endfunction() + + +# Returns the path for the 'module_name'. If the module has not been seen before by +# get_individual_modules, an empty string is returned +function (find_path_for_module module_name module_names module_paths result) + list(FIND module_names ${module_name} i) + if (i EQUAL -1) + # Did not find the name in the list + set(${result} "" PARENT_SCOPE) + else () + # We found the name in the list, so the path is at the same location + list(GET module_paths ${i} path) + set(${result} ${path} PARENT_SCOPE) + endif () +endfunction () + + +# Gets the names of the dependencies of 'module_name' recursively and returns them in +# 'result'. For a dependency chain of a -> b -> c get_recursive_depdencies(a) will +# return "b,c" +function (get_recursive_dependencies module_name module_path module_names module_paths result) + set(result_aggregate "") + get_module_attribute_dependencies(${module_path} deps) + if (deps) + foreach (name ${deps}) + find_path_for_module(${name} "${module_names}" "${module_paths}" path) + if (path) + get_recursive_dependencies( + ${name} ${path} + "${module_names}" "${module_paths}" + res + ) + # 1. We add "base" to the list of dependencies as we always want it + # 2. We add dependencies in this order such that when we later traverse + # this list, we automatically get them in the correct order (meaning + # that we include a dependency first) + set(result_aggregate ${result_aggregate} "base" ${res} ${name}) + else () + message(FATAL_ERROR "Could not find dependency ${name} for module ${module_name}") + endif () + endforeach () + endif () + set(${result} ${result_aggregate} PARENT_SCOPE) +endfunction() + + +# Returns a list of all modules contained in the folder 'path' +function (get_individual_modules path module_names module_paths) + file(GLOB moduleDirs RELATIVE ${path} ${path}/*) + + set(names "") + set(paths "") + foreach (dir ${moduleDirs}) + if (EXISTS "${path}/${dir}/CMakeLists.txt") + list(APPEND names ${dir}) + list(APPEND paths ${path}/${dir}) + else () + # The CMakeLists.txt does not exist, so it might be a group of subdirectories + get_individual_modules(${path}/${dir} _mod_names _mod_paths) + list(APPEND names ${_mod_names}) + list(APPEND paths ${_mod_paths}) + # message(STATUS "Skipping ${dir} as ${dir}/CMakeLists.txt does not exist") + endif () + endforeach () + + set(${module_names} ${names} PARENT_SCOPE) + set(${module_paths} ${paths} PARENT_SCOPE) +endfunction () + + + + + + +set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules") +set(internal_module_path "${OPENSPACE_BASE_DIR}/modules") +set(all_enabled_modules "") + + +# +# Step 1: Get a list of all modules +# +# First get all the internal module +get_individual_modules(${internal_module_path} all_module_names all_module_paths) + +# Then get all external modules +foreach (path ${OPENSPACE_EXTERNAL_MODULES_PATHS}) + get_individual_modules(${path} names paths) + + foreach (n ${names}) + if (${n} IN_LIST all_module_names) + message(FATAL_ERROR "Module name ${n} is not unique among the external directories") + endif () + endforeach () + + set(all_module_names ${all_module_names} ${names}) + set(all_module_paths ${all_module_paths} ${paths}) +endforeach () + +list(LENGTH all_module_names all_module_names_count) +math(EXPR all_module_names_count "${all_module_names_count} - 1") + + +# +# Step 2: Create options for all modules with correct default values +# +set(enabled_module_names "") +set(enabled_module_paths "") +foreach(val RANGE ${all_module_names_count}) + list(GET all_module_names ${val} name) + list(GET all_module_paths ${val} path) + + get_module_attribute_supported(${path} is_module_supported) + if (NOT ${is_module_supported}) + message(STATUS "Skipping module ${name} (${path}) as it is not supported on this machine") + continue() + endif () + + get_module_attribute_default(${path} is_default_module) + create_option_name(${name} optionName) + option(${optionName} "Build ${path} Module" ${is_default_module}) + + if (${optionName}) + list(APPEND enabled_module_names ${name}) + list(APPEND enabled_module_paths ${path}) + endif () +endforeach () + + +# +# Step 3: For each module that is default or enabled by the user, get the dependencies +# +set(dependencies "") +list(LENGTH enabled_module_names enabled_module_count) +if (${enabled_module_count} EQUAL 0) + message(STATUS "No modules selected") + return() +endif () +math(EXPR enabled_module_count "${enabled_module_count} - 1") +foreach (val RANGE ${enabled_module_count}) + list(GET enabled_module_names ${val} name) + list(GET enabled_module_paths ${val} path) + + get_recursive_dependencies( + ${name} ${path} + "${all_module_names}" "${all_module_paths}" + deps +) + + set(dependencies ${dependencies} ${deps}) +endforeach() + +# We can remove the duplicates here. We constructed the list such that nested +# dependencies are order left to right. REMOVE_DUPLICATES will keep the left most +# value in the case of duplicates, so that will still work +list(REMOVE_DUPLICATES dependencies) + + +# +# Step 4: Check each dependency and set it, if necessary +# +foreach (dep ${dependencies}) + create_option_name(${dep} optionName) + if (NOT ${optionName}) + set(${optionName} ON CACHE BOOL "Build ${dep} Module" FORCE) + message(STATUS "Due to dependencies, the '${dep}' was enabled") + + find_path_for_module(${dep} "${all_module_names}" "${all_module_paths}" path) + list(APPEND enabled_module_names ${dep}) + list(APPEND enabled_module_paths ${path}) + endif () +endforeach () + +# Print all the enabled modules +message(STATUS "Enabled modules:") +list(LENGTH enabled_module_names enabled_module_count) +math(EXPR enabled_module_count "${enabled_module_count} - 1") +foreach (val RANGE ${enabled_module_count}) + list(GET enabled_module_names ${val} name) + list(GET enabled_module_paths ${val} path) + + message(STATUS "\t${name} (${path})") +endforeach () + + +# +# Step 5: Add the subdirectories of all enabled modules +# +add_library(openspace-module-collection INTERFACE) +set(module_class_names "") +set(module_external_libraries "") +foreach (val RANGE ${enabled_module_count}) + list(GET enabled_module_names ${val} name) + list(GET enabled_module_paths ${val} path) + + create_library_name(${name} library_name) + list(APPEND all_enabled_modules "${library_name}") + begin_header("Module ${name} (${library_name})") + add_subdirectory(${path}) + end_header("End: Module ${name}") + message(STATUS "") + + target_link_libraries(openspace-module-collection INTERFACE ${library_name}) + + # This is just a hack as a dependency from kameleon->core has been introduced that + # should be removed + if (${library_name} STREQUAL "openspace-module-kameleon") + cmake_policy(SET CMP0079 NEW) + target_link_libraries(openspace-core PRIVATE openspace-module-kameleon) + endif () + + create_define_name(${name} define_name) + target_compile_definitions(openspace-module-collection INTERFACE "${define_name}") + + get_property(class_name GLOBAL PROPERTY CurrentModuleClassName) + list(APPEND module_class_names ${class_name}) + + get_property(ext_lib GLOBAL PROPERTY CurrentModuleExternalLibraries) + list(APPEND module_external_libraries ${ext_lib}) +endforeach () + +list(REMOVE_DUPLICATES module_external_libraries) +add_external_library_dependencies("${module_external_libraries}") + + +# +# Step 6: Create the moduleregistration.h file with the header file paths, class +# names and the external module paths. +# The class list needs to be topologically sorted, based on +# the dependency graph, in order to guarantee that modules are +# initialized after their dependencies. +# + +# We generate a list of the names of the enabled modules taking +# the topologically sorted dependencies and adding the rest of the modules. +# REMOVE_DUPLICATES will keep the left most value in the case of duplicates +set(topologically_sorted ${dependencies} ${enabled_module_names}) +list(REMOVE_DUPLICATES topologically_sorted) + +set(MODULE_HEADERS "") +set(MODULE_CLASSES "") +set(MODULE_PATHS "") + +foreach (key RANGE ${enabled_module_count}) + list(GET topologically_sorted ${key} name) + list(FIND enabled_module_names ${name} val) + + list(GET enabled_module_paths ${val} path) + list(GET module_class_names ${val} class_name) + + string(TOUPPER ${name} module_upper) + string(TOLOWER ${name} module_lower) + + create_module_header_filepath(${name} ${path} header_filepath) + + list(APPEND MODULE_HEADERS "#include <${header_filepath}>\n") + list(APPEND MODULE_CLASSES " new ${class_name},\n") +endforeach () + +get_unique_include_paths( + "${enabled_module_paths}" + "${internal_module_path}" + module_paths +) + +foreach (path ${module_paths}) + list(APPEND MODULE_PATHS " \"${path}\",\n") + # The module path should include the 'modules' directory, which is removed for the + # include path to make all of the includes look the same + list(APPEND MODULE_PATHS " \"${path}/modules\",\n") + target_include_directories(openspace-module-collection PUBLIC ${path}) +endforeach () + +if (NOT "${MODULE_HEADERS}" STREQUAL "") + string(REPLACE ";" "" MODULE_HEADERS ${MODULE_HEADERS}) +endif () + +if (NOT "${MODULE_CLASSES}" STREQUAL "") + string(REPLACE ";" "" MODULE_CLASSES ${MODULE_CLASSES}) +endif () + +if (NOT "${MODULE_PATHS}" STREQUAL "") + string(REPLACE ";" "" MODULE_PATHS ${MODULE_PATHS}) + string(REPLACE "\\" "/" MODULE_PATHS ${MODULE_PATHS}) +endif () + +configure_file( + ${OPENSPACE_CMAKE_EXT_DIR}/module_registration.template + ${CMAKE_BINARY_DIR}/_generated/include/openspace/moduleregistration.h +) + +configure_file( + ${OPENSPACE_CMAKE_EXT_DIR}/module_path.template + ${CMAKE_BINARY_DIR}/_generated/include/openspace/modulepath.h +) + +# Return the list of enabled modules to the caller +set(all_enabled_modules ${all_enabled_modules} PARENT_SCOPE) diff --git a/modules/atmosphere/CMakeLists.txt b/modules/atmosphere/CMakeLists.txt index 68f88ebda5..1c7f7b5d5d 100644 --- a/modules/atmosphere/CMakeLists.txt +++ b/modules/atmosphere/CMakeLists.txt @@ -25,46 +25,46 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/atmospheredeferredcaster.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableatmosphere.h + rendering/atmospheredeferredcaster.h + rendering/renderableatmosphere.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/atmospheredeferredcaster.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableatmosphere.cpp + rendering/atmospheredeferredcaster.cpp + rendering/renderableatmosphere.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_common.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_fs.glsl + shaders/atmosphere_common.glsl + shaders/atmosphere_deferred_vs.glsl + shaders/atmosphere_deferred_fs.glsl + shaders/deltaE_calc_vs.glsl + shaders/deltaE_calc_fs.glsl + shaders/deltaJ_calc_vs.glsl + shaders/deltaJ_calc_fs.glsl + shaders/deltaJ_calc_gs.glsl + shaders/deltaS_calc_vs.glsl + shaders/deltaS_calc_gs.glsl + shaders/deltaS_calc_fs.glsl + shaders/deltaS_sup_calc_vs.glsl + shaders/deltaS_sup_calc_gs.glsl + shaders/deltaS_sup_calc_fs.glsl + shaders/inScattering_calc_vs.glsl + shaders/inScattering_calc_gs.glsl + shaders/inScattering_calc_fs.glsl + shaders/inScattering_sup_calc_vs.glsl + shaders/inScattering_sup_calc_gs.glsl + shaders/inScattering_sup_calc_fs.glsl + shaders/irradiance_calc_vs.glsl + shaders/irradiance_calc_fs.glsl + shaders/irradiance_final_vs.glsl + shaders/irradiance_final_fs.glsl + shaders/irradiance_sup_calc_vs.glsl + shaders/irradiance_sup_calc_fs.glsl + shaders/transmittance_calc_vs.glsl + shaders/transmittance_calc_fs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp index 00d9cd476a..c5a86c5172 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp @@ -284,7 +284,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData, _time, lt ); - glm::dvec4 sunPosObj = glm::dvec4(0.0); + glm::dvec4 sunPosObj; // Sun following camera position if (_sunFollowingCameraEnabled) { @@ -340,6 +340,15 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData, SceneGraphNode* casterNode = global::renderEngine->scene()->sceneGraphNode(caster); + if ((sourceNode == nullptr) || (casterNode == nullptr)) { + LERRORC( + "AtmosphereDeferredcaster", + "Invalid scenegraph node for the shadow's caster or shadow's " + "receiver." + ); + return; + } + const double sourceRadiusScale = std::max( glm::compMax(sourceNode->scale()), 1.0 @@ -350,15 +359,6 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData, 1.0 ); - if ((sourceNode == nullptr) || (casterNode == nullptr)) { - LERRORC( - "AtmosphereDeferredcaster", - "Invalid scenegraph node for the shadow's caster or shadow's " - "receiver." - ); - return; - } - // First we determine if the caster is shadowing the current planet // (all calculations in World Coordinates): glm::dvec3 planetCasterVec = diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index c4de1f58a9..2a0291a97d 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -275,8 +275,8 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) //================================================================ ghoul::Dictionary shadowDictionary; bool success = dictionary.getValue(KeyShadowGroup, shadowDictionary); - bool disableShadows = false; if (success) { + bool disableShadows = false; std::vector> sourceArray; unsigned int sourceCounter = 1; while (success) { @@ -351,10 +351,10 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) //================================================================ //========== Reads Atmosphere Entries from mod file ============== //================================================================ - bool errorReadingAtmosphereData = false; ghoul::Dictionary atmosphereDictionary; success = dictionary.getValue(keyAtmosphere, atmosphereDictionary); if (success) { + bool errorReadingAtmosphereData = false; if (!atmosphereDictionary.getValue(keyAtmosphereRadius, _atmosphereRadius)) { errorReadingAtmosphereData = true; LWARNINGC( diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt index 0a2c4b4d53..ed840fdc1e 100644 --- a/modules/base/CMakeLists.txt +++ b/modules/base/CMakeLists.txt @@ -25,129 +25,129 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemtext.h - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.h - ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.h - ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderableboxgrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderablegrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderableradialgrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderablesphericalgrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablelabels.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablenodeline.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/timelinerotation.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.h - ${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.h - ${CMAKE_CURRENT_SOURCE_DIR}/scale/nonuniformstaticscale.h - ${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.h - ${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.h - ${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.h - ${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/timelinetranslation.h + dashboard/dashboarditemangle.h + dashboard/dashboarditemdate.h + dashboard/dashboarditemdistance.h + dashboard/dashboarditemframerate.h + dashboard/dashboarditemmission.h + dashboard/dashboarditemparallelconnection.h + dashboard/dashboarditempropertyvalue.h + dashboard/dashboarditemsimulationincrement.h + dashboard/dashboarditemspacing.h + dashboard/dashboarditemtext.h + dashboard/dashboarditemvelocity.h + lightsource/cameralightsource.h + lightsource/scenegraphlightsource.h + rendering/modelgeometry.h + rendering/multimodelgeometry.h + rendering/grids/renderableboxgrid.h + rendering/grids/renderablegrid.h + rendering/grids/renderableradialgrid.h + rendering/grids/renderablesphericalgrid.h + rendering/renderablecartesianaxes.h + rendering/renderablelabels.h + rendering/renderablemodel.h + rendering/renderablenodeline.h + rendering/renderableplane.h + rendering/renderableplaneimagelocal.h + rendering/renderableplaneimageonline.h + rendering/renderablesphere.h + rendering/renderabletrail.h + rendering/renderabletrailorbit.h + rendering/renderabletrailtrajectory.h + rendering/screenspacedashboard.h + rendering/screenspaceframebuffer.h + rendering/screenspaceimagelocal.h + rendering/screenspaceimageonline.h + rotation/timelinerotation.h + rotation/constantrotation.h + rotation/fixedrotation.h + rotation/luarotation.h + rotation/staticrotation.h + scale/luascale.h + scale/nonuniformstaticscale.h + scale/staticscale.h + scale/timedependentscale.h + timeframe/timeframeinterval.h + timeframe/timeframeunion.h + translation/luatranslation.h + translation/statictranslation.h + translation/timelinetranslation.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemtext.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderableboxgrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderablegrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderableradialgrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/grids/renderablesphericalgrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablelabels.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablenodeline.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/timelinerotation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/scale/nonuniformstaticscale.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/timelinetranslation.cpp + dashboard/dashboarditemangle.cpp + dashboard/dashboarditemdate.cpp + dashboard/dashboarditemdistance.cpp + dashboard/dashboarditemframerate.cpp + dashboard/dashboarditemmission.cpp + dashboard/dashboarditemparallelconnection.cpp + dashboard/dashboarditempropertyvalue.cpp + dashboard/dashboarditemsimulationincrement.cpp + dashboard/dashboarditemspacing.cpp + dashboard/dashboarditemtext.cpp + dashboard/dashboarditemvelocity.cpp + lightsource/cameralightsource.cpp + lightsource/scenegraphlightsource.cpp + rendering/modelgeometry.cpp + rendering/multimodelgeometry.cpp + rendering/grids/renderableboxgrid.cpp + rendering/grids/renderablegrid.cpp + rendering/grids/renderableradialgrid.cpp + rendering/grids/renderablesphericalgrid.cpp + rendering/renderablecartesianaxes.cpp + rendering/renderablelabels.cpp + rendering/renderablemodel.cpp + rendering/renderablenodeline.cpp + rendering/renderableplane.cpp + rendering/renderableplaneimagelocal.cpp + rendering/renderableplaneimageonline.cpp + rendering/renderablesphere.cpp + rendering/renderabletrail.cpp + rendering/renderabletrailorbit.cpp + rendering/renderabletrailtrajectory.cpp + rendering/screenspacedashboard.cpp + rendering/screenspaceframebuffer.cpp + rendering/screenspaceimagelocal.cpp + rendering/screenspaceimageonline.cpp + rotation/timelinerotation.cpp + rotation/constantrotation.cpp + rotation/fixedrotation.cpp + rotation/luarotation.cpp + rotation/staticrotation.cpp + scale/luascale.cpp + scale/nonuniformstaticscale.cpp + scale/staticscale.cpp + scale/timedependentscale.cpp + timeframe/timeframeinterval.cpp + timeframe/timeframeunion.cpp + translation/luatranslation.cpp + translation/statictranslation.cpp + translation/timelinetranslation.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/line_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/line_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_vs.glsl + shaders/axes_fs.glsl + shaders/axes_vs.glsl + shaders/grid_vs.glsl + shaders/grid_fs.glsl + shaders/imageplane_fs.glsl + shaders/imageplane_vs.glsl + shaders/line_fs.glsl + shaders/line_vs.glsl + shaders/model_fs.glsl + shaders/model_vs.glsl + shaders/plane_fs.glsl + shaders/plane_vs.glsl + shaders/renderabletrail_fs.glsl + shaders/renderabletrail_vs.glsl + shaders/screenspace_fs.glsl + shaders/screenspace_vs.glsl + shaders/sphere_fs.glsl + shaders/sphere_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/base/dashboard/dashboarditemangle.cpp b/modules/base/dashboard/dashboarditemangle.cpp index 103ce82d57..d4457ac5b4 100644 --- a/modules/base/dashboard/dashboarditemangle.cpp +++ b/modules/base/dashboard/dashboarditemangle.cpp @@ -353,7 +353,7 @@ void DashboardItemAngle::render(glm::vec2& penPosition) { const glm::dvec3 a = referenceInfo.first - sourceInfo.first; const glm::dvec3 b = destinationInfo.first - sourceInfo.first; - std::fill(_buffer.begin(), _buffer.end(), 0); + std::fill(_buffer.begin(), _buffer.end(), char(0)); if (glm::length(a) == 0.0 || glm::length(b) == 0) { char* end = fmt::format_to( _buffer.data(), diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index 38632b97ee..f806f22a90 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -173,6 +173,7 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary : DashboardTextItem(dictionary) , _doSimplification(SimplificationInfo, true) , _requestedUnit(RequestedUnitInfo, properties::OptionProperty::DisplayType::Dropdown) + , _formatString(FormatStringInfo, "Distance from {} to {}: {:f} {}") , _source{ properties::OptionProperty( SourceTypeInfo, @@ -189,7 +190,6 @@ DashboardItemDistance::DashboardItemDistance(const ghoul::Dictionary& dictionary properties::StringProperty(DestinationNodeNameInfo), nullptr } - , _formatString(FormatStringInfo, "Distance from {} to {}: {:f} {}") { documentation::testSpecificationAndThrow( Documentation(), @@ -358,7 +358,7 @@ std::pair DashboardItemDistance::positionAndLabel( return { mainComp.node->worldPosition(), mainComp.node->guiName() }; case Type::NodeSurface: { - glm::dvec3 otherPos = glm::dvec3(0.0); + glm::dvec3 otherPos; if (otherComp.type == Type::NodeSurface) { // We are only interested in the direction, and we want to prevent // infinite recursion @@ -414,7 +414,7 @@ void DashboardItemDistance::render(glm::vec2& penPosition) { dist = { convertedD, nameForDistanceUnit(unit, convertedD != 1.0) }; } - std::fill(_buffer.begin(), _buffer.end(), 0); + std::fill(_buffer.begin(), _buffer.end(), char(0)); try { char* end = fmt::format_to( _buffer.data(), diff --git a/modules/base/dashboard/dashboarditemframerate.cpp b/modules/base/dashboard/dashboarditemframerate.cpp index 1f38996ffb..93e20cd280 100644 --- a/modules/base/dashboard/dashboarditemframerate.cpp +++ b/modules/base/dashboard/dashboarditemframerate.cpp @@ -247,7 +247,7 @@ void DashboardItemFramerate::render(glm::vec2& penPosition) { FrametimeType frametimeType = FrametimeType(_frametimeType.value()); - std::fill(_buffer.begin(), _buffer.end(), 0); + std::fill(_buffer.begin(), _buffer.end(), char(0)); char* end = format( _buffer, frametimeType, diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index 8d2d1e3cad..24bf02adf9 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -75,15 +75,14 @@ void DashboardItemParallelConnection::render(glm::vec2& penPosition) { if (status == ParallelConnection::Status::ClientWithHost || status == ParallelConnection::Status::ClientWithoutHost) { - constexpr const char* Singular = "You and {} more client are tuned in"; - constexpr const char* Plural = "You and {} more clients are tuned in"; - connectionInfo += "\n"; if (nClients > 2) { + constexpr const char* Plural = "You and {} more clients are tuned in"; connectionInfo += fmt::format(Plural, nClients - 1); } else if (nClients == 2) { + constexpr const char* Singular = "You and {} more client are tuned in"; connectionInfo += fmt::format(Singular, nClients - 1); } else if (nClients == 1) { @@ -128,14 +127,13 @@ glm::vec2 DashboardItemParallelConnection::size() const { if (status == ParallelConnection::Status::ClientWithHost || status == ParallelConnection::Status::ClientWithoutHost) { - constexpr const char* Singular = "You and {} more client are tuned in"; - constexpr const char* Plural = "You and {} more clients are tuned in"; - connectionInfo += "\n"; if (nClients > 2) { + constexpr const char* Plural = "You and {} more clients are tuned in"; connectionInfo += fmt::format(Plural, nClients); } else if (nClients == 2) { + constexpr const char* Singular = "You and {} more client are tuned in"; connectionInfo += fmt::format(Singular, nClients - 1); } else if (nClients == 1) { diff --git a/modules/base/rendering/renderablelabels.cpp b/modules/base/rendering/renderablelabels.cpp index efadca6ec9..8cd8f806eb 100644 --- a/modules/base/rendering/renderablelabels.cpp +++ b/modules/base/rendering/renderablelabels.cpp @@ -601,11 +601,6 @@ bool RenderableLabels::isReady() const { void RenderableLabels::initialize() { ZoneScoped - bool success = true;// loadData(); - if (!success) { - throw ghoul::RuntimeError("Error loading objects labels data."); - } - setRenderBin(Renderable::RenderBin::PreDeferredTransparent); } diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index 6ebf88d97c..d23501759d 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -569,7 +569,11 @@ glm::dmat3 FixedRotation::matrix(const UpdateData&) const { { LWARNINGC( "FixedRotation", - fmt::format("Near-collinear vectors detected: x ({}) y ({}) z ({})", x, y, z) + fmt::format( + "Near-collinear vectors detected: " + "x ({}, {}, {}) y ({}, {}, {}) z ({}, {}, {})", + x.x, x.y, x.z, y.x, y.y, y.z, z.x, z.y, z.z + ) ); return glm::dmat3(); } diff --git a/modules/cefwebgui/CMakeLists.txt b/modules/cefwebgui/CMakeLists.txt index 0fcab73536..35c27003c4 100644 --- a/modules/cefwebgui/CMakeLists.txt +++ b/modules/cefwebgui/CMakeLists.txt @@ -41,8 +41,6 @@ set(OPENSPACE_SOURCE_FILES ) source_group("Source Files" FILES ${OPENSPACE_SOURCE_FILES}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - create_new_module( CefWebGui cefwebgui_module diff --git a/modules/cefwebgui/include.cmake b/modules/cefwebgui/include.cmake index 188c9c1068..d904a7eb24 100644 --- a/modules/cefwebgui/include.cmake +++ b/modules/cefwebgui/include.cmake @@ -7,6 +7,4 @@ endif () set(OPENSPACE_DEPENDENCIES webbrowser - webgui - server ) diff --git a/modules/debugging/CMakeLists.txt b/modules/debugging/CMakeLists.txt index 41dfdd2605..5c976e673c 100644 --- a/modules/debugging/CMakeLists.txt +++ b/modules/debugging/CMakeLists.txt @@ -25,20 +25,20 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugrenderer.h + rendering/renderabledebugplane.h + rendering/debugrenderer.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledebugplane.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugrenderer.cpp + rendering/renderabledebugplane.cpp + rendering/debugrenderer.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugshader_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/debugshader_fs.glsl + rendering/debugshader_vs.glsl + rendering/debugshader_fs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/debugging/rendering/debugrenderer.cpp b/modules/debugging/rendering/debugrenderer.cpp index 56058fe9eb..b06854cffc 100644 --- a/modules/debugging/rendering/debugrenderer.cpp +++ b/modules/debugging/rendering/debugrenderer.cpp @@ -225,24 +225,4 @@ void DebugRenderer::renderCameraFrustum(const RenderData& data, const Camera& ot glEnable(GL_CULL_FACE); } -#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED -const DebugRenderer::Vertices DebugRenderer::verticesFor( - const globebrowsing::AABB3& screenSpaceAABB) const -{ - Vertices vertices(8); - for (size_t i = 0; i < 8; i++) { - const bool cornerIsRight = i % 2 == 0; - const bool cornerIsUp = i > 3; - const bool cornerIsFar = (i / 2) % 2 == 1; - - const double x = cornerIsRight ? screenSpaceAABB.max.x : screenSpaceAABB.min.x; - const double y = cornerIsUp ? screenSpaceAABB.max.y : screenSpaceAABB.min.y; - const double z = cornerIsFar ? screenSpaceAABB.max.z : screenSpaceAABB.min.z; - - vertices[i] = glm::vec4(x, y, z, 1); - } - return vertices; -} -#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED - } // namespace openspace diff --git a/modules/debugging/rendering/debugrenderer.h b/modules/debugging/rendering/debugrenderer.h index 37729510e7..310f1cdcb7 100644 --- a/modules/debugging/rendering/debugrenderer.h +++ b/modules/debugging/rendering/debugrenderer.h @@ -27,10 +27,6 @@ #include -#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED -#include -#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED - #include #include #include @@ -132,15 +128,6 @@ public: void renderCameraFrustum(const RenderData& data, const Camera& otherCamera, const glm::vec4& rgba = { 1.f, 1.f, 1.f, 0.3f }) const; -#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED - /** - * Takes a AABB3 in screen space and returns vertices representing the corner points - * of the AABB. The ordering of the corner points is compatible with the box - * rendering methods in this class. - */ - const Vertices verticesFor(const globebrowsing::AABB3& screenSpaceAABB) const; -#endif // OPENSPACE_MODULE_GLOBEBROWSING_ENABLED - protected: std::unique_ptr _programObject; diff --git a/modules/digitaluniverse/CMakeLists.txt b/modules/digitaluniverse/CMakeLists.txt index e2f68ab6fa..070b876aa0 100644 --- a/modules/digitaluniverse/CMakeLists.txt +++ b/modules/digitaluniverse/CMakeLists.txt @@ -25,38 +25,38 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablepoints.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledumeshes.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablebillboardscloud.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanescloud.h + rendering/renderablepoints.h + rendering/renderabledumeshes.h + rendering/renderablebillboardscloud.h + rendering/renderableplanescloud.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablepoints.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledumeshes.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablebillboardscloud.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanescloud.cpp + rendering/renderablepoints.cpp + rendering/renderabledumeshes.cpp + rendering/renderablebillboardscloud.cpp + rendering/renderableplanescloud.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/pointssprite_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/pointssprite_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_sprite_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboardpolygon_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboardpolygon_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboardpolygon_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/dumesh_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/dumesh_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_fs.glsl + shaders/pointssprite_fs.glsl + shaders/pointssprite_vs.glsl + shaders/points_sprite_fs.glsl + shaders/points_fs.glsl + shaders/points_gs.glsl + shaders/points_vs.glsl + shaders/billboard_fs.glsl + shaders/billboard_gs.glsl + shaders/billboard_vs.glsl + shaders/billboardpolygon_fs.glsl + shaders/billboardpolygon_gs.glsl + shaders/billboardpolygon_vs.glsl + shaders/dumesh_vs.glsl + shaders/dumesh_fs.glsl + shaders/plane_vs.glsl + shaders/plane_fs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index c4fc3bc78a..61d94610f2 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -1208,7 +1208,7 @@ void RenderableBillboardsCloud::update(const UpdateData&) { ZoneScopedN("Sprite texture") TracyGpuZone("Sprite texture") - ghoul::opengl::Texture* t = _spriteTexture; + ghoul::opengl::Texture* texture = _spriteTexture; unsigned int hash = ghoul::hashCRC32File(_spriteTexturePath); @@ -1225,7 +1225,7 @@ void RenderableBillboardsCloud::update(const UpdateData&) { } ); - DigitalUniverseModule::TextureManager.release(t); + DigitalUniverseModule::TextureManager.release(texture); _spriteTextureIsDirty = false; } } diff --git a/modules/exoplanets/CMakeLists.txt b/modules/exoplanets/CMakeLists.txt index fff4edca01..e3a77cc7b1 100644 --- a/modules/exoplanets/CMakeLists.txt +++ b/modules/exoplanets/CMakeLists.txt @@ -25,25 +25,25 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/exoplanetshelper.h - ${CMAKE_CURRENT_SOURCE_DIR}/exoplanetsmodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableorbitdisc.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/exoplanetsdatapreparationtask.h + exoplanetshelper.h + exoplanetsmodule.h + rendering/renderableorbitdisc.h + tasks/exoplanetsdatapreparationtask.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/exoplanetshelper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/exoplanetsmodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/exoplanetsmodule_lua.inl - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableorbitdisc.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/exoplanetsdatapreparationtask.cpp + exoplanetshelper.cpp + exoplanetsmodule.cpp + exoplanetsmodule_lua.inl + rendering/renderableorbitdisc.cpp + tasks/exoplanetsdatapreparationtask.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/orbitdisc_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/orbitdisc_vs.glsl + shaders/orbitdisc_fs.glsl + shaders/orbitdisc_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 8456c34c36..e2ca007a22 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -120,7 +120,7 @@ ExoplanetSystem findExoplanetSystemInData(std::string_view starName) { } system.starName = starName; - return std::move(system); + return system; } void createExoplanetSystem(const std::string& starName) { diff --git a/modules/fieldlines/CMakeLists.txt b/modules/fieldlines/CMakeLists.txt index 9a887da930..c252250bd7 100644 --- a/modules/fieldlines/CMakeLists.txt +++ b/modules/fieldlines/CMakeLists.txt @@ -25,19 +25,19 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.h + rendering/renderablefieldlines.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.cpp + rendering/renderablefieldlines.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_gs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_vs.glsl + shaders/fieldline_fs.glsl + shaders/fieldline_gs.glsl + shaders/fieldline_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/fieldlines/include.cmake b/modules/fieldlines/include.cmake deleted file mode 100644 index 947e563af0..0000000000 --- a/modules/fieldlines/include.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set (OPENSPACE_DEPENDENCIES - kameleon - space -) \ No newline at end of file diff --git a/modules/fieldlinessequence/CMakeLists.txt b/modules/fieldlinessequence/CMakeLists.txt index 9af2549997..19e66c8f97 100644 --- a/modules/fieldlinessequence/CMakeLists.txt +++ b/modules/fieldlinessequence/CMakeLists.txt @@ -25,24 +25,24 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlinessequence.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/fieldlinesstate.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/commons.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/kameleonfieldlinehelper.h + rendering/renderablefieldlinessequence.h + util/fieldlinesstate.h + util/commons.h + util/kameleonfieldlinehelper.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlinessequence.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/fieldlinesstate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/commons.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/kameleonfieldlinehelper.cpp + rendering/renderablefieldlinessequence.cpp + util/fieldlinesstate.cpp + util/commons.cpp + util/kameleonfieldlinehelper.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldlinessequence_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldlinessequence_fs.glsl + shaders/fieldlinessequence_vs.glsl + shaders/fieldlinessequence_fs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/fieldlinessequence/include.cmake b/modules/fieldlinessequence/include.cmake index a746e4569e..f6e8111e4e 100644 --- a/modules/fieldlinessequence/include.cmake +++ b/modules/fieldlinessequence/include.cmake @@ -1,3 +1,3 @@ set (OPENSPACE_DEPENDENCIES - space + kameleon ) diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index 00b57c7e3d..54e904484a 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -221,7 +221,7 @@ namespace { Invalid }; - float stringToFloat(const std::string input, const float backupValue = 0.f) { + float stringToFloat(const std::string& input, float backupValue = 0.f) { float tmp; try { tmp = std::stof(input); diff --git a/modules/fitsfilereader/CMakeLists.txt b/modules/fitsfilereader/CMakeLists.txt index a95eebce93..1532a9e1b6 100644 --- a/modules/fitsfilereader/CMakeLists.txt +++ b/modules/fitsfilereader/CMakeLists.txt @@ -26,14 +26,14 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/fitsfilereadermodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/fitsfilereader.h + fitsfilereadermodule.h + include/fitsfilereader.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/fitsfilereadermodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/fitsfilereader.cpp + fitsfilereadermodule.cpp + src/fitsfilereader.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) @@ -62,5 +62,5 @@ set(CCfits_BUILD_SHARED_LIBS OFF) disable_external_warnings(cfitsio) disable_external_warnings(CCfits) -target_include_directories(${MODULE_NAME} SYSTEM PUBLIC ${INCLUDES_FOR_TARGET}) -target_link_libraries(${MODULE_NAME} PRIVATE CCfits) +target_include_directories(openspace-module-fitsfilereader SYSTEM PRIVATE ${INCLUDES_FOR_TARGET}) +target_link_libraries(openspace-module-fitsfilereader PRIVATE cfitsio CCfits) diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index 8d978d718a..0ec6aa60f8 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -28,9 +28,22 @@ #include #include #include -#include #include +#ifdef WIN32 +#pragma warning (push) +#pragma warning (disable : 4100) // unreferenced formal parameter +#pragma warning (disable : 4267) // conversion from 'size_t' to 'int' +#pragma warning (disable : 4456) // declaration of 'col' hides previous local declaration +#endif // WIN32 + +#include + +#ifdef WIN32 +#pragma warning (pop) +#endif // WIN32 + + using namespace CCfits; namespace { @@ -616,9 +629,9 @@ std::vector FitsFileReader::readSpeckFile(const std::string& filePath, // RenderableGaiaStars expects kiloParsec (because fits file from Vienna had // in kPc). // Thus we need to convert positions twice atm. - renderValues[0] = readValues[0] / 1000.0; // PosX - renderValues[1] = readValues[1] / 1000.0; // PosY - renderValues[2] = readValues[2] / 1000.0; // PosZ + renderValues[0] = readValues[0] / 1000.f; // PosX + renderValues[1] = readValues[1] / 1000.f; // PosY + renderValues[2] = readValues[2] / 1000.f; // PosZ renderValues[3] = readValues[6]; // AbsMag renderValues[4] = readValues[3]; // color renderValues[5] = readValues[13] * readValues[16]; // Vel X diff --git a/modules/gaia/CMakeLists.txt b/modules/gaia/CMakeLists.txt index 782b9ced23..f1cfcf3843 100644 --- a/modules/gaia/CMakeLists.txt +++ b/modules/gaia/CMakeLists.txt @@ -25,41 +25,41 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/gaiamodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablegaiastars.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/octreemanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/octreeculler.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readfilejob.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readfitstask.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readspecktask.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/constructoctreetask.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/gaiaoptions.h + gaiamodule.h + rendering/renderablegaiastars.h + rendering/octreemanager.h + rendering/octreeculler.h + tasks/readfilejob.h + tasks/readfitstask.h + tasks/readspecktask.h + tasks/constructoctreetask.h + rendering/gaiaoptions.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/gaiamodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablegaiastars.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/octreemanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/octreeculler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readfilejob.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readfitstask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/readspecktask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/constructoctreetask.cpp + gaiamodule.cpp + rendering/renderablegaiastars.cpp + rendering/octreemanager.cpp + rendering/octreeculler.cpp + tasks/readfilejob.cpp + tasks/readfitstask.cpp + tasks/readspecktask.cpp + tasks/constructoctreetask.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_vbo_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_ssbo_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_billboard_nofbo_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_billboard_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_billboard_ge.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_point_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_point_ge.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_tonemapping_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_tonemapping_point_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/gaia_tonemapping_billboard_fs.glsl + shaders/gaia_vbo_vs.glsl + shaders/gaia_ssbo_vs.glsl + shaders/gaia_billboard_nofbo_fs.glsl + shaders/gaia_billboard_fs.glsl + shaders/gaia_billboard_ge.glsl + shaders/gaia_point_fs.glsl + shaders/gaia_point_ge.glsl + shaders/gaia_tonemapping_vs.glsl + shaders/gaia_tonemapping_point_fs.glsl + shaders/gaia_tonemapping_billboard_fs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/gaia/include.cmake b/modules/gaia/include.cmake index 98bffaa6bf..a3db024daf 100644 --- a/modules/gaia/include.cmake +++ b/modules/gaia/include.cmake @@ -2,5 +2,4 @@ set(DEFAULT_MODULE ON) set(OPENSPACE_DEPENDENCIES fitsfilereader - globebrowsing ) diff --git a/modules/gaia/rendering/octreemanager.cpp b/modules/gaia/rendering/octreemanager.cpp index 5b56c62816..6c35ccc461 100644 --- a/modules/gaia/rendering/octreemanager.cpp +++ b/modules/gaia/rendering/octreemanager.cpp @@ -407,7 +407,7 @@ std::map> OctreeManager::traverseData(const glm::dmat4& removedKey != _removedKeysInPrevCall.rend(); ++removedKey) { // Uses a reverse loop to try to decrease the biggest chunk. - if (*removedKey == _biggestChunkIndexInUse - 1) { + if (*removedKey == static_cast(_biggestChunkIndexInUse) - 1) { _biggestChunkIndexInUse = *removedKey; LDEBUG(fmt::format( "Decreased size to: {} Free Spots in VBO: {}", @@ -611,7 +611,7 @@ int OctreeManager::readFromFile(std::ifstream& inFileStream, bool readData, )); // Octree Manager root halfDistance must be updated before any nodes are created! - if (MAX_DIST != oldMaxdist) { + if (static_cast(MAX_DIST) != oldMaxdist) { for (size_t i = 0; i < 8; ++i) { _root->Children[i]->halfDimension = MAX_DIST / 2.f; _root->Children[i]->originX = (i % 2 == 0) ? @@ -963,7 +963,7 @@ bool OctreeManager::insertInNode(OctreeNode& node, const std::vector& sta // Node is a leaf and it's not yet full -> insert star. storeStarData(node, starValues); - if (depth > _totalDepth) { + if (depth > static_cast(_totalDepth)) { _totalDepth = depth; } return true; @@ -1355,7 +1355,7 @@ bool OctreeManager::updateBufferIndex(OctreeNode& node) { if (_freeSpotsInBuffer.empty()) { _biggestChunkIndexInUse++; } - else if (_freeSpotsInBuffer.top() > _biggestChunkIndexInUse) { + else if (_freeSpotsInBuffer.top() > static_cast(_biggestChunkIndexInUse)) { _biggestChunkIndexInUse = _freeSpotsInBuffer.top(); } return true; diff --git a/modules/gaia/tasks/readfilejob.cpp b/modules/gaia/tasks/readfilejob.cpp index bf116931d7..fe102d9629 100644 --- a/modules/gaia/tasks/readfilejob.cpp +++ b/modules/gaia/tasks/readfilejob.cpp @@ -203,9 +203,15 @@ void ReadFileJob::execute() { float radVelZ = 1000.f * radial_vel[i] * rGal.z; // Use Pythagoras theorem for the final Space Velocity [m/s]. - values[idx++] = sqrt(pow(radVelX, 2) + pow(tanVelX, 2)); // Vel X [U] - values[idx++] = sqrt(pow(radVelY, 2) + pow(tanVelY, 2)); // Vel Y [V] - values[idx++] = sqrt(pow(radVelZ, 2) + pow(tanVelZ, 2)); // Vel Z [W] + values[idx++] = static_cast( + std::sqrt(std::pow(radVelX, 2) + std::pow(tanVelX, 2)) // Vel X [U] + ); + values[idx++] = static_cast( + std::sqrt(std::pow(radVelY, 2) + std::pow(tanVelY, 2)) // Vel Y [V] + ); + values[idx++] = static_cast( + std::sqrt(std::pow(radVelZ, 2) + std::pow(tanVelZ, 2)) // Vel Z [W] + ); } // Otherwise use the vector [m/s] we got from proper motion. else { diff --git a/modules/galaxy/CMakeLists.txt b/modules/galaxy/CMakeLists.txt index 065f3971bc..6115cc655b 100644 --- a/modules/galaxy/CMakeLists.txt +++ b/modules/galaxy/CMakeLists.txt @@ -25,33 +25,35 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/galaxymodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/galaxyraycaster.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablegalaxy.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/milkywayconversiontask.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/milkywaypointsconversiontask.h + galaxymodule.h + rendering/galaxyraycaster.h + rendering/renderablegalaxy.h + tasks/milkywayconversiontask.h + tasks/milkywaypointsconversiontask.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/galaxymodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/galaxyraycaster.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablegalaxy.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/milkywayconversiontask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/milkywaypointsconversiontask.cpp + galaxymodule.cpp + rendering/galaxyraycaster.cpp + rendering/renderablegalaxy.cpp + tasks/milkywayconversiontask.cpp + tasks/milkywaypointsconversiontask.cpp ) + source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/galaxyraycast.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/billboard_ge.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/points_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/raycasterbounds_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/raycasterbounds_vs.glsl + shaders/galaxyraycast.glsl + shaders/billboard_vs.glsl + shaders/billboard_fs.glsl + shaders/billboard_ge.glsl + shaders/points_fs.glsl + shaders/points_vs.glsl + shaders/raycasterbounds_fs.glsl + shaders/raycasterbounds_vs.glsl ) + source_group("Shader Files" FILES ${SHADER_FILES}) create_new_module( diff --git a/modules/galaxy/include.cmake b/modules/galaxy/include.cmake index 586a4f7717..ffea0ac430 100644 --- a/modules/galaxy/include.cmake +++ b/modules/galaxy/include.cmake @@ -1,6 +1 @@ set(DEFAULT_MODULE ON) - -set (OPENSPACE_DEPENDENCIES - volume - space -) \ No newline at end of file diff --git a/modules/galaxy/rendering/galaxyraycaster.cpp b/modules/galaxy/rendering/galaxyraycaster.cpp index 3faa00b483..65f5b8c86e 100644 --- a/modules/galaxy/rendering/galaxyraycaster.cpp +++ b/modules/galaxy/rendering/galaxyraycaster.cpp @@ -100,7 +100,6 @@ glm::dmat4 GalaxyRaycaster::modelViewTransform(const RenderData& data) { void GalaxyRaycaster::preRaycast(const RaycastData& data, ghoul::opengl::ProgramObject& program) { - const std::string colorUniformName = "color" + std::to_string(data.id); const std::string stepSizeUniformName = "maxStepSize" + std::to_string(data.id); const std::string galaxyTextureUniformName = "galaxyTexture" + std::to_string(data.id); diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index a609917a01..f42a83bf5b 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -25,86 +25,85 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/globebrowsingmodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/asynctiledataprovider.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/basictypes.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/dashboarditemglobelocation.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/ellipsoid.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/gdalwrapper.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/geodeticpatch.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/globelabelscomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/globetranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/gpulayergroup.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layer.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layeradjustment.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layergroup.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layergroupid.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layermanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/layerrendersettings.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/lrucache.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/lrucache.inl - ${CMAKE_CURRENT_SOURCE_DIR}/src/lruthreadpool.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/lruthreadpool.inl - ${CMAKE_CURRENT_SOURCE_DIR}/src/memoryawaretilecache.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/prioritizingconcurrentjobmanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/prioritizingconcurrentjobmanager.inl - ${CMAKE_CURRENT_SOURCE_DIR}/src/rawtile.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/rawtiledatareader.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderableglobe.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/ringscomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/shadowcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/skirtedgrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileindex.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileloadjob.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileprovider.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/tiletextureinitdata.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/timequantizer.h + globebrowsingmodule.h + src/asynctiledataprovider.h + src/basictypes.h + src/dashboarditemglobelocation.h + src/ellipsoid.h + src/gdalwrapper.h + src/geodeticpatch.h + src/globelabelscomponent.h + src/globetranslation.h + src/gpulayergroup.h + src/layer.h + src/layeradjustment.h + src/layergroup.h + src/layergroupid.h + src/layermanager.h + src/layerrendersettings.h + src/lrucache.h + src/lrucache.inl + src/lruthreadpool.h + src/lruthreadpool.inl + src/memoryawaretilecache.h + src/prioritizingconcurrentjobmanager.h + src/prioritizingconcurrentjobmanager.inl + src/rawtile.h + src/rawtiledatareader.h + src/renderableglobe.h + src/ringscomponent.h + src/shadowcomponent.h + src/skirtedgrid.h + src/tileindex.h + src/tileloadjob.h + src/tileprovider.h + src/tiletextureinitdata.h + src/timequantizer.h ) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/globebrowsingmodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globebrowsingmodule_lua.inl - ${CMAKE_CURRENT_SOURCE_DIR}/src/asynctiledataprovider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/dashboarditemglobelocation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/ellipsoid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/gdalwrapper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/geodeticpatch.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/globelabelscomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/globetranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/gpulayergroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/layer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/layeradjustment.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/layergroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/layermanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/layerrendersettings.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/memoryawaretilecache.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/rawtile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/rawtiledatareader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderableglobe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/ringscomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/shadowcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/skirtedgrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileindex.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileloadjob.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/tileprovider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/tiletextureinitdata.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/timequantizer.cpp + globebrowsingmodule.cpp + globebrowsingmodule_lua.inl + src/asynctiledataprovider.cpp + src/dashboarditemglobelocation.cpp + src/ellipsoid.cpp + src/gdalwrapper.cpp + src/geodeticpatch.cpp + src/globelabelscomponent.cpp + src/globetranslation.cpp + src/gpulayergroup.cpp + src/layer.cpp + src/layeradjustment.cpp + src/layergroup.cpp + src/layermanager.cpp + src/layerrendersettings.cpp + src/memoryawaretilecache.cpp + src/rawtiledatareader.cpp + src/renderableglobe.cpp + src/ringscomponent.cpp + src/shadowcomponent.cpp + src/skirtedgrid.cpp + src/tileindex.cpp + src/tileloadjob.cpp + src/tileprovider.cpp + src/tiletextureinitdata.cpp + src/timequantizer.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/blending.hglsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/globalrenderer_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/localrenderer_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderer_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_geom_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_geom_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/texturetilemapping.hglsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/tile.hglsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/tileheight.hglsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/tilevertexskirt.hglsl + shaders/blending.hglsl + shaders/globalrenderer_vs.glsl + shaders/localrenderer_vs.glsl + shaders/renderer_fs.glsl + shaders/rings_vs.glsl + shaders/rings_fs.glsl + shaders/rings_geom_vs.glsl + shaders/rings_geom_fs.glsl + shaders/texturetilemapping.hglsl + shaders/tile.hglsl + shaders/tileheight.hglsl + shaders/tilevertexskirt.hglsl ) source_group("Shader Files" FILES ${SHADER_FILES}) @@ -119,28 +118,13 @@ create_new_module( install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/gdal_data DESTINATION modules/globebrowsing) if (WIN32) - target_include_directories( - openspace-module-globebrowsing - SYSTEM PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/include - ) - - target_link_libraries( - openspace-module-globebrowsing - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal_i.lib - ) + target_include_directories(openspace-module-globebrowsing SYSTEM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/include) + target_link_libraries(openspace-module-globebrowsing PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal_i.lib) register_external_libraries("${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal241.dll") else (WIN32) find_package(GDAL REQUIRED) - target_include_directories( - openspace-module-globebrowsing - SYSTEM PUBLIC - ${GDAL_INCLUDE_DIR} - ) - + target_include_directories(openspace-module-globebrowsing SYSTEM PRIVATE ${GDAL_INCLUDE_DIR}) target_link_libraries(openspace-module-globebrowsing PRIVATE ${GDAL_LIBRARY}) - mark_as_advanced(GDAL_CONFIG GDAL_INCLUDE_DIR GDAL_LIBRARY) endif () # WIN32 diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 1c49f7ae5e..b37cc025e9 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -121,12 +121,13 @@ namespace { Layer currentLayer; for (int i = 0; i < nSubdatasets; ++i) { int iDataset = -1; - static char IdentifierBuffer[64]; + std::array IdentifierBuffer; + std::fill(IdentifierBuffer.begin(), IdentifierBuffer.end(), '\0'); sscanf( subDatasets[i], - "SUBDATASET_%i_%[^=]", + "SUBDATASET_%i_%256[^=]", &iDataset, - IdentifierBuffer + IdentifierBuffer.data() ); @@ -137,7 +138,7 @@ namespace { currentLayerNumber = iDataset; } - const std::string identifier = std::string(IdentifierBuffer); + const std::string identifier = std::string(IdentifierBuffer.data()); const std::string ds(subDatasets[i]); const std::string value = ds.substr(ds.find_first_of('=') + 1); diff --git a/modules/globebrowsing/include.cmake b/modules/globebrowsing/include.cmake index 7f45a2d151..5667e647fb 100644 --- a/modules/globebrowsing/include.cmake +++ b/modules/globebrowsing/include.cmake @@ -1,6 +1,5 @@ -set (DEFAULT_MODULE ON) - set (OPENSPACE_DEPENDENCIES debugging - space -) \ No newline at end of file +) + +set (DEFAULT_MODULE ON) diff --git a/modules/globebrowsing/src/asynctiledataprovider.cpp b/modules/globebrowsing/src/asynctiledataprovider.cpp index 98f0e35161..654f6de1ce 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.cpp +++ b/modules/globebrowsing/src/asynctiledataprovider.cpp @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -48,7 +47,6 @@ AsyncTileDataProvider::AsyncTileDataProvider(std::string name, { ZoneScoped - _globeBrowsingModule = global::moduleEngine->module(); performReset(ResetRawTileDataReader::No); } diff --git a/modules/globebrowsing/src/asynctiledataprovider.h b/modules/globebrowsing/src/asynctiledataprovider.h index 00d8230749..c29b12874d 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.h +++ b/modules/globebrowsing/src/asynctiledataprovider.h @@ -33,8 +33,6 @@ #include #include -namespace openspace { class GlobeBrowsingModule; } - namespace openspace::globebrowsing { struct RawTile; @@ -103,7 +101,6 @@ protected: private: const std::string _name; - GlobeBrowsingModule* _globeBrowsingModule; /// The reader used for asynchronous reading std::unique_ptr _rawTileDataReader; diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.cpp b/modules/globebrowsing/src/dashboarditemglobelocation.cpp index cd19cfb440..1d2b460dee 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.cpp +++ b/modules/globebrowsing/src/dashboarditemglobelocation.cpp @@ -199,7 +199,7 @@ void DashboardItemGlobeLocation::render(glm::vec2& penPosition) { std::pair dist = simplifyDistance(altitude); - std::fill(_buffer.begin(), _buffer.end(), 0); + std::fill(_buffer.begin(), _buffer.end(), char(0)); char* end = fmt::format_to( _buffer.data(), _formatString.c_str(), diff --git a/modules/globebrowsing/src/gdalwrapper.cpp b/modules/globebrowsing/src/gdalwrapper.cpp index 054f3786fe..4f9399c81b 100644 --- a/modules/globebrowsing/src/gdalwrapper.cpp +++ b/modules/globebrowsing/src/gdalwrapper.cpp @@ -84,14 +84,6 @@ GdalWrapper& GdalWrapper::ref() { return *_singleton; } -int64_t GDALCacheUsed() { - return GDALGetCacheUsed64(); -} - -int64_t GDALMaximumCacheSize() { - return GDALGetCacheMax64(); -} - bool GdalWrapper::logGdalErrors() const { return _logGdalErrors; } diff --git a/modules/globebrowsing/src/gdalwrapper.h b/modules/globebrowsing/src/gdalwrapper.h index afbbe2d211..3da23381c5 100644 --- a/modules/globebrowsing/src/gdalwrapper.h +++ b/modules/globebrowsing/src/gdalwrapper.h @@ -51,18 +51,6 @@ public: static GdalWrapper& ref(); - /** - * Get the current size of the GDAL in memory cache. - * \returns the number of bytes currently in the GDAL memory cache. - */ - static int64_t GDALCacheUsed(); - - /** - * Get the maximum GDAL in memory cache size. - * \returns the maximum number of bytes allowed for the GDAL cache. - */ - static int64_t GDALMaximumCacheSize(); - bool logGdalErrors() const; private: diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 08e3c19a05..779dbd9947 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -524,9 +524,7 @@ bool GlobeLabelsComponent::readLabelsFile(const std::string& file) { strncpy(lEntry.feature, token.c_str(), 256); int tokenChar = 0; while (tokenChar < 256) { - if ((lEntry.feature[tokenChar] < 0 || lEntry.feature[tokenChar] > 127) && - lEntry.feature[tokenChar] != '\0') - { + if (lEntry.feature[tokenChar] < 0 && lEntry.feature[tokenChar] != '\0') { lEntry.feature[tokenChar] = '*'; } else if (lEntry.feature[tokenChar] == '\"') { diff --git a/modules/globebrowsing/src/rawtile.cpp b/modules/globebrowsing/src/rawtile.cpp deleted file mode 100644 index 9e626a2d61..0000000000 --- a/modules/globebrowsing/src/rawtile.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2020 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include - -namespace openspace::globebrowsing { - -RawTile createDefaultTile(TileTextureInitData initData) { - RawTile defaultRes; - std::byte* data = new std::byte[initData.totalNumBytes]; - defaultRes.imageData = std::unique_ptr(data); - std::fill_n(defaultRes.imageData.get(), initData.totalNumBytes, std::byte(0)); - defaultRes.textureInitData = std::move(initData); - return defaultRes; -} - -} // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/src/rawtile.h b/modules/globebrowsing/src/rawtile.h index d992466ff6..8360a582b6 100644 --- a/modules/globebrowsing/src/rawtile.h +++ b/modules/globebrowsing/src/rawtile.h @@ -55,8 +55,6 @@ struct RawTile { GLuint pbo = 0; }; -RawTile createDefaultTile(TileTextureInitData initData); - } // namespace openspace::globebrowsing #endif // __OPENSPACE_MODULE_GLOBEBROWSING___RAWTILE___H__ diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index 540fbc9795..26e926a963 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -946,7 +946,6 @@ TileMetaData RawTileDataReader::tileMetaData(RawTile& rawTile, std::fill(ppData.maxValues.begin(), ppData.maxValues.end(), -FLT_MAX); std::fill(ppData.minValues.begin(), ppData.minValues.end(), FLT_MAX); std::fill(ppData.hasMissingData.begin(), ppData.hasMissingData.end(), false); - std::vector noDataValues(_initData.nRasters, noDataValueAsFloat()); bool allIsMissing = true; for (int y = 0; y < region.numPixels.y; ++y) { diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index d8f8bbbcae..a58b9de396 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -123,12 +123,6 @@ namespace { "" // @TODO Missing documentation }; - constexpr openspace::properties::Property::PropertyInfo ShowChunkAABBInfo = { - "ShowChunkAABB", - "Show chunk AABB", - "" // @TODO Missing documentation - }; - constexpr openspace::properties::Property::PropertyInfo HeightResolutionInfo = { "ShowHeightResolution", "Show height resolution", @@ -524,7 +518,6 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) , _debugProperties({ BoolProperty(ShowChunkEdgeInfo, false), BoolProperty(ShowChunkBoundsInfo, false), - BoolProperty(ShowChunkAABBInfo, false), BoolProperty(HeightResolutionInfo, false), BoolProperty(HeightIntensityInfo, false), BoolProperty(LevelProjectedAreaInfo, true), @@ -1283,13 +1276,12 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, } _localRenderer.program->deactivate(); - if (_debugProperties.showChunkBounds || _debugProperties.showChunkAABB) { + if (_debugProperties.showChunkBounds) { for (int i = 0; i < globalCount; ++i) { debugRenderChunk( *_globalChunkBuffer[i], mvp, - _debugProperties.showChunkBounds, - _debugProperties.showChunkAABB + _debugProperties.showChunkBounds ); } @@ -1297,8 +1289,7 @@ void RenderableGlobe::renderChunks(const RenderData& data, RendererTasks&, debugRenderChunk( *_localChunkBuffer[i], mvp, - _debugProperties.showChunkBounds, - _debugProperties.showChunkAABB + _debugProperties.showChunkBounds ); } } @@ -1560,7 +1551,7 @@ void RenderableGlobe::renderChunkLocally(const Chunk& chunk, const RenderData& d } void RenderableGlobe::debugRenderChunk(const Chunk& chunk, const glm::dmat4& mvp, - bool renderBounds, bool renderAABB) const + bool renderBounds) const { ZoneScoped @@ -1589,12 +1580,6 @@ void RenderableGlobe::debugRenderChunk(const Chunk& chunk, const glm::dmat4& mvp if (renderBounds) { DebugRenderer::ref().renderNiceBox(clippingSpaceCorners, color); } - - if (renderAABB) { - const std::vector& screenSpacePoints = - DebugRenderer::ref().verticesFor(screenSpaceBounds); - DebugRenderer::ref().renderNiceBox(screenSpacePoints, color); - } } ////////////////////////////////////////////////////////////////////////////////////////// @@ -1825,7 +1810,7 @@ void RenderableGlobe::recompileShaders() { shaderDictionary.setValue("nShadowSamples", _generalProperties.nShadowSamples - 1); // Exclise Shadow Samples - int nEclipseShadows = _ellipsoid.shadowConfigurationArray().size(); + int nEclipseShadows = static_cast(_ellipsoid.shadowConfigurationArray().size()); shaderDictionary.setValue("nEclipseShadows", nEclipseShadows - 1); // // Create local shader diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index 188ec97b5c..27e4a84970 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -124,7 +124,6 @@ private: struct { properties::BoolProperty showChunkEdges; properties::BoolProperty showChunkBounds; - properties::BoolProperty showChunkAABB; properties::BoolProperty showHeightResolution; properties::BoolProperty showHeightIntensities; properties::BoolProperty levelByProjectedAreaElseDistance; @@ -220,7 +219,7 @@ private: ); void debugRenderChunk(const Chunk& chunk, const glm::dmat4& mvp, - bool renderBounds, bool renderAABB) const; + bool renderBounds) const; bool isCullableByFrustum(const Chunk& chunk, const RenderData& renderData, const glm::dmat4& mvp) const; diff --git a/modules/globebrowsing/src/tileprovider.cpp b/modules/globebrowsing/src/tileprovider.cpp index a0d6e1b267..7c2f757a52 100644 --- a/modules/globebrowsing/src/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider.cpp @@ -460,10 +460,12 @@ std::string consumeTemporalMetaData(TemporalTileProvider& t, const std::string& else { gdalNode = CPLSearchXMLNode(node, "FilePath"); if (gdalNode) { + std::string gdalDescription = std::string(gdalNode->psChild->pszValue); + return gdalDescription; + } + else { return ""; } - std::string gdalDescription = std::string(gdalNode->psChild->pszValue); - return gdalDescription; } } diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index fd03fda9f0..6ef62ea8c8 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -477,11 +477,11 @@ bool TimeQuantizer::quantize(Time& t, bool clamp) { // resolutionFraction helps to improve iteration performance constexpr const double ResolutionFraction = 0.7; constexpr const int IterationLimit = 50; - int iterations = 0; - int lastIncr = 0; - int lastDecr = 0; if (_timerange.includes(t)) { + int iterations = 0; + int lastIncr = 0; + int lastDecr = 0; DateTime quantized = DateTime(_timerange.start()); doFirstApproximation(quantized, unquantized, _resolutionValue, _resolutionUnit); double error = unquantized.J2000() - quantized.J2000(); diff --git a/modules/imgui/CMakeLists.txt b/modules/imgui/CMakeLists.txt index 4ea3d8d0d8..5b533161e3 100644 --- a/modules/imgui/CMakeLists.txt +++ b/modules/imgui/CMakeLists.txt @@ -24,47 +24,44 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) -# include(GenerateExportHeader) - set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/include/gui.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guiassetcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guicomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guifilepathcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guigibscomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guiglobebrowsingcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guihelpcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guijoystickcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guimemorycomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guimissioncomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guiparallelcomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guipropertycomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guishortcutscomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guispacetimecomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/guiiswacomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/imgui_include.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/renderproperties.h + include/gui.h + include/guiassetcomponent.h + include/guicomponent.h + include/guifilepathcomponent.h + include/guigibscomponent.h + include/guiglobebrowsingcomponent.h + include/guihelpcomponent.h + include/guijoystickcomponent.h + include/guimemorycomponent.h + include/guimissioncomponent.h + include/guiparallelcomponent.h + include/guipropertycomponent.h + include/guishortcutscomponent.h + include/guispacetimecomponent.h + include/guiiswacomponent.h + include/imgui_include.h + include/renderproperties.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/src/gui.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guiassetcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guicomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guifilepathcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guigibscomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guiglobebrowsingcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guihelpcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guijoystickcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guimemorycomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guimissioncomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guiparallelcomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guipropertycomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guishortcutscomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guispacetimecomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guiiswacomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderproperties.cpp - + src/gui.cpp + src/guiassetcomponent.cpp + src/guicomponent.cpp + src/guifilepathcomponent.cpp + src/guigibscomponent.cpp + src/guiglobebrowsingcomponent.cpp + src/guihelpcomponent.cpp + src/guijoystickcomponent.cpp + src/guimemorycomponent.cpp + src/guimissioncomponent.cpp + src/guiparallelcomponent.cpp + src/guipropertycomponent.cpp + src/guishortcutscomponent.cpp + src/guispacetimecomponent.cpp + src/guiiswacomponent.cpp + src/renderproperties.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) @@ -74,8 +71,6 @@ set(SHADER_FILES ) source_group("Shader Files" FILES ${SHADER_FILES}) -# set(openspace-module-imgui_LIBRARY_MODE SHARED) - create_new_module( "ImGUI" imgui_module @@ -83,6 +78,4 @@ create_new_module( ${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES} ) -include_external_library(${imgui_module} PRIVATE Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui) - -# generate_export_header(${imgui_module} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/_generated/include/imgui_export.h) +include_external_library(${imgui_module} PRIVATE Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui) diff --git a/modules/imgui/include/imgui_include.h b/modules/imgui/include/imgui_include.h index 3aafc34c8c..6a29f0501a 100644 --- a/modules/imgui/include/imgui_include.h +++ b/modules/imgui/include/imgui_include.h @@ -30,8 +30,9 @@ #pragma clang diagnostic ignored "-Wold-style-cast" #elif (defined __GNUC__) #pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +#pragma GCC diagnostic ignored "-Wclass-memaccess" #pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #endif // __clang__ #include diff --git a/modules/imgui/src/guiglobebrowsingcomponent.cpp b/modules/imgui/src/guiglobebrowsingcomponent.cpp index 70a712a4f5..8eb6ef4019 100644 --- a/modules/imgui/src/guiglobebrowsingcomponent.cpp +++ b/modules/imgui/src/guiglobebrowsingcomponent.cpp @@ -188,7 +188,7 @@ void GuiGlobeBrowsingComponent::render() { urlInfo.cbegin(), urlInfo.cend(), std::string(), - [](std::string lhs, const UrlInfo& i) { + [](const std::string& lhs, const UrlInfo& i) { return lhs + i.name + ": (" + i.url + ")" + '\0'; } ); @@ -257,17 +257,11 @@ void GuiGlobeBrowsingComponent::render() { } - if (iServer < 0) { - return; - } - _currentServer = urlInfo[iServer].name; - - - // Can't use urlIt here since it might have been invalidated before - if (urlInfo.empty()) { + if (iServer < 0 || urlInfo.empty()) { // There are no server so we have to bail return; } + _currentServer = urlInfo[iServer].name; ImGui::Separator(); diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index 96ca7bcd26..a8186b7d89 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -83,7 +83,7 @@ namespace { } struct TreeNode { - TreeNode(std::string p) + explicit TreeNode(std::string p) : path(std::move(p)) #ifdef Debugging_ImGui_TreeNode_Indices , index(nextIndex++) diff --git a/modules/iswa/CMakeLists.txt b/modules/iswa/CMakeLists.txt index 1edcd9d964..843884ab1a 100644 --- a/modules/iswa/CMakeLists.txt +++ b/modules/iswa/CMakeLists.txt @@ -25,51 +25,51 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/datacygnet.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/datasphere.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswabasegroup.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswacygnet.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswadatagroup.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswakameleongroup.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/texturecygnet.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessor.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessorjson.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessorkameleon.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessortext.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager_lua.inl + rendering/datacygnet.h + rendering/dataplane.h + rendering/datasphere.h + rendering/kameleonplane.h + rendering/iswabasegroup.h + rendering/iswacygnet.h + rendering/iswadatagroup.h + rendering/iswakameleongroup.h + rendering/screenspacecygnet.h + rendering/texturecygnet.h + rendering/textureplane.h + util/dataprocessor.h + util/dataprocessorjson.h + util/dataprocessorkameleon.h + util/dataprocessortext.h + util/iswamanager.h + util/iswamanager_lua.inl ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessor.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessorjson.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessorkameleon.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/dataprocessortext.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/datacygnet.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/datasphere.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswabasegroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswacygnet.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswadatagroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswakameleongroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/texturecygnet.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.cpp + util/dataprocessor.cpp + util/dataprocessorjson.cpp + util/dataprocessorkameleon.cpp + util/dataprocessortext.cpp + util/iswamanager.cpp + rendering/datacygnet.cpp + rendering/dataplane.cpp + rendering/datasphere.cpp + rendering/iswabasegroup.cpp + rendering/iswacygnet.cpp + rendering/iswadatagroup.cpp + rendering/iswakameleongroup.cpp + rendering/kameleonplane.cpp + rendering/screenspacecygnet.cpp + rendering/texturecygnet.cpp + rendering/textureplane.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/dataplane_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/dataplane_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/textureplane_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/textureplane_vs.glsl + shaders/dataplane_fs.glsl + shaders/dataplane_vs.glsl + shaders/textureplane_fs.glsl + shaders/textureplane_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/iswa/include.cmake b/modules/iswa/include.cmake index 9c6bb4a938..f6e8111e4e 100644 --- a/modules/iswa/include.cmake +++ b/modules/iswa/include.cmake @@ -1,5 +1,3 @@ set (OPENSPACE_DEPENDENCIES - base kameleon - space -) \ No newline at end of file +) diff --git a/modules/iswa/util/dataprocessor.cpp b/modules/iswa/util/dataprocessor.cpp index 0bda04e042..673cd6f26b 100644 --- a/modules/iswa/util/dataprocessor.cpp +++ b/modules/iswa/util/dataprocessor.cpp @@ -182,7 +182,9 @@ void DataProcessor::add(const std::vector>& optionValues, values.begin(), values.end(), 0.f, - [mean](float l, float r) { return l + pow(r - mean, 2); } + [mean](float l, float r) { + return l + static_cast(std::pow(r - mean, 2)); + } ); const float standardDeviation = sqrt(variance / numValues); @@ -190,8 +192,9 @@ void DataProcessor::add(const std::vector>& optionValues, const float oldMean = (1.f / _numValues[i]) * _sum[i]; _sum[i] += sum[i]; - _standardDeviation[i] = sqrt(pow(standardDeviation, 2) + - pow(_standardDeviation[i], 2)); + _standardDeviation[i] = static_cast( + std::sqrt(std::pow(standardDeviation, 2) + std::pow(_standardDeviation[i], 2)) + ); _numValues[i] += numValues; const float min = normalizeWithStandardScore( diff --git a/modules/kameleon/CMakeLists.txt b/modules/kameleon/CMakeLists.txt index c82a216b5a..d34b17ae0f 100644 --- a/modules/kameleon/CMakeLists.txt +++ b/modules/kameleon/CMakeLists.txt @@ -25,15 +25,19 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake) +# Use _ROOT variables +# https://cmake.org/cmake/help/git-stage/policy/CMP0074.html +cmake_policy(SET CMP0074 NEW) + set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/include/kameleonwrapper.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/kameleonhelper.h + include/kameleonwrapper.h + include/kameleonhelper.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/src/kameleonwrapper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/kameleonhelper.cpp + src/kameleonwrapper.cpp + src/kameleonhelper.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) @@ -60,29 +64,16 @@ 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 ) - -if (GHOUL_DISABLE_EXTERNAL_WARNINGS) - if (MSVC) - target_compile_options(ccmc PRIVATE "/W0" "/MP") - target_compile_definitions(ccmc PRIVATE "_SCL_SECURE_NO_WARNINGS") - else () - target_compile_options(ccmc PRIVATE "-w") - endif () -endif () +disable_external_warnings(ccmc) set_folder_location(ccmc "External") if (TARGET cdf) - if (GHOUL_DISABLE_EXTERNAL_WARNINGS) - if (MSVC) - target_compile_options(cdf PRIVATE "/W0" "/MP") - target_compile_definitions(cdf PRIVATE "_SCL_SECURE_NO_WARNINGS") - else () - target_compile_options(cdf PRIVATE "-w") - endif () - endif () + disable_external_warnings(cdf) set_folder_location(cdf "External") endif () -# Boost -find_package(Boost REQUIRED) -target_include_directories(openspace-module-kameleon SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) -#include_external_library(${onscreengui_module} Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/kameleon) +if (WIN32) + target_compile_options(ccmc PRIVATE /MP) + if (TARGET cdf) + target_compile_options(cdf PRIVATE /MP) + endif () +endif () diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 338d482c86..606edb945b 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 338d482c8617bfacda0a5af8f3f6bb23163d436f +Subproject commit 606edb945b62d0151f20270ddb2db4a9f558aaa1 diff --git a/modules/kameleon/include.cmake b/modules/kameleon/include.cmake deleted file mode 100644 index 63c20b8181..0000000000 --- a/modules/kameleon/include.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set (OPENSPACE_DEPENDENCIES - space -) \ No newline at end of file diff --git a/modules/kameleon/include/kameleonwrapper.h b/modules/kameleon/include/kameleonwrapper.h index 6c5e728553..8d00cf000a 100644 --- a/modules/kameleon/include/kameleonwrapper.h +++ b/modules/kameleon/include/kameleonwrapper.h @@ -88,7 +88,7 @@ public: const glm::size3_t& outDimensions) const; float* uniformSliceValues(const std::string& var, const glm::size3_t& outDimensions, - const float& zSlice) const; + float zSlice) const; float* uniformSampledVectorValues(const std::string& xVar, const std::string& yVar, const std::string& zVar, const glm::size3_t& outDimensions) const; @@ -116,7 +116,6 @@ public: std::array gridVariables() const; - Model model() const; GridType gridType() const; std::string parent() const; diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index 53bbf3f08a..b84fff0474 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -77,7 +77,6 @@ double getTime(ccmc::Kameleon* kameleon) { // redundant! std::string seqStartStr; - double seqStartDbl; if (kameleon->doesAttributeExist("start_time")){ seqStartStr = kameleon->getGlobalAttribute("start_time").getAttributeString(); @@ -126,13 +125,13 @@ double getTime(ccmc::Kameleon* kameleon) { "No starting time attribute could be found in the .cdf file. Starting " "time is set to 01.JAN.2000 12:00." ); - seqStartDbl = 0.0; } if (seqStartStr.length() == 19) { seqStartStr += ".000Z"; } + double seqStartDbl; if (seqStartStr.length() == 24) { seqStartDbl = Time::convertTime( seqStartStr.substr(0, seqStartStr.length() - 2) diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index 6f725b1c2b..a0837bd1b7 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -81,20 +81,20 @@ std::array gridVariables(ccmc::Model* model) { std::string z = std::move(tokens.at(2)); std::transform( - x.begin(), - x.end(), + x.cbegin(), + x.cend(), x.begin(), [](char c) { return static_cast(tolower(c)); } ); std::transform( - y.begin(), - y.end(), + y.cbegin(), + y.cend(), y.begin(), [](char c) { return static_cast(tolower(c)); } ); std::transform( - z.begin(), - z.end(), + z.cbegin(), + z.cend(), z.begin(), [](char c) { return static_cast(tolower(c)); } ); @@ -331,7 +331,7 @@ float* KameleonWrapper::uniformSampledValues(const std::string& var, // This method returns new'd memory, turn into std::vector instead? float* KameleonWrapper::uniformSliceValues(const std::string& var, const glm::size3_t& outDimensions, - const float& slice) const + float slice) const { ghoul_assert(_model && _interpolator, "Model and interpolator must exist"); LINFO(fmt::format( diff --git a/modules/kameleonvolume/CMakeLists.txt b/modules/kameleonvolume/CMakeLists.txt index 37897ab5e5..cb36ab4563 100644 --- a/modules/kameleonvolume/CMakeLists.txt +++ b/modules/kameleonvolume/CMakeLists.txt @@ -25,20 +25,20 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/kameleonvolumereader.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablekameleonvolume.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleondocumentationtask.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleonmetadatatojsontask.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleonvolumetorawtask.h + kameleonvolumereader.h + rendering/renderablekameleonvolume.h + tasks/kameleondocumentationtask.h + tasks/kameleonmetadatatojsontask.h + tasks/kameleonvolumetorawtask.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/kameleonvolumereader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablekameleonvolume.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleondocumentationtask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleonmetadatatojsontask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/kameleonvolumetorawtask.cpp + kameleonvolumereader.cpp + rendering/renderablekameleonvolume.cpp + tasks/kameleondocumentationtask.cpp + tasks/kameleonmetadatatojsontask.cpp + tasks/kameleonvolumetorawtask.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/kameleonvolume/kameleonvolumemodule.h b/modules/kameleonvolume/kameleonvolumemodule.h index 41c47dbc58..0c3ffa75fd 100644 --- a/modules/kameleonvolume/kameleonvolumemodule.h +++ b/modules/kameleonvolume/kameleonvolumemodule.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_KAMELEONVOLUME___KAMELEONVOLUMEMODULE___H__ #include + #include namespace openspace { diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 0df6caca5d..9bba62ea06 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -39,6 +39,7 @@ #pragma warning (disable : 4800) // #pragma warning: there is no warning number '4800' #endif // WIN32 +#include #include #include #include @@ -78,7 +79,7 @@ KameleonVolumeReader::KameleonVolumeReader(std::string path) : _path(std::move(p throw ghoul::FileNotFoundError(_path); } - const long status = _kameleon.open(_path); + const long status = _kameleon->open(_path); if (status != ccmc::FileReader::OK) { LERROR(fmt::format("Failed to open file '{}' with Kameleon", _path)); throw ghoul::RuntimeError("Failed to open file: " + _path + " with Kameleon"); @@ -86,10 +87,12 @@ KameleonVolumeReader::KameleonVolumeReader(std::string path) : _path(std::move(p // Possibly use a kameleon interpolator instead of a model interpolator? _interpolator = std::unique_ptr( - _kameleon.model->createNewInterpolator() + _kameleon->model->createNewInterpolator() ); } +KameleonVolumeReader::~KameleonVolumeReader() {} + std::unique_ptr> KameleonVolumeReader::readFloatVolume( const glm::uvec3 & dimensions, const std::string& variable, @@ -145,28 +148,28 @@ std::unique_ptr> KameleonVolumeReader::readFloatVolume( std::vector KameleonVolumeReader::variableNames() const { std::vector variableNames; - const int nVariables = _kameleon.model->getNumberOfVariables(); + const int nVariables = _kameleon->model->getNumberOfVariables(); for (int i = 0; i < nVariables; ++i) { - variableNames.push_back(_kameleon.model->getVariableName(i)); + variableNames.push_back(_kameleon->model->getVariableName(i)); } return variableNames; } std::vector KameleonVolumeReader::variableAttributeNames() const { - return _kameleon.model->getVariableAttributeNames(); + return _kameleon->model->getVariableAttributeNames(); } std::vector KameleonVolumeReader::globalAttributeNames() const { std::vector attributeNames; - const int nAttributes = _kameleon.model->getNumberOfGlobalAttributes(); + const int nAttributes = _kameleon->model->getNumberOfGlobalAttributes(); for (int i = 0; i < nAttributes; ++i) { - attributeNames.push_back(_kameleon.model->getGlobalAttributeName(i)); + attributeNames.push_back(_kameleon->model->getGlobalAttributeName(i)); } return attributeNames; } std::array KameleonVolumeReader::gridVariableNames() const { - return openspace::gridVariables(_kameleon.model); + return openspace::gridVariables(_kameleon->model); } void KameleonVolumeReader::addAttributeToDictionary(ghoul::Dictionary& dictionary, @@ -190,7 +193,7 @@ void KameleonVolumeReader::addAttributeToDictionary(ghoul::Dictionary& dictionar ghoul::Dictionary KameleonVolumeReader::readMetaData() const { ghoul::Dictionary globalAttributesDictionary; for (const std::string& attributeName : globalAttributeNames()) { - ccmc::Attribute attribute = _kameleon.model->getGlobalAttribute(attributeName); + ccmc::Attribute attribute = _kameleon->model->getGlobalAttribute(attributeName); addAttributeToDictionary(globalAttributesDictionary, attributeName, attribute); } @@ -199,7 +202,7 @@ ghoul::Dictionary KameleonVolumeReader::readMetaData() const { for (const std::string& variableName : variableNames()) { ghoul::Dictionary variableAttributesDictionary; for (const std::string& attributeName : varAttrNames) { - ccmc::Attribute attribute = _kameleon.model->getVariableAttribute( + ccmc::Attribute attribute = _kameleon->model->getVariableAttribute( variableName, attributeName ); @@ -220,11 +223,11 @@ ghoul::Dictionary KameleonVolumeReader::readMetaData() const { std::string KameleonVolumeReader::simulationStart() const { std::string startTime; - if (_kameleon.model->doesAttributeExist("start_time")) { - startTime = globalAttribute(*_kameleon.model, "start_time"); + if (_kameleon->model->doesAttributeExist("start_time")) { + startTime = globalAttribute(*_kameleon->model, "start_time"); } - else if (_kameleon.model->doesAttributeExist("tim_rundate_cal")) { - startTime = globalAttribute(*_kameleon.model, "tim_rundate_cal"); + else if (_kameleon->model->doesAttributeExist("tim_rundate_cal")) { + startTime = globalAttribute(*_kameleon->model, "tim_rundate_cal"); size_t numChars = startTime.length(); if (numChars < 19) { // Fall through to add the required characters @@ -249,11 +252,11 @@ std::string KameleonVolumeReader::simulationStart() const { } } } - else if (_kameleon.model->doesAttributeExist("tim_obsdate_cal")) { - startTime = globalAttribute(*_kameleon.model, "tim_obsdate_cal"); + else if (_kameleon->model->doesAttributeExist("tim_obsdate_cal")) { + startTime = globalAttribute(*_kameleon->model, "tim_obsdate_cal"); } - else if (_kameleon.model->doesAttributeExist("tim_crstart_cal")) { - startTime = globalAttribute(*_kameleon.model, "tim_crstart_cal"); + else if (_kameleon->model->doesAttributeExist("tim_crstart_cal")) { + startTime = globalAttribute(*_kameleon->model, "tim_crstart_cal"); } if (startTime.length() == 19) { @@ -264,21 +267,21 @@ std::string KameleonVolumeReader::simulationStart() const { } float KameleonVolumeReader::elapsedTime() const { - if (_kameleon.model->doesAttributeExist("elapsed_time_in_seconds")) { - return globalAttribute(*_kameleon.model, "elapsed_time_in_seconds"); + if (_kameleon->model->doesAttributeExist("elapsed_time_in_seconds")) { + return globalAttribute(*_kameleon->model, "elapsed_time_in_seconds"); } - else if (_kameleon.model->doesAttributeExist("time_physical_time")) { - return globalAttribute(*_kameleon.model, "time_physical_time"); + else if (_kameleon->model->doesAttributeExist("time_physical_time")) { + return globalAttribute(*_kameleon->model, "time_physical_time"); } return 0.f; } std::string KameleonVolumeReader::simulationEnd() const { - return globalAttribute(*_kameleon.model, "end_time"); + return globalAttribute(*_kameleon->model, "end_time"); } std::string KameleonVolumeReader::getVisUnit(const std::string& variable) const { - return _kameleon.model->getNativeUnit(variable); + return _kameleon->model->getNativeUnit(variable); } std::string KameleonVolumeReader::time() const { @@ -290,12 +293,12 @@ std::string KameleonVolumeReader::time() const { } double KameleonVolumeReader::minValue(const std::string & variable) const { - ccmc::Model& m = *_kameleon.model; + ccmc::Model& m = *_kameleon->model; return m.getVariableAttribute(variable, "actual_min").getAttributeFloat(); } double KameleonVolumeReader::maxValue(const std::string & variable) const { - ccmc::Model& m = *_kameleon.model; + ccmc::Model& m = *_kameleon->model; return m.getVariableAttribute(variable, "actual_max").getAttributeFloat(); } diff --git a/modules/kameleonvolume/kameleonvolumereader.h b/modules/kameleonvolume/kameleonvolumereader.h index 47c09cccb4..6f5c3e7605 100644 --- a/modules/kameleonvolume/kameleonvolumereader.h +++ b/modules/kameleonvolume/kameleonvolumereader.h @@ -28,21 +28,13 @@ #include #include #include +#include -#ifdef WIN32 -#pragma warning (push) -#pragma warning (disable : 4619) // #pragma warning: there is no warning number '4619' -#pragma warning (disable : 4675) // #pragma warning: there is no warning number '4675' -#pragma warning (disable : 4800) // #pragma warning: there is no warning number '4800' -#endif // WIN32 - -#include - -#ifdef WIN32 -#pragma warning (pop) -#endif // WIN32 - -namespace ccmc { class Interpolator; } +namespace ccmc { + class Attribute; + class Interpolator; + class Kameleon; +} // namespce ccmc namespace ghoul { class Dictionary; } namespace openspace::volume { template class RawVolume; } @@ -52,6 +44,7 @@ namespace openspace::kameleonvolume { class KameleonVolumeReader { public: KameleonVolumeReader(std::string path); + ~KameleonVolumeReader(); std::unique_ptr> readFloatVolume( const glm::uvec3& dimensions, const std::string& variable, @@ -83,7 +76,7 @@ private: const std::string& key, ccmc::Attribute& attr); std::string _path; - ccmc::Kameleon _kameleon; + std::unique_ptr _kameleon; std::unique_ptr _interpolator; }; diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 76af40a5d4..2a97b063ab 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -24,6 +24,10 @@ #include +#include +#include +#include +#include #include #include #include @@ -389,7 +393,7 @@ void RenderableKameleonVolume::loadCdf(const std::string& path) { } if (_autoGridType) { - if (variables[0] == "r" && variables[0] == "theta" && variables[0] == "phi") { + if (variables[0] == "r" && variables[1] == "theta" && variables[2] == "phi") { _gridType.setValue(static_cast(volume::VolumeGridType::Spherical)); } else { diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.h b/modules/kameleonvolume/rendering/renderablekameleonvolume.h index 6fb43aeff9..bc03090cc6 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.h +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.h @@ -26,10 +26,6 @@ #define __OPENSPACE_MODULE_KAMELEONVOLUME___RENDERABLEKAMELEONVOLUME___H__ #include -#include -#include -#include -#include #include #include @@ -37,7 +33,10 @@ #include #include -namespace openspace { struct RenderData; } +namespace openspace { + struct RenderData; + class TransferFunction; +} // namespace openspace namespace openspace::volume { class BasicVolumeRaycaster; diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index f4939a794d..e3ea77df4c 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp index 8f5f9be5b3..f8cbd48c9a 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp @@ -30,6 +30,7 @@ #include #include #include +#include namespace { constexpr const char* KeyInput = "Input"; diff --git a/modules/multiresvolume/CMakeLists.txt b/modules/multiresvolume/CMakeLists.txt index 18733b9f4f..1f05c51900 100644 --- a/modules/multiresvolume/CMakeLists.txt +++ b/modules/multiresvolume/CMakeLists.txt @@ -25,39 +25,39 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/atlasmanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickmanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickselector.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickcover.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickselection.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/multiresvolumeraycaster.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/shenbrickselector.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/tfbrickselector.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/localtfbrickselector.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simpletfbrickselector.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemultiresvolume.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/tsp.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogrammanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/errorhistogrammanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/localerrorhistogrammanager.h + rendering/atlasmanager.h + rendering/brickmanager.h + rendering/brickselector.h + rendering/brickcover.h + rendering/brickselection.h + rendering/multiresvolumeraycaster.h + rendering/shenbrickselector.h + rendering/tfbrickselector.h + rendering/localtfbrickselector.h + rendering/simpletfbrickselector.h + rendering/renderablemultiresvolume.h + rendering/tsp.h + rendering/histogrammanager.h + rendering/errorhistogrammanager.h + rendering/localerrorhistogrammanager.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/atlasmanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickcover.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickmanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/brickselection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/multiresvolumeraycaster.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/shenbrickselector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/tfbrickselector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/localtfbrickselector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simpletfbrickselector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemultiresvolume.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/tsp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/histogrammanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/errorhistogrammanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/localerrorhistogrammanager.cpp + rendering/atlasmanager.cpp + rendering/brickcover.cpp + rendering/brickmanager.cpp + rendering/brickselection.cpp + rendering/multiresvolumeraycaster.cpp + rendering/shenbrickselector.cpp + rendering/tfbrickselector.cpp + rendering/localtfbrickselector.cpp + rendering/simpletfbrickselector.cpp + rendering/renderablemultiresvolume.cpp + rendering/tsp.cpp + rendering/histogrammanager.cpp + rendering/errorhistogrammanager.cpp + rendering/localerrorhistogrammanager.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/multiresvolume/include.cmake b/modules/multiresvolume/include.cmake deleted file mode 100644 index 63c20b8181..0000000000 --- a/modules/multiresvolume/include.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set (OPENSPACE_DEPENDENCIES - space -) \ No newline at end of file diff --git a/modules/multiresvolume/rendering/atlasmanager.cpp b/modules/multiresvolume/rendering/atlasmanager.cpp index 2f0642fc4d..fd688043de 100644 --- a/modules/multiresvolume/rendering/atlasmanager.cpp +++ b/modules/multiresvolume/rendering/atlasmanager.cpp @@ -182,7 +182,7 @@ void AtlasManager::addToAtlas(int firstBrickIndex, int lastBrickIndex, unsigned int atlasCoords = _freeAtlasCoords.back(); _freeAtlasCoords.pop_back(); int level = _nOtLevels - static_cast( - floor(log((7.0 * (float(brickIndex % _nOtNodes)) + 1.0))/log(8)) - 1 + floor(log1p((7.0 * (float(brickIndex % _nOtNodes))))/log(8)) - 1 ); ghoul_assert(atlasCoords <= 0x0FFFFFFF, "@MISSING"); unsigned int atlasData = (level << 28) + atlasCoords; diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 726ea4b21c..652b9fa39c 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -301,7 +301,7 @@ int ErrorHistogramManager::parentOffset(int offset, int base) const { return -1; } const int depth = static_cast( - floor(log(((base - 1) * offset + 1.0)) / log(base)) + floor(log1p(((base - 1) * offset)) / log(base)) ); const int firstInLevel = static_cast((pow(base, depth) - 1) / (base - 1)); const int inLevelOffset = offset - firstInLevel; diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp index 39f53d52c1..dc7e000cfc 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp @@ -82,8 +82,6 @@ bool LocalErrorHistogramManager::buildHistograms(int numBins) { success &= buildFromOctreeChild(bst, ot); if (!success) { LERROR("Failed in buildFromOctreeChild"); - } - if (!success) { return false; } pb1.print(processedLeaves++); @@ -99,8 +97,6 @@ bool LocalErrorHistogramManager::buildHistograms(int numBins) { success &= buildFromBstChild(bst, ot); if (!success) { LERROR("Failed in buildFromBstChild"); - } - if (!success) { return false; } pb2.print(processedLeaves++); @@ -464,7 +460,7 @@ int LocalErrorHistogramManager::parentOffset(int offset, int base) const { return -1; } const int depth = static_cast( - floor(log(((base - 1) * offset + 1.0)) / log(base)) + floor(log1p(((base - 1) * offset)) / log(base)) ); const int firstInLevel = static_cast((pow(base, depth) - 1) / (base - 1)); const int inLevelOffset = offset - firstInLevel; diff --git a/modules/multiresvolume/rendering/localtfbrickselector.cpp b/modules/multiresvolume/rendering/localtfbrickselector.cpp index b663438232..aa2be187c4 100644 --- a/modules/multiresvolume/rendering/localtfbrickselector.cpp +++ b/modules/multiresvolume/rendering/localtfbrickselector.cpp @@ -345,9 +345,6 @@ bool LocalTfBrickSelector::calculateBrickErrors() { } size_t tfWidth = tf->width(); - if (tfWidth <= 0) { - return false; - } std::vector gradients(tfWidth - 1); for (size_t offset = 0; offset < tfWidth - 1; offset++) { diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp index 50a3ede0dc..cc2c4a7985 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp @@ -151,7 +151,9 @@ bool MultiresVolumeRaycaster::isCameraInside(const RenderData& data, float divisor = 1.0; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) { - if (abs(modelTransform[i][j] > divisor)) divisor = modelTransform[i][j]; + if (abs(modelTransform[i][j]) > divisor) { + divisor = modelTransform[i][j]; + } } glm::mat4 scaledModelTransform = modelTransform / divisor; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index a80e6cfa7d..abf4100fa9 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -464,7 +464,6 @@ bool RenderableMultiresVolume::initializeSelector() { ghoul::filesystem::CacheManager::Persistent::Yes ); std::ifstream cacheFile(cacheFilename, std::ios::in | std::ios::binary); - std::string errorHistogramsPath = _errorHistogramsPath; if (cacheFile.is_open()) { // Read histograms from cache. cacheFile.close(); diff --git a/modules/multiresvolume/rendering/tsp.cpp b/modules/multiresvolume/rendering/tsp.cpp index bcb194fcea..528c18ce2d 100644 --- a/modules/multiresvolume/rendering/tsp.cpp +++ b/modules/multiresvolume/rendering/tsp.cpp @@ -139,7 +139,7 @@ bool TSP::construct() { unsigned int OTNode = OT * _numOTNodes; // Calculate BST level (first level is level 0) - unsigned int BSTLevel = static_cast(log(OT + 1) / log(2)); + unsigned int BSTLevel = static_cast(log1p(OT) / log(2)); // Traverse OT unsigned int OTChild = 1; @@ -574,18 +574,18 @@ bool TSP::writeCache() { } float TSP::spatialError(unsigned int brickIndex) const { - return reinterpret_cast(_data[brickIndex*NUM_DATA + SPATIAL_ERR]); + return *reinterpret_cast(_data[brickIndex*NUM_DATA + SPATIAL_ERR]); } float TSP::temporalError(unsigned int brickIndex) const { - return reinterpret_cast(_data[brickIndex*NUM_DATA + TEMPORAL_ERR]); + return *reinterpret_cast(_data[brickIndex*NUM_DATA + TEMPORAL_ERR]); } unsigned int TSP::firstOctreeChild(unsigned int brickIndex) const { const unsigned int otNode = brickIndex % _numOTNodes; const unsigned int bstOffset = brickIndex - otNode; - const unsigned int depth = static_cast(log(7 * otNode + 1) / log(8)); + const unsigned int depth = static_cast(log1p(7 * otNode) / log(8)); const unsigned int firstInLevel = static_cast((pow(8, depth) - 1) / 7); const unsigned int levelOffset = otNode - firstInLevel; const unsigned int firstInChildLevel = static_cast( @@ -599,7 +599,7 @@ unsigned int TSP::firstOctreeChild(unsigned int brickIndex) const { unsigned int TSP::bstLeft(unsigned int brickIndex) const { const unsigned int bstNode = brickIndex / _numOTNodes; const unsigned int otOffset = brickIndex % _numOTNodes; - const unsigned int depth = static_cast(log(bstNode + 1) / log(2)); + const unsigned int depth = static_cast(log1p(bstNode) / log(2)); const unsigned int firstInLevel = static_cast(pow(2, depth) - 1); const unsigned int levelOffset = bstNode - firstInLevel; const unsigned int firstInChildLevel = static_cast( @@ -620,7 +620,7 @@ bool TSP::isBstLeaf(unsigned int brickIndex) const { bool TSP::isOctreeLeaf(unsigned int brickIndex) const { const unsigned int otNode = brickIndex % _numOTNodes; - const unsigned int depth = static_cast(log(7 * otNode + 1) / log(8)); + const unsigned int depth = static_cast(log1p(7 * otNode) / log(8)); return depth == _numOTLevels - 1; } diff --git a/modules/space/CMakeLists.txt b/modules/space/CMakeLists.txt index e191a4eff1..e33d971844 100644 --- a/modules/space/CMakeLists.txt +++ b/modules/space/CMakeLists.txt @@ -25,49 +25,49 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablerings.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableorbitalkepler.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesatellites.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesmallbody.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/keplertranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/spicetranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/tletranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/translation/horizonstranslation.h - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/spicerotation.h + rendering/planetgeometry.h + rendering/renderableconstellationbounds.h + rendering/renderablerings.h + rendering/renderableorbitalkepler.h + rendering/renderablesatellites.h + rendering/renderablesmallbody.h + rendering/renderablestars.h + rendering/simplespheregeometry.h + translation/keplertranslation.h + translation/spicetranslation.h + translation/tletranslation.h + translation/horizonstranslation.h + rotation/spicerotation.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablerings.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableorbitalkepler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesatellites.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesmallbody.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/keplertranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/spicetranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/tletranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/translation/horizonstranslation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rotation/spicerotation.cpp + rendering/planetgeometry.cpp + rendering/renderableconstellationbounds.cpp + rendering/renderablerings.cpp + rendering/renderableorbitalkepler.cpp + rendering/renderablesatellites.cpp + rendering/renderablesmallbody.cpp + rendering/renderablestars.cpp + rendering/simplespheregeometry.cpp + translation/keplertranslation.cpp + translation/spicetranslation.cpp + translation/tletranslation.cpp + translation/horizonstranslation.cpp + rotation/spicerotation.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/debrisViz_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/debrisViz_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_ge.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_vs.glsl + shaders/constellationbounds_fs.glsl + shaders/constellationbounds_vs.glsl + shaders/debrisViz_fs.glsl + shaders/debrisViz_vs.glsl + shaders/rings_vs.glsl + shaders/rings_fs.glsl + shaders/star_fs.glsl + shaders/star_ge.glsl + shaders/star_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 1ce88f70bd..2037e83b93 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -185,8 +185,6 @@ void RenderableSmallBody::readDataFile(const std::string& filename) { std::string line; unsigned int csvLine = 0; int fieldCount = 0; - float lineSkipFraction = 1.0; - int lastLineCount = -1; const std::string expectedHeaderLine = "full_name,epoch_cal,e,a,i,om,w,ma,per"; try { @@ -197,6 +195,7 @@ void RenderableSmallBody::readDataFile(const std::string& filename) { } _numObjects = numberOfLines; + float lineSkipFraction = 1.0; if (!_isFileReadinitialized) { _isFileReadinitialized = true; initializeFileReading(); @@ -230,6 +229,7 @@ void RenderableSmallBody::readDataFile(const std::string& filename) { skipSingleLineInFile(file); } bool firstDataLine = true; + int lastLineCount = -1; for (csvLine = _startRenderIdx + 1; csvLine <= endElement + 1; csvLine++, sequentialLineErrors++) @@ -258,8 +258,8 @@ void RenderableSmallBody::readDataFile(const std::string& filename) { fieldCount, csvLine + 1, numberOfLines, filename )); } - catch (std::ios_base::failure& f) { - throw f; + catch (std::ios_base::failure&) { + throw; } if (sequentialLineErrors == 4) { diff --git a/modules/space/rendering/renderablesmallbody.h b/modules/space/rendering/renderablesmallbody.h index 5b47599e7f..21d961d7e1 100644 --- a/modules/space/rendering/renderablesmallbody.h +++ b/modules/space/rendering/renderablesmallbody.h @@ -46,7 +46,7 @@ public: private: void readOrbitalParamsFromThisLine(bool firstDataLine, int& fieldCount, unsigned int& csvLine, std::ifstream& file); - void readDataFile(const std::string& filename); + virtual void readDataFile(const std::string& filename) override; void initializeFileReading(); void skipSingleLineInFile(std::ifstream& file); diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 2219305f85..075f180901 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -73,7 +73,7 @@ namespace { constexpr double PARSEC = 0.308567756E17; - struct CommonDataLayout { + struct ColorVBOLayout { std::array position; float value; float luminance; @@ -81,19 +81,35 @@ namespace { float apparentMagnitude; }; - struct ColorVBOLayout : public CommonDataLayout {}; + struct VelocityVBOLayout { + std::array position; + float value; + float luminance; + float absoluteMagnitude; + float apparentMagnitude; - struct VelocityVBOLayout : public CommonDataLayout { float vx; // v_x float vy; // v_y float vz; // v_z }; - struct SpeedVBOLayout : public CommonDataLayout { + struct SpeedVBOLayout { + std::array position; + float value; + float luminance; + float absoluteMagnitude; + float apparentMagnitude; + float speed; }; - struct OtherDataLayout : public CommonDataLayout {}; + struct OtherDataLayout { + std::array position; + float value; + float luminance; + float absoluteMagnitude; + float apparentMagnitude; + }; constexpr openspace::properties::Property::PropertyInfo SpeckFileInfo = { "SpeckFile", diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index 7a794e1e74..6a89bf3768 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -176,16 +176,9 @@ void HorizonsTranslation::readHorizonsTextFile() { return; } - // The beginning of a Horizons file has a header with a lot of information about the - // query that we do not care about. Ignore everything until data starts, including - // the row marked by $$SOE (i.e. Start Of Ephemerides). - std::string line; - while (line[0] != '$') { - std::getline(fileStream, line); - } - // Read data line by line until $$EOE (i.e. End Of Ephemerides). // Skip the rest of the file. + std::string line; std::getline(fileStream, line); while (line[0] != '$') { std::stringstream str(line); diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index c1dd9beb2d..f31ece809d 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -34,11 +34,10 @@ namespace { template T solveIteration(const Func& function, T x0, const T& err = 0.0, int maxIter = 100) { - T x = 0; T x2 = x0; for (int i = 0; i < maxIter; ++i) { - x = x2; + T x = x2; x2 = function(x); if (std::abs(x2 - x) < err) { return x2; diff --git a/modules/spacecraftinstruments/CMakeLists.txt b/modules/spacecraftinstruments/CMakeLists.txt index 45f3282bc8..d56f71adb9 100644 --- a/modules/spacecraftinstruments/CMakeLists.txt +++ b/modules/spacecraftinstruments/CMakeLists.txt @@ -25,63 +25,63 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditeminstruments.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecrawlingline.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefov.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneprojection.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanetprojection.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableshadowcylinder.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodelprojection.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/decoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/hongkangparser.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/instrumenttimesparser.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/image.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/imagesequencer.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/instrumentdecoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/labelparser.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/projectioncomponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/scannerdecoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/sequenceparser.h - ${CMAKE_CURRENT_SOURCE_DIR}/util/targetdecoder.h + dashboard/dashboarditeminstruments.h + rendering/renderablecrawlingline.h + rendering/renderablefov.h + rendering/renderableplaneprojection.h + rendering/renderableplanetprojection.h + rendering/renderableshadowcylinder.h + rendering/renderablemodelprojection.h + util/decoder.h + util/hongkangparser.h + util/instrumenttimesparser.h + util/image.h + util/imagesequencer.h + util/instrumentdecoder.h + util/labelparser.h + util/projectioncomponent.h + util/scannerdecoder.h + util/sequenceparser.h + util/targetdecoder.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditeminstruments.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecrawlingline.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefov.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneprojection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanetprojection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableshadowcylinder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodelprojection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/decoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/hongkangparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/instrumenttimesparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/imagesequencer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/instrumentdecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/labelparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/projectioncomponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/scannerdecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/sequenceparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/util/targetdecoder.cpp + dashboard/dashboarditeminstruments.cpp + rendering/renderablecrawlingline.cpp + rendering/renderablefov.cpp + rendering/renderableplaneprojection.cpp + rendering/renderableplanetprojection.cpp + rendering/renderableshadowcylinder.cpp + rendering/renderablemodelprojection.cpp + util/decoder.cpp + util/hongkangparser.cpp + util/instrumenttimesparser.cpp + util/imagesequencer.cpp + util/instrumentdecoder.cpp + util/labelparser.cpp + util/projectioncomponent.cpp + util/scannerdecoder.cpp + util/sequenceparser.cpp + util/targetdecoder.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/crawlingline_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/crawlingline_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fov_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/fov_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableModel_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableModel_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableModelProjection_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableModelProjection_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablePlanet_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablePlanet_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablePlanetProjection_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablePlanetProjection_vs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/terminatorshadow_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/terminatorshadow_vs.glsl + shaders/crawlingline_fs.glsl + shaders/crawlingline_vs.glsl + shaders/fov_fs.glsl + shaders/fov_vs.glsl + shaders/renderableModel_fs.glsl + shaders/renderableModel_vs.glsl + shaders/renderableModelProjection_fs.glsl + shaders/renderableModelProjection_vs.glsl + shaders/renderablePlanet_fs.glsl + shaders/renderablePlanet_vs.glsl + shaders/renderablePlanetProjection_fs.glsl + shaders/renderablePlanetProjection_vs.glsl + shaders/terminatorshadow_fs.glsl + shaders/terminatorshadow_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) diff --git a/modules/spacecraftinstruments/include.cmake b/modules/spacecraftinstruments/include.cmake index 659b975323..ffea0ac430 100644 --- a/modules/spacecraftinstruments/include.cmake +++ b/modules/spacecraftinstruments/include.cmake @@ -1,5 +1 @@ set(DEFAULT_MODULE ON) - -set (OPENSPACE_DEPENDENCIES - space -) diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index be75dca698..12b7986138 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -767,97 +767,96 @@ void RenderableFov::computeIntercepts(const UpdateData& data, const std::string& } -#ifdef DEBUG_THIS - // At least one point will intersect - for (size_t i = 0; i < _instrument.bounds.size(); ++i) { - // Wrap around the array index to 0 - const size_t j = (i == _instrument.bounds.size() - 1) ? 0 : i + 1; +#if 0 // DEBUG_THIS + // At least one point will intersect + for (size_t i = 0; i < _instrument.bounds.size(); ++i) { + // Wrap around the array index to 0 + const size_t j = (i == _instrument.bounds.size() - 1) ? 0 : i + 1; - const glm::dvec3& iBound = _instrument.bounds[i]; - const glm::dvec3& jBound = _instrument.bounds[j]; + const glm::dvec3& iBound = _instrument.bounds[i]; + const glm::dvec3& jBound = _instrument.bounds[j]; - auto intercepts = [&](const glm::dvec3& probe) -> bool { - return SpiceManager::ref().surfaceIntercept( - target, - _instrument.spacecraft, - _instrument.name, - makeBodyFixedReferenceFrame(_instrument.referenceFrame).first, - _instrument.aberrationCorrection, - data.time, - probe - ).interceptFound; - }; + auto intercepts = [&](const glm::dvec3& probe) -> bool { + return SpiceManager::ref().surfaceIntercept( + target, + _instrument.spacecraft, + _instrument.name, + makeBodyFixedReferenceFrame(_instrument.referenceFrame).first, + _instrument.aberrationCorrection, + data.time, + probe + ).interceptFound; + }; - static const uint8_t NoIntersect = 0b00; - static const uint8_t ThisIntersect = 0b01; - static const uint8_t NextIntersect = 0b10; - static const uint8_t BothIntersect = 0b11; + static const uint8_t NoIntersect = 0b00; + static const uint8_t ThisIntersect = 0b01; + static const uint8_t NextIntersect = 0b10; + static const uint8_t BothIntersect = 0b11; - const uint8_t type = (intersects[i] ? 1 : 0) + (intersects[j] ? 2 : 0); - switch (type) { - case NoIntersect: - { - // If both points don't intercept, the target might still pass between - // them, so we need to check the intermediate point + const uint8_t type = (intersects[i] ? 1 : 0) + (intersects[j] ? 2 : 0); + switch (type) { + case NoIntersect: + { + // If both points don't intercept, the target might still pass between + // them, so we need to check the intermediate point - const glm::dvec3 half = glm::mix(iBound, jBound, 0.5); - if (intercepts(half)) { - // The two outer points do not intersect, but the middle point - // does; so we need to find the intersection points - const double t1 = bisect(half, iBound, intercepts); - const double t2 = 0.5 + bisect(half, jBound, intercepts); + const glm::dvec3 half = glm::mix(iBound, jBound, 0.5); + if (intercepts(half)) { + // The two outer points do not intersect, but the middle point + // does; so we need to find the intersection points + const double t1 = bisect(half, iBound, intercepts); + const double t2 = 0.5 + bisect(half, jBound, intercepts); - // - // The target is sticking out somewhere between i and j, so we - // have three regions here: - // The first (0,t1) and second (t2,1) are not intersecting - // The third between (t1,t2) is intersecting - // - // i p1 p2 j - // ***** - // x-------* *-------x - // 0 t1 t2 1 + // + // The target is sticking out somewhere between i and j, so we + // have three regions here: + // The first (0,t1) and second (t2,1) are not intersecting + // The third between (t1,t2) is intersecting + // + // i p1 p2 j + // ***** + // x-------* *-------x + // 0 t1 t2 1 - // OBS: i and j are in bounds-space, p1, p2 are in - // _orthogonalPlane-space - const size_t p1 = static_cast( - indexForBounds(i) + t1 * InterpolationSteps - ); - const size_t p2 = static_cast( - indexForBounds(i) + t2 * InterpolationSteps - ); + // OBS: i and j are in bounds-space, p1, p2 are in + // _orthogonalPlane-space + const size_t p1 = static_cast( + indexForBounds(i) + t1 * InterpolationSteps + ); + const size_t p2 = static_cast( + indexForBounds(i) + t2 * InterpolationSteps + ); - // We can copy the non-intersecting parts - copyFieldOfViewValues(i, indexForBounds(i), p1); - copyFieldOfViewValues(i, p2, indexForBounds(j)); + // We can copy the non-intersecting parts + copyFieldOfViewValues(i, indexForBounds(i), p1); + copyFieldOfViewValues(i, p2, indexForBounds(j)); - // Are recompute the intersecting ones - for (size_t k = 0; k <= (p2 - p1); ++k) { - const double t = t1 + k * (t2 - t1); - const glm::dvec3 interpolated = glm::mix(iBound, jBound, t); - const glm::vec3 icpt = interceptVector(interpolated); - _orthogonalPlane.data[p1 + k] = { - icpt.x, icpt.y, icpt.z, - RenderInformation::VertexColorTypeSquare - }; - } + // Are recompute the intersecting ones + for (size_t k = 0; k <= (p2 - p1); ++k) { + const double t = t1 + k * (t2 - t1); + const glm::dvec3 interpolated = glm::mix(iBound, jBound, t); + const glm::vec3 icpt = interceptVector(interpolated); + _orthogonalPlane.data[p1 + k] = { + icpt.x, icpt.y, icpt.z, + RenderInformation::VertexColorTypeSquare + }; } - else { - copyFieldOfViewValues( - i, - indexForBounds(i), - indexForBounds(i + 1) - ); - } - break; } - case ThisIntersect: - case NextIntersect: - case BothIntersect: - break; - default: - throw ghoul::MissingCaseException(); + else { + copyFieldOfViewValues( + i, + indexForBounds(i), + indexForBounds(i + 1) + ); + } + break; } + case ThisIntersect: + case NextIntersect: + case BothIntersect: + break; + default: + throw ghoul::MissingCaseException(); } } #endif diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index 0d2ae2f198..d665bd7252 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -163,7 +163,6 @@ bool HongKangParser::create() { double captureStart = -1.0; std::string cameraTarget = "VOID"; - std::string scannerTarget = "VOID"; std::string line; while (!file.eof()) { @@ -236,7 +235,7 @@ bool HongKangParser::create() { met, _metRef ); - scannerTarget = findPlaybookSpecifiedTarget(line); + std::string scannerTarget = findPlaybookSpecifiedTarget(line); TimeRange scanRange = { scanStart, scanStop }; ghoul_assert(scanRange.isDefined(), "Invalid time range!"); diff --git a/modules/spout/CMakeLists.txt b/modules/spout/CMakeLists.txt index 9cc9bd8a01..2b3fd31444 100644 --- a/modules/spout/CMakeLists.txt +++ b/modules/spout/CMakeLists.txt @@ -25,15 +25,15 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/renderableplanespout.h - ${CMAKE_CURRENT_SOURCE_DIR}/screenspacespout.h - ${CMAKE_CURRENT_SOURCE_DIR}/spoutlibrary.h + renderableplanespout.h + screenspacespout.h + spoutlibrary.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/renderableplanespout.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/screenspacespout.cpp + renderableplanespout.cpp + screenspacespout.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) @@ -46,7 +46,7 @@ create_new_module( ${HEADER_FILES} ${SOURCE_FILES} ) -target_include_directories(openspace-module-spout SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/spout) +target_include_directories(openspace-module-spout SYSTEM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ext/spout) target_link_libraries(openspace-module-spout PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ext/spout/SpoutLibrary.lib) register_external_libraries("${CMAKE_CURRENT_SOURCE_DIR}/ext/spout/SpoutLibrary.dll") diff --git a/modules/spout/include.cmake b/modules/spout/include.cmake index 2a359fe308..e52c831cc2 100644 --- a/modules/spout/include.cmake +++ b/modules/spout/include.cmake @@ -1,7 +1,3 @@ -set (OPENSPACE_DEPENDENCIES - base -) - if (WIN32) set(DEFAULT_MODULE ON) endif () diff --git a/modules/sync/CMakeLists.txt b/modules/sync/CMakeLists.txt index 97a6716b7e..ecf74f7c1d 100644 --- a/modules/sync/CMakeLists.txt +++ b/modules/sync/CMakeLists.txt @@ -25,18 +25,18 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/syncmodule.h - ${CMAKE_CURRENT_SOURCE_DIR}/syncs/httpsynchronization.h - ${CMAKE_CURRENT_SOURCE_DIR}/syncs/urlsynchronization.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/syncassettask.h + syncmodule.h + syncs/httpsynchronization.h + syncs/urlsynchronization.h + tasks/syncassettask.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/syncmodule.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/syncs/httpsynchronization.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/syncs/urlsynchronization.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/syncassettask.cpp + syncmodule.cpp + syncs/httpsynchronization.cpp + syncs/urlsynchronization.cpp + tasks/syncassettask.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/touch/CMakeLists.txt b/modules/touch/CMakeLists.txt index 5792eaaecf..ed76ab5ec1 100644 --- a/modules/touch/CMakeLists.txt +++ b/modules/touch/CMakeLists.txt @@ -25,28 +25,28 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/directinputsolver.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/tuioear.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/touchinteraction.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/touchmarker.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/win32_touch.h + ext/levmarq.h + include/directinputsolver.h + include/tuioear.h + include/touchinteraction.h + include/touchmarker.h + include/win32_touch.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/directinputsolver.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/tuioear.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/touchinteraction.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/touchmarker.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/win32_touch.cpp + ext/levmarq.cpp + src/directinputsolver.cpp + src/tuioear.cpp + src/touchinteraction.cpp + src/touchmarker.cpp + src/win32_touch.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) set(SHADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/marker_fs.glsl - ${CMAKE_CURRENT_SOURCE_DIR}/shaders/marker_vs.glsl + shaders/marker_fs.glsl + shaders/marker_vs.glsl ) source_group("Shader Files" FILES ${SHADER_FILES}) @@ -57,6 +57,5 @@ create_new_module( ${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES} ) -include_external_library(${touch_module} PUBLIC libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext) - +include_external_library(${touch_module} PRIVATE libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext ${CMAKE_CURRENT_SOURCE_DIR}/ext) disable_external_warnings_for_file(${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp) diff --git a/modules/touch/ext/CMakeLists.txt b/modules/touch/ext/CMakeLists.txt index 9ce2824de9..f1a5d5f26c 100644 --- a/modules/touch/ext/CMakeLists.txt +++ b/modules/touch/ext/CMakeLists.txt @@ -26,58 +26,58 @@ project(libTUIO11) message(STATUS "Generating libTUIO11 project") set(TUIO_SOURCE - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/WebSockSender.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/UdpSender.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/UdpReceiver.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioTime.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioServer.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioPoint.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioObject.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioManager.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioDispatcher.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioCursor.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioContainer.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioClient.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TuioBlob.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TcpSender.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/TcpReceiver.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/OscReceiver.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/OneEuroFilter.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO/FlashSender.cpp - - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/ip/IpEndpointName.cpp - - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/osc/OscTypes.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/osc/OscReceivedElements.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/osc/OscPrintReceivedElements.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/osc/OscOutboundPacketStream.cpp + libTUIO11/TUIO/WebSockSender.cpp + libTUIO11/TUIO/UdpSender.cpp + libTUIO11/TUIO/UdpReceiver.cpp + libTUIO11/TUIO/TuioTime.cpp + libTUIO11/TUIO/TuioServer.cpp + libTUIO11/TUIO/TuioPoint.cpp + libTUIO11/TUIO/TuioObject.cpp + libTUIO11/TUIO/TuioManager.cpp + libTUIO11/TUIO/TuioDispatcher.cpp + libTUIO11/TUIO/TuioCursor.cpp + libTUIO11/TUIO/TuioContainer.cpp + libTUIO11/TUIO/TuioClient.cpp + libTUIO11/TUIO/TuioBlob.cpp + libTUIO11/TUIO/TcpSender.cpp + libTUIO11/TUIO/TcpReceiver.cpp + libTUIO11/TUIO/OscReceiver.cpp + libTUIO11/TUIO/OneEuroFilter.cpp + libTUIO11/TUIO/FlashSender.cpp + + libTUIO11/oscpack/ip/IpEndpointName.cpp + + libTUIO11/oscpack/osc/OscTypes.cpp + libTUIO11/oscpack/osc/OscReceivedElements.cpp + libTUIO11/oscpack/osc/OscPrintReceivedElements.cpp + libTUIO11/oscpack/osc/OscOutboundPacketStream.cpp ) if (WIN32) - set(TUIO_SOURCE - ${TUIO_SOURCE} - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/ip/win32/NetworkingUtils.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/ip/win32/UdpSocket.cpp - ) + set(TUIO_SOURCE + ${TUIO_SOURCE} + libTUIO11/oscpack/ip/win32/NetworkingUtils.cpp + libTUIO11/oscpack/ip/win32/UdpSocket.cpp + ) endif () if (UNIX) - set(TUIO_SOURCE - ${TUIO_SOURCE} - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/ip/posix/NetworkingUtils.cpp - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack/ip/posix/UdpSocket.cpp - ) + set(TUIO_SOURCE + ${TUIO_SOURCE} + libTUIO11/oscpack/ip/posix/NetworkingUtils.cpp + libTUIO11/oscpack/ip/posix/UdpSocket.cpp + ) endif () -add_library(libTUIO11 - ${TUIO_SOURCE} +add_library(libTUIO11 ${TUIO_SOURCE}) +target_include_directories(libTUIO11 SYSTEM + PUBLIC + "${PROJECT_SOURCE_DIR}/libTUIO11/TUIO" + "${PROJECT_SOURCE_DIR}/libTUIO11/" + "${PROJECT_SOURCE_DIR}/libTUIO11/oscpack" ) -target_include_directories(libTUIO11 PUBLIC - ${PROJECT_SOURCE_DIR}/libTUIO11/ - ${PROJECT_SOURCE_DIR}/libTUIO11/oscpack - ${PROJECT_SOURCE_DIR}/libTUIO11/TUIO) if (WIN32) - # Tuio dependencies - target_link_libraries(libTUIO11 PRIVATE winmm.lib wininet.lib ws2_32.lib) + # Tuio dependencies + target_link_libraries(libTUIO11 PRIVATE winmm.lib wininet.lib ws2_32.lib) endif () diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 5de30dcf64..f619cd1f32 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -1086,9 +1086,9 @@ void TouchInteraction::step(double dt, bool directTouch) { } else if (currentPosViolatingZoomOutLimit) { #ifdef TOUCH_DEBUG_PROPERTIES - LINFO(fmt::format( + LINFOC("", fmt::format( "{}: You are outside zoom out {} limit, only zoom in allowed", - _loggerCat, _zoomOutLimit.value()); + _loggerCat, _zoomOutLimit.value())); #endif // Only allow zooming in if you are outside the zoom out limit if (newPosDistance < currentPosDistance) { diff --git a/modules/toyvolume/CMakeLists.txt b/modules/toyvolume/CMakeLists.txt index ad4395b781..0436ed5291 100644 --- a/modules/toyvolume/CMakeLists.txt +++ b/modules/toyvolume/CMakeLists.txt @@ -25,14 +25,14 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletoyvolume.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/toyvolumeraycaster.h + rendering/renderabletoyvolume.h + rendering/toyvolumeraycaster.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletoyvolume.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/toyvolumeraycaster.cpp + rendering/renderabletoyvolume.cpp + rendering/toyvolumeraycaster.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/toyvolume/include.cmake b/modules/toyvolume/include.cmake index 659b975323..ffea0ac430 100644 --- a/modules/toyvolume/include.cmake +++ b/modules/toyvolume/include.cmake @@ -1,5 +1 @@ set(DEFAULT_MODULE ON) - -set (OPENSPACE_DEPENDENCIES - space -) diff --git a/modules/vislab/CMakeLists.txt b/modules/vislab/CMakeLists.txt index 1e75a257b2..3c5fd4b9ce 100644 --- a/modules/vislab/CMakeLists.txt +++ b/modules/vislab/CMakeLists.txt @@ -25,17 +25,13 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES -${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledistancelabel.h + rendering/renderabledistancelabel.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabledistancelabel.cpp + rendering/renderabledistancelabel.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) -create_new_module( - "VisLab" - vislab_module - ${HEADER_FILES} ${SOURCE_FILES} -) +create_new_module("VisLab" vislab_module ${HEADER_FILES} ${SOURCE_FILES}) diff --git a/modules/volume/CMakeLists.txt b/modules/volume/CMakeLists.txt index 3974d1f95f..14aa11f617 100644 --- a/modules/volume/CMakeLists.txt +++ b/modules/volume/CMakeLists.txt @@ -25,51 +25,51 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/envelope.h - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolume.h - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumemetadata.h - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumereader.h - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumewriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/textureslicevolumereader.h - ${CMAKE_CURRENT_SOURCE_DIR}/textureslicevolumereader.inl - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunction.h - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunctionhandler.h - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunctionproperty.h - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumemetadata.h - ${CMAKE_CURRENT_SOURCE_DIR}/lrucache.h - ${CMAKE_CURRENT_SOURCE_DIR}/lrucache.inl - ${CMAKE_CURRENT_SOURCE_DIR}/linearlrucache.h - ${CMAKE_CURRENT_SOURCE_DIR}/linearlrucache.inl - ${CMAKE_CURRENT_SOURCE_DIR}/volumegridtype.h - ${CMAKE_CURRENT_SOURCE_DIR}/volumesampler.h - ${CMAKE_CURRENT_SOURCE_DIR}/volumesampler.inl - ${CMAKE_CURRENT_SOURCE_DIR}/volumeutils.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletimevaryingvolume.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/basicvolumeraycaster.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/volumeclipplane.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/volumeclipplanes.h - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/generaterawvolumetask.h + envelope.h + rawvolume.h + rawvolumemetadata.h + rawvolumereader.h + rawvolumewriter.h + textureslicevolumereader.h + textureslicevolumereader.inl + transferfunction.h + transferfunctionhandler.h + transferfunctionproperty.h + rawvolumemetadata.h + lrucache.h + lrucache.inl + linearlrucache.h + linearlrucache.inl + volumegridtype.h + volumesampler.h + volumesampler.inl + volumeutils.h + rendering/renderabletimevaryingvolume.h + rendering/basicvolumeraycaster.h + rendering/volumeclipplane.h + rendering/volumeclipplanes.h + tasks/generaterawvolumetask.h ) source_group("Header Files" FILES ${HEADER_FILES}) set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/envelope.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolume.inl - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumemetadata.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumereader.inl - ${CMAKE_CURRENT_SOURCE_DIR}/rawvolumewriter.inl - ${CMAKE_CURRENT_SOURCE_DIR}/textureslicevolumereader.inl - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunction.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunctionhandler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/transferfunctionproperty.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/volumesampler.inl - ${CMAKE_CURRENT_SOURCE_DIR}/volumegridtype.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/volumeutils.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletimevaryingvolume.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/basicvolumeraycaster.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/volumeclipplane.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/volumeclipplanes.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/tasks/generaterawvolumetask.cpp + envelope.cpp + rawvolume.inl + rawvolumemetadata.cpp + rawvolumereader.inl + rawvolumewriter.inl + textureslicevolumereader.inl + transferfunction.cpp + transferfunctionhandler.cpp + transferfunctionproperty.cpp + volumesampler.inl + volumegridtype.cpp + volumeutils.cpp + rendering/renderabletimevaryingvolume.cpp + rendering/basicvolumeraycaster.cpp + rendering/volumeclipplane.cpp + rendering/volumeclipplanes.cpp + tasks/generaterawvolumetask.cpp ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/volume/envelope.cpp b/modules/volume/envelope.cpp index a3539dc83d..d4e2d4050b 100644 --- a/modules/volume/envelope.cpp +++ b/modules/volume/envelope.cpp @@ -156,11 +156,9 @@ std::string EnvelopePoint::decimalToHexadecimal(int dec) const { return "00"; } - int hex = dec; std::string hexStr; - while (dec > 0) { - hex = dec % 16; + int hex = dec % 16; if (hex < 10) { hexStr = hexStr.insert(0, std::string(1, static_cast(hex + 48))); diff --git a/modules/volume/include.cmake b/modules/volume/include.cmake index 659b975323..ffea0ac430 100644 --- a/modules/volume/include.cmake +++ b/modules/volume/include.cmake @@ -1,5 +1 @@ set(DEFAULT_MODULE ON) - -set (OPENSPACE_DEPENDENCIES - space -) diff --git a/modules/volume/linearlrucache.h b/modules/volume/linearlrucache.h index d2a8c3553f..1bf5ec0f69 100644 --- a/modules/volume/linearlrucache.h +++ b/modules/volume/linearlrucache.h @@ -25,7 +25,6 @@ #ifndef __OPENSPACE_MODULE_VOLUME___LINEARLRUCACHE___H__ #define __OPENSPACE_MODULE_VOLUME___LINEARLRUCACHE___H__ -//#include #include #include #include diff --git a/modules/volume/lrucache.h b/modules/volume/lrucache.h index 2b20ce46b9..fd84de9532 100644 --- a/modules/volume/lrucache.h +++ b/modules/volume/lrucache.h @@ -31,13 +31,12 @@ namespace openspace::volume { -template < +template< typename KeyType, typename ValueType, - template class ContainerType + template class ContainerType > -class LruCache -{ +class LruCache { public: LruCache(size_t capacity); diff --git a/modules/volume/rawvolume.h b/modules/volume/rawvolume.h index 44485f63db..1c30a0db88 100644 --- a/modules/volume/rawvolume.h +++ b/modules/volume/rawvolume.h @@ -33,9 +33,9 @@ namespace openspace::volume { template class RawVolume { +public: using VoxelType = Type; -public: RawVolume(const glm::uvec3& dimensions); glm::uvec3 dimensions() const; diff --git a/modules/volume/rawvolumemetadata.cpp b/modules/volume/rawvolumemetadata.cpp index e7886f57ca..10a956a6f1 100644 --- a/modules/volume/rawvolumemetadata.cpp +++ b/modules/volume/rawvolumemetadata.cpp @@ -25,8 +25,9 @@ #include #include - +#include #include +#include namespace { constexpr const char* KeyDimensions = "Dimensions"; diff --git a/modules/volume/rawvolumemetadata.h b/modules/volume/rawvolumemetadata.h index c3f95f7cd3..87cb5b035d 100644 --- a/modules/volume/rawvolumemetadata.h +++ b/modules/volume/rawvolumemetadata.h @@ -25,10 +25,11 @@ #ifndef __OPENSPACE_MODULE_VOLUME___RAWVOLUMEMETADATA___H__ #define __OPENSPACE_MODULE_VOLUME___RAWVOLUMEMETADATA___H__ -#include #include +#include -#include +namespace openspace::documentation { struct Documentation; } +namespace ghoul { class Dictionary; } namespace openspace::volume { diff --git a/modules/volume/rawvolumereader.h b/modules/volume/rawvolumereader.h index f534f338c7..d90a50c235 100644 --- a/modules/volume/rawvolumereader.h +++ b/modules/volume/rawvolumereader.h @@ -26,7 +26,6 @@ #define __OPENSPACE_MODULE_VOLUME___RAWVOLUMEREADER___H__ #include -#include #include namespace openspace::volume { diff --git a/modules/volume/rendering/basicvolumeraycaster.cpp b/modules/volume/rendering/basicvolumeraycaster.cpp index 0f1cfda6ec..2b0746992e 100644 --- a/modules/volume/rendering/basicvolumeraycaster.cpp +++ b/modules/volume/rendering/basicvolumeraycaster.cpp @@ -24,17 +24,18 @@ #include +#include +#include +#include +#include +#include #include -#include #include -#include +#include #include #include -#include -#include -#include -#include #include +#include namespace { constexpr const char* GlslRaycastPath = "${MODULE_VOLUME}/shaders/raycast.glsl"; diff --git a/modules/volume/rendering/basicvolumeraycaster.h b/modules/volume/rendering/basicvolumeraycaster.h index 66d018cc93..ad04676459 100644 --- a/modules/volume/rendering/basicvolumeraycaster.h +++ b/modules/volume/rendering/basicvolumeraycaster.h @@ -26,12 +26,9 @@ #define __OPENSPACE_MODULE_VOLUME___BASICVOLUMERAYCASTER___H__ #include -#include -#include -#include -#include #include +#include namespace ghoul::opengl { class Texture; @@ -42,6 +39,7 @@ namespace ghoul::opengl { namespace openspace { struct RenderData; struct RaycastData; + class TransferFunction; } // namespace openspace namespace openspace::volume { @@ -78,8 +76,7 @@ public: void setVolumeTexture(std::shared_ptr texture); std::shared_ptr volumeTexture() const; - void setTransferFunction( - std::shared_ptr transferFunction); + void setTransferFunction(std::shared_ptr transferFunction); void setStepSize(float stepSize); float opacity() const; @@ -97,7 +94,7 @@ private: std::shared_ptr _clipPlanes; std::shared_ptr _volumeTexture; - std::shared_ptr _transferFunction; + std::shared_ptr _transferFunction; BoxGeometry _boundingBox; VolumeGridType _gridType; glm::mat4 _modelTransform = glm::mat4(1.f); diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index 61eac27267..970b755900 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/modules/volume/rendering/renderabletimevaryingvolume.h b/modules/volume/rendering/renderabletimevaryingvolume.h index b1b22438e8..e1d71275df 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.h +++ b/modules/volume/rendering/renderabletimevaryingvolume.h @@ -27,20 +27,12 @@ #include +#include #include #include +#include +#include #include -// #include - #include -// #include -// #include - -// #include -// #include -// #include -// #include -// #include -// #include namespace openspace { class Histogram; diff --git a/modules/volume/tasks/generaterawvolumetask.cpp b/modules/volume/tasks/generaterawvolumetask.cpp index e89bece66b..d7ef4401be 100644 --- a/modules/volume/tasks/generaterawvolumetask.cpp +++ b/modules/volume/tasks/generaterawvolumetask.cpp @@ -27,11 +27,9 @@ #include #include #include - #include #include #include - #include #include #include @@ -40,7 +38,6 @@ #include #include - #include namespace { @@ -53,11 +50,9 @@ namespace { constexpr const char* KeyUpperDomainBound = "UpperDomainBound"; } // namespace -namespace openspace { -namespace volume { +namespace openspace::volume { -GenerateRawVolumeTask::GenerateRawVolumeTask(const ghoul::Dictionary& dictionary) -{ +GenerateRawVolumeTask::GenerateRawVolumeTask(const ghoul::Dictionary& dictionary) { openspace::documentation::testSpecificationAndThrow( documentation(), dictionary, @@ -234,5 +229,4 @@ documentation::Documentation GenerateRawVolumeTask::documentation() { }; } -} // namespace volume -} // namespace openspace +} // namespace openspace::volume diff --git a/modules/volume/tasks/generaterawvolumetask.h b/modules/volume/tasks/generaterawvolumetask.h index 9f7ca41732..1fe1611ad6 100644 --- a/modules/volume/tasks/generaterawvolumetask.h +++ b/modules/volume/tasks/generaterawvolumetask.h @@ -28,11 +28,9 @@ #include #include - #include -namespace openspace { -namespace volume { +namespace openspace::volume { class GenerateRawVolumeTask : public Task { public: @@ -53,7 +51,6 @@ private: std::string _valueFunctionLua; }; -} // namespace volume -} // namespace openspace +} // namespace openspace::volume #endif // __OPENSPACE_MODULE_VOLUME___GENERATERAWVOLUMETASK___H__ diff --git a/modules/volume/transferfunction.h b/modules/volume/transferfunction.h index 9581cc6e63..e613be6779 100644 --- a/modules/volume/transferfunction.h +++ b/modules/volume/transferfunction.h @@ -25,8 +25,8 @@ #ifndef __OPENSPACE_MODULE_VOLUME___TRANSFERFUNCTION___H__ #define __OPENSPACE_MODULE_VOLUME___TRANSFERFUNCTION___H__ -#include #include +#include namespace ghoul { class Dictionary; } namespace ghoul::opengl { class Texture; } diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 55f88c9be4..76b8b972cf 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -45,6 +45,10 @@ cmake_minimum_required(VERSION 2.8.12.1) # Use folders in the resulting project files. set_property(GLOBAL PROPERTY OS_FOLDERS ON) +# "OpenSpace Helper" is not a valid CMake target name under OLD +# https://cmake.org/cmake/help/git-stage/policy/CMP0037.html +cmake_policy(SET CMP0037 OLD) + # Use _ROOT variables # https://cmake.org/cmake/help/git-stage/policy/CMP0074.html cmake_policy(SET CMP0074 NEW) @@ -234,4 +238,4 @@ set_folder_location(openspace_web_helper "Helper") # Display CEF configuration settings. PRINT_CEF_CONFIG() -target_include_directories(${webbrowser_module} PUBLIC ${CEF_ROOT}) +target_include_directories(${webbrowser_module} SYSTEM PUBLIC ${CEF_ROOT}) diff --git a/modules/webbrowser/cmake/cef_support.cmake b/modules/webbrowser/cmake/cef_support.cmake index fdecb039d1..8c15677a76 100644 --- a/modules/webbrowser/cmake/cef_support.cmake +++ b/modules/webbrowser/cmake/cef_support.cmake @@ -32,22 +32,22 @@ # platform. function(set_current_cef_build_platform) - if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") set(CEF_PLATFORM "macosx64" PARENT_SCOPE) - elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") - if(CMAKE_SIZEOF_VOID_P MATCHES 8) + elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + if (CMAKE_SIZEOF_VOID_P MATCHES 8) set(CEF_PLATFORM "linux64" PARENT_SCOPE) - else() + else () set(CEF_PLATFORM "linux32" PARENT_SCOPE) - endif() - elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - if(CMAKE_SIZEOF_VOID_P MATCHES 8) + endif () + elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + if (CMAKE_SIZEOF_VOID_P MATCHES 8) set(CEF_PLATFORM "windows64" PARENT_SCOPE) else() set(CEF_PLATFORM "windows32" PARENT_SCOPE) - endif() - endif() -endfunction() + endif () + endif () +endfunction () # Download the CEF binary distribution for |platform| and |version| to # |download_dir|. The |CEF_ROOT| variable will be set in global scope pointing @@ -64,10 +64,10 @@ function(download_cef platform version download_dir) set(CEF_ROOT "${CEF_DOWNLOAD_DIR}/${CEF_DISTRIBUTION}" CACHE INTERNAL "CEF_ROOT") # Download and/or extract the binary distribution if necessary. - if(NOT IS_DIRECTORY "${CEF_ROOT}") + if (NOT IS_DIRECTORY "${CEF_ROOT}") set(CEF_DOWNLOAD_FILENAME "${CEF_DISTRIBUTION}.tar.bz2") set(CEF_DOWNLOAD_PATH "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}") - if(NOT EXISTS "${CEF_DOWNLOAD_PATH}") + if (NOT EXISTS "${CEF_DOWNLOAD_PATH}") string(REPLACE "+" "%2B" CEF_DOWNLOAD_URL "http://opensource.spotify.com/cefbuilds/${CEF_DOWNLOAD_FILENAME}") # Download the SHA1 hash for the binary distribution. @@ -81,21 +81,21 @@ function(download_cef platform version download_dir) DOWNLOAD "${CEF_DOWNLOAD_URL}" "${CEF_DOWNLOAD_PATH}" EXPECTED_HASH SHA1=${CEF_SHA1} SHOW_PROGRESS - ) - endif() + ) + endif () # Extract the binary distribution. message(STATUS "Extracting CEF: ${CEF_DOWNLOAD_PATH}...") execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}" WORKING_DIRECTORY ${CEF_DOWNLOAD_DIR} - ) - endif() -endfunction() + ) + endif () +endfunction () macro(set_openspace_cef_target_out_dir) - if(${CMAKE_GENERATOR} STREQUAL "Ninja" OR - ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") + if (${CMAKE_GENERATOR} STREQUAL "Ninja" OR + ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") # By default Ninja and Make builds don't create a subdirectory named after # the configuration. # set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}") @@ -104,11 +104,11 @@ macro(set_openspace_cef_target_out_dir) # Output binaries (executables, libraries) to the correct directory. # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR}) # set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR}) - else() + else () # set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$") set(CEF_TARGET_OUT_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$") - endif() -endmacro() + endif () +endmacro () macro(add_windows_cef_manifest target_dir manifest_path target extension) add_custom_command( @@ -119,7 +119,7 @@ macro(add_windows_cef_manifest target_dir manifest_path target extension) -outputresource:"${target_dir}/${target}.${extension}"\;\#1 COMMENT "Adding manifest..." ) -endmacro() +endmacro () # Add a logical target that can be used to link the specified libraries into an @@ -130,5 +130,5 @@ macro(add_cef_logical_target target debug_lib release_lib) IMPORTED_LOCATION "${release_lib}" IMPORTED_LOCATION_DEBUG "${debug_lib}" IMPORTED_LOCATION_RELEASE "${release_lib}" - ) -endmacro() + ) +endmacro () diff --git a/modules/webbrowser/cmake/webbrowser_helpers.cmake b/modules/webbrowser/cmake/webbrowser_helpers.cmake index c9b6242ba8..e35c088166 100644 --- a/modules/webbrowser/cmake/webbrowser_helpers.cmake +++ b/modules/webbrowser/cmake/webbrowser_helpers.cmake @@ -23,122 +23,117 @@ ########################################################################################## function(set_cef_targets cef_root main_target) - # find cef cmake helpers - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${cef_root}/cmake") - include(cef_support) + # find cef cmake helpers + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${cef_root}/cmake") + include(cef_support) - # Use _ROOT variables - # https://cmake.org/cmake/help/git-stage/policy/CMP0074.html - cmake_policy(SET CMP0074 NEW) - find_package(CEF REQUIRED) + # Use _ROOT variables + # https://cmake.org/cmake/help/git-stage/policy/CMP0074.html + cmake_policy(SET CMP0074 NEW) + find_package(CEF REQUIRED) - # ensure out target dir is set - set_openspace_cef_target_out_dir() + # ensure out target dir is set + set_openspace_cef_target_out_dir() - # main CEF executable target - set(CEF_TARGET ${main_target} PARENT_SCOPE) -endfunction() + # main CEF executable target + set(CEF_TARGET ${main_target} PARENT_SCOPE) +endfunction () function(run_cef_platform_config cef_root cef_target module_path) - # find cef cmake helpers - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${cef_root}/cmake") - include(cef_support) + # find cef cmake helpers + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${cef_root}/cmake") + include(cef_support) - # Use _ROOT variables - # https://cmake.org/cmake/help/git-stage/policy/CMP0074.html - cmake_policy(SET CMP0074 NEW) - find_package(CEF REQUIRED) + # Use _ROOT variables + # https://cmake.org/cmake/help/git-stage/policy/CMP0074.html + cmake_policy(SET CMP0074 NEW) + find_package(CEF REQUIRED) - if (OS_MACOSX) - run_cef_macosx_config("${cef_target}" "${module_path}") - endif() - if (OS_WINDOWS) - run_cef_windows_config("${cef_target}" "${cef_root}" "${module_path}") - endif() - if (OS_LINUX) - run_cef_linux_config("${cef_target}") - endif() -endfunction() + if (OS_MACOSX) + run_cef_macosx_config("${cef_target}" "${module_path}") + endif () + if (OS_WINDOWS) + run_cef_windows_config("${cef_target}" "${cef_root}" "${module_path}") + endif () + if (OS_LINUX) + run_cef_linux_config("${cef_target}") + endif () +endfunction () function(run_cef_macosx_config CEF_ROOT module_path) - if (${CMAKE_GENERATOR} STREQUAL "Ninja" OR - ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") - set(CEF_OUTPUT_PREFIX "") - else() - set(CEF_OUTPUT_PREFIX "$/") - endif() + if (${CMAKE_GENERATOR} STREQUAL "Ninja" OR ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") + set(CEF_OUTPUT_PREFIX "") + else () + set(CEF_OUTPUT_PREFIX "$/") + endif () - set(CEF_FINAL_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEF_OUTPUT_PREFIX}${CEF_TARGET}.app") - set(CEF_INTERMEDIATE_HELPER_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEF_OUTPUT_PREFIX}${CEF_HELPER_TARGET}.app") + set(CEF_FINAL_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEF_OUTPUT_PREFIX}${CEF_TARGET}.app") + set(CEF_INTERMEDIATE_HELPER_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CEF_OUTPUT_PREFIX}${CEF_HELPER_TARGET}.app") - set(CEF_FINAL_HELPER_APP "${CEF_FINAL_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app") - set(CEF_FRAMEWORK_LOCATION "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework") - set(CEF_FRAMEWORK_FINAL_LOCATION "${CEF_FINAL_APP}/Contents/Frameworks/Chromium Embedded Framework.framework") + set(CEF_FINAL_HELPER_APP "${CEF_FINAL_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app") + set(CEF_FRAMEWORK_LOCATION "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework") + set(CEF_FRAMEWORK_FINAL_LOCATION "${CEF_FINAL_APP}/Contents/Frameworks/Chromium Embedded Framework.framework") - add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}") + add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}") - # target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) - target_link_libraries(${CEF_TARGET} PUBLIC libcef_dll_wrapper ${CEF_STANDARD_LIBS}) - set_target_properties(${CEF_TARGET} PROPERTIES - RESOURCE "${WEBBROWSER_RESOURCES_SRCS}" - MACOSX_BUNDLE_INFO_PLIST ${module_path}/mac/Info.plist - ) + # target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) + target_link_libraries(${CEF_TARGET} PUBLIC libcef_dll_wrapper ${CEF_STANDARD_LIBS}) + set_target_properties(${CEF_TARGET} PROPERTIES + RESOURCE "${WEBBROWSER_RESOURCES_SRCS}" + MACOSX_BUNDLE_INFO_PLIST ${module_path}/mac/Info.plist + ) - # Copy files into the main app bundle. + # Copy files into the main app bundle. + add_custom_command( + TARGET ${CEF_TARGET} + POST_BUILD + # Copy the helper app bundle into the Frameworks directory. + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_INTERMEDIATE_HELPER_APP}" "${CEF_FINAL_HELPER_APP}" + # Copy the CEF framework into the Frameworks directory. + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_FRAMEWORK_LOCATION}" "${CEF_FRAMEWORK_FINAL_LOCATION}" + VERBATIM + ) + + # copy dynamic libraries to bundle + file(GLOB LIBRARIES_TO_COPY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib") + foreach (lib_file ${LIBRARIES_TO_COPY}) + get_filename_component(file_name "${lib_file}" NAME) add_custom_command( - TARGET ${CEF_TARGET} - POST_BUILD - # Copy the helper app bundle into the Frameworks directory. - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_INTERMEDIATE_HELPER_APP}" "${CEF_FINAL_HELPER_APP}" - # Copy the CEF framework into the Frameworks directory. - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_FRAMEWORK_LOCATION}" "${CEF_FRAMEWORK_FINAL_LOCATION}" - VERBATIM + TARGET ${CEF_TARGET} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${lib_file}" + "${CEF_FINAL_APP}/Contents/${file_name}" ) + endforeach () - # copy dynamic libraries to bundle - file(GLOB LIBRARIES_TO_COPY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib") - foreach (lib_file ${LIBRARIES_TO_COPY}) - get_filename_component(file_name "${lib_file}" NAME) - add_custom_command( - TARGET ${CEF_TARGET} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${lib_file}" - "${CEF_FINAL_APP}/Contents/${file_name}" - ) - endforeach () - - if(NOT ${CMAKE_GENERATOR} STREQUAL "Xcode") - # Manually process and copy over resource files. - # The Xcode generator handles this via the set_target_properties RESOURCE directive. - set(PREFIXES "mac/") # Remove these prefixes from input file paths. - COPY_MACOSX_RESOURCES("${WEBBROWSER_RESOURCES_SOURCES}" "${PREFIXES}" "${CEF_TARGET}" "${module_path}" "${CEF_FINAL_APP}") - endif() -endfunction() + if (NOT ${CMAKE_GENERATOR} STREQUAL "Xcode") + # Manually process and copy over resource files. + # The Xcode generator handles this via the set_target_properties RESOURCE directive. + set(PREFIXES "mac/") # Remove these prefixes from input file paths. + COPY_MACOSX_RESOURCES("${WEBBROWSER_RESOURCES_SOURCES}" "${PREFIXES}" "${CEF_TARGET}" "${module_path}" "${CEF_FINAL_APP}") + endif () +endfunction () function(run_cef_windows_config CEF_TARGET CEF_ROOT MODULE_PATH) - # Executable target. - add_dependencies(${CEF_TARGET} libcef_dll_wrapper) - target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) - include_directories(${CEF_ROOT}) + # Executable target. + add_dependencies(${CEF_TARGET} libcef_dll_wrapper) + target_link_libraries(${CEF_TARGET} PUBLIC libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) + include_directories(${CEF_ROOT}) - add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}") + add_dependencies(${CEF_TARGET} libcef_dll_wrapper "${CEF_HELPER_TARGET}") - if(USE_SANDBOX) - # Logical target used to link the cef_sandbox library. - message(STATUS "Using CEF in Sandboxed mode.") - ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}") - target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS}) - endif() + if (USE_SANDBOX) + # Logical target used to link the cef_sandbox library. + message(STATUS "Using CEF in Sandboxed mode.") + ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}") + target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS}) + endif () - # Add the custom manifest files to the executable. - set_openspace_cef_target_out_dir() - add_windows_cef_manifest("${CEF_TARGET_OUT_DIR}" "${MODULE_PATH}" "${CEF_TARGET}" "exe") - - # Copy binary and resource files to the target output directory. - copy_files("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "$") - copy_files("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "$") -endfunction() + # Add the custom manifest files to the executable. + set_openspace_cef_target_out_dir() + add_windows_cef_manifest("${CEF_TARGET_OUT_DIR}" "${MODULE_PATH}" "${CEF_TARGET}" "exe") +endfunction () function(run_cef_linux_config CEF_ROOT) - message(ERROR "Linux is not yet supported for Web Browser Module.") -endfunction() + message(ERROR "Linux is not yet supported for Web Browser Module.") +endfunction () diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index 8e7a12caac..f5f32ffa61 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -31,12 +31,17 @@ #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4100) +#elif __clang__ +//#pragma clang diagnostic push +//#pragma clang diagnostic ignored "-Wunused-variable" #endif // _MSC_VER #include #ifdef _MSC_VER #pragma warning (pop) +#elif __clang__ +//#pragma clang diagnostic pop #endif // _MSC_VER #include diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index cdcc85faeb..ec43227d68 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -25,8 +25,9 @@ #include #include -#include #include +#include +#include #include #include #include @@ -72,6 +73,7 @@ WebBrowserModule::WebBrowserModule() : OpenSpaceModule(WebBrowserModule::Name) , _updateBrowserBetweenRenderables(UpdateBrowserBetweenRenderablesInfo, true) , _browserUpdateInterval(BrowserUpdateIntervalInfo, 1.f, 1.0f, 1000.f) + , _eventHandler(new EventHandler) { global::callback::deinitialize->emplace_back([this]() { ZoneScopedN("WebBrowserModule") @@ -105,7 +107,7 @@ void WebBrowserModule::internalDeinitialize() { return; } - _eventHandler.resetBrowserInstance(); + _eventHandler->resetBrowserInstance(); bool forceBrowserShutdown = true; for (BrowserInstance* browser : _browsers) { @@ -159,7 +161,7 @@ void WebBrowserModule::internalInitialize(const ghoul::Dictionary& dictionary) { ); } - _eventHandler.initialize(); + _eventHandler->initialize(); // register ScreenSpaceBrowser auto fScreenSpaceRenderable = FactoryManager::ref().factory(); @@ -199,17 +201,13 @@ void WebBrowserModule::removeBrowser(BrowserInstance* browser) { void WebBrowserModule::attachEventHandler(BrowserInstance* browserInstance) { if (_enabled) { - _eventHandler.setBrowserInstance(browserInstance); + _eventHandler->setBrowserInstance(browserInstance); } } -EventHandler WebBrowserModule::eventHandler() { - return _eventHandler; -} - void WebBrowserModule::detachEventHandler() { if (_enabled) { - _eventHandler.setBrowserInstance(nullptr); + _eventHandler->setBrowserInstance(nullptr); } } diff --git a/modules/webbrowser/webbrowsermodule.h b/modules/webbrowser/webbrowsermodule.h index bc2c78a2a7..ff5e266ed2 100644 --- a/modules/webbrowser/webbrowsermodule.h +++ b/modules/webbrowser/webbrowsermodule.h @@ -25,7 +25,6 @@ #ifndef __OPENSPACE_MODULE_WEBBROWSER___WEBBROWSERMODULE___H__ #define __OPENSPACE_MODULE_WEBBROWSER___WEBBROWSERMODULE___H__ -#include #include #include #include @@ -33,7 +32,9 @@ namespace openspace { +class BrowserInstance; class CefHost; +class EventHandler; namespace webbrowser { extern std::chrono::microseconds interval; @@ -51,7 +52,6 @@ public: void addBrowser(BrowserInstance*); void removeBrowser(BrowserInstance*); - EventHandler eventHandler(); void attachEventHandler(BrowserInstance* browserInstance); void detachEventHandler(); bool isEnabled() const; @@ -73,7 +73,7 @@ private: properties::FloatProperty _browserUpdateInterval; std::vector _browsers; - EventHandler _eventHandler; + std::unique_ptr _eventHandler; std::unique_ptr _cefHost; std::string _webHelperLocation; bool _enabled = true; diff --git a/modules/webgui/CMakeLists.txt b/modules/webgui/CMakeLists.txt index 3bd341131a..1382cbf61b 100644 --- a/modules/webgui/CMakeLists.txt +++ b/modules/webgui/CMakeLists.txt @@ -35,8 +35,6 @@ set(OPENSPACE_SOURCE_FILES ) source_group("Source Files" FILES ${OPENSPACE_SOURCE_FILES}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # Specify the NodeJs distribution version. diff --git a/modules/webgui/cmake/nodejs_support.cmake b/modules/webgui/cmake/nodejs_support.cmake index c892251c2b..71aeccd89c 100644 --- a/modules/webgui/cmake/nodejs_support.cmake +++ b/modules/webgui/cmake/nodejs_support.cmake @@ -1,47 +1,47 @@ -######################################################################################### -# # -# OpenSpace # -# # -# Copyright (c) 2014-2017 # -# # -# Permission is hereby granted, free of charge, to any person obtaining a copy of this # -# software and associated documentation files (the "Software"), to deal in the Software # -# without restriction, including without limitation the rights to use, copy, modify, # -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # -# permit persons to whom the Software is furnished to do so, subject to the following # -# conditions: # -# # -# The above copyright notice and this permission notice shall be included in all copies # -# or substantial portions of the Software. # -# # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # -# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # -# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -######################################################################################### +########################################################################################## +# # +# OpenSpace # +# # +# Copyright (c) 2014-2020 # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of this # +# software and associated documentation files (the "Software"), to deal in the Software # +# without restriction, including without limitation the rights to use, copy, modify, # +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the following # +# conditions: # +# # +# The above copyright notice and this permission notice shall be included in all copies # +# or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +########################################################################################## # https://nodejs.org/dist/v8.9.4/win-x64/node.exe # https://nodejs.org/dist/v8.9.4/node-v8.9.4-darwin-x64.tar.gz # https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz function(DownloadNodeJs version download_dir) - if(MSVC) + if (MSVC) set(basename "node") set(filename "${basename}.exe") set(path "v${version}/win-x64/${filename}") - endif(MSVC) - if(APPLE) + endif () + if (APPLE) set(basename "node-v${version}-darwin-x64") set(filename "${basename}.tar.gz") set(path "v${version}/${filename}") - endif(APPLE) + endif () if (UNIX AND NOT APPLE) set(basename "node-v${version}-linux-x64") set(filename "${basename}.tar.xz") set(path "v${version}/${filename}") - endif(UNIX AND NOT APPLE) + endif () # Specify the binary distribution type and download directory. set(NODEJS_DOWNLOAD_DIR "${download_dir}") @@ -50,19 +50,16 @@ function(DownloadNodeJs version download_dir) set(NODEJS_ROOT "${NODEJS_DOWNLOAD_DIR}" CACHE INTERNAL "NODEJS_ROOT") # Download and/or extract the binary distribution if necessary. - if(NOT IS_DIRECTORY "${NODEJS_ROOT}") + if (NOT IS_DIRECTORY "${NODEJS_ROOT}") set(NODEJS_DOWNLOAD_SOURCE "v${version}/node-v${version}-${suffix}") set(NODEJS_DOWNLOAD_PATH "${NODEJS_DOWNLOAD_DIR}/${filename}") - if(NOT EXISTS "${NODEJS_DOWNLOAD_PATH}") + if (NOT EXISTS "${NODEJS_DOWNLOAD_PATH}") set(NODEJS_DOWNLOAD_URL "https://nodejs.org/dist/${path}") # Download the binary distribution. message(STATUS "Downloading NodeJs: ${NODEJS_DOWNLOAD_PATH}...") - file( - DOWNLOAD "${NODEJS_DOWNLOAD_URL}" "${NODEJS_DOWNLOAD_PATH}" - SHOW_PROGRESS - ) - endif() + file(DOWNLOAD "${NODEJS_DOWNLOAD_URL}" "${NODEJS_DOWNLOAD_PATH}" SHOW_PROGRESS) + endif () message(STATUS "URL: ${NODEJS_DOWNLOAD_URL}") @@ -74,7 +71,7 @@ function(DownloadNodeJs version download_dir) COMMAND tar xzf ${NODEJS_DOWNLOAD_PATH} WORKING_DIRECTORY ${NODEJS_DOWNLOAD_DIR} ) - endif() + endif () if (UNIX AND NOT APPLE) # Linux uses tar.xz message(STATUS "Extracting NodeJs: ${NODEJS_DOWNLOAD_PATH} in ${NODEJS_DOWNLOAD_DIR}") @@ -82,13 +79,12 @@ function(DownloadNodeJs version download_dir) COMMAND tar xf ${NODEJS_DOWNLOAD_PATH} WORKING_DIRECTORY ${NODEJS_DOWNLOAD_DIR} ) - endif() + endif () if (UNIX) - FILE(COPY ${NODEJS_DOWNLOAD_DIR}/${basename}/bin/node - DESTINATION ${NODEJS_DOWNLOAD_DIR}) + FILE(COPY ${NODEJS_DOWNLOAD_DIR}/${basename}/bin/node DESTINATION ${NODEJS_DOWNLOAD_DIR}) FILE(REMOVE_RECURSE ${NODEJS_DOWNLOAD_DIR}/${basename}) FILE(REMOVE ${NODEJS_DOWNLOAD_PATH}) - endif() - endif() -endfunction() + endif () + endif () +endfunction () diff --git a/modules/webgui/include.cmake b/modules/webgui/include.cmake index 448a857dfd..3ccace7c97 100644 --- a/modules/webgui/include.cmake +++ b/modules/webgui/include.cmake @@ -1,4 +1 @@ set (DEFAULT_MODULE ON) -set (OPENSPACE_DEPENDENCIES - server -) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dd9966703f..b218ba7e4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -434,17 +434,42 @@ endforeach () # Create OpenSpace target ########################################################################################## add_library(openspace-core STATIC ${OPENSPACE_HEADER} ${OPENSPACE_SOURCE}) -target_include_directories(openspace-core PUBLIC - # In order to be able to include openspace-core files - ${OPENSPACE_BASE_DIR}/include - # In order to be able to include module files - ${OPENSPACE_BASE_DIR} - # In order to use the date library - SYSTEM ${OPENSPACE_BASE_DIR}/ext/date/include - # In order to use the nlohmann JSON library - SYSTEM ${OPENSPACE_BASE_DIR}/ext - # In order to be able to include the module_registration file - ${CMAKE_BINARY_DIR}/_generated/include +target_include_directories(openspace-core SYSTEM + PUBLIC + # In order to use the date library + ${OPENSPACE_BASE_DIR}/ext/date/include + # In order to use the nlohmann JSON library + ${OPENSPACE_BASE_DIR}/ext +) + +target_include_directories(openspace-core + PUBLIC + # In order to be able to include openspace-core files + ${OPENSPACE_BASE_DIR}/include + # In order to be able to include the module_registration file + ${CMAKE_BINARY_DIR}/_generated/include + + PRIVATE + # In order to be able to include module files. This is a temporary fix as this + # introduces a dependency from the opnspace-core onto the modules + ${OPENSPACE_BASE_DIR} +) + +target_precompile_headers(openspace-core PRIVATE + [["ghoul/fmt.h"]] + [["ghoul/glm.h"]] + [["ghoul/misc/assert.h"]] + [["ghoul/misc/boolean.h"]] + [["ghoul/misc/exception.h"]] + [["ghoul/misc/invariants.h"]] + [["ghoul/misc/profiling.h"]] + + + + + + + ) configure_file( @@ -460,8 +485,18 @@ configure_file( ) if (APPLE) - find_library(APPKIT_LIBRARY AppKit REQUIRED) - target_link_libraries(openspace-core PUBLIC ${APPKIT_LIBRARY}) + target_link_libraries(openspace-core INTERFACE external-system-apple) endif () set_openspace_compile_settings(openspace-core) +target_link_libraries(openspace-core PUBLIC Ghoul spice external-curl) + +if (OPENSPACE_WITH_ABUFFER_RENDERER) + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER") +endif () + +# Just in case, create the bin directory +add_custom_command( + TARGET openspace-core + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} +) diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index 4c9f074f6c..b9cd12c220 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -179,7 +179,8 @@ TestResult testSpecification(const Documentation& documentation, TestResult result; result.success = true; - auto applyVerifier = [dictionary, &result](Verifier& verifier, const std::string& key) + auto applyVerifier = [dictionary, &result](const Verifier& verifier, + const std::string& key) { TestResult res = verifier(dictionary, key); if (!res.success) { diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index 63751bdb66..d1d1327ad9 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -377,7 +377,7 @@ TestResult OrVerifier::operator()(const ghoul::Dictionary& dictionary, const bool success = std::any_of( res.cbegin(), res.cend(), - [](const TestResult& res) { return res.success; } + std::mem_fn(&TestResult::success) ); if (success) { diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 2f5785d68e..4ed9888ad7 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -364,7 +364,7 @@ void create() { #ifdef WIN32 profile = new (currentPos) Profile; ghoul_assert(profile, "No profile"); - currentPos += sizeof(Profile); + //currentPos += sizeof(Profile); #else // ^^^ WIN32 / !WIN32 vvv profile = new Profile; #endif // WIN32 diff --git a/src/engine/globalscallbacks.cpp b/src/engine/globalscallbacks.cpp index e2953460eb..78ff2accb5 100644 --- a/src/engine/globalscallbacks.cpp +++ b/src/engine/globalscallbacks.cpp @@ -24,6 +24,7 @@ #include +#include #include #include @@ -203,7 +204,7 @@ void create() { #ifdef WIN32 touchExit = new (currentPos) std::vector>; ghoul_assert(touchExit, "No touchExit"); - currentPos += sizeof(std::vector>); + //currentPos += sizeof(std::vector>); #else // ^^^ WIN32 / !WIN32 vvv touchExit = new std::vector>; #endif // WIN32 diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp index 5cb6c292d6..61b8979085 100644 --- a/src/engine/moduleengine.cpp +++ b/src/engine/moduleengine.cpp @@ -45,14 +45,22 @@ void ModuleEngine::initialize( { ZoneScoped - for (OpenSpaceModule* m : AllModules()) { + std::vector modules = AllModules(); + + for (OpenSpaceModule* m : modules) { + registerModule(std::unique_ptr(m)); + } + + for (OpenSpaceModule* m : modules) { const std::string& identifier = m->identifier(); auto it = moduleConfigurations.find(identifier); ghoul::Dictionary configuration; if (it != moduleConfigurations.end()) { configuration = it->second; } - registerModule(std::unique_ptr(m), configuration); + m->initialize(configuration); + addPropertySubOwner(m); + } } @@ -99,9 +107,7 @@ void ModuleEngine::deinitializeGL() { LDEBUG("Finished deinitializing OpenGL of modules"); } -void ModuleEngine::registerModule(std::unique_ptr mod, - const ghoul::Dictionary& configuration) -{ +void ModuleEngine::registerModule(std::unique_ptr mod) { ZoneScoped ghoul_assert(mod, "Module must not be nullptr"); @@ -121,8 +127,6 @@ void ModuleEngine::registerModule(std::unique_ptr mod, } LDEBUG(fmt::format("Registering module '{}'", mod->identifier())); - mod->initialize(this, configuration); - addPropertySubOwner(mod.get()); LDEBUG(fmt::format("Registered module '{}'", mod->identifier())); _modules.push_back(std::move(mod)); } diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index d51f322e91..ed3a510fff 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -633,7 +633,7 @@ void OpenSpaceEngine::initializeGL() { call.parameters.begin(), call.parameters.end(), std::string("("), - [](std::string a, const std::unique_ptr& v) { + [](const std::string& a, const std::unique_ptr& v) { std::stringstream s; s << v.get(); return a + s.str() + ", "; @@ -793,12 +793,8 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) { progressInfo.progress = (*it)->progress(); if ((*it)->nTotalBytesIsKnown()) { - progressInfo.currentSize = static_cast( - (*it)->nSynchronizedBytes() - ); - progressInfo.totalSize = static_cast( - (*it)->nTotalBytes() - ); + progressInfo.currentSize = (*it)->nSynchronizedBytes(); + progressInfo.totalSize = (*it)->nTotalBytes(); } loading = true; diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index e9e647296c..4b81fa6887 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -277,10 +277,10 @@ int downloadFile(lua_State* L) { DownloadManager::FailOnError::Yes, 5 ); - if (!future || (future && !future->isFinished)) { + if (!future || !future->isFinished) { return ghoul::lua::luaError( L, - future ? "Download failed" : "Download failed: " + future->errorMessage + future ? "Download failed: " + future->errorMessage : "Download failed" ); } diff --git a/src/interaction/keyframenavigator.cpp b/src/interaction/keyframenavigator.cpp index c7de51ac17..7a175778e7 100644 --- a/src/interaction/keyframenavigator.cpp +++ b/src/interaction/keyframenavigator.cpp @@ -97,13 +97,7 @@ bool KeyframeNavigator::updateCamera(Camera& camera, bool ignoreFutureKeyframes) return false; } - return updateCamera( - &camera, - prevKeyframe->data, - nextKeyframe->data, - t, - ignoreFutureKeyframes - ); + return updateCamera(&camera, prevPose, nextPose, t, ignoreFutureKeyframes); } bool KeyframeNavigator::updateCamera(Camera* camera, const CameraPose prevPose, diff --git a/src/interaction/navigationhandler_lua.inl b/src/interaction/navigationhandler_lua.inl index 4e6db5e561..c7e6adc28e 100644 --- a/src/interaction/navigationhandler_lua.inl +++ b/src/interaction/navigationhandler_lua.inl @@ -309,7 +309,7 @@ int joystickButton(lua_State* L) { cmds.begin(), cmds.end(), std::string(), - [](std::string lhs, std::string rhs) { + [](const std::string& lhs, const std::string& rhs) { return lhs + ";" + rhs; } ); diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 5e35d79081..336a294693 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -703,9 +703,9 @@ void SessionRecording::preSynchronization() { //Handle callback(s) for change in idle/record/playback state if (_state != _lastState) { - using K = const CallbackHandle; + using K = CallbackHandle; using V = StateChangeCallback; - for (const std::pair& it : _stateChangeCallbacks) { + for (const std::pair& it : _stateChangeCallbacks) { it.second(); } } diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 514528237e..27fcacb977 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -149,7 +149,7 @@ ParallelConnection::Message ParallelConnection::receiveMessage() { } // Make sure that header matches this version of OpenSpace - if (!(headerBuffer[0] == 'O' && headerBuffer[1] && 'S')) { + if (!(headerBuffer[0] == 'O' && headerBuffer[1] == 'S')) { LERROR("Expected to read message header 'OS' from socket."); throw ConnectionLostError(); } @@ -174,7 +174,7 @@ ParallelConnection::Message ParallelConnection::receiveMessage() { const uint32_t messageSizeIn = *reinterpret_cast(headerBuffer.data() + offset); - offset += sizeof(uint32_t); + //offset += sizeof(uint32_t); const size_t messageSize = messageSizeIn; diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index 184ac07c1f..b8fa677f61 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -129,10 +129,6 @@ ParallelPeer::~ParallelPeer() { if (_timeJumpCallback != -1) { global::timeManager->removeTimeJumpCallback(_timeJumpCallback); } - if (_timeJumpCallback != -1) { - global::timeManager->removeTimeJumpCallback(_timeJumpCallback); - } - } void ParallelPeer::connect() { diff --git a/src/properties/stringproperty.cpp b/src/properties/stringproperty.cpp index 803d0a3ea7..682731a549 100644 --- a/src/properties/stringproperty.cpp +++ b/src/properties/stringproperty.cpp @@ -58,11 +58,9 @@ std::string fromStringConversion(std::string val, bool& success) { } bool toStringConversion(std::string& outValue, std::string inValue) { - std::string str; nlohmann::json json; nlohmann::to_json(json, inValue); outValue = json.dump(); - return true; } diff --git a/src/rendering/dashboard_lua.inl b/src/rendering/dashboard_lua.inl index 40ac6930f1..09c752dc20 100644 --- a/src/rendering/dashboard_lua.inl +++ b/src/rendering/dashboard_lua.inl @@ -22,7 +22,6 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include #include #include diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index 48aa47acfe..bcfadbfb18 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -103,37 +103,6 @@ namespace { GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3 }; - - void saveTextureToMemory(GLenum attachment, int width, int height, - std::vector& memory) - { - memory.clear(); - memory.resize(width * height * 3); - - std::vector tempMemory(width * height * 3); - - if (attachment != GL_DEPTH_ATTACHMENT) { - glReadBuffer(attachment); - glReadPixels(0, 0, width, height, GL_RGB, GL_FLOAT, tempMemory.data()); - - } - else { - glReadPixels( - 0, - 0, - width, - height, - GL_DEPTH_COMPONENT, - GL_FLOAT, - tempMemory.data() - ); - } - - for (int i = 0; i < width * height * 3; ++i) { - memory[i] = static_cast(tempMemory[i]); - } - } - } // namespace namespace openspace { @@ -1426,13 +1395,8 @@ void FramebufferRenderer::performDeferredTasks( Deferredcaster* deferredcaster = deferredcasterTask.deferredcaster; - ghoul::opengl::ProgramObject* deferredcastProgram = nullptr; - - if (deferredcastProgram != _deferredcastPrograms[deferredcaster].get() - || deferredcastProgram == nullptr) - { - deferredcastProgram = _deferredcastPrograms[deferredcaster].get(); - } + ghoul::opengl::ProgramObject* deferredcastProgram = + _deferredcastPrograms[deferredcaster].get(); if (deferredcastProgram) { _pingPongIndex = _pingPongIndex == 0 ? 1 : 0; diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index 7b1d63f491..c0f78ee138 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -322,15 +322,10 @@ void LoadingScreen::render() { (item.name + " 100%\n99999999/99999999") ); - // The maximum count is in here since we can't control the amount of - // screen estate and the number of nodes. Rather than looping forever - // we make use with an overlap in the worst case - bool foundSpace = false; - glm::vec2 ll = glm::vec2(0.f); glm::vec2 ur = glm::vec2(0.f); int i = 0; - for (; i < MaxNumberLocationSamples && !foundSpace; ++i) { + for (; i < MaxNumberLocationSamples; ++i) { std::uniform_int_distribution distX( 15, static_cast(res.x - b.x - 15) diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index fb4e01ee31..37c25d05f8 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -139,14 +139,6 @@ namespace { "into the window." }; -#ifdef OPENSPACE_WITH_INSTRUMENTATION - constexpr openspace::properties::Property::PropertyInfo SaveFrameInfo = { - "SaveFrameInformation", - "Save Frame Information", - "Saves the frame information to disk" - }; -#endif // OPENSPACE_WITH_INSTRUMENTATION - constexpr openspace::properties::Property::PropertyInfo DisableMasterInfo = { "DisableMasterRendering", "Disable Master Rendering", @@ -262,9 +254,6 @@ RenderEngine::RenderEngine() , _showCameraInfo(ShowCameraInfo, true) , _applyWarping(ApplyWarpingInfo, false) , _showFrameInformation(ShowFrameNumberInfo, false) -#ifdef OPENSPACE_WITH_INSTRUMENTATION - , _saveFrameInformation(SaveFrameInfo, false) -#endif // OPENSPACE_WITH_INSTRUMENTATION , _disableMasterRendering(DisableMasterInfo, false) , _globalBlackOutFactor(GlobalBlackoutFactorInfo, 1.f, 0.f, 1.f) , _enableFXAA(FXAAInfo, true) @@ -365,14 +354,6 @@ RenderEngine::RenderEngine() addProperty(_horizFieldOfView); addProperty(_showFrameInformation); -#ifdef OPENSPACE_WITH_INSTRUMENTATION - _saveFrameInformation.onChange([&]() { - if (_saveFrameInformation) { - _frameInfo.lastSavedFrame = frameNumber(); - } - }); - addProperty(_saveFrameInformation); -#endif // OPENSPACE_WITH_INSTRUMENTATION addProperty(_framerateLimit); addProperty(_globalRotation); @@ -904,35 +885,6 @@ void RenderEngine::postDraw() { ZoneScoped ++_frameNumber; - -#ifdef OPENSPACE_WITH_INSTRUMENTATION - if (_saveFrameInformation) { - _frameInfo.frames.push_back({ - frameNumber(), - global::windowDelegate.deltaTime(), - global::windowDelegate.averageDeltaTime() - }); - } - - const uint16_t next = _frameInfo.lastSavedFrame + _frameInfo.saveEveryNthFrame; - const bool shouldSave = _saveFrameInformation && frameNumber() >= next; - if (shouldSave) { - std::string filename = fmt::format( - "_inst_renderengine_{}_{}.txt", - _frameInfo.lastSavedFrame, _frameInfo.saveEveryNthFrame - ); - std::ofstream file(absPath("${BIN}/" + filename)); - for (const FrameInfo& i : _frameInfo.frames) { - std::string line = fmt::format( - "{}\t{}\t{}", i.iFrame, i.deltaTime, i.avgDeltaTime - ); - file << line << '\n'; - } - - _frameInfo.frames.clear(); - _frameInfo.lastSavedFrame = frameNumber(); - } -#endif // OPENSPACE_WITH_INSTRUMENTATION } Scene* RenderEngine::scene() { diff --git a/src/rendering/transferfunction.cpp b/src/rendering/transferfunction.cpp index f702b1d347..6079ecefd8 100644 --- a/src/rendering/transferfunction.cpp +++ b/src/rendering/transferfunction.cpp @@ -112,7 +112,7 @@ void TransferFunction::setCallback(TfChangedCallback callback) { _tfChangedCallback = std::move(callback); } -void TransferFunction::setTextureFromTxt(std::shared_ptr ptr) { +void TransferFunction::setTextureFromTxt() { std::ifstream in; in.open(_filepath.c_str()); diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index d364354be3..ae734c2a5d 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -48,6 +48,7 @@ namespace { constexpr const char* KeyIdentifier = "Identifier"; constexpr const char* KeyParent = "Parent"; +#ifdef TRACY_ENABLE constexpr const char* renderBinToString(int renderBin) { // Synced with Renderable::RenderBin if (renderBin == 1) { @@ -69,6 +70,7 @@ namespace { throw ghoul::MissingCaseException(); } } +#endif // TRACY_ENABLE } // namespace namespace openspace { diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 4e6c766067..b44e1ad2ca 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -150,12 +150,13 @@ bool doesUriContainGroupTag(const std::string& command, std::string& groupName) } } -std::string replaceUriWithGroupName(std::string uri, std::string ownerName) { +std::string replaceUriWithGroupName(const std::string& uri, const std::string& ownerName) +{ size_t pos = uri.find_first_of("."); return ownerName + "." + uri.substr(pos); } -std::string extractUriWithoutGroupName(std::string uri) { +std::string extractUriWithoutGroupName(const std::string& uri) { size_t pos = uri.find_first_of("."); return uri.substr(pos); } diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index e27ddeb283..220531b537 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -25,7 +25,7 @@ #include #include -#include +#include namespace openspace::luascriptfunctions { diff --git a/src/scripting/systemcapabilitiesbinding.cpp b/src/scripting/systemcapabilitiesbinding.cpp index 79b7676711..c6d3914fe1 100644 --- a/src/scripting/systemcapabilitiesbinding.cpp +++ b/src/scripting/systemcapabilitiesbinding.cpp @@ -175,7 +175,7 @@ int extensions(lua_State* L) { lua_newtable(L); - for (size_t i = 1; i <= extensions.size(); ++i) { + for (size_t i = 1; i < extensions.size(); ++i) { ghoul::lua::push(L, extensions[i]); lua_rawseti(L, -2, i); } diff --git a/src/util/keys.cpp b/src/util/keys.cpp index a01f7316fd..bb7ea212ae 100644 --- a/src/util/keys.cpp +++ b/src/util/keys.cpp @@ -46,7 +46,7 @@ KeyAction operator|(KeyAction lhs, KeyAction rhs) { ); } -KeyAction operator|=(KeyAction& lhs, KeyAction rhs) { +KeyAction operator|=(KeyAction lhs, KeyAction rhs) { return (lhs | rhs); } @@ -62,7 +62,7 @@ KeyModifier operator|(KeyModifier lhs, KeyModifier rhs) { ); } -KeyModifier operator|=(KeyModifier& lhs, KeyModifier rhs) { +KeyModifier operator|=(KeyModifier lhs, KeyModifier rhs) { return (lhs | rhs); } diff --git a/src/util/openspacemodule.cpp b/src/util/openspacemodule.cpp index faba6a17fb..f0ff0289b9 100644 --- a/src/util/openspacemodule.cpp +++ b/src/util/openspacemodule.cpp @@ -47,9 +47,7 @@ OpenSpaceModule::OpenSpaceModule(std::string name) : properties::PropertyOwner({ std::move(name) }) {} -void OpenSpaceModule::initialize(const ModuleEngine* moduleEngine, - const ghoul::Dictionary& configuration) -{ +void OpenSpaceModule::initialize(const ghoul::Dictionary& configuration) { ZoneScoped ZoneName(identifier().c_str(), identifier().size()) @@ -71,7 +69,6 @@ void OpenSpaceModule::initialize(const ModuleEngine* moduleEngine, LDEBUG(fmt::format("Registering module path {}: {}", moduleToken, path)); FileSys.registerPathToken(moduleToken, std::move(path)); - _moduleEngine = moduleEngine; internalInitialize(configuration); } @@ -145,10 +142,6 @@ std::string OpenSpaceModule::modulePath() const { ); } -const ModuleEngine* OpenSpaceModule::moduleEngine() const { - return _moduleEngine; -} - void OpenSpaceModule::internalInitialize(const ghoul::Dictionary&) {} void OpenSpaceModule::internalInitializeGL() {} diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 6b1c86146b..f5e2d31f92 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -387,9 +387,9 @@ std::vector> SpiceManager::ckCoverage( } else { id *= 1000; - const auto it = _ckIntervals.find(id); - if (it != _ckIntervals.end()) { - return it->second; + const auto it2 = _ckIntervals.find(id); + if (it2 != _ckIntervals.end()) { + return it2->second; } else { std::vector> emptyList; @@ -404,11 +404,9 @@ std::vector> SpiceManager::spiceBodies( std::vector> bodies; constexpr const int Frnmln = 33; - constexpr const int Lnsize = 81; SPICEINT_CELL(idset, 8192); SpiceChar frname[Frnmln]; - SpiceChar outlin[Lnsize]; for (SpiceInt i = 1; i <= 6; i++) { if (i < 6) { @@ -434,7 +432,12 @@ std::vector> SpiceManager::spiceBodies( Frnmln, frname ); - bodies.push_back(std::make_pair(((long)((SpiceInt*)idset.data)[j]), frname)); + bodies.push_back( + std::make_pair( + static_cast(reinterpret_cast(idset.data)[j]), + frname + ) + ); } } return bodies; diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index b5e0f47b81..183283dd69 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -613,7 +613,7 @@ int time_interpolateTimeRelative(lua_State* L) { return ghoul::lua::luaError(L, fmt::format("bad argument #1 ({})", msg)); } - if (lua_gettop(L) == 1 && isNumber) { + if (lua_gettop(L) == 1) { double delta = lua_tonumber(L, 1); global::timeManager->interpolateTimeRelative( delta, diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index 7cbf5b878f..66c251c61c 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -146,9 +146,9 @@ void TimeManager::preSynchronization(double dt) { if (newTime != _lastTime) { ZoneScopedN("newTime != _lastTime") - using K = const CallbackHandle; + using K = CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timeChangeCallbacks) { + for (const std::pair& it : _timeChangeCallbacks) { ZoneScopedN("tcc") it.second(); } @@ -158,25 +158,25 @@ void TimeManager::preSynchronization(double dt) { _targetDeltaTime != _lastTargetDeltaTime) { ZoneScopedN("delta time changed") - using K = const CallbackHandle; + using K = CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _deltaTimeChangeCallbacks) { + for (const std::pair& it : _deltaTimeChangeCallbacks) { ZoneScopedN("dtcc") it.second(); } } if (_deltaTimeStepsChanged) { - using K = const CallbackHandle; + using K = CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _deltaTimeStepsChangeCallbacks) { + for (const std::pair& it : _deltaTimeStepsChangeCallbacks) { it.second(); } } if (_timelineChanged) { ZoneScopedN("timeline changed") - using K = const CallbackHandle; + using K = CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timelineChangeCallbacks) { + for (const std::pair& it : _timelineChangeCallbacks) { ZoneScopedN("tlcc") it.second(); } @@ -254,9 +254,9 @@ void TimeManager::progressTime(double dt) { _integrateFromTime.data().setTime(_timeNextFrame.j2000Seconds()); _shouldSetTime = false; - using K = const CallbackHandle; + using K = CallbackHandle; using V = TimeChangeCallback; - for (const std::pair& it : _timeJumpCallbacks) { + for (const std::pair& it : _timeJumpCallbacks) { it.second(); } return; diff --git a/support/cmake/application_definition.cmake b/support/cmake/application_definition.cmake index 1f6180e0db..c539ed00ba 100644 --- a/support/cmake/application_definition.cmake +++ b/support/cmake/application_definition.cmake @@ -25,18 +25,40 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) function (create_new_application application_name) - add_executable(${application_name} MACOSX_BUNDLE ${ARGN}) - set_openspace_compile_settings(${application_name}) + add_executable(${application_name} MACOSX_BUNDLE ${ARGN}) + set_openspace_compile_settings(${application_name}) - if (WIN32) - get_external_library_dependencies(ext_lib) - ghl_copy_files( - ${application_name} - "${CURL_ROOT_DIR}/lib/libcurl.dll" - "${CURL_ROOT_DIR}/lib/libeay32.dll" - "${CURL_ROOT_DIR}/lib/ssleay32.dll" - ${ext_lib} - ) - ghl_copy_shared_libraries(${application_name} ${OPENSPACE_EXT_DIR}/ghoul) - endif () + # We currently can't reuse the precompiled header because that one has the Kameleon + # definition stuck into it + #target_precompile_headers(${library_name} REUSE_FROM openspace-core) + target_precompile_headers(${application_name} PRIVATE + [["ghoul/fmt.h"]] + [["ghoul/glm.h"]] + [["ghoul/misc/assert.h"]] + [["ghoul/misc/boolean.h"]] + [["ghoul/misc/exception.h"]] + [["ghoul/misc/invariants.h"]] + [["ghoul/misc/profiling.h"]] + + + + + + + + ) + + if (WIN32) + get_external_library_dependencies(ext_lib) + ghl_copy_files( + ${application_name} + "${OPENSPACE_BASE_DIR}/ext/curl/lib/libcurl.dll" + "${OPENSPACE_BASE_DIR}/ext/curl/lib/libeay32.dll" + "${OPENSPACE_BASE_DIR}/ext/curl/lib/ssleay32.dll" + ${ext_lib} + ) + ghl_copy_shared_libraries(${application_name} ${OPENSPACE_BASE_DIR}/ext/ghoul) + endif () + + target_link_libraries(${application_name} PUBLIC openspace-module-base) endfunction () diff --git a/support/cmake/handle_modules.cmake b/support/cmake/handle_modules.cmake deleted file mode 100644 index b6258833f8..0000000000 --- a/support/cmake/handle_modules.cmake +++ /dev/null @@ -1,369 +0,0 @@ -########################################################################################## -# # -# OpenSpace # -# # -# Copyright (c) 2014-2020 # -# # -# Permission is hereby granted, free of charge, to any person obtaining a copy of this # -# software and associated documentation files (the "Software"), to deal in the Software # -# without restriction, including without limitation the rights to use, copy, modify, # -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # -# permit persons to whom the Software is furnished to do so, subject to the following # -# conditions: # -# # -# The above copyright notice and this permission notice shall be included in all copies # -# or substantial portions of the Software. # -# # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # -# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # -# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -########################################################################################## - -include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) -include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) - -function (handle_modules internal_module_path external_modules_paths) - # - # Step 1: Get a list of all modules - # - # First get all the internal module - get_individual_modules(${internal_module_path} all_module_names all_module_paths) - - # Then get all external modules - foreach (path ${external_modules_paths}) - get_individual_modules(${path} names paths) - - foreach (n ${names}) - if (${n} IN_LIST all_module_names) - message(FATAL_ERROR "Module name ${n} is not unique among the external directories") - endif () - endforeach () - - set(all_module_names ${all_module_names} ${names}) - set(all_module_paths ${all_module_paths} ${paths}) - endforeach () - - list(LENGTH all_module_names all_module_names_count) - math(EXPR all_module_names_count "${all_module_names_count} - 1") - - # - # Step 2: Create options for all modules with correct default values - # - - set(enabled_module_names "") - set(enabled_module_paths "") - foreach(val RANGE ${all_module_names_count}) - list(GET all_module_names ${val} name) - list(GET all_module_paths ${val} path) - - get_module_attribute_supported(${path} is_module_supported) - if (NOT ${is_module_supported}) - message(STATUS "Skipping module ${name} (${path}) as it is not supported on this machine") - continue() - endif () - - get_module_attribute_default(${path} is_default_module) - create_option_name(${name} optionName) - option(${optionName} "Build ${path} Module" ${is_default_module}) - - if (${optionName}) - list(APPEND enabled_module_names ${name}) - list(APPEND enabled_module_paths ${path}) - endif () - endforeach () - - # - # Step 3: For each module that is default or enabled by the user, get the dependencies - # - set(dependencies "") - list(LENGTH enabled_module_names enabled_module_count) - if (${enabled_module_count} EQUAL 0) - message(STATUS "No modules selected") - return() - endif () - math(EXPR enabled_module_count "${enabled_module_count} - 1") - foreach (val RANGE ${enabled_module_count}) - list(GET enabled_module_names ${val} name) - list(GET enabled_module_paths ${val} path) - - get_recursive_dependencies( - ${name} ${path} - "${all_module_names}" "${all_module_paths}" - deps - ) - - set(dependencies ${dependencies} ${deps}) - endforeach() - - # We can remove the duplicates here. We constructed the list such that nested - # dependencies are order left to right. REMOVE_DUPLICATES will keep the left most - # value in the case of duplicates, so that will still work - list(REMOVE_DUPLICATES dependencies) - - # - # Step 4: Check each dependency and set it, if necessary - # - foreach (dep ${dependencies}) - create_option_name(${dep} optionName) - if (NOT ${optionName}) - set(${optionName} ON CACHE BOOL "Build ${dep} Module" FORCE) - message(STATUS "Due to dependencies, the '${dep}' was enabled") - - find_path_for_module(${dep} "${all_module_names}" "${all_module_paths}" path) - list(APPEND enabled_module_names ${dep}) - list(APPEND enabled_module_paths ${path}) - endif () - endforeach () - - # Print all the enabled modules - message(STATUS "Enabled modules:") - list(LENGTH enabled_module_names enabled_module_count) - math(EXPR enabled_module_count "${enabled_module_count} - 1") - foreach (val RANGE ${enabled_module_count}) - list(GET enabled_module_names ${val} name) - list(GET enabled_module_paths ${val} path) - - message(STATUS "\t${name} (${path})") - endforeach () - - # - # Step 5: Add the subdirectories of all enabled modules - # - set(module_class_names "") - set(module_external_libraries "") - foreach (val RANGE ${enabled_module_count}) - list(GET enabled_module_names ${val} name) - list(GET enabled_module_paths ${val} path) - - create_library_name(${name} library_name) - begin_header("Module ${name} (${library_name})") - add_subdirectory(${path}) - end_header("End: Module ${name}") - message(STATUS "") - - # Only link openspace-core against the library if it has been set STATIC - get_target_property(library_type ${library_name} TYPE) - if (NOT ${library_type} STREQUAL "SHARED_LIBRARY") - target_link_libraries(openspace-core PUBLIC ${library_name}) - endif() - - create_define_name(${name} define_name) - target_compile_definitions(openspace-core PUBLIC "${define_name}") - - get_property(class_name GLOBAL PROPERTY CurrentModuleClassName) - list(APPEND module_class_names ${class_name}) - - get_property(ext_lib GLOBAL PROPERTY CurrentModuleExternalLibraries) - list(APPEND module_external_libraries ${ext_lib}) - endforeach () - - list(REMOVE_DUPLICATES module_external_libraries) - add_external_library_dependencies("${module_external_libraries}") - - # - # Step 6: Create the moduleregistration.h file with the header file paths, class - # names and the external module paths. - # The class list needs to be topologically sorted, based on - # the dependency graph, in order to guarantee that modules are - # initialized after their dependencies. - # - - # We generate a list of the names of the enabled modules taking - # the topologically sorted dependencies and adding the rest of the modules. - # REMOVE_DUPLICATES will keep the left most value in the case of duplicates - set(topologically_sorted ${dependencies} ${enabled_module_names}) - list(REMOVE_DUPLICATES topologically_sorted) - - set(MODULE_HEADERS "") - set(MODULE_CLASSES "") - set(MODULE_PATHS "") - - foreach (key RANGE ${enabled_module_count}) - list(GET topologically_sorted ${key} name) - list(FIND enabled_module_names ${name} val) - - list(GET enabled_module_paths ${val} path) - list(GET module_class_names ${val} class_name) - - string(TOUPPER ${name} module_upper) - string(TOLOWER ${name} module_lower) - - create_module_header_filepath(${name} ${path} header_filepath) - - list(APPEND MODULE_HEADERS "#include <${header_filepath}>\n") - list(APPEND MODULE_CLASSES " new ${class_name},\n") - endforeach () - - get_unique_include_paths( - "${enabled_module_paths}" - "${internal_module_path}" - module_paths - ) - - foreach (path ${module_paths}) - list(APPEND MODULE_PATHS " \"${path}\",\n") - # The module path should include the 'modules' directory, which is removed for the - # include path to make all of the includes look the same - list(APPEND MODULE_PATHS " \"${path}/modules\",\n") - target_include_directories(openspace-core PUBLIC ${path}) - endforeach () - - if (NOT "${MODULE_HEADERS}" STREQUAL "") - string(REPLACE ";" "" MODULE_HEADERS ${MODULE_HEADERS}) - endif () - - if (NOT "${MODULE_CLASSES}" STREQUAL "") - string(REPLACE ";" "" MODULE_CLASSES ${MODULE_CLASSES}) - endif () - - if (NOT "${MODULE_PATHS}" STREQUAL "") - string(REPLACE ";" "" MODULE_PATHS ${MODULE_PATHS}) - string(REPLACE "\\" "/" MODULE_PATHS ${MODULE_PATHS}) - endif () - - configure_file( - ${OPENSPACE_CMAKE_EXT_DIR}/module_registration.template - ${CMAKE_BINARY_DIR}/_generated/include/openspace/moduleregistration.h - ) - - configure_file( - ${OPENSPACE_CMAKE_EXT_DIR}/module_path.template - ${CMAKE_BINARY_DIR}/_generated/include/openspace/modulepath.h - ) -endfunction() - - -# This function takes a list of module paths and returns the list of include paths that -# need to be added to the moduleregistration file. Each module files parent directory is -# considered, but with the internal module path ignored -function (get_unique_include_paths module_paths internal_module_path result) - set(res "") - foreach (p ${all_module_paths}) - get_filename_component(base_dir_parent "${p}/.." ABSOLUTE) - get_filename_component(base_dir_grandparent "${p}/../.." ABSOLUTE) - get_filename_component(int_dir "${internal_module_path}/.." ABSOLUTE) - if (NOT ${base_dir_grandparent} STREQUAL ${int_dir}) - # We need to add both parent and grantparent directory: - # The grandparent has to be added if we have an external module in the path - # x/modules/name and we need to add 'x' to the module search path such that - # people can write #include - # - # The parent needs to be included for modules in subdirectories of the form - # openspace/modules/dir/name such that 'dir' is included in the search path - list(APPEND res ${base_dir_parent}) - list(APPEND res ${base_dir_grandparent}) - endif () - endforeach () - - list(REMOVE_DUPLICATES res) - set(${result} ${res} PARENT_SCOPE) -endfunction () - - -# Returns whether the module located at 'path' is a default module or not -function (get_module_attribute_default path result) - set(${result} OFF PARENT_SCOPE) - if (EXISTS "${path}/include.cmake") - unset(DEFAULT_MODULE) - include(${path}/include.cmake) - if (DEFINED DEFAULT_MODULE) - set(${result} ${DEFAULT_MODULE} PARENT_SCOPE) - endif () - endif () -endfunction() - - -# Returns the list of dependencies of the module located at 'path' -function (get_module_attribute_dependencies path result) - set(${result} "" PARENT_SCOPE) - if (EXISTS "${path}/include.cmake") - unset(OPENSPACE_DEPENDENCIES) - include(${path}/${dir}/include.cmake) - if (DEFINED OPENSPACE_DEPENDENCIES) - set(${result} ${OPENSPACE_DEPENDENCIES} PARENT_SCOPE) - endif () - endif () -endfunction() - -# Returns the state whether the module located at 'path' is supported on this machine -function (get_module_attribute_supported path result) - set(${result} ON PARENT_SCOPE) - if (EXISTS "${path}/include.cmake") - unset(SUPPORTED) - include(${path}/${dir}/include.cmake) - if (DEFINED SUPPORTED) - set(${result} ${SUPPORTED} PARENT_SCOPE) - endif () - endif () -endfunction() - - -# Returns the path for the 'module_name'. If the module has not been seen before by -# get_individual_modules, an empty string is returned -function (find_path_for_module module_name module_names module_paths result) - list(FIND module_names ${module_name} i) - if (i EQUAL -1) - # Did not find the name in the list - set(${result} "" PARENT_SCOPE) - else () - # We found the name in the list, so the path is at the same location - list(GET module_paths ${i} path) - set(${result} ${path} PARENT_SCOPE) - endif () -endfunction () - - -# Gets the names of the dependencies of 'module_name' recursively and returns them in -# 'result'. For a dependency chain of a -> b -> c get_recursive_depdencies(a) will -# return "b,c" -function (get_recursive_dependencies module_name module_path module_names module_paths result) - set(result_aggregate "") - get_module_attribute_dependencies(${module_path} deps) - if (deps) - foreach (name ${deps}) - find_path_for_module(${name} "${module_names}" "${module_paths}" path) - if (path) - get_recursive_dependencies( - ${name} ${path} - "${module_names}" "${module_paths}" - res - ) - # 1. We add "base" to the list of dependencies as we always want it - # 2. We add dependencies in this order such that when we later traverse - # this list, we automatically get them in the correct order (meaning - # that we include a dependency first) - set(result_aggregate ${result_aggregate} "base" ${res} ${name}) - else () - message(FATAL_ERROR "Could not find dependency ${name} for module ${module_name}") - endif () - endforeach () - endif () - set(${result} ${result_aggregate} PARENT_SCOPE) -endfunction() - - -# Returns a list of all modules contained in the folder 'path' -function (get_individual_modules path module_names module_paths) - file(GLOB moduleDirs RELATIVE ${path} ${path}/*) - - set(names "") - set(paths "") - foreach (dir ${moduleDirs}) - if (EXISTS "${path}/${dir}/CMakeLists.txt") - list(APPEND names ${dir}) - list(APPEND paths ${path}/${dir}) - else () - # The CMakeLists.txt does not exist, so it might be a group of subdirectories - get_individual_modules(${path}/${dir} _mod_names _mod_paths) - list(APPEND names ${_mod_names}) - list(APPEND paths ${_mod_paths}) - # message(STATUS "Skipping ${dir} as ${dir}/CMakeLists.txt does not exist") - endif () - endforeach () - - set(${module_names} ${names} PARENT_SCOPE) - set(${module_paths} ${paths} PARENT_SCOPE) -endfunction () diff --git a/support/cmake/module_common.cmake b/support/cmake/module_common.cmake index 7ca5c2f94d..dffd4218d4 100644 --- a/support/cmake/module_common.cmake +++ b/support/cmake/module_common.cmake @@ -23,29 +23,29 @@ ########################################################################################## function (create_library_name module_name library_name) - string(TOLOWER ${module_name} module_name) - set(${library_name} "openspace-module-${module_name}" PARENT_SCOPE) + string(TOLOWER ${module_name} module_name) + set(${library_name} "openspace-module-${module_name}" PARENT_SCOPE) endfunction () function (create_option_name module_name option_name) - string(TOUPPER ${module_name} module_name) - set(${option_name} "OPENSPACE_MODULE_${module_name}" PARENT_SCOPE) + string(TOUPPER ${module_name} module_name) + set(${option_name} "OPENSPACE_MODULE_${module_name}" PARENT_SCOPE) endfunction () function (create_define_name module_name define_name) - string(TOUPPER ${module_name} module_name) - set(${define_name} "OPENSPACE_MODULE_${module_name}_ENABLED" PARENT_SCOPE) + string(TOUPPER ${module_name} module_name) + set(${define_name} "OPENSPACE_MODULE_${module_name}_ENABLED" PARENT_SCOPE) endfunction () function (create_module_header_filepath module_name module_path header_filepath) - string(TOLOWER ${module_name} module_name) - string(REPLACE "${OPENSPACE_BASE_DIR}/" "" module_path ${module_path}) - set(header_filepath "${module_path}/${module_name}module.h" PARENT_SCOPE) + string(TOLOWER ${module_name} module_name) + string(REPLACE "${OPENSPACE_BASE_DIR}/" "" module_path ${module_path}) + set(header_filepath "${module_path}/${module_name}module.h" PARENT_SCOPE) endfunction () function (create_module_class_name module_name module_class_name) - # Capitalize the first character - string(SUBSTRING ${module_name} 0 1 FIRST_LETTER) - string(TOUPPER ${FIRST_LETTER} FIRST_LETTER) - string(REGEX REPLACE "^.(.*)" "${FIRST_LETTER}\\1" module_name "${module_name}") + # Capitalize the first character + string(SUBSTRING ${module_name} 0 1 FIRST_LETTER) + string(TOUPPER ${FIRST_LETTER} FIRST_LETTER) + string(REGEX REPLACE "^.(.*)" "${FIRST_LETTER}\\1" module_name "${module_name}") endfunction () diff --git a/support/cmake/module_definition.cmake b/support/cmake/module_definition.cmake index b2aaffd948..b09ea6c2c2 100644 --- a/support/cmake/module_definition.cmake +++ b/support/cmake/module_definition.cmake @@ -35,65 +35,69 @@ include(GenerateExportHeader) # The 'library_mode' determines whether the module is linked STATIC or SHARED # Dependencies will have to be set in a file called "include.cmake" function (create_new_module module_name output_library_name library_mode) - # Create a library name of the style: openspace-module-${name} - create_library_name(${module_name} library_name) + # Create a library name of the style: openspace-module-${name} + create_library_name(${module_name} library_name) - # Add the module files to the list of sources - get_module_files(${module_name} module_files) + # Add the module files to the list of sources + get_module_files(${module_name} module_files) - # Create the library - add_library(${library_name} ${library_mode} ${module_files} ${ARGN}) + # Create the library + add_library(${library_name} ${library_mode} ${module_files} ${ARGN}) - # Set compile settings that are common to all modules - set_openspace_compile_settings(${library_name}) + # Set compile settings that are common to all modules + set_openspace_compile_settings(${library_name}) - handle_module_dependencies(${library_name} ${module_name}) + target_include_directories(${library_name} PUBLIC ${OPENSPACE_BASE_DIR}) + create_define_name(${module_name} define_name) + target_compile_definitions(${library_name} PUBLIC "${define_name}") - if ("${library_mode}" STREQUAL "SHARED") - # If it is a shared library, we want to generate the export header - string(TOLOWER ${module_name} lower_module_name) - generate_export_header( - ${library_name} - EXPORT_FILE_NAME - ${CMAKE_BINARY_DIR}/_generated/include/${lower_module_name}_export.h - ) - endif () + handle_module_dependencies(${library_name} ${module_name}) - # This is an ugly hack as we can't inject a variable into a scope two parents above - # would love to: set(${module_class_name} "${module_name}Module" PARENT_PARENT_SCOPE) - # instead - # This value is used in handle_modules.cmake::handle_modules - set_property(GLOBAL PROPERTY CurrentModuleClassName "${module_name}Module") - - set(${output_library_name} ${library_name} PARENT_SCOPE) + if ("${library_mode}" STREQUAL "SHARED") + # If it is a shared library, we want to generate the export header + string(TOLOWER ${module_name} lower_module_name) + generate_export_header( + ${library_name} + EXPORT_FILE_NAME + ${CMAKE_BINARY_DIR}/_generated/include/${lower_module_name}_export.h + ) + endif () + + # This is an ugly hack as we can't inject a variable into a scope two parents above + # would love to: set(${module_class_name} "${module_name}Module" PARENT_PARENT_SCOPE) + # instead + # This value is used in handle_modules.cmake::handle_modules + set_property(GLOBAL PROPERTY CurrentModuleClassName "${module_name}Module") + + set(${output_library_name} ${library_name} PARENT_SCOPE) endfunction () function (register_external_libraries libraries) - # This is an ugly hack as we can't inject a variable into a scope two parents above - # would love to: set(${module_external_librarys} "${libraries}" PARENT_PARENT_SCOPE) - # instead - set(libs "") - foreach (library ${libraries}) - get_filename_component(lib ${library} ABSOLUTE) - list(APPEND libs ${lib}) - endforeach() + # This is an ugly hack as we can't inject a variable into a scope two parents above + # would love to: set(${module_external_librarys} "${libraries}" PARENT_PARENT_SCOPE) + # instead + set(libs "") + foreach (library ${libraries}) + get_filename_component(lib ${library} ABSOLUTE) + list(APPEND libs ${lib}) + endforeach() - set_property(GLOBAL PROPERTY CurrentModuleExternalLibraries ${libs}) + set_property(GLOBAL PROPERTY CurrentModuleExternalLibraries ${libs}) endfunction () # Gets and returns the module.h and module.cpp files and provides them with a # source group function (get_module_files module_name module_files) - string(TOLOWER ${module_name} module_name_lower) - set(module_files - ${CMAKE_CURRENT_SOURCE_DIR}/${module_name_lower}module.h - ${CMAKE_CURRENT_SOURCE_DIR}/${module_name_lower}module.cpp - PARENT_SCOPE - ) - source_group("Module Files" FILES ${module_files}) + string(TOLOWER ${module_name} module_name_lower) + set(module_files + ${CMAKE_CURRENT_SOURCE_DIR}/${module_name_lower}module.h + ${CMAKE_CURRENT_SOURCE_DIR}/${module_name_lower}module.cpp + PARENT_SCOPE + ) + source_group("Module Files" FILES ${module_files}) endfunction () @@ -102,28 +106,48 @@ endfunction () # function takes care that they are added to the project # External dependencies are found using the find_package function and then linked function (handle_module_dependencies target_name module_name) - # We always want to link against Ghoul and the core library - target_link_libraries(${library_name} PRIVATE Ghoul openspace-core) + # We always want to link against Ghoul and the core library + target_link_libraries(${library_name} PRIVATE Ghoul openspace-core) + # We currently can't reuse the precompiled header because that one has the Kameleon + # definition stuck into it + #target_precompile_headers(${library_name} REUSE_FROM openspace-core) + target_precompile_headers(${library_name} PRIVATE + [["ghoul/fmt.h"]] + [["ghoul/glm.h"]] + [["ghoul/misc/assert.h"]] + [["ghoul/misc/boolean.h"]] + [["ghoul/misc/exception.h"]] + [["ghoul/misc/invariants.h"]] + [["ghoul/misc/profiling.h"]] + + + + + + + + ) - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include.cmake") - include(${CMAKE_CURRENT_SOURCE_DIR}/include.cmake) - # Handle OpenSpace dependencies - foreach (dep ${OPENSPACE_DEPENDENCIES}) - create_library_name(${dep} dep_library) - message(STATUS "Link: ${target_name} <- ${dep_library}") - target_link_libraries(${target_name} PRIVATE ${dep_library}) - endforeach () + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include.cmake") + include(${CMAKE_CURRENT_SOURCE_DIR}/include.cmake) - # Handle external dependencies - foreach (dep ${EXTERNAL_DEPENDENCIES}) - string(TOUPPER ${dep} dep_upper) - find_package(${dep} REQUIRED) - target_include_directories(${target_name} PUBLIC - ${${dep_upper}_INCLUDE_DIR} ${${dep_upper}_INCLUDE_DIRS} - ) - message(STATUS "Link: ${target_name} <- ${${dep_upper}_LIBRARIES}") - target_link_libraries(${target_name} PRIVATE ${${dep_upper}_LIBRARIES}) - endforeach () - endif () + # Handle OpenSpace dependencies + foreach (dep ${OPENSPACE_DEPENDENCIES}) + create_library_name(${dep} dep_library) + message(STATUS "Link: ${target_name} <- ${dep_library}") + target_link_libraries(${target_name} PRIVATE ${dep_library}) + endforeach () + + # Handle external dependencies + foreach (dep ${EXTERNAL_DEPENDENCIES}) + string(TOUPPER ${dep} dep_upper) + find_package(${dep} REQUIRED) + target_include_directories(${target_name} PUBLIC + ${${dep_upper}_INCLUDE_DIR} ${${dep_upper}_INCLUDE_DIRS} + ) + message(STATUS "Link: ${target_name} <- ${${dep_upper}_LIBRARIES}") + target_link_libraries(${target_name} PRIVATE ${${dep_upper}_LIBRARIES}) + endforeach () + endif () endfunction () diff --git a/support/cmake/openspace_header.template b/support/cmake/openspace_header.template index ca8ede21eb..f5a5ac7ce2 100644 --- a/support/cmake/openspace_header.template +++ b/support/cmake/openspace_header.template @@ -31,9 +31,9 @@ namespace openspace { std::string licenseText(); -constexpr int OPENSPACE_VERSION_MAJOR = @OPENSPACE_VERSION_MAJOR@; -constexpr int OPENSPACE_VERSION_MINOR = @OPENSPACE_VERSION_MINOR@; -constexpr int OPENSPACE_VERSION_PATCH = @OPENSPACE_VERSION_PATCH@; +constexpr const int OPENSPACE_VERSION_MAJOR = @OPENSPACE_VERSION_MAJOR@; +constexpr const int OPENSPACE_VERSION_MINOR = @OPENSPACE_VERSION_MINOR@; +constexpr const int OPENSPACE_VERSION_PATCH = @OPENSPACE_VERSION_PATCH@; constexpr const char* OPENSPACE_VERSION_NUMBER = "@OPENSPACE_VERSION_MAJOR@.@OPENSPACE_VERSION_MINOR@.@OPENSPACE_VERSION_PATCH@"; diff --git a/support/cmake/packaging.cmake b/support/cmake/packaging.cmake index 796e5367c2..52cec8a3eb 100644 --- a/support/cmake/packaging.cmake +++ b/support/cmake/packaging.cmake @@ -33,82 +33,82 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${OPENSPACE_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${OPENSPACE_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${OPENSPACE_VERSION_PATCH}") set(OPENSPACE_VERSION_NUMBER - "${OPENSPACE_VERSION_MAJOR}.${OPENSPACE_VERSION_MINOR}.${OPENSPACE_VERSION_PATCH}" + "${OPENSPACE_VERSION_MAJOR}.${OPENSPACE_VERSION_MINOR}.${OPENSPACE_VERSION_PATCH}" ) set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenSpace ${OPENSPACE_VERSION_NUMBER}") set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME} ${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}" + "${CPACK_PACKAGE_NAME} ${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}" ) set(CPACK_STRIP_FILES 1) install(DIRECTORY - ${OPENSPACE_BASE_DIR}/bin/${CMAKE_BUILD_TYPE}/ - DESTINATION bin - USE_SOURCE_PERMISSIONS + ${OPENSPACE_BASE_DIR}/bin/${CMAKE_BUILD_TYPE}/ + DESTINATION bin + USE_SOURCE_PERMISSIONS ) install(DIRECTORY ${OPENSPACE_BASE_DIR}/config/ DESTINATION config) install(DIRECTORY ${OPENSPACE_BASE_DIR}/data/ DESTINATION data) install(DIRECTORY ${OPENSPACE_BASE_DIR}/modules/ - DESTINATION modules - FILES_MATCHING - PATTERN "*.glsl" - PATTERN "*.hglsl" - PATTERN "*.fs" - PATTERN "*.vs" - PATTERN "*.lua" + DESTINATION modules + FILES_MATCHING + PATTERN "*.glsl" + PATTERN "*.hglsl" + PATTERN "*.fs" + PATTERN "*.vs" + PATTERN "*.lua" ) install(DIRECTORY ${OPENSPACE_BASE_DIR}/scripts/ DESTINATION scripts) install(DIRECTORY ${OPENSPACE_BASE_DIR}/shaders/ DESTINATION shaders) install(FILES - ${OPENSPACE_BASE_DIR}/openspace.cfg - ${OPENSPACE_BASE_DIR}/CREDITS.md - ${OPENSPACE_BASE_DIR}/LICENSE.md - ${OPENSPACE_BASE_DIR}/README.md - DESTINATION . + ${OPENSPACE_BASE_DIR}/openspace.cfg + ${OPENSPACE_BASE_DIR}/CREDITS.md + ${OPENSPACE_BASE_DIR}/LICENSE.md + ${OPENSPACE_BASE_DIR}/README.md + DESTINATION . ) if (WIN32) - set(CPACK_GENERATOR ZIP) - # Need backslash for correct subdirectory paths - set(CPACK_PACKAGE_ICON "${OPENSPACE_BASE_DIR}\\\\apps\\\\OpenSpace\\\\openspace.png") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}\\\\${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}") + set(CPACK_GENERATOR ZIP) + # Need backslash for correct subdirectory paths + set(CPACK_PACKAGE_ICON "${OPENSPACE_BASE_DIR}\\\\apps\\\\OpenSpace\\\\openspace.png") + set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}\\\\${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}") else () - set(CPACK_GENERATOR TGZ) - set(CPACK_PACKAGE_ICON "${OPENSPACE_BASE_DIR}/apps/OpenSpace/openspace.png") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}") + set(CPACK_GENERATOR TGZ) + set(CPACK_PACKAGE_ICON "${OPENSPACE_BASE_DIR}/apps/OpenSpace/openspace.png") + set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${OPENSPACE_VERSION_NUMBER} ${OPENSPACE_VERSION_STRING}") endif () option(OPENSPACE_CREATE_INSTALLER "Create an OpenSpace installer from the package" OFF) if (OPENSPACE_CREATE_INSTALLER) - set(CPACK_PACKAGE_EXECUTABLES "openspace;OpenSpace") - if (WIN32) - set(CPACK_GENERATOR "ZIP;NSIS") - # OpenSpace does NOT seem to handle C:/Program Files/ without crashing - set(CPACK_NSIS_INSTALL_ROOT "C:") - # There is a bug in NSI that does not handle full unix paths properly. Make - # sure there is at least one set of four (4) backlashes. - set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_FILE_NAME}") - # Create the desktop link - set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortCut '$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk' '$INSTDIR\\\\bin\\\\OpenSpace.exe' ") - # Delete the desktop link - set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Delete '$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk' ") - # The icon to start the application. - set(CPACK_NSIS_MUI_ICON "${OPENSPACE_BASE_DIR}\\\\apps\\\\OpenSpace\\\\openspace.ico") - # Add a link to the application website in the startup menu. - set(CPACK_NSIS_MENU_LINKS "http://openspaceproject.com/" "OpenSpace Homepage") - # Set the icon for the application in the Add/Remove programs section. - set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\OpenSpace.exe") - # The mail address for the maintainer of the application in the Add/Remove programs section - set(CPACK_NSIS_CONTACT alexander.bock@liu.se) - # The url of the application in the Add/Remove programs section - set(CPACK_NSIS_URL_INFO_ABOUT "http://openspaceproject.com/") - # Help URL - set(CPACK_NSIS_HELP_LINK "http://openspaceproject.com/") - endif () + set(CPACK_PACKAGE_EXECUTABLES "openspace;OpenSpace") + if (WIN32) + set(CPACK_GENERATOR "ZIP;NSIS") + # OpenSpace does NOT seem to handle C:/Program Files/ without crashing + set(CPACK_NSIS_INSTALL_ROOT "C:") + # There is a bug in NSI that does not handle full unix paths properly. Make + # sure there is at least one set of four (4) backlashes. + set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_FILE_NAME}") + # Create the desktop link + set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortCut '$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk' '$INSTDIR\\\\bin\\\\OpenSpace.exe' ") + # Delete the desktop link + set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Delete '$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk' ") + # The icon to start the application. + set(CPACK_NSIS_MUI_ICON "${OPENSPACE_BASE_DIR}\\\\apps\\\\OpenSpace\\\\openspace.ico") + # Add a link to the application website in the startup menu. + set(CPACK_NSIS_MENU_LINKS "http://openspaceproject.com/" "OpenSpace Homepage") + # Set the icon for the application in the Add/Remove programs section. + set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\OpenSpace.exe") + # The mail address for the maintainer of the application in the Add/Remove programs section + set(CPACK_NSIS_CONTACT alexander.bock@liu.se) + # The url of the application in the Add/Remove programs section + set(CPACK_NSIS_URL_INFO_ABOUT "http://openspaceproject.com/") + # Help URL + set(CPACK_NSIS_HELP_LINK "http://openspaceproject.com/") + endif () endif () include (CPack) diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index 698821579c..7b492bcc48 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -22,303 +22,216 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## -function (set_openspace_compile_settings project) - set_property(TARGET ${project} PROPERTY CXX_STANDARD 17) - set_property(TARGET ${project} PROPERTY CXX_STANDARD_REQUIRED ON) +function (set_openspace_compile_settings target) + target_compile_features(${target} PRIVATE cxx_std_17) - if (MSVC) - target_compile_options( - ${project} - PRIVATE - "/MP" # Multi-threading support - "/W4" # Highest warning level - "/w44062" # enumerator 'identifier' in a switch of enum 'enumeration' is not handled - "/wd4127" # conditional expression is constant - "/wd4201" # nonstandard extension used : nameless struct/union - "/w44255" # 'function': no function prototype given: converting '()' to '(void)' - "/w44263" # 'function': member function does not override any base class virtual member function - "/w44264" # 'virtual_function': no override available for virtual member function from base 'class'; function is hidden - "/w44265" # 'class': class has virtual functions, but destructor is not virtual - "/w44266" # 'function': no override available for virtual member function from base 'type'; function is hidden - "/w44289" # nonstandard extension used : 'var' : loop control variable declared in the for-loop is used outside the for-loop scope - "/w44296" # 'operator': expression is always false - "/w44311" # 'variable' : pointer truncation from 'type' to 'type' - "/w44339" # 'type' : use of undefined type detected in CLR meta-data - use of this type may lead to a runtime exception - "/w44342" # behavior change: 'function' called, but a member operator was called in previous versions - "/w44350" # behavior change: 'member1' called instead of 'member2' - "/w44431" # missing type specifier - int assumed. Note: C no longer supports default-int - "/w44471" # a forward declaration of an unscoped enumeration must have an underlying type (int assumed) - "/wd4505" # unreferenced local function has been removed - "/w44545" # expression before comma evaluates to a function which is missing an argument list - "/w44546" # function call before comma missing argument list - "/w44547" # 'operator': operator before comma has no effect; expected operator with side-effect - "/w44548" # expression before comma has no effect; expected expression with side-effect - "/w44549" # 'operator': operator before comma has no effect; did you intend 'operator'? - "/w44555" # expression has no effect; expected expression with side-effect - # This is disabled until GLM is updated to version 0.9.9 that removes occurrance of this warning - # "/w44574" # 'identifier' is defined to be '0': did you mean to use '#if identifier'? - "/w44608" # 'symbol1' has already been initialized by another union member in the initializer list, 'symbol2' - "/w44619" # #pragma warning: there is no warning number 'number' - "/w44628" # digraphs not supported with -Ze. Character sequence 'digraph' not interpreted as alternate token for 'char' - "/w44640" # 'instance': construction of local static object is not thread-safe - "/w44905" # wide string literal cast to 'LPSTR' - "/w44906" # string literal cast to 'LPWSTR' - "/w44946" # reinterpret_cast used between related classes: 'class1' and 'class2' - "/w44986" # 'symbol': exception specification does not match previous declaration - "/w44988" # 'symbol': variable declared outside class/function scope - "/std:c++latest" - "/permissive-" - "/Zc:twoPhase-" # Used to prevent C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229): error C2187: syntax error: 'identifier' was unexpected here - # This is a bug in Visual Studio 15.3 and can be removed with the next version: - # https://developercommunity.visualstudio.com/content/problem/94419/vs-2017-153-with-permissive-shows-error-c2187-in-c.html - "/Zc:strictStrings-" # Windows header don't adhere to this - "/Zc:__cplusplus" # Correctly set the __cplusplus macro - ) - if (OPENSPACE_WARNINGS_AS_ERRORS) - target_compile_options(${project} PRIVATE "/WX") - endif () + set(MSVC_WARNINGS + "/MP" # Multi-threading support + "/W4" # Highest warning level + "/w44062" # enumerator 'identifier' in a switch of enum 'enumeration' is not handled + "/wd4127" # conditional expression is constant + "/wd4201" # nonstandard extension used : nameless struct/union + "/w44255" # 'function': no function prototype given: converting '()' to '(void)' + "/w44263" # 'function': member function does not override any base class virtual member function + "/w44264" # 'virtual_function': no override available for virtual member function from base 'class'; function is hidden + "/w44265" # 'class': class has virtual functions, but destructor is not virtual + "/w44266" # 'function': no override available for virtual member function from base 'type'; function is hidden + "/w44289" # nonstandard extension used : 'var' : loop control variable declared in the for-loop is used outside the for-loop scope + "/w44296" # 'operator': expression is always false + "/w44311" # 'variable' : pointer truncation from 'type' to 'type' + "/w44339" # 'type' : use of undefined type detected in CLR meta-data - use of this type may lead to a runtime exception + "/w44342" # behavior change: 'function' called, but a member operator was called in previous versions + "/w44350" # behavior change: 'member1' called instead of 'member2' + "/w44431" # missing type specifier - int assumed. Note: C no longer supports default-int + "/w44471" # a forward declaration of an unscoped enumeration must have an underlying type (int assumed) + "/wd4505" # unreferenced local function has been removed + "/w44545" # expression before comma evaluates to a function which is missing an argument list + "/w44546" # function call before comma missing argument list + "/w44547" # 'operator': operator before comma has no effect; expected operator with side-effect + "/w44548" # expression before comma has no effect; expected expression with side-effect + "/w44549" # 'operator': operator before comma has no effect; did you intend 'operator'? + "/w44555" # expression has no effect; expected expression with side-effect + # This is disabled until GLM is updated to version 0.9.9 that removes occurrance of this warning + # "/w44574" # 'identifier' is defined to be '0': did you mean to use '#if identifier'? + "/w44608" # 'symbol1' has already been initialized by another union member in the initializer list, 'symbol2' + "/w44619" # #pragma warning: there is no warning number 'number' + "/w44628" # digraphs not supported with -Ze. Character sequence 'digraph' not interpreted as alternate token for 'char' + "/w44640" # 'instance': construction of local static object is not thread-safe + "/w44905" # wide string literal cast to 'LPSTR' + "/w44906" # string literal cast to 'LPWSTR' + "/w44946" # reinterpret_cast used between related classes: 'class1' and 'class2' + "/w44986" # 'symbol': exception specification does not match previous declaration + "/w44988" # 'symbol': variable declared outside class/function scope + "/std:c++latest" + "/permissive-" + "/Zc:twoPhase-" # Used to prevent C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229): error C2187: syntax error: 'identifier' was unexpected here + # This is a bug in Visual Studio 15.3 and can be removed with the next version: + # https://developercommunity.visualstudio.com/content/problem/94419/vs-2017-153-with-permissive-shows-error-c2187-in-c.html + "/Zc:strictStrings-" # Windows header don't adhere to this + "/Zc:__cplusplus" # Correctly set the __cplusplus macro + ) + if (OPENSPACE_WARNINGS_AS_ERRORS) + set(MSVC_WARNINGS ${MSVC_WARNINGS} "/WX") + endif () + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX) + set(MSVC_WARNINGS ${MSVC_WARNINGS} "/arch:AVX") + endif () + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX2) + set(MSVC_WARNINGS ${MSVC_WARNINGS} "/arch:AVX2") + endif () + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX512) + set(MSVC_WARNINGS ${MSVC_WARNINGS} "/arch:AVX512") + endif () + if (OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS) + set(MSVC_WARNINGS ${MSVC_WARNINGS} + "/Oi" # usage of intrinsic functions + "/GL" # Whole program optimization + ) + else () + set(MSVC_WARNINGS ${MSVC_WARNINGS} + "/ZI" # Edit and continue support + ) + endif () - # Boost as of 1.64 still uses unary_function unless we define this - target_compile_definitions(${project} PRIVATE "_HAS_AUTO_PTR_ETC") - target_compile_definitions(${project} PRIVATE "NOMINMAX") + set(CLANG_WARNINGS + "-stdlib=libc++" + "-Wall" + "-Wextra" + "-Wabstract-vbase-init" + "-Warray-bounds-pointer-arithmetic" + "-Wassign-enum" + "-Wauto-import" + "-Wbad-function-cast" + "-Wbitfield-constant-conversion" + "-Wcast-calling-convention" + "-Wcast-qual" + "-Wchar-subscripts" + "-Wcomma" + "-Wcomment" + "-Wcomplex-component-init" + "-Wconditional-uninitialized" + "-Wdate-time" + "-Wdeprecated-implementations" + "-Wdollar-in-identifier-extension" + "-Wduplicate-enum" + "-Wduplicate-method-match" + "-Wempty-body" + "-Wformat-pedantic" + "-Wheader-hygiene" + "-Widiomatic-parentheses" + "-Wimplicit-fallthrough" + "-Wimport-preprocessor-directive-pedantic" + "-Winconsistent-missing-override" + "-Winfinite-recursion" + "-Wkeyword-macro" + "-Wlanguage-extension-token" + "-Wloop-analysis" + "-Wmethod-signatures" + "-Wmicrosoft-end-of-file" + "-Wmicrosoft-enum-forward-reference" + "-Wmicrosoft-fixed-enum" + "-Wmicrosoft-flexible-array" + "-Wmismatched-tags" + "-Wmissing-field-initializers" + "-Wmissing-noreturn" + "-Wnewline-eof" + "-Wnon-virtual-dtor" + "-Wold-style-cast" + "-Woverloaded-virtual" + "-Wpessimizing-move" + "-Wpointer-arith" + "-Wpragmas" + "-Wredundant-move" + "-Wreorder" + "-Wsemicolon-before-method-body" + # "-Wshadow-field" + "-Wshadow-field-in-constructor" + # "-Wshadow-all" Add this again once the Properties don't throw warnings --abock + "-Wshift-sign-overflow" + "-Wshorten-64-to-32" + "-Wsign-compare" + "-Wstring-conversion" + "-Wtautological-compare" + "-Wthread-safety" + "-Wundef" + "-Wundefined-reinterpret-cast" + "-Wuninitialized" + "-Wunneeded-internal-declaration" + "-Wunneeded-member-function" + "-Wunreachable-code-break" + "-Wunreachable-code-loop-increment" + "-Wunreachable-code-return" + "-Wunused-exception-parameter" + "-Wunused-label" + "-Wunused-local-typedef" + "-Wunused-macros" + "-Wunused-parameter" + "-Wunused-private-field" + "-Wunused-result" + "-Wunused-variable" + "-Wused-but-marked-unused" + "-Wvariadic-macros" + "-Wvla" + "-Wzero-length-array" + "-Wno-missing-braces" + ) + if (OPENSPACE_WARNINGS_AS_ERRORS) + set(CLANG_WARNINGS ${CLANG_WARNINGS} "-Werror") + endif () - if (OPENSPACE_OPTIMIZATION_ENABLE_AVX) - target_compile_options(${project} PRIVATE "/arch:AVX") - endif () - if (OPENSPACE_OPTIMIZATION_ENABLE_AVX2) - target_compile_options(${project} PRIVATE "/arch:AVX2") - endif () - if (OPENSPACE_OPTIMIZATION_ENABLE_AVX512) - target_compile_options(${project} PRIVATE "/arch:AVX512") - endif () - if (OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS) - target_compile_options(${project} PRIVATE - "/Oi" # usage of intrinsic functions - "/GL" # Whole program optimization - ) - else () - target_compile_options(${project} PRIVATE - "/ZI" # Edit and continue support - ) - endif () - elseif (NOT LINUX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") - if (OPENSPACE_WARNINGS_AS_ERRORS) - target_compile_options(${project} PRIVATE "-Werror") - endif () + set(GCC_WARNINGS + "-ggdb" + "-Wall" + "-Wextra" + "-Wpedantic" + "-Wunused-parameter" + "-Wuninitialized" + "-Wsuggest-attribute=const" + "-Wsuggest-final-types" + "-Wsuggest-final-methods" + "-Wsuggest-override" + "-Walloc-zero" + "-Wduplicated-cond" + "-Wshadow" + "-Wundef" + "-Wcast-qual" + "-Wzero-as-null-pointer-constant" + "-Wdate-time" + "-Wuseless-cast" + "-Wlogical-op" + "-Wint-in-bool-context" + "-Wno-deprecated-copy" + "-Wno-write-strings" + "-Wnon-virtual-dtor" + "-Wold-style-cast" + "-Woverloaded-virtual" + "-Wno-long-long" + ) + if (OPENSPACE_WARNINGS_AS_ERRORS) + set(GCC_WARNINGS ${CLANG_WARNINGS} "-Werror") + endif () - target_compile_options( - ${project} - PRIVATE - "-stdlib=libc++" - "-Wall" - "-Wextra" - "-Wabstract-vbase-init" - "-Warray-bounds-pointer-arithmetic" - "-Wassign-enum" - "-Wauto-import" - "-Wbad-function-cast" - "-Wbitfield-constant-conversion" - "-Wcast-calling-convention" - "-Wcast-qual" - "-Wchar-subscripts" - "-Wcomma" - "-Wcomment" - "-Wcomplex-component-init" - "-Wconditional-uninitialized" - "-Wdate-time" - "-Wdeprecated-implementations" - "-Wdollar-in-identifier-extension" - "-Wduplicate-enum" - "-Wduplicate-method-match" - "-Wempty-body" - "-Wformat-pedantic" - "-Wheader-hygiene" - "-Widiomatic-parentheses" - "-Wimplicit-fallthrough" - "-Wimport-preprocessor-directive-pedantic" - "-Winconsistent-missing-override" - "-Winfinite-recursion" - "-Wkeyword-macro" - "-Wlanguage-extension-token" - "-Wloop-analysis" - "-Wmethod-signatures" - "-Wmicrosoft-end-of-file" - "-Wmicrosoft-enum-forward-reference" - "-Wmicrosoft-fixed-enum" - "-Wmicrosoft-flexible-array" - "-Wmismatched-tags" - "-Wmissing-field-initializers" - "-Wmissing-noreturn" - "-Wnewline-eof" - "-Wnon-virtual-dtor" - "-Wold-style-cast" - "-Woverloaded-virtual" - "-Wpessimizing-move" - "-Wpointer-arith" - "-Wpragmas" - "-Wredundant-move" - "-Wreorder" - "-Wsemicolon-before-method-body" - # "-Wshadow-field" - "-Wshadow-field-in-constructor" - # "-Wshadow-all" Add this again once the Properties don't throw warnings --abock - "-Wshift-sign-overflow" - "-Wshorten-64-to-32" - "-Wsign-compare" - "-Wstring-conversion" - "-Wtautological-compare" - "-Wthread-safety" - "-Wundef" - "-Wundefined-reinterpret-cast" - "-Wuninitialized" - "-Wunneeded-internal-declaration" - "-Wunneeded-member-function" - "-Wunreachable-code-break" - "-Wunreachable-code-loop-increment" - "-Wunreachable-code-return" - "-Wunused-exception-parameter" - "-Wunused-label" - "-Wunused-local-typedef" - "-Wunused-macros" - "-Wunused-parameter" - "-Wunused-private-field" - "-Wunused-result" - "-Wunused-variable" - "-Wused-but-marked-unused" - "-Wvariadic-macros" - "-Wvla" - "-Wzero-length-array" - "-Wno-missing-braces" - ) - elseif (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") - if (OPENSPACE_WARNINGS_AS_ERRORS) - target_compile_options(${project} PRIVATE "-Werror") - endif () + if (MSVC) + target_compile_options(${target} PRIVATE ${MSVC_WARNINGS}) - target_compile_options( - ${project} - PRIVATE - "-stdlib=libc++" - "-std=c++17" - "-Wall" - "-Wextra" - "-Wabstract-vbase-init" - "-Warray-bounds-pointer-arithmetic" - "-Wassign-enum" - "-Wauto-import" - "-Wbad-function-cast" - "-Wbitfield-constant-conversion" - "-Wcast-calling-convention" - "-Wcast-qual" - "-Wchar-subscripts" - "-Wcomma" - "-Wcomment" - "-Wcomplex-component-init" - "-Wconditional-uninitialized" - "-Wdate-time" - "-Wdeprecated-implementations" - "-Wdollar-in-identifier-extension" - "-Wduplicate-enum" - "-Wduplicate-method-match" - "-Wempty-body" - "-Wformat-pedantic" - "-Wheader-hygiene" - "-Widiomatic-parentheses" - "-Wimplicit-fallthrough" - "-Wimport-preprocessor-directive-pedantic" - "-Winconsistent-missing-override" - "-Winfinite-recursion" - "-Wkeyword-macro" - "-Wlanguage-extension-token" - "-Wloop-analysis" - "-Wmethod-signatures" - "-Wmicrosoft-end-of-file" - "-Wmicrosoft-enum-forward-reference" - "-Wmicrosoft-fixed-enum" - "-Wmicrosoft-flexible-array" - "-Wmismatched-tags" - "-Wmissing-field-initializers" - "-Wmissing-noreturn" - "-Wnewline-eof" - "-Wnon-virtual-dtor" - "-Wold-style-cast" - "-Woverloaded-virtual" - "-Wpessimizing-move" - "-Wpointer-arith" - "-Wpragmas" - "-Wredundant-move" - "-Wreorder" - "-Wsemicolon-before-method-body" - # "-Wshadow-field" - "-Wshadow-field-in-constructor" - # "-Wshadow-all" Add this again once the Properties don't throw warnings --abock - "-Wshift-sign-overflow" - "-Wshorten-64-to-32" - "-Wsign-compare" - "-Wstring-conversion" - "-Wtautological-compare" - "-Wthread-safety" - "-Wundef" - "-Wundefined-reinterpret-cast" - "-Wuninitialized" - "-Wunneeded-internal-declaration" - "-Wunneeded-member-function" - "-Wunreachable-code-break" - "-Wunreachable-code-loop-increment" - "-Wunreachable-code-return" - "-Wunused-exception-parameter" - "-Wunused-label" - "-Wunused-local-typedef" - "-Wunused-macros" - "-Wunused-parameter" - "-Wunused-private-field" - "-Wunused-result" - "-Wunused-variable" - "-Wused-but-marked-unused" - "-Wvariadic-macros" - "-Wvla" - "-Wzero-length-array" - "-Wno-missing-braces" - ) - - target_link_libraries(${project} PRIVATE "c++" "c++abi") - - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - target_compile_options( - ${project} - PRIVATE - "-ggdb" - "-Wall" - "-Wextra" - "-Wpedantic" - "-Wunused-parameter" - "-Wuninitialized" - "-Wsuggest-attribute=const" - "-Wsuggest-final-types" - "-Wsuggest-final-methods" - "-Wsuggest-override" - "-Walloc-zero" - "-Wduplicated-cond" - "-Wshadow" - "-Wundef" - "-Wcast-qual" - "-Wzero-as-null-pointer-constant" - "-Wdate-time" - "-Wuseless-cast" - "-Wlogical-op" - "-Wint-in-bool-context" - "-Wno-write-strings" - "-Wnon-virtual-dtor" - "-Wold-style-cast" - "-Woverloaded-virtual" - "-Wno-long-long" - ) - - if (OPENSPACE_WARNINGS_AS_ERRORS) - target_compile_options(${project} PRIVATE "-Werror") - endif () - else () - message("Compiler not handled in set_openspace_compile_settings.cmake") + # Boost as of 1.64 still uses unary_function unless we define this + target_compile_definitions(${target} PRIVATE "_HAS_AUTO_PTR_ETC") + target_compile_definitions(${target} PRIVATE "NOMINMAX") + elseif (NOT LINUX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if (OPENSPACE_WARNINGS_AS_ERRORS) + target_compile_options(${target} PRIVATE "-Werror") endif () + # Apple has "deprecated" OpenGL and offers nothing by warnings instead + target_compile_definitions(${target} PRIVATE "GL_SILENCE_DEPRECATION") + + target_compile_options(${target} PRIVATE ${CLANG_WARNINGS}) + elseif (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(${target} PRIVATE ${CLANG_WARNINGS} "-std=c++17") + target_link_libraries(${target} PRIVATE "c++" "c++abi") + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${target} PRIVATE ${GCC_WARNINGS}) + else () + message("Compiler not handled in set_openspace_compile_settings.cmake") + endif () endfunction () diff --git a/support/cppcheck/suppressions.txt b/support/cppcheck/suppressions.txt index cfe9971764..704af3f655 100644 --- a/support/cppcheck/suppressions.txt +++ b/support/cppcheck/suppressions.txt @@ -1,5 +1,6 @@ -// This is not a memleak because the placement new operator does not -// actually create any memory that could leak -missingInclude -noExplicitConstructor useStlAlgorithm +unreadVariable +unusedFunction + +shadowFunction:modules/globebrowsing/src/tileprovider.cpp +syntaxError:src/scene/profile.cpp:44 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 658348b7ab..f701277149 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -47,12 +47,21 @@ add_executable( set_openspace_compile_settings(OpenSpaceTest) -target_include_directories(OpenSpaceTest PUBLIC +target_include_directories(OpenSpaceTest + PUBLIC "${GHOUL_BASE_DIR}/ext/catch2/single_include" + "${OPENSPACE_BASE_DIR}" ) target_compile_definitions(OpenSpaceTest PUBLIC "GHL_THROW_ON_ASSERT") target_link_libraries(OpenSpaceTest PUBLIC openspace-core) +foreach (library_name ${all_enabled_modules}) + get_target_property(library_type ${library_name} TYPE) + if (NOT ${library_type} STREQUAL "SHARED_LIBRARY") + target_link_libraries(OpenSpaceTest PRIVATE ${library_name}) + endif() +endforeach () + if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) # Add the CEF binary distribution's cmake/ directory to the module path and # find CEF to initialize it properly. diff --git a/tests/test_concurrentjobmanager.cpp b/tests/test_concurrentjobmanager.cpp index ec91ee5c23..1eb9521b1f 100644 --- a/tests/test_concurrentjobmanager.cpp +++ b/tests/test_concurrentjobmanager.cpp @@ -30,7 +30,7 @@ namespace { struct TestJob : public openspace::Job { - TestJob(int jobExecutingTime) + explicit TestJob(int jobExecutingTime) : _jobExecutingTime(jobExecutingTime) {} @@ -45,12 +45,12 @@ namespace { private: int _jobExecutingTime; - int prod; + int prod = 0; }; struct VerboseProduct { - VerboseProduct(int v) : val(v) {} + explicit VerboseProduct(int v) : val(v) {} ~VerboseProduct() {} @@ -59,7 +59,7 @@ namespace { struct VerboseJob : public openspace::Job { - VerboseJob(int jobExecutingTime) + explicit VerboseJob(int jobExecutingTime) : _jobExecutingTime(jobExecutingTime) , _product(-1) {} From 7bf7a2540110ea691d401c335e70401bd3a765b8 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 29 Dec 2020 13:44:57 +0100 Subject: [PATCH 072/147] Updated submodules (#1444) * Update submodules - Ghoul - assimp (5.0.0 -> 5.0.1) - catch2 (2.11.1 -> 2.13.3) - fmt (7.0.3 -> 7.1.3) - freetype2 (2.10.1 -> 2.10.4) - glbinding (3.1 -> 3.2) - glm (0.9.9.5 -> 0.9.9.8) - websocketpp (0.7.x -> 0.8.2) - SGCT - fmt (7.0.3 -> 7.1.3) - freetype (2.9.1 -> 2.10.4) - GLM (0.9.9.6 -> 0.9.9.8) * Update to new include external definition * Remove warning about no eof newline --- apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- modules/imgui/CMakeLists.txt | 2 +- modules/touch/CMakeLists.txt | 2 +- src/rendering/framebufferrenderer.cpp | 6 +++++- support/cmake/set_openspace_compile_settings.cmake | 1 - 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 930239ffee..aac6ab65af 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 930239ffee6356ce277ad3949ca406b75b8db088 +Subproject commit aac6ab65afba7df7ba07b04da9da7b57ecacbbb3 diff --git a/ext/ghoul b/ext/ghoul index c59ca6051e..f30b6f6410 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit c59ca6051e5dbf749a6b29a9c3ff7f856d60c308 +Subproject commit f30b6f6410df09ba95d94cdfe675f2a5d1c9b6fe diff --git a/modules/imgui/CMakeLists.txt b/modules/imgui/CMakeLists.txt index 5b533161e3..68ca881284 100644 --- a/modules/imgui/CMakeLists.txt +++ b/modules/imgui/CMakeLists.txt @@ -78,4 +78,4 @@ create_new_module( ${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES} ) -include_external_library(${imgui_module} PRIVATE Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui) +include_external_library(${imgui_module} PRIVATE Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/imgui) diff --git a/modules/touch/CMakeLists.txt b/modules/touch/CMakeLists.txt index ed76ab5ec1..babeffa6c9 100644 --- a/modules/touch/CMakeLists.txt +++ b/modules/touch/CMakeLists.txt @@ -57,5 +57,5 @@ create_new_module( ${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES} ) -include_external_library(${touch_module} PRIVATE libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext ${CMAKE_CURRENT_SOURCE_DIR}/ext) +include_external_library(${touch_module} PRIVATE libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext) disable_external_warnings_for_file(${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp) diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index bcfadbfb18..d985bc8b74 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -385,7 +385,11 @@ void FramebufferRenderer::initialize() { glDisablei(GL_BLEND, 1); glDisablei(GL_BLEND, 2); - glClampColor(GL_CLAMP_READ_COLOR, GL_FALSE); + // glClampColor is weird as it requires a GLenum in the function definition, but + // the OpenGL standard says that it only accepts GL_FALSE and GL_TRUE, which are + // of type GLboolean *eye rolling* + // GLenum(0) == GLboolen(0) == GL_FALSE + glClampColor(GL_CLAMP_READ_COLOR, GLenum(0)); glEnable(GL_DEPTH_TEST); diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index 7b492bcc48..831f025f81 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -134,7 +134,6 @@ function (set_openspace_compile_settings target) "-Wmismatched-tags" "-Wmissing-field-initializers" "-Wmissing-noreturn" - "-Wnewline-eof" "-Wnon-virtual-dtor" "-Wold-style-cast" "-Woverloaded-virtual" From 067c0f4b27fc5d3565d3b45f93e7ce03a3bfb4e0 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 15:07:11 +0100 Subject: [PATCH 073/147] Introduction of new Dictionary class (#1446) * Adapting to introduction of new Dictionary class in Ghoul * Mainly replacing usage of float instead of doubles as expected * Adjust to the lack of the hasKeyAndValue function --- ext/ghoul | 2 +- include/openspace/documentation/verifier.h | 9 - include/openspace/documentation/verifier.inl | 2 +- include/openspace/properties/property.h | 1 + include/openspace/rendering/renderable.h | 7 +- include/openspace/scene/scenegraphnode.h | 4 +- .../rendering/renderableatmosphere.cpp | 249 ++- .../rendering/grids/renderableboxgrid.cpp | 4 +- .../base/rendering/grids/renderablegrid.cpp | 6 +- .../rendering/grids/renderableradialgrid.cpp | 4 +- .../grids/renderablesphericalgrid.cpp | 2 +- modules/base/rendering/modelgeometry.cpp | 2 +- .../rendering/renderablecartesianaxes.cpp | 6 +- modules/base/rendering/renderablelabels.cpp | 38 +- modules/base/rendering/renderablemodel.cpp | 10 +- modules/base/rendering/renderablenodeline.cpp | 2 +- modules/base/rendering/renderablesphere.cpp | 3 +- modules/base/rendering/renderabletrail.cpp | 14 +- .../rendering/renderabletrailtrajectory.cpp | 4 +- .../base/rendering/screenspacedashboard.cpp | 2 +- .../base/rendering/screenspaceimagelocal.cpp | 2 +- .../base/rendering/screenspaceimageonline.cpp | 2 +- modules/base/rotation/constantrotation.cpp | 4 +- modules/base/rotation/fixedrotation.cpp | 6 +- modules/base/rotation/staticrotation.cpp | 6 +- modules/base/rotation/timelinerotation.cpp | 5 +- modules/base/timeframe/timeframeunion.cpp | 8 +- .../base/translation/timelinetranslation.cpp | 5 +- modules/cefwebgui/cefwebguimodule.cpp | 6 +- .../rendering/renderablebillboardscloud.cpp | 30 +- .../rendering/renderabledumeshes.cpp | 24 +- .../rendering/renderableplanescloud.cpp | 18 +- .../rendering/renderablepoints.cpp | 4 +- modules/exoplanets/exoplanetsmodule_lua.inl | 2 +- .../rendering/renderableorbitdisc.cpp | 2 +- .../rendering/renderablefieldlines.cpp | 99 +- .../renderablefieldlinessequence.cpp | 68 +- .../gaia/rendering/renderablegaiastars.cpp | 18 +- modules/gaia/tasks/constructoctreetask.cpp | 48 +- modules/gaia/tasks/readfitstask.cpp | 4 +- modules/galaxy/rendering/renderablegalaxy.cpp | 100 +- .../galaxy/tasks/milkywayconversiontask.cpp | 24 +- modules/globebrowsing/globebrowsingmodule.cpp | 12 +- .../src/globelabelscomponent.cpp | 34 +- modules/globebrowsing/src/layer.cpp | 38 +- modules/globebrowsing/src/layeradjustment.cpp | 13 +- modules/globebrowsing/src/layergroup.cpp | 4 +- modules/globebrowsing/src/layermanager.cpp | 6 +- modules/globebrowsing/src/renderableglobe.cpp | 57 +- modules/globebrowsing/src/ringscomponent.cpp | 16 +- modules/globebrowsing/src/shadowcomponent.cpp | 12 +- modules/globebrowsing/src/tileprovider.cpp | 35 +- modules/imgui/src/renderproperties.cpp | 4 +- modules/iswa/rendering/datacygnet.cpp | 10 +- modules/iswa/rendering/datasphere.cpp | 2 +- modules/iswa/rendering/iswabasegroup.cpp | 8 +- modules/iswa/rendering/iswacygnet.cpp | 73 +- modules/iswa/rendering/iswadatagroup.cpp | 46 +- modules/iswa/rendering/iswakameleongroup.cpp | 11 +- modules/iswa/rendering/kameleonplane.cpp | 19 +- modules/iswa/util/iswamanager_lua.inl | 4 +- .../kameleonvolume/kameleonvolumereader.cpp | 14 +- .../rendering/renderablekameleonvolume.cpp | 44 +- .../tasks/kameleondocumentationtask.cpp | 13 +- .../tasks/kameleonvolumetorawtask.cpp | 24 +- .../rendering/renderablemultiresvolume.cpp | 34 +- modules/server/servermodule.cpp | 2 +- modules/server/src/jsonconverters.cpp | 23 +- modules/server/src/serverinterface.cpp | 2 +- .../rendering/renderableorbitalkepler.cpp | 26 +- modules/space/rendering/renderablerings.cpp | 8 +- modules/space/rendering/renderablestars.cpp | 2 +- .../space/rendering/simplespheregeometry.cpp | 4 +- modules/space/rotation/spicerotation.cpp | 10 +- modules/space/spacemodule.cpp | 2 +- modules/space/translation/tletranslation.cpp | 2 +- .../rendering/renderablecrawlingline.cpp | 4 +- .../rendering/renderablefov.cpp | 6 +- .../rendering/renderablemodelprojection.cpp | 16 +- .../rendering/renderableplaneprojection.cpp | 29 +- .../rendering/renderableplanetprojection.cpp | 12 +- .../rendering/renderableshadowcylinder.cpp | 2 +- .../util/hongkangparser.cpp | 28 +- .../util/instrumentdecoder.cpp | 8 +- .../util/instrumenttimesparser.cpp | 7 +- .../util/labelparser.cpp | 75 +- .../util/projectioncomponent.cpp | 21 +- .../util/targetdecoder.cpp | 8 +- modules/spout/screenspacespout.cpp | 2 +- modules/sync/syncmodule.cpp | 2 +- modules/sync/syncs/urlsynchronization.cpp | 2 +- .../rendering/renderabletoyvolume.cpp | 31 +- modules/volume/rawvolumemetadata.cpp | 48 +- .../rendering/renderabletimevaryingvolume.cpp | 16 +- modules/volume/rendering/volumeclipplane.cpp | 4 +- modules/volume/rendering/volumeclipplanes.cpp | 7 +- .../volume/tasks/generaterawvolumetask.cpp | 6 +- modules/volume/transferfunction.cpp | 19 +- modules/webbrowser/src/screenspacebrowser.cpp | 4 +- modules/webbrowser/webbrowsermodule.cpp | 4 +- screenshots | 1 + src/documentation/documentation.cpp | 4 +- src/documentation/verifier.cpp | 28 +- src/engine/configuration.cpp | 96 +- src/engine/logfactory.cpp | 12 +- src/mission/mission.cpp | 19 +- src/properties/property.cpp | 31 +- src/rendering/dashboarditem.cpp | 8 +- src/rendering/framebufferrenderer.cpp | 4 +- src/rendering/renderable.cpp | 15 +- src/rendering/screenspacerenderable.cpp | 35 +- src/scene/assetloader.cpp | 31 +- src/scene/scene.cpp | 7 +- src/scene/scenegraphnode.cpp | 45 +- src/scripting/scriptscheduler.cpp | 18 +- src/scripting/scriptscheduler_lua.inl | 45 +- src/util/taskloader.cpp | 11 +- src/util/time_lua.inl | 2 +- src/util/timerange.cpp | 10 +- tests/test_documentation.cpp | 1577 ++++++++--------- tests/test_scriptscheduler.cpp | 629 ++++--- 121 files changed, 2299 insertions(+), 2160 deletions(-) create mode 120000 screenshots diff --git a/ext/ghoul b/ext/ghoul index f30b6f6410..81645c130c 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit f30b6f6410df09ba95d94cdfe675f2a5d1c9b6fe +Subproject commit 81645c130c6c391469d78a67bb39f84bfd650212 diff --git a/include/openspace/documentation/verifier.h b/include/openspace/documentation/verifier.h index a94792e2b0..2f8802e8bc 100644 --- a/include/openspace/documentation/verifier.h +++ b/include/openspace/documentation/verifier.h @@ -1140,13 +1140,10 @@ using TableDeprecatedVerifier = DeprecatedVerifier; // Definitions of external templates that are instantiated in the cpp file // This cuts down the compilation times as almost all of the possible template types do // not need to be instantiated multiple times -extern template struct Vector2Verifier; extern template struct Vector2Verifier; extern template struct Vector2Verifier; -extern template struct Vector3Verifier; extern template struct Vector3Verifier; extern template struct Vector3Verifier; -extern template struct Vector4Verifier; extern template struct Vector4Verifier; extern template struct Vector4Verifier; @@ -1196,13 +1193,10 @@ extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; -extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; -extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; -extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; extern template struct AnnotationVerifier; @@ -1211,13 +1205,10 @@ extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; -extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; -extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; -extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; extern template struct DeprecatedVerifier; diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 6b707ece6f..974bb2977e 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -33,7 +33,7 @@ template TestResult TemplateVerifier::operator()(const ghoul::Dictionary& dict, const std::string& key) const { - if (dict.hasKeyAndValue(key)) { + if (dict.hasValue(key)) { return { true, {}, {} }; } else { diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index ce92102ece..3ca1fac4af 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 589daf3827..042cea6e0d 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -74,8 +75,8 @@ public: bool isEnabled() const; bool shouldUpdateIfDisabled() const; - void setBoundingSphere(float boundingSphere); - float boundingSphere() const; + void setBoundingSphere(double boundingSphere); + double boundingSphere() const; virtual void render(const RenderData& data, RendererTasks& rendererTask); virtual void update(const UpdateData& data); @@ -97,7 +98,7 @@ public: protected: properties::BoolProperty _enabled; properties::FloatProperty _opacity; - properties::FloatProperty _boundingSphere; + properties::DoubleProperty _boundingSphere; properties::StringProperty _renderableType; bool _shouldUpdateIfDisabled = false; diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index d2b3bfc4d1..2120f0b27c 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -126,7 +126,7 @@ public: SceneGraphNode* parent() const; std::vector children() const; - float boundingSphere() const; + double boundingSphere() const; SceneGraphNode* childNode(const std::string& identifier); @@ -177,7 +177,7 @@ private: glm::dmat4 _modelTransformCached = glm::dmat4(1.0); - properties::FloatProperty _boundingSphere; + properties::DoubleProperty _boundingSphere; properties::BoolProperty _computeScreenSpaceValues; properties::IVec2Property _screenSpacePosition; properties::BoolProperty _screenVisibility; diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 2a0291a97d..5c9a375ece 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -257,7 +257,7 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) , _hardShadowsEnabledP(EclipseHardShadowsInfo, false) { ghoul_precondition( - dictionary.hasKeyAndValue(SceneGraphNode::KeyIdentifier), + dictionary.hasValue(SceneGraphNode::KeyIdentifier), "RenderableAtmosphere needs the identifier to be specified" ); @@ -273,21 +273,25 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) //================================================================ //======== Reads Shadow (Eclipses) Entries in mod file =========== //================================================================ - ghoul::Dictionary shadowDictionary; - bool success = dictionary.getValue(KeyShadowGroup, shadowDictionary); - if (success) { + if (dictionary.hasValue(KeyShadowGroup)) { + ghoul::Dictionary shadowDictionary = + dictionary.value(KeyShadowGroup); bool disableShadows = false; + bool success = true; std::vector> sourceArray; unsigned int sourceCounter = 1; while (success) { - std::string sourceName; - success = shadowDictionary.getValue(KeyShadowSource + - std::to_string(sourceCounter) + ".Name", sourceName); + std::string keyName = + KeyShadowSource + std::to_string(sourceCounter) + ".Name"; + std::string keyRadius = + KeyShadowSource + std::to_string(sourceCounter) + ".Radius"; + + success = shadowDictionary.hasValue(keyName); if (success) { - double sourceRadius; - success = shadowDictionary.getValue(KeyShadowSource + - std::to_string(sourceCounter) + ".Radius", sourceRadius); + std::string sourceName = shadowDictionary.value(keyName); + success = shadowDictionary.hasValue(keyRadius); if (success) { + double sourceRadius = shadowDictionary.value(keyRadius); sourceArray.emplace_back(sourceName, sourceRadius); } else { @@ -301,6 +305,7 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) break; } } + sourceCounter++; } @@ -309,14 +314,19 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) std::vector> casterArray; unsigned int casterCounter = 1; while (success) { - std::string casterName; - success = shadowDictionary.getValue(KeyShadowCaster + - std::to_string(casterCounter) + ".Name", casterName); + std::string keyName = + KeyShadowCaster + std::to_string(casterCounter) + ".Name"; + std::string keyRadius = + KeyShadowCaster + std::to_string(casterCounter) + ".Radius"; + + success = shadowDictionary.hasValue(keyName); if (success) { - double casterRadius; - success = shadowDictionary.getValue(KeyShadowCaster + - std::to_string(casterCounter) + ".Radius", casterRadius); + std::string casterName = shadowDictionary.value(keyName); + + success = shadowDictionary.hasValue(keyRadius); if (success) { + double casterRadius = + shadowDictionary.value(keyRadius); casterArray.emplace_back(casterName, casterRadius); } else { @@ -351,11 +361,17 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) //================================================================ //========== Reads Atmosphere Entries from mod file ============== //================================================================ - ghoul::Dictionary atmosphereDictionary; - success = dictionary.getValue(keyAtmosphere, atmosphereDictionary); + bool success = dictionary.hasValue(keyAtmosphere); if (success) { + ghoul::Dictionary atmosphereDictionary = + dictionary.value(keyAtmosphere); bool errorReadingAtmosphereData = false; - if (!atmosphereDictionary.getValue(keyAtmosphereRadius, _atmosphereRadius)) { + if (atmosphereDictionary.hasKey(keyAtmosphereRadius)) { + _atmosphereRadius = static_cast( + atmosphereDictionary.value(keyAtmosphereRadius) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -364,7 +380,12 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - if (!atmosphereDictionary.getValue(keyPlanetRadius, _atmospherePlanetRadius)) { + if (atmosphereDictionary.hasKey(keyPlanetRadius)) { + _atmospherePlanetRadius = static_cast( + atmosphereDictionary.value(keyPlanetRadius) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -373,10 +394,12 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - if (!atmosphereDictionary.getValue( - keyAverageGroundReflectance, - _planetAverageGroundReflectance)) - { + if (atmosphereDictionary.hasKey(keyAverageGroundReflectance)) { + _planetAverageGroundReflectance = static_cast( + atmosphereDictionary.value(keyAverageGroundReflectance) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -386,21 +409,26 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) } if (atmosphereDictionary.hasKey(SunIntensityInfo.identifier)) { - _sunRadianceIntensity = - atmosphereDictionary.value(SunIntensityInfo.identifier); + _sunRadianceIntensity = static_cast( + atmosphereDictionary.value(SunIntensityInfo.identifier) + ); } if (atmosphereDictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) { - _mieScattExtPropCoefProp = atmosphereDictionary.value( - MieScatteringExtinctionPropCoeffInfo.identifier + _mieScattExtPropCoefProp = static_cast( + atmosphereDictionary.value( + MieScatteringExtinctionPropCoeffInfo.identifier + ) ); } - if (!atmosphereDictionary.getValue( - GroundRadianceEmittioninfo.identifier, - _planetGroundRadianceEmittion)) - { + if (atmosphereDictionary.hasKey(GroundRadianceEmittioninfo.identifier)) { + _planetGroundRadianceEmittion = static_cast( + atmosphereDictionary.value(GroundRadianceEmittioninfo.identifier) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -409,21 +437,35 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - ghoul::Dictionary rayleighDictionary; - success = atmosphereDictionary.getValue(keyRayleigh, rayleighDictionary); - + success = atmosphereDictionary.hasValue(keyRayleigh); if (success) { + ghoul::Dictionary rayleighDictionary = + atmosphereDictionary.value(keyRayleigh); // Not using right now. - glm::vec3 rayleighWavelengths = glm::vec3(0.f); - rayleighDictionary.getValue( - "Coefficients.Wavelengths", - rayleighWavelengths - ); + glm::dvec3 rayleighWavelengths = glm::dvec3(0.f); + if (rayleighDictionary.hasValue("Coefficients")) { + ghoul::Dictionary coefficientsDictionary = + rayleighDictionary.value("Coefficients"); + if (coefficientsDictionary.hasKey("Wavelengths")) { + rayleighWavelengths = + coefficientsDictionary.value("Wavelengths"); + } - if (!rayleighDictionary.getValue( - "Coefficients.Scattering", - _rayleighScatteringCoeff)) - { + if (coefficientsDictionary.hasKey("Scattering")) { + _rayleighScatteringCoeff = coefficientsDictionary.value( + "Scattering" + ); + } + else { + errorReadingAtmosphereData = true; + LWARNINGC( + identifier, + "No Rayleigh Scattering parameters specified for Atmosphere Effects. " + "Disabling atmosphere effects for this planet." + ); + } + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -432,11 +474,12 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - if (!rayleighDictionary.getValue( - keyRayleighHeightScale, - _rayleighHeightScale) - ) - { + if (rayleighDictionary.hasKey(keyRayleighHeightScale)) { + _rayleighHeightScale = static_cast( + rayleighDictionary.value(keyRayleighHeightScale) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -454,18 +497,28 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - ghoul::Dictionary ozoneDictionary; - success = atmosphereDictionary.getValue(keyOzone, ozoneDictionary); + success = atmosphereDictionary.hasValue(keyOzone); if (success) { - _ozoneLayerEnabled = true; - if (!ozoneDictionary.getValue(keyOzoneHeightScale, _ozoneHeightScale)) { - _ozoneLayerEnabled = false; + ghoul::Dictionary ozoneDictionary = + atmosphereDictionary.value(keyOzone); + _ozoneLayerEnabled = ozoneDictionary.hasValue(keyOzoneHeightScale); + if (_ozoneLayerEnabled) { + _ozoneHeightScale = static_cast( + ozoneDictionary.value(keyOzoneHeightScale) + ); } - if (!ozoneDictionary.getValue( - "Coefficients.Extinction", - _ozoneExtinctionCoeff)) - { + if (ozoneDictionary.hasValue("Coefficients")) { + ghoul::Dictionary coeff = + ozoneDictionary.value("Coefficients"); + if (coeff.hasValue("Extinction")) { + _ozoneExtinctionCoeff = coeff.value("Extinction"); + } + else { + _ozoneLayerEnabled = false; + } + } + else { _ozoneLayerEnabled = false; } } @@ -473,10 +526,16 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) _ozoneLayerEnabled = false; } - ghoul::Dictionary mieDictionary; - success = atmosphereDictionary.getValue(keyMie, mieDictionary); + success = atmosphereDictionary.hasValue(keyMie); if (success) { - if (!mieDictionary.getValue(keyMieHeightScale, _mieHeightScale)) { + ghoul::Dictionary mieDictionary = + atmosphereDictionary.value(keyMie); + if (mieDictionary.hasKey(keyMieHeightScale)) { + _mieHeightScale = static_cast( + mieDictionary.value(keyMieHeightScale) + ); + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -485,7 +544,36 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - if (!mieDictionary.getValue("Coefficients.Scattering", _mieScatteringCoeff)) { + if (mieDictionary.hasValue("Coefficients")) { + ghoul::Dictionary coeffs = + mieDictionary.value("Coefficients"); + + if (coeffs.hasValue("Scattering")) { + _mieScatteringCoeff = coeffs.value("Scattering"); + } + else { + errorReadingAtmosphereData = true; + LWARNINGC( + identifier, + "No Mie Scattering parameters specified for Atmosphere Effects. " + "Disabling atmosphere effects for this planet." + ); + } + + if (coeffs.hasValue("Extinction")) { + _mieExtinctionCoeff = coeffs.value("Extinction"); + } + else { + errorReadingAtmosphereData = true; + LWARNINGC( + identifier, + "No Mie Scattering parameters specified for Atmosphere Effects. " + "Disabling atmosphere effects for this planet." + ); + } + + } + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -494,16 +582,12 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - if (!mieDictionary.getValue("Coefficients.Extinction", _mieExtinctionCoeff)) { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Extinction parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." + if (mieDictionary.hasValue(keyMiePhaseConstant)) { + _miePhaseConstant = static_cast( + mieDictionary.value(keyMiePhaseConstant) ); } - - if (!mieDictionary.getValue(keyMiePhaseConstant, _miePhaseConstant)) { + else { errorReadingAtmosphereData = true; LWARNINGC( identifier, @@ -521,10 +605,14 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - ghoul::Dictionary ImageDictionary; - success = atmosphereDictionary.getValue(keyImage, ImageDictionary); + success = atmosphereDictionary.hasValue(keyImage); if (success) { - if (ImageDictionary.getValue(keyToneMappingOp, _preCalculatedTexturesScale)) { + ghoul::Dictionary ImageDictionary = + atmosphereDictionary.value(keyImage); + if (ImageDictionary.hasKey(keyToneMappingOp)) { + _preCalculatedTexturesScale = static_cast( + ImageDictionary.value(keyToneMappingOp) + ); LDEBUG(fmt::format( "Atmosphere Texture Scaled to {}", _preCalculatedTexturesScale @@ -532,18 +620,23 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) } } - ghoul::Dictionary debugDictionary; - success = atmosphereDictionary.getValue(keyATMDebug, debugDictionary); + success = atmosphereDictionary.hasValue(keyATMDebug); if (success) { - if (debugDictionary.getValue(keyTextureScale, _preCalculatedTexturesScale)) { + ghoul::Dictionary debugDictionary = + atmosphereDictionary.value(keyATMDebug); + if (debugDictionary.hasKey(keyTextureScale)) { + _preCalculatedTexturesScale = static_cast( + debugDictionary.value(keyTextureScale) + ); LDEBUG(fmt::format( "Atmosphere Texture Scaled to {}", _preCalculatedTexturesScale )); } - if (debugDictionary.getValue(keySaveTextures, _saveCalculationsToTexture)) { - LDEBUG("Saving Precalculated Atmosphere Textures."); + if (debugDictionary.hasKey(keySaveTextures)) { + _saveCalculationsToTexture = debugDictionary.value(keySaveTextures); + LDEBUG("Saving Precalculated Atmosphere Textures"); } } diff --git a/modules/base/rendering/grids/renderableboxgrid.cpp b/modules/base/rendering/grids/renderableboxgrid.cpp index e56c997d0a..e08b8aee92 100644 --- a/modules/base/rendering/grids/renderableboxgrid.cpp +++ b/modules/base/rendering/grids/renderableboxgrid.cpp @@ -110,7 +110,7 @@ RenderableBoxGrid::RenderableBoxGrid(const ghoul::Dictionary& dictionary) registerUpdateRenderBinFromOpacity(); if (dictionary.hasKey(GridColorInfo.identifier)) { - _gridColor = dictionary.value(GridColorInfo.identifier); + _gridColor = dictionary.value(GridColorInfo.identifier); } _gridColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_gridColor); @@ -123,7 +123,7 @@ RenderableBoxGrid::RenderableBoxGrid(const ghoul::Dictionary& dictionary) addProperty(_lineWidth); if (dictionary.hasKey(SizeInfo.identifier)) { - _size = dictionary.value(SizeInfo.identifier); + _size = dictionary.value(SizeInfo.identifier); } _size.onChange([&]() { _gridIsDirty = true; }); addProperty(_size); diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index 9e55e4a216..b376a0e340 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -119,14 +119,14 @@ RenderableGrid::RenderableGrid(const ghoul::Dictionary& dictionary) registerUpdateRenderBinFromOpacity(); if (dictionary.hasKey(GridColorInfo.identifier)) { - _gridColor = dictionary.value(GridColorInfo.identifier); + _gridColor = dictionary.value(GridColorInfo.identifier); } _gridColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_gridColor); if (dictionary.hasKey(SegmentsInfo.identifier)) { _segments = static_cast( - dictionary.value(SegmentsInfo.identifier) + dictionary.value(SegmentsInfo.identifier) ); } _segments.onChange([&]() { _gridIsDirty = true; }); @@ -140,7 +140,7 @@ RenderableGrid::RenderableGrid(const ghoul::Dictionary& dictionary) addProperty(_lineWidth); if (dictionary.hasKey(SizeInfo.identifier)) { - _size = dictionary.value(SizeInfo.identifier); + _size = dictionary.value(SizeInfo.identifier); } _size.onChange([&]() { _gridIsDirty = true; }); addProperty(_size); diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index cc7e030e80..0cc2a3f449 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -151,14 +151,14 @@ RenderableRadialGrid::RenderableRadialGrid(const ghoul::Dictionary& dictionary) registerUpdateRenderBinFromOpacity(); if (dictionary.hasKey(GridColorInfo.identifier)) { - _gridColor = dictionary.value(GridColorInfo.identifier); + _gridColor = dictionary.value(GridColorInfo.identifier); } _gridColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_gridColor); if (dictionary.hasKey(GridSegmentsInfo.identifier)) { _gridSegments = static_cast( - dictionary.value(GridSegmentsInfo.identifier) + dictionary.value(GridSegmentsInfo.identifier) ); } _gridSegments.onChange([&]() { _gridIsDirty = true; }); diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index 95af20718b..22fbc0878b 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -111,7 +111,7 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio registerUpdateRenderBinFromOpacity(); if (dictionary.hasKey(GridColorInfo.identifier)) { - _gridColor = dictionary.value(GridColorInfo.identifier); + _gridColor = dictionary.value(GridColorInfo.identifier); } _gridColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_gridColor); diff --git a/modules/base/rendering/modelgeometry.cpp b/modules/base/rendering/modelgeometry.cpp index fa0b673bdb..a225d03296 100644 --- a/modules/base/rendering/modelgeometry.cpp +++ b/modules/base/rendering/modelgeometry.cpp @@ -85,7 +85,7 @@ documentation:: Documentation ModelGeometry::Documentation() { ghoul::mm_unique_ptr ModelGeometry::createFromDictionary( const ghoul::Dictionary& dictionary) { - if (!dictionary.hasKeyAndValue(KeyType)) { + if (!dictionary.hasValue(KeyType)) { throw ghoul::RuntimeError("Dictionary did not contain a key 'Type'"); } diff --git a/modules/base/rendering/renderablecartesianaxes.cpp b/modules/base/rendering/renderablecartesianaxes.cpp index e188f362ac..1eeb32324f 100644 --- a/modules/base/rendering/renderablecartesianaxes.cpp +++ b/modules/base/rendering/renderablecartesianaxes.cpp @@ -118,19 +118,19 @@ RenderableCartesianAxes::RenderableCartesianAxes(const ghoul::Dictionary& dictio ); if (dictionary.hasKey(XColorInfo.identifier)) { - _xColor = dictionary.value(XColorInfo.identifier); + _xColor = dictionary.value(XColorInfo.identifier); } _xColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_xColor); if (dictionary.hasKey(XColorInfo.identifier)) { - _yColor = dictionary.value(YColorInfo.identifier); + _yColor = dictionary.value(YColorInfo.identifier); } _yColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_yColor); if (dictionary.hasKey(ZColorInfo.identifier)) { - _zColor = dictionary.value(ZColorInfo.identifier); + _zColor = dictionary.value(ZColorInfo.identifier); } _zColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_zColor); diff --git a/modules/base/rendering/renderablelabels.cpp b/modules/base/rendering/renderablelabels.cpp index 8cd8f806eb..2233379f67 100644 --- a/modules/base/rendering/renderablelabels.cpp +++ b/modules/base/rendering/renderablelabels.cpp @@ -369,10 +369,10 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) _labelOrientationOption.addOption(NormalDirection, "Camera Position Normal"); _labelOrientationOption = NormalDirection; - if (dictionary.hasKeyAndValue(LabelOrientationOptionInfo.identifier)) { + if (dictionary.hasValue(LabelOrientationOptionInfo.identifier)) { const std::string o = dictionary.value( LabelOrientationOptionInfo.identifier - ); + ); if (o == "Camera View Direction") { _labelOrientationOption = ViewDirection; @@ -391,12 +391,12 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) _labelColor.setViewOption(properties::Property::ViewOptions::Color); if (dictionary.hasKey(LabelColorInfo.identifier)) { - _labelColor = dictionary.value(LabelColorInfo.identifier); + _labelColor = dictionary.value(LabelColorInfo.identifier); } addProperty(_labelColor); if (dictionary.hasKey(FontSizeInfo.identifier)) { - _fontSize = dictionary.value(FontSizeInfo.identifier); + _fontSize = static_cast(dictionary.value(FontSizeInfo.identifier)); } _fontSize.onChange([&]() { _font = global::fontManager->font( @@ -409,24 +409,30 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) addProperty(_fontSize); if (dictionary.hasKey(LabelSizeInfo.identifier)) { - _labelSize = dictionary.value(LabelSizeInfo.identifier); + _labelSize = static_cast( + dictionary.value(LabelSizeInfo.identifier) + ); } addProperty(_labelSize); if (dictionary.hasKey(LabelMinSizeInfo.identifier)) { - _labelMinSize = dictionary.value(LabelMinSizeInfo.identifier); + _labelMinSize = static_cast( + dictionary.value(LabelMinSizeInfo.identifier) + ); } addProperty(_labelMinSize); if (dictionary.hasKey(LabelMaxSizeInfo.identifier)) { - _labelMaxSize = dictionary.value(LabelMaxSizeInfo.identifier); + _labelMaxSize = static_cast( + dictionary.value(LabelMaxSizeInfo.identifier) + ); } addProperty(_labelMaxSize); if (dictionary.hasKey(TransformationMatrixInfo.identifier)) { _transformationMatrix = dictionary.value( TransformationMatrixInfo.identifier - ); + ); } if (dictionary.hasKey(PixelSizeControlInfo.identifier)) { @@ -440,7 +446,9 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) addProperty(_enableFadingEffect); if (dictionary.hasKey(FadeStartDistInfo.identifier)) { - _fadeStartDistance = dictionary.value(FadeStartDistInfo.identifier); + _fadeStartDistance = static_cast( + dictionary.value(FadeStartDistInfo.identifier) + ); } addProperty(_fadeStartDistance); @@ -511,13 +519,17 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) addProperty(_fadeStartUnitOption); if (dictionary.hasKey(FadeStartSpeedInfo.identifier)) { - _fadeStartSpeed = dictionary.value(FadeStartSpeedInfo.identifier); + _fadeStartSpeed = static_cast( + dictionary.value(FadeStartSpeedInfo.identifier) + ); } addProperty(_fadeStartSpeed); if (dictionary.hasKey(FadeEndDistInfo.identifier)) { - _fadeEndDistance = dictionary.value(FadeEndDistInfo.identifier); + _fadeEndDistance = static_cast( + dictionary.value(FadeEndDistInfo.identifier) + ); } addProperty(_fadeEndDistance); @@ -588,7 +600,9 @@ RenderableLabels::RenderableLabels(const ghoul::Dictionary& dictionary) addProperty(_fadeEndUnitOption); if (dictionary.hasKey(FadeEndSpeedInfo.identifier)) { - _fadeEndSpeed = dictionary.value(FadeEndSpeedInfo.identifier); + _fadeEndSpeed = static_cast( + dictionary.value(FadeEndSpeedInfo.identifier) + ); } addProperty(_fadeEndSpeed); diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 3fb0bc90f6..c864d02a7b 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -278,13 +278,13 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(AmbientIntensityInfo.identifier)) { - _ambientIntensity = dictionary.value(AmbientIntensityInfo.identifier); + _ambientIntensity = dictionary.value(AmbientIntensityInfo.identifier); } if (dictionary.hasKey(DiffuseIntensityInfo.identifier)) { - _diffuseIntensity = dictionary.value(DiffuseIntensityInfo.identifier); + _diffuseIntensity = dictionary.value(DiffuseIntensityInfo.identifier); } if (dictionary.hasKey(SpecularIntensityInfo.identifier)) { - _specularIntensity = dictionary.value(SpecularIntensityInfo.identifier); + _specularIntensity = dictionary.value(SpecularIntensityInfo.identifier); } if (dictionary.hasKey(ShadingInfo.identifier)) { @@ -303,7 +303,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) const ghoul::Dictionary& lsDictionary = dictionary.value(LightSourcesInfo.identifier); - for (const std::string& k : lsDictionary.keys()) { + for (std::string_view k : lsDictionary.keys()) { std::unique_ptr lightSource = LightSource::createFromDictionary( lsDictionary.value(k) ); @@ -328,7 +328,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(RotationVecInfo.identifier)) { - _rotationVec = dictionary.value(RotationVecInfo.identifier); + _rotationVec = dictionary.value(RotationVecInfo.identifier); } _blendingFuncOption.addOption(DefaultBlending, "Default"); diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index 68bfd4d0da..674f8f31eb 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -144,7 +144,7 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(LineColorInfo.identifier)) { - _lineColor = dictionary.value(LineColorInfo.identifier); + _lineColor = dictionary.value(LineColorInfo.identifier); } if (dictionary.hasKey(LineWidthInfo.identifier)) { _lineWidth = static_cast( diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index c88294d8f5..ce1d5d9fc9 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -282,8 +282,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) addProperty(_fadeInThreshold); } - if (dictionary.hasKey(FadeOutThresholdInfo.identifier) || - dictionary.hasKey(FadeInThresholdInfo.identifier)) { + if (dictionary.hasKey(FadeInThresholdInfo.identifier)) { _disableFadeInDistance.set(false); addProperty(_disableFadeInDistance); } diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 928872c451..bf00b7edae 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -242,25 +242,25 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) ); addPropertySubOwner(_translation.get()); - _appearance.lineColor = dictionary.value(LineColorInfo.identifier); + _appearance.lineColor = dictionary.value(LineColorInfo.identifier); - if (dictionary.hasKeyAndValue(EnableFadeInfo.identifier)) { + if (dictionary.hasValue(EnableFadeInfo.identifier)) { _appearance.useLineFade = dictionary.value(EnableFadeInfo.identifier); } - if (dictionary.hasKeyAndValue(FadeInfo.identifier)) { + if (dictionary.hasValue(FadeInfo.identifier)) { _appearance.lineFade = static_cast( dictionary.value(FadeInfo.identifier) ); } - if (dictionary.hasKeyAndValue(LineWidthInfo.identifier)) { + if (dictionary.hasValue(LineWidthInfo.identifier)) { _appearance.lineWidth = static_cast(dictionary.value( LineWidthInfo.identifier )); } - if (dictionary.hasKeyAndValue(PointSizeInfo.identifier)) { + if (dictionary.hasValue(PointSizeInfo.identifier)) { _appearance.pointSize = static_cast( dictionary.value(PointSizeInfo.identifier) ); @@ -268,7 +268,7 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) // This map is not accessed out of order as long as the Documentation is adapted // whenever the map changes. The documentation will check for valid values - if (dictionary.hasKeyAndValue(RenderingModeInfo.identifier)) { + if (dictionary.hasValue(RenderingModeInfo.identifier)) { _appearance.renderingModes = RenderingModeConversion.at( dictionary.value(RenderingModeInfo.identifier) ); @@ -279,7 +279,7 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) addPropertySubOwner(_appearance); - if (dictionary.hasKeyAndValue(RenderBinModeInfo.identifier)) { + if (dictionary.hasValue(RenderBinModeInfo.identifier)) { openspace::Renderable::RenderBin cfgRenderBin = RenderBinConversion.at( dictionary.value(RenderBinModeInfo.identifier) ); diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 5efe975a24..0bfc711000 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -166,7 +166,7 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di _sampleInterval.onChange([this] { _needsFullSweep = true; }); addProperty(_sampleInterval); - if (dictionary.hasKeyAndValue(TimeSubSampleInfo.identifier)) { + if (dictionary.hasValue(TimeSubSampleInfo.identifier)) { _timeStampSubsamplingFactor = static_cast( dictionary.value(TimeSubSampleInfo.identifier) ); @@ -174,7 +174,7 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di _timeStampSubsamplingFactor.onChange([this] { _subsamplingIsDirty = true; }); addProperty(_timeStampSubsamplingFactor); - if (dictionary.hasKeyAndValue(RenderFullPathInfo.identifier)) { + if (dictionary.hasValue(RenderFullPathInfo.identifier)) { _renderFullTrail = dictionary.value(RenderFullPathInfo.identifier); } addProperty(_renderFullTrail); diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index 2ddcb82b82..ea5cf6d492 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -152,7 +152,7 @@ ScreenSpaceDashboard::ScreenSpaceDashboard(const ghoul::Dictionary& dictionary) ); std::string identifier; - if (dictionary.hasKeyAndValue(KeyIdentifier)) { + if (dictionary.hasValue(KeyIdentifier)) { identifier = dictionary.value(KeyIdentifier); } else { diff --git a/modules/base/rendering/screenspaceimagelocal.cpp b/modules/base/rendering/screenspaceimagelocal.cpp index 4239bb5b9a..04bdc57b61 100644 --- a/modules/base/rendering/screenspaceimagelocal.cpp +++ b/modules/base/rendering/screenspaceimagelocal.cpp @@ -79,7 +79,7 @@ ScreenSpaceImageLocal::ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary ); std::string identifier; - if (dictionary.hasKeyAndValue(KeyIdentifier)) { + if (dictionary.hasValue(KeyIdentifier)) { identifier = dictionary.value(KeyIdentifier); } else { diff --git a/modules/base/rendering/screenspaceimageonline.cpp b/modules/base/rendering/screenspaceimageonline.cpp index 8597122c44..958975fc4b 100644 --- a/modules/base/rendering/screenspaceimageonline.cpp +++ b/modules/base/rendering/screenspaceimageonline.cpp @@ -81,7 +81,7 @@ ScreenSpaceImageOnline::ScreenSpaceImageOnline(const ghoul::Dictionary& dictiona ); std::string identifier; - if (dictionary.hasKeyAndValue(KeyIdentifier)) { + if (dictionary.hasValue(KeyIdentifier)) { identifier = dictionary.value(KeyIdentifier); } else { diff --git a/modules/base/rotation/constantrotation.cpp b/modules/base/rotation/constantrotation.cpp index 3696f09910..ddf508b51e 100644 --- a/modules/base/rotation/constantrotation.cpp +++ b/modules/base/rotation/constantrotation.cpp @@ -84,11 +84,11 @@ ConstantRotation::ConstantRotation(const ghoul::Dictionary& dictionary) addProperty(_rotationAxis); addProperty(_rotationRate); - if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { + if (dictionary.hasKey(RotationInfo.identifier)) { _rotationAxis = dictionary.value(RotationInfo.identifier); } - if (dictionary.hasKeyAndValue(RotationRateInfo.identifier)) { + if (dictionary.hasKey(RotationRateInfo.identifier)) { _rotationRate = static_cast( dictionary.value(RotationRateInfo.identifier) ); diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index d23501759d..d071dc8b63 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -461,7 +461,7 @@ bool FixedRotation::initialize() { const bool hasXAxis = _constructorDictionary.hasKey(KeyXAxis); if (hasXAxis) { - if (_constructorDictionary.hasKeyAndValue(KeyXAxis)) { + if (_constructorDictionary.hasValue(KeyXAxis)) { _xAxis.type = Axis::Type::Object; _xAxis.object = _constructorDictionary.value(KeyXAxis); } @@ -486,7 +486,7 @@ bool FixedRotation::initialize() { const bool hasYAxis = _constructorDictionary.hasKey(KeyYAxis); if (hasYAxis) { - if (_constructorDictionary.hasKeyAndValue(KeyYAxis)) { + if (_constructorDictionary.hasValue(KeyYAxis)) { _yAxis.type = Axis::Type::Object; _yAxis.object = _constructorDictionary.value(KeyYAxis); } @@ -511,7 +511,7 @@ bool FixedRotation::initialize() { const bool hasZAxis = _constructorDictionary.hasKey(KeyZAxis); if (hasZAxis) { - if (_constructorDictionary.hasKeyAndValue(KeyZAxis)) { + if (_constructorDictionary.hasValue(KeyZAxis)) { _zAxis.type = Axis::Type::Object; _zAxis.object = _constructorDictionary.value(KeyZAxis); } diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 8c995246b1..e11de94e0e 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -107,20 +107,20 @@ StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) : StaticRota "StaticRotation" ); - if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { + if (dictionary.hasValue(RotationInfo.identifier)) { _eulerRotation = static_cast( dictionary.value(RotationInfo.identifier) ); _matrixIsDirty = true; } - else if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { + else if (dictionary.hasValue(RotationInfo.identifier)) { glm::dvec4 data = dictionary.value(RotationInfo.identifier); _eulerRotation = rotationMatrixToEulerAngles( glm::mat3_cast(glm::dquat(data.w, data.x, data.y, data.z)) ); _matrixIsDirty = true; } - else if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { + else if (dictionary.hasValue(RotationInfo.identifier)) { _eulerRotation = rotationMatrixToEulerAngles( dictionary.value(RotationInfo.identifier) ); diff --git a/modules/base/rotation/timelinerotation.cpp b/modules/base/rotation/timelinerotation.cpp index 53657cc1cf..1e907382b4 100644 --- a/modules/base/rotation/timelinerotation.cpp +++ b/modules/base/rotation/timelinerotation.cpp @@ -70,9 +70,8 @@ TimelineRotation::TimelineRotation(const ghoul::Dictionary& dictionary) { const ghoul::Dictionary& keyframes = dictionary.value(KeyKeyframes); - std::vector timeStrings = keyframes.keys(); - for (const std::string& timeString : timeStrings) { - const double t = Time::convertTime(timeString); + for (std::string_view timeString : keyframes.keys()) { + const double t = Time::convertTime(std::string(timeString)); ghoul::mm_unique_ptr rotation = Rotation::createFromDictionary( diff --git a/modules/base/timeframe/timeframeunion.cpp b/modules/base/timeframe/timeframeunion.cpp index 2a2af962fe..f2b8c38548 100644 --- a/modules/base/timeframe/timeframeunion.cpp +++ b/modules/base/timeframe/timeframeunion.cpp @@ -83,13 +83,13 @@ TimeFrameUnion::TimeFrameUnion(const ghoul::Dictionary& dictionary) ghoul::Dictionary frames = dictionary.value(TimeFramesInfo.identifier); - for (const std::string& k : frames.keys()) { + for (std::string_view k : frames.keys()) { const ghoul::Dictionary& subDictionary = frames.value(k); _timeFrames.push_back(TimeFrame::createFromDictionary(subDictionary)); TimeFrame& subFrame = *_timeFrames.back(); - subFrame.setIdentifier(k); - subFrame.setGuiName(k); - subFrame.setDescription(k); + subFrame.setIdentifier(std::string(k)); + subFrame.setGuiName(std::string(k)); + subFrame.setDescription(std::string(k)); addPropertySubOwner(*_timeFrames.back()); } } diff --git a/modules/base/translation/timelinetranslation.cpp b/modules/base/translation/timelinetranslation.cpp index 6cf6da3195..69d05e62c5 100644 --- a/modules/base/translation/timelinetranslation.cpp +++ b/modules/base/translation/timelinetranslation.cpp @@ -70,9 +70,8 @@ TimelineTranslation::TimelineTranslation(const ghoul::Dictionary& dictionary) { const ghoul::Dictionary& keyframes = dictionary.value(KeyKeyframes); - std::vector timeStrings = keyframes.keys(); - for (const std::string& timeString : timeStrings) { - const double t = Time::convertTime(timeString); + for (std::string_view timeString : keyframes.keys()) { + const double t = Time::convertTime(std::string(timeString)); ghoul::mm_unique_ptr translation = Translation::createFromDictionary( diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index 71b0967697..f71ecda914 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -196,8 +196,10 @@ void CefWebGuiModule::internalInitialize(const ghoul::Dictionary& configuration) } ); - if (configuration.hasValue(GuiScaleInfo.identifier)) { - _guiScale = configuration.value(GuiScaleInfo.identifier); + if (configuration.hasValue(GuiScaleInfo.identifier)) { + _guiScale = static_cast( + configuration.value(GuiScaleInfo.identifier) + ); } _enabled = configuration.hasValue(EnabledInfo.identifier) && diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index 61d94610f2..dbd64dd6e9 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -294,7 +294,7 @@ documentation::Documentation RenderableBillboardsCloud::Documentation() { }, { keyColor, - new Vector3Verifier, + new DoubleVector3Verifier, Optional::No, "Astronomical Object Color (r,g,b)." }, @@ -384,7 +384,7 @@ documentation::Documentation RenderableBillboardsCloud::Documentation() { }, { ColorRangeInfo.identifier, - new Vector2ListVerifier, + new Vector2ListVerifier, Optional::Yes, ColorRangeInfo.description }, @@ -503,7 +503,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di _renderOption.addOption(RenderOptionPositionNormal, "Camera Position Normal"); _renderOption = RenderOptionViewDirection; - if (dictionary.hasKeyAndValue(RenderOptionInfo.identifier)) { + if (dictionary.hasValue(RenderOptionInfo.identifier)) { const std::string o = dictionary.value(RenderOptionInfo.identifier); if (o == "Camera View Direction") { @@ -589,7 +589,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di ); for (size_t i = 0; i < rangeDataDict.size(); ++i) { _colorRangeData.push_back( - rangeDataDict.value(std::to_string(i + 1)) + rangeDataDict.value(std::to_string(i + 1)) ); } _optionColorRangeData = _colorRangeData[_colorRangeData.size() - 1]; @@ -606,7 +606,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di } } else if (dictionary.hasKey(keyColor)) { - _pointColor = dictionary.value(keyColor); + _pointColor = dictionary.value(keyColor); _pointColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_pointColor); } @@ -659,7 +659,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di _hasLabel = true; if (dictionary.hasKey(TextColorInfo.identifier)) { - _textColor = dictionary.value(TextColorInfo.identifier); + _textColor = dictionary.value(TextColorInfo.identifier); _hasLabel = true; } _textColor.setViewOption(properties::Property::ViewOptions::Color); @@ -667,22 +667,30 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di _textColor.onChange([&]() { _textColorIsDirty = true; }); if (dictionary.hasKey(TextOpacityInfo.identifier)) { - _textOpacity = dictionary.value(TextOpacityInfo.identifier); + _textOpacity = static_cast( + dictionary.value(TextOpacityInfo.identifier) + ); } addProperty(_textOpacity); if (dictionary.hasKey(TextSizeInfo.identifier)) { - _textSize = dictionary.value(TextSizeInfo.identifier); + _textSize = static_cast( + dictionary.value(TextSizeInfo.identifier) + ); } addProperty(_textSize); if (dictionary.hasKey(LabelMinSizeInfo.identifier)) { - _textMinSize = dictionary.value(LabelMinSizeInfo.identifier); + _textMinSize = static_cast( + dictionary.value(LabelMinSizeInfo.identifier) + ); } addProperty(_textMinSize); if (dictionary.hasKey(LabelMaxSizeInfo.identifier)) { - _textMaxSize = dictionary.value(LabelMaxSizeInfo.identifier); + _textMaxSize = static_cast( + dictionary.value(LabelMaxSizeInfo.identifier) + ); } addProperty(_textMaxSize); } @@ -694,7 +702,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di } if (dictionary.hasKey(FadeInDistancesInfo.identifier)) { - glm::vec2 v = dictionary.value(FadeInDistancesInfo.identifier); + glm::dvec2 v = dictionary.value(FadeInDistancesInfo.identifier); _fadeInDistance = v; _disableFadeInDistance = false; addProperty(_fadeInDistance); diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index 01094ae093..3b0182d7c6 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -211,7 +211,7 @@ documentation::Documentation RenderableDUMeshes::Documentation() { }, { MeshColorInfo.identifier, - new Vector3ListVerifier, + new Vector3ListVerifier, Optional::No, MeshColorInfo.description }, @@ -286,7 +286,7 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary) } } - if (dictionary.hasKeyAndValue(LineWidthInfo.identifier)) { + if (dictionary.hasValue(LineWidthInfo.identifier)) { _lineWidth = static_cast( dictionary.value(LineWidthInfo.identifier) ); @@ -303,7 +303,7 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary) _hasLabel = true; if (dictionary.hasKey(TextColorInfo.identifier)) { - _textColor = dictionary.value(TextColorInfo.identifier); + _textColor = dictionary.value(TextColorInfo.identifier); _hasLabel = true; } _textColor.setViewOption(properties::Property::ViewOptions::Color); @@ -311,22 +311,30 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary) _textColor.onChange([&]() { _textColorIsDirty = true; }); if (dictionary.hasKey(TextOpacityInfo.identifier)) { - _textOpacity = dictionary.value(TextOpacityInfo.identifier); + _textOpacity = static_cast( + dictionary.value(TextOpacityInfo.identifier) + ); } addProperty(_textOpacity); if (dictionary.hasKey(TextSizeInfo.identifier)) { - _textSize = dictionary.value(TextSizeInfo.identifier); + _textSize = static_cast( + dictionary.value(TextSizeInfo.identifier) + ); } addProperty(_textSize); if (dictionary.hasKey(LabelMinSizeInfo.identifier)) { - _textMinSize = floor(dictionary.value(LabelMinSizeInfo.identifier)); + _textMinSize = static_cast( + floor(dictionary.value(LabelMinSizeInfo.identifier)) + ); } addProperty(_textMinSize); if (dictionary.hasKey(LabelMaxSizeInfo.identifier)) { - _textMaxSize = floor(dictionary.value(LabelMaxSizeInfo.identifier)); + _textMaxSize = static_cast( + floor(dictionary.value(LabelMaxSizeInfo.identifier)) + ); } addProperty(_textMaxSize); } @@ -337,7 +345,7 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary) ); for (int i = 0; i < static_cast(colorDict.size()); ++i) { _meshColorMap.insert( - { i + 1, colorDict.value(std::to_string(i + 1)) } + { i + 1, colorDict.value(std::to_string(i + 1)) } ); } } diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 5ad3c26ae7..c1aa4a1c8b 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -276,7 +276,7 @@ documentation::Documentation RenderablePlanesCloud::Documentation() { }, { FadeInDistancesInfo.identifier, - new Vector2Verifier, + new DoubleVector2Verifier, Optional::Yes, FadeInDistancesInfo.description }, @@ -385,7 +385,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary _hasLabel = true; if (dictionary.hasKey(TextColorInfo.identifier)) { - _textColor = dictionary.value(TextColorInfo.identifier); + _textColor = dictionary.value(TextColorInfo.identifier); _hasLabel = true; } _textColor.setViewOption(properties::Property::ViewOptions::Color); @@ -393,24 +393,28 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary _textColor.onChange([&]() { _textColorIsDirty = true; }); if (dictionary.hasKey(TextOpacityInfo.identifier)) { - _textOpacity = dictionary.value(TextOpacityInfo.identifier); + _textOpacity = static_cast( + dictionary.value(TextOpacityInfo.identifier) + ); } addProperty(_textOpacity); if (dictionary.hasKey(TextSizeInfo.identifier)) { - _textSize = dictionary.value(TextSizeInfo.identifier); + _textSize = static_cast( + dictionary.value(TextSizeInfo.identifier) + ); } addProperty(_textSize); if (dictionary.hasKey(LabelMinSizeInfo.identifier)) { _textMinSize = static_cast( - dictionary.value(LabelMinSizeInfo.identifier) + dictionary.value(LabelMinSizeInfo.identifier) ); } if (dictionary.hasKey(LabelMaxSizeInfo.identifier)) { _textMaxSize = static_cast( - dictionary.value(LabelMaxSizeInfo.identifier) + dictionary.value(LabelMaxSizeInfo.identifier) ); } } @@ -461,7 +465,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary } if (dictionary.hasKey(FadeInDistancesInfo.identifier)) { - _fadeInDistance = dictionary.value(FadeInDistancesInfo.identifier); + _fadeInDistance = dictionary.value(FadeInDistancesInfo.identifier); _disableFadeInDistance = false; addProperty(_fadeInDistance); addProperty(_disableFadeInDistance); diff --git a/modules/digitaluniverse/rendering/renderablepoints.cpp b/modules/digitaluniverse/rendering/renderablepoints.cpp index ebfc9fff45..47202bfa4b 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.cpp +++ b/modules/digitaluniverse/rendering/renderablepoints.cpp @@ -115,7 +115,7 @@ documentation::Documentation RenderablePoints::Documentation() { }, { keyColor, - new Vector3Verifier, + new Vector3Verifier, Optional::No, "Astronomical Object Color (r,g,b)." }, @@ -195,7 +195,7 @@ RenderablePoints::RenderablePoints(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(keyColor)) { - _pointColor = dictionary.value(keyColor); + _pointColor = dictionary.value(keyColor); } addProperty(_pointColor); diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index e2ca007a22..9f49593221 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -417,7 +417,7 @@ int addExoplanetSystem(lua_State* L) { ghoul::lua::luaDictionaryFromState(L, d); for (size_t i = 1; i <= d.size(); ++i) { - if (!d.hasKeyAndValue(std::to_string(i))) { + if (!d.hasValue(std::to_string(i))) { return ghoul::lua::luaError( L, fmt::format("List item {} is of invalid type", i) ); diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 319b78b3b0..7f08e92e81 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -125,7 +125,7 @@ RenderableOrbitDisc::RenderableOrbitDisc(const ghoul::Dictionary& dictionary) ); if (dictionary.hasKey(OffsetInfo.identifier)) { - _offset = dictionary.value(OffsetInfo.identifier); + _offset = dictionary.value(OffsetInfo.identifier); } addProperty(_offset); diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index e75f6de397..039af9ef6a 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -120,19 +120,25 @@ RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) std::string identifier = dictionary.value(SceneGraphNode::KeyIdentifier); setIdentifier(identifier); - bool success = dictionary.getValue(KeyVectorField, _vectorFieldInfo); - if (!success) { + if (!dictionary.hasValue(KeyVectorField)) { LERROR(fmt::format("Renderable does not contain a key for '{}'", KeyVectorField)); } - - success = dictionary.getValue(KeyFieldlines, _fieldlineInfo); - if (!success) { + else { + _vectorFieldInfo = dictionary.value(KeyVectorField); + } + + if (!dictionary.hasValue(KeyFieldlines)) { LERROR(fmt::format("Renderable does not contain a key for '{}'", KeyFieldlines)); } + else { + _fieldlineInfo = dictionary.value(KeyFieldlines); + } - success = dictionary.getValue(KeySeedPoints, _seedPointsInfo); - if (!success) { - LERROR(fmt::format("Renderable does not contain a key for '{}", KeySeedPoints)); + if (!dictionary.hasValue(KeySeedPoints)) { + LERROR(fmt::format("Renderable does not contain a key for '{}'", KeySeedPoints)); + } + else { + _seedPointsInfo = dictionary.value(KeySeedPoints); } // @TODO a non-magic number perhaps ---abock @@ -145,8 +151,8 @@ RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) // @TODO hook up visibility changes ---abock - auto dirtyFieldlines = [this]() { this->_fieldLinesAreDirty = true; }; - auto dirtySeedpoints = [this]() { this->_seedPointsAreDirty = true; }; + auto dirtyFieldlines = [this]() { _fieldLinesAreDirty = true; }; + auto dirtySeedpoints = [this]() { _seedPointsAreDirty = true; }; _stepSize.onChange(dirtyFieldlines); addProperty(_stepSize); @@ -164,17 +170,25 @@ RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) } void RenderableFieldlines::initializeDefaultPropertyValues() { - _fieldlineInfo.getValue(KeyFieldlinesStepSize, _stepSize); - _fieldlineInfo.getValue(KeyFieldlinesClassification, _classification); - _fieldlineInfo.getValue(KeyFieldlinesColor, _fieldlineColor); + if (_fieldlineInfo.hasKey(KeyFieldlinesStepSize)) { + _stepSize = static_cast( + _fieldlineInfo.value(KeyFieldlinesStepSize) + ); + } + if (_fieldlineInfo.hasKey(KeyFieldlinesClassification)) { + _classification = _fieldlineInfo.value(KeyFieldlinesClassification); + } + if (_fieldlineInfo.hasKey(KeyFieldlinesColor)) { + _fieldlineColor = _fieldlineInfo.value(KeyFieldlinesColor); + } - if (_seedPointsInfo.hasKeyAndValue(KeySeedPointsType)) { + if (_seedPointsInfo.hasValue(KeySeedPointsType)) { std::string sourceType = _seedPointsInfo.value(KeySeedPointsType); if (sourceType == SeedPointsSourceFile) { _seedPointSource = SeedPointSourceFile; - if (_seedPointsInfo.hasKeyAndValue(KeySeedPointsFile)) { + if (_seedPointsInfo.hasValue(KeySeedPointsFile)) { std::string seedPointSourceFile = _seedPointsInfo.value( KeySeedPointsFile ); @@ -189,14 +203,16 @@ void RenderableFieldlines::initializeDefaultPropertyValues() { bool RenderableFieldlines::isReady() const { const bool programReady = _program != nullptr; - const bool vectorFieldReady = !_vectorFieldInfo.empty(); - const bool fieldlineReady = !_fieldlineInfo.empty(); - const bool seedPointsReady = !_seedPointsInfo.empty(); + const bool vectorFieldReady = !_vectorFieldInfo.isEmpty(); + const bool fieldlineReady = !_fieldlineInfo.isEmpty(); + const bool seedPointsReady = !_seedPointsInfo.isEmpty(); return programReady && vectorFieldReady && fieldlineReady && seedPointsReady; } void RenderableFieldlines::initializeGL() { - if (_vectorFieldInfo.empty() || _fieldlineInfo.empty() || _seedPointsInfo.empty()) { + if (_vectorFieldInfo.isEmpty() || _fieldlineInfo.isEmpty() || + _seedPointsInfo.isEmpty()) + { throw ghoul::RuntimeError("Error initializing"); } @@ -368,26 +384,31 @@ void RenderableFieldlines::loadSeedPointsFromFile() { void RenderableFieldlines::loadSeedPointsFromTable() { // @TODO needs testing ---abock + if (!_seedPointsInfo.hasValue(KeySeedPointsTable)) { + return; + } LINFO("Loading provided list of seed points"); - ghoul::Dictionary seedpointsDictionary; - _seedPointsInfo.getValue(KeySeedPointsTable, seedpointsDictionary); - for (const std::string& index : seedpointsDictionary.keys()) { - glm::vec3 seedPos = glm::vec3(0.f); - _fieldlineInfo.getValue(std::string(KeySeedPointsTable) + "." + index, seedPos); - _seedPoints.push_back(seedPos); + ghoul::Dictionary seedpointsDictionary = + _seedPointsInfo.value(KeySeedPointsType); + for (std::string_view index : seedpointsDictionary.keys()) { + std::string key = fmt::format("{}.{}", KeySeedPointsTable, index); + // (2020-12-31, abock) Looks to me as if this should be seedpointsDictionary + if (_fieldlineInfo.hasValue(key)) { + glm::dvec3 seedPos = _fieldlineInfo.value(key); + _seedPoints.push_back(seedPos); + } } } std::vector RenderableFieldlines::generateFieldlines() { - std::string type; - bool success = _vectorFieldInfo.getValue(KeyVectorFieldType, type); - if (!success) { + if (!_vectorFieldInfo.hasValue(KeyVectorFieldType)) { LERROR(fmt::format( "{} does not contain a '{}' key", KeyVectorField, KeyVectorFieldType )); return {}; } + std::string type = _vectorFieldInfo.value(KeyVectorFieldType); if (type == VectorFieldTypeVolumeKameleon) { return generateFieldlinesVolumeKameleon(); } @@ -402,19 +423,18 @@ std::vector RenderableFieldlines::generateFieldlines std::vector RenderableFieldlines::generateFieldlinesVolumeKameleon() { - std::string model; - bool success = _vectorFieldInfo.getValue(KeyVectorFieldVolumeModel, model); - if (!success) { + if (!_vectorFieldInfo.hasValue(KeyVectorFieldVolumeModel)) { LERROR(fmt::format("{} does not name a model", KeyVectorField)); return {}; } - std::string fileName; - success = _vectorFieldInfo.getValue(KeyVectorFieldFile, fileName); - if (!success) { + std::string model = _vectorFieldInfo.value(KeyVectorFieldVolumeModel); + + if (!_vectorFieldInfo.hasValue(KeyVectorFieldFile)) { LERROR(fmt::format("{} does not name a file", KeyVectorField)); return {}; } + std::string fileName = _vectorFieldInfo.value(KeyVectorFieldFile); fileName = absPath(fileName); //KameleonWrapper::Model modelType; @@ -432,12 +452,13 @@ RenderableFieldlines::generateFieldlinesVolumeKameleon() const std::string v2 = std::string(KeyVectorFieldVolumeVariable) + ".2"; const std::string v3 = std::string(KeyVectorFieldVolumeVariable) + ".3"; - const bool threeVariables = _vectorFieldInfo.hasKeyAndValue(v1) && - _vectorFieldInfo.hasKeyAndValue(v2) && - _vectorFieldInfo.hasKeyAndValue(v3); + const bool threeVariables = + _vectorFieldInfo.hasValue(v1) && + _vectorFieldInfo.hasValue(v2) && + _vectorFieldInfo.hasValue(v3); - const bool lorentzForce = _vectorFieldInfo.hasKeyAndValue(v1) && - (_vectorFieldInfo.value(v1) == VectorFieldKameleonVariableLorentz); + const bool lorentzForce = _vectorFieldInfo.hasValue(v1) && + (_vectorFieldInfo.value(v1) == VectorFieldKameleonVariableLorentz); if (!threeVariables && !lorentzForce) { LERROR(fmt::format("'{}' does not name variables", KeyVectorField)); diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index 54e904484a..f7605379a7 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -372,15 +372,17 @@ void RenderableFieldlinesSequence::initializeGL() { bool RenderableFieldlinesSequence::extractMandatoryInfoFromDictionary( SourceFileType& sourceFileType) { - - _dictionary->getValue(SceneGraphNode::KeyIdentifier, _identifier); + if (_dictionary->hasValue(SceneGraphNode::KeyIdentifier)) { + _identifier = _dictionary->value(SceneGraphNode::KeyIdentifier); + } // ------------------- EXTRACT MANDATORY VALUES FROM DICTIONARY ------------------- // std::string inputFileTypeString; - if (!_dictionary->getValue(KeyInputFileType, inputFileTypeString)) { + if (!_dictionary->hasValue(KeyInputFileType)) { LERROR(fmt::format("{}: The field {} is missing", _identifier, KeyInputFileType)); } else { + inputFileTypeString = _dictionary->value(KeyInputFileType); std::transform( inputFileTypeString.begin(), inputFileTypeString.end(), @@ -407,11 +409,11 @@ bool RenderableFieldlinesSequence::extractMandatoryInfoFromDictionary( } } - std::string sourceFolderPath; - if (!_dictionary->getValue(KeySourceFolder, sourceFolderPath)) { + if (!_dictionary->hasValue(KeySourceFolder)) { LERROR(fmt::format("{}: The field {} is missing", _identifier, KeySourceFolder)); return false; } + std::string sourceFolderPath = _dictionary->value(KeySourceFolder); // Ensure that the source folder exists and then extract // the files with the same extension as @@ -467,7 +469,8 @@ void RenderableFieldlinesSequence::extractOptionalInfoFromDictionary( { // ------------------- EXTRACT OPTIONAL VALUES FROM DICTIONARY ------------------- // - if (_dictionary->getValue(KeyOutputFolder, outputFolderPath)) { + if (_dictionary->hasValue(KeyOutputFolder)) { + outputFolderPath = _dictionary->value(KeyOutputFolder); ghoul::filesystem::Directory outputFolder(outputFolderPath); if (FileSys.directoryExists(outputFolder)) { outputFolderPath = absPath(outputFolderPath); @@ -481,8 +484,9 @@ void RenderableFieldlinesSequence::extractOptionalInfoFromDictionary( } } - ghoul::Dictionary colorTablesPathsDictionary; - if (_dictionary->getValue(KeyColorTablePaths, colorTablesPathsDictionary)) { + if (_dictionary->hasValue(KeyColorTablePaths)) { + ghoul::Dictionary colorTablesPathsDictionary = + _dictionary->value(KeyColorTablePaths); const size_t nProvidedPaths = colorTablesPathsDictionary.size(); if (nProvidedPaths > 0) { // Clear the default! It is already specified in the transferFunction @@ -494,28 +498,30 @@ void RenderableFieldlinesSequence::extractOptionalInfoFromDictionary( } } - ghoul::Dictionary colorTablesRangesDictionary; - if (_dictionary->getValue(KeyColorTableRanges, colorTablesRangesDictionary)) { + if (_dictionary->hasValue(KeyColorTableRanges)) { + ghoul::Dictionary colorTablesRangesDictionary = + _dictionary->value(KeyColorTableRanges); const size_t nProvidedRanges = colorTablesRangesDictionary.size(); for (size_t i = 1; i <= nProvidedRanges; ++i) { _colorTableRanges.push_back( - colorTablesRangesDictionary.value(std::to_string(i))); + colorTablesRangesDictionary.value(std::to_string(i))); } } else { - _colorTableRanges.push_back(glm::vec2(0, 1)); + _colorTableRanges.push_back(glm::vec2(0.f, 1.f)); } - ghoul::Dictionary maskingRangesDictionary; - if (_dictionary->getValue(KeyMaskingRanges, maskingRangesDictionary)) { + if (_dictionary->hasValue(KeyMaskingRanges)) { + ghoul::Dictionary maskingRangesDictionary = + _dictionary->value(KeyMaskingRanges); const size_t nProvidedRanges = maskingRangesDictionary.size(); for (size_t i = 1; i <= nProvidedRanges; ++i) { _maskingRanges.push_back( - maskingRangesDictionary.value(std::to_string(i))); + maskingRangesDictionary.value(std::to_string(i))); } } else { - _maskingRanges.push_back(glm::vec2(-100000, 100000)); // Just some default values! + _maskingRanges.push_back(glm::dvec2(-100000, 100000)); // Just some default values } } @@ -523,8 +529,8 @@ void RenderableFieldlinesSequence::extractOptionalInfoFromDictionary( * Returns false if it fails to extract mandatory information! */ bool RenderableFieldlinesSequence::extractJsonInfoFromDictionary(fls::Model& model) { - std::string modelStr; - if (_dictionary->getValue(KeyJsonSimulationModel, modelStr)) { + if (_dictionary->hasValue(KeyJsonSimulationModel)) { + std::string modelStr = _dictionary->value(KeyJsonSimulationModel); std::transform( modelStr.begin(), modelStr.end(), @@ -540,9 +546,10 @@ bool RenderableFieldlinesSequence::extractJsonInfoFromDictionary(fls::Model& mod return false; } - float scaleFactor; - if (_dictionary->getValue(KeyJsonScalingFactor, scaleFactor)) { - _scalingFactor = scaleFactor; + if (_dictionary->hasValue(KeyJsonScalingFactor)) { + _scalingFactor = static_cast( + _dictionary->value(KeyJsonScalingFactor) + ); } else { LWARNING(fmt::format( @@ -609,9 +616,8 @@ void RenderableFieldlinesSequence::loadOsflsStatesIntoRAM(const std::string& out } void RenderableFieldlinesSequence::extractOsflsInfoFromDictionary() { - bool shouldLoadInRealtime = false; - if (_dictionary->getValue(KeyOslfsLoadAtRuntime, shouldLoadInRealtime)) { - _loadingStatesDynamically = shouldLoadInRealtime; + if (_dictionary->hasValue(KeyOslfsLoadAtRuntime)) { + _loadingStatesDynamically = _dictionary->value(KeyOslfsLoadAtRuntime); } else { LWARNING(fmt::format( @@ -908,8 +914,8 @@ bool RenderableFieldlinesSequence::extractCdfInfoFromDictionary(std::string& see std::string& tracingVar, std::vector& extraVars) { - - if (_dictionary->getValue(KeyCdfSeedPointFile, seedFilePath)) { + if (_dictionary->hasValue(KeyCdfSeedPointFile)) { + seedFilePath = _dictionary->value(KeyCdfSeedPointFile); ghoul::filesystem::File seedPointFile(seedFilePath); if (FileSys.fileExists(seedPointFile)) { seedFilePath = absPath(seedFilePath); @@ -927,7 +933,10 @@ bool RenderableFieldlinesSequence::extractCdfInfoFromDictionary(std::string& see return false; } - if (!_dictionary->getValue(KeyCdfTracingVariable, tracingVar)) { + if (_dictionary->hasValue(KeyCdfTracingVariable)) { + tracingVar = _dictionary->value(KeyCdfTracingVariable); + } + else { tracingVar = "b"; // Magnetic field variable as default LWARNING(fmt::format( "{}: No '{}', using default '{}'", @@ -935,8 +944,9 @@ bool RenderableFieldlinesSequence::extractCdfInfoFromDictionary(std::string& see )); } - ghoul::Dictionary extraQuantityNamesDictionary; - if (_dictionary->getValue(KeyCdfExtraVariables, extraQuantityNamesDictionary)) { + if (_dictionary->hasValue(KeyCdfExtraVariables)) { + ghoul::Dictionary extraQuantityNamesDictionary = + _dictionary->value(KeyCdfExtraVariables); const size_t nProvidedExtras = extraQuantityNamesDictionary.size(); for (size_t i = 1; i <= nProvidedExtras; ++i) { extraVars.push_back( diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp index d4c1f2a0de..c82f5d5b03 100644 --- a/modules/gaia/rendering/renderablegaiastars.cpp +++ b/modules/gaia/rendering/renderablegaiastars.cpp @@ -726,7 +726,7 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(AdditionalNodesInfo.identifier)) { _additionalNodes = static_cast( - dictionary.value(AdditionalNodesInfo.identifier) + dictionary.value(AdditionalNodesInfo.identifier) ); } @@ -773,32 +773,32 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(FilterPosXInfo.identifier)) { - _posXThreshold = dictionary.value(FilterPosXInfo.identifier); + _posXThreshold = dictionary.value(FilterPosXInfo.identifier); } addProperty(_posXThreshold); if (dictionary.hasKey(FilterPosYInfo.identifier)) { - _posXThreshold = dictionary.value(FilterPosYInfo.identifier); + _posXThreshold = dictionary.value(FilterPosYInfo.identifier); } addProperty(_posYThreshold); if (dictionary.hasKey(FilterPosZInfo.identifier)) { - _posZThreshold = dictionary.value(FilterPosZInfo.identifier); + _posZThreshold = dictionary.value(FilterPosZInfo.identifier); } addProperty(_posZThreshold); if (dictionary.hasKey(FilterGMagInfo.identifier)) { - _gMagThreshold = dictionary.value(FilterGMagInfo.identifier); + _gMagThreshold = dictionary.value(FilterGMagInfo.identifier); } addProperty(_gMagThreshold); if (dictionary.hasKey(FilterBpRpInfo.identifier)) { - _bpRpThreshold = dictionary.value(FilterBpRpInfo.identifier); + _bpRpThreshold = dictionary.value(FilterBpRpInfo.identifier); } addProperty(_bpRpThreshold); if (dictionary.hasKey(FilterDistInfo.identifier)) { - _distThreshold = dictionary.value(FilterDistInfo.identifier); + _distThreshold = dictionary.value(FilterDistInfo.identifier); } addProperty(_distThreshold); @@ -825,8 +825,8 @@ RenderableGaiaStars::RenderableGaiaStars(const ghoul::Dictionary& dictionary) // Ugly fix for ASCII sorting when there are more columns read than 10. std::set intKeys; - for (const std::string& key : tmpDict.keys()) { - intKeys.insert(std::stoi(key)); + for (std::string_view key : tmpDict.keys()) { + intKeys.insert(std::stoi(std::string(key))); } for (int key : intKeys) { diff --git a/modules/gaia/tasks/constructoctreetask.cpp b/modules/gaia/tasks/constructoctreetask.cpp index 725d86963c..b10eda0bc2 100644 --- a/modules/gaia/tasks/constructoctreetask.cpp +++ b/modules/gaia/tasks/constructoctreetask.cpp @@ -98,99 +98,99 @@ ConstructOctreeTask::ConstructOctreeTask(const ghoul::Dictionary& dictionary) { // Check for filter params. if (dictionary.hasKey(KeyFilterPosX)) { - _posX = dictionary.value(KeyFilterPosX); + _posX = dictionary.value(KeyFilterPosX); _filterPosX = true; } if (dictionary.hasKey(KeyFilterPosY)) { - _posY = dictionary.value(KeyFilterPosY); + _posY = dictionary.value(KeyFilterPosY); _filterPosY = true; } if (dictionary.hasKey(KeyFilterPosZ)) { - _posZ = dictionary.value(KeyFilterPosZ); + _posZ = dictionary.value(KeyFilterPosZ); _filterPosZ = true; } if (dictionary.hasKey(KeyFilterGMag)) { - _gMag = dictionary.value(KeyFilterGMag); + _gMag = dictionary.value(KeyFilterGMag); _filterGMag = true; } if (dictionary.hasKey(KeyFilterBpRp)) { - _bpRp = dictionary.value(KeyFilterBpRp); + _bpRp = dictionary.value(KeyFilterBpRp); _filterBpRp = true; } if (dictionary.hasKey(KeyFilterVelX)) { - _velX = dictionary.value(KeyFilterVelX); + _velX = dictionary.value(KeyFilterVelX); _filterVelX = true; } if (dictionary.hasKey(KeyFilterVelY)) { - _velY = dictionary.value(KeyFilterVelY); + _velY = dictionary.value(KeyFilterVelY); _filterVelY = true; } if (dictionary.hasKey(KeyFilterVelZ)) { - _velZ = dictionary.value(KeyFilterVelZ); + _velZ = dictionary.value(KeyFilterVelZ); _filterVelZ = true; } if (dictionary.hasKey(KeyFilterBpMag)) { - _bpMag = dictionary.value(KeyFilterBpMag); + _bpMag = dictionary.value(KeyFilterBpMag); _filterBpMag = true; } if (dictionary.hasKey(KeyFilterRpMag)) { - _rpMag = dictionary.value(KeyFilterRpMag); + _rpMag = dictionary.value(KeyFilterRpMag); _filterRpMag = true; } if (dictionary.hasKey(KeyFilterBpG)) { - _bpG = dictionary.value(KeyFilterBpG); + _bpG = dictionary.value(KeyFilterBpG); _filterBpG = true; } if (dictionary.hasKey(KeyFilterGRp)) { - _gRp = dictionary.value(KeyFilterGRp); + _gRp = dictionary.value(KeyFilterGRp); _filterGRp = true; } if (dictionary.hasKey(KeyFilterRa)) { - _ra = dictionary.value(KeyFilterRa); + _ra = dictionary.value(KeyFilterRa); _filterRa = true; } if (dictionary.hasKey(KeyFilterRaError)) { - _raError = dictionary.value(KeyFilterRaError); + _raError = dictionary.value(KeyFilterRaError); _filterRaError = true; } if (dictionary.hasKey(KeyFilterDec)) { - _dec = dictionary.value(KeyFilterDec); + _dec = dictionary.value(KeyFilterDec); _filterDec = true; } if (dictionary.hasKey(KeyFilterDecError)) { - _decError = dictionary.value(KeyFilterDecError); + _decError = dictionary.value(KeyFilterDecError); _filterDecError = true; } if (dictionary.hasKey(KeyFilterParallax)) { - _parallax = dictionary.value(KeyFilterParallax); + _parallax = dictionary.value(KeyFilterParallax); _filterParallax = true; } if (dictionary.hasKey(KeyFilterParallaxError)) { - _parallaxError = dictionary.value(KeyFilterParallaxError); + _parallaxError = dictionary.value(KeyFilterParallaxError); _filterParallaxError = true; } if (dictionary.hasKey(KeyFilterPmra)) { - _pmra = dictionary.value(KeyFilterPmra); + _pmra = dictionary.value(KeyFilterPmra); _filterPmra = true; } if (dictionary.hasKey(KeyFilterPmraError)) { - _pmraError = dictionary.value(KeyFilterPmraError); + _pmraError = dictionary.value(KeyFilterPmraError); _filterPmraError = true; } if (dictionary.hasKey(KeyFilterPmdec)) { - _pmdec = dictionary.value(KeyFilterPmdec); + _pmdec = dictionary.value(KeyFilterPmdec); _filterPmdec = true; } if (dictionary.hasKey(KeyFilterPmdecError)) { - _pmdecError = dictionary.value(KeyFilterPmdecError); + _pmdecError = dictionary.value(KeyFilterPmdecError); _filterPmdecError = true; } if (dictionary.hasKey(KeyFilterRv)) { - _rv = dictionary.value(KeyFilterRv); + _rv = dictionary.value(KeyFilterRv); _filterRv = true; } if (dictionary.hasKey(KeyFilterRvError)) { - _rvError = dictionary.value(KeyFilterRvError); + _rvError = dictionary.value(KeyFilterRvError); _filterRvError = true; } } diff --git a/modules/gaia/tasks/readfitstask.cpp b/modules/gaia/tasks/readfitstask.cpp index 5cbe1cf384..3fea257007 100644 --- a/modules/gaia/tasks/readfitstask.cpp +++ b/modules/gaia/tasks/readfitstask.cpp @@ -89,8 +89,8 @@ ReadFitsTask::ReadFitsTask(const ghoul::Dictionary& dictionary) { // Ugly fix for ASCII sorting when there are more columns read than 10. std::set intKeys; - for (const std::string& key : d.keys()) { - intKeys.insert(std::stoi(key)); + for (std::string_view key : d.keys()) { + intKeys.insert(std::stoi(std::string(key))); } for (int key : intKeys) { diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index acda52d1f1..50b9de41af 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -191,61 +191,38 @@ RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) , _downScaleVolumeRendering(DownscaleVolumeRenderingInfo, 1.f, 0.1f, 1.f) , _numberOfRayCastingSteps(NumberOfRayCastingStepsInfo, 1000.f, 1.f, 1000.f) { - dictionary.getValue("VolumeRenderingEnabled", _volumeRenderingEnabled); - dictionary.getValue("StarRenderingEnabled", _starRenderingEnabled); - { - double stepSize; - dictionary.getValue("StepSize", stepSize); - _stepSize = static_cast(stepSize); + if (dictionary.hasKey("VolumeRenderingEnabled")) { + _volumeRenderingEnabled = dictionary.value("VolumeRenderingEnabled"); } - { - double absorptionMultiply = _absorptionMultiply; - dictionary.getValue("AbsorptionMultiply", absorptionMultiply); - _absorptionMultiply = static_cast(absorptionMultiply); - } - { - double emissionMultiply = _emissionMultiply; - dictionary.getValue("EmissionMultiply", emissionMultiply); - _emissionMultiply = static_cast(emissionMultiply); - } - dictionary.getValue("StarRenderingMethod", _starRenderingMethod); - { - double enabledPointsRatio = _enabledPointsRatio; - dictionary.getValue("EnabledPointsRatio", enabledPointsRatio); - _enabledPointsRatio = static_cast(enabledPointsRatio); - } - { - glm::dvec3 translation = glm::vec3(_translation); - dictionary.getValue("Translation", translation); - _translation = glm::vec3(translation); - } - { - glm::dvec3 rotation = glm::vec3(_rotation); - dictionary.getValue("Rotation", rotation); - _rotation = glm::vec3(rotation); + if (dictionary.hasKey("StarRenderingEnabled")) { + _starRenderingEnabled = dictionary.value("StarRenderingEnabled"); } - if (dictionary.hasKeyAndValue(VolumeRenderingEnabledInfo.identifier)) { + if (dictionary.hasKey("StarRenderingMethod")) { + _starRenderingMethod = dictionary.value("StarRenderingMethod"); + } + + if (dictionary.hasValue(VolumeRenderingEnabledInfo.identifier)) { _volumeRenderingEnabled = dictionary.value( VolumeRenderingEnabledInfo.identifier ); } - if (dictionary.hasKeyAndValue(StarRenderingEnabledInfo.identifier)) { + if (dictionary.hasValue(StarRenderingEnabledInfo.identifier)) { _starRenderingEnabled = static_cast(StarRenderingEnabledInfo.identifier); } - if (dictionary.hasKeyAndValue(StepSizeInfo.identifier)) { + if (dictionary.hasValue(StepSizeInfo.identifier)) { _stepSize = static_cast(dictionary.value(StepSizeInfo.identifier)); } - if (dictionary.hasKeyAndValue(AbsorptionMultiplyInfo.identifier)) { + if (dictionary.hasValue(AbsorptionMultiplyInfo.identifier)) { _absorptionMultiply = static_cast( dictionary.value(AbsorptionMultiplyInfo.identifier) ); } - if (dictionary.hasKeyAndValue(EmissionMultiplyInfo.identifier)) { + if (dictionary.hasValue(EmissionMultiplyInfo.identifier)) { _emissionMultiply = static_cast( dictionary.value(EmissionMultiplyInfo.identifier) ); @@ -267,37 +244,36 @@ RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) } } - if (dictionary.hasKeyAndValue(TranslationInfo.identifier)) { - _translation = dictionary.value(TranslationInfo.identifier); + if (dictionary.hasValue(TranslationInfo.identifier)) { + _translation = dictionary.value(TranslationInfo.identifier); } - if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { - _rotation = dictionary.value(RotationInfo.identifier); + if (dictionary.hasValue(RotationInfo.identifier)) { + _rotation = dictionary.value(RotationInfo.identifier); } - if (!dictionary.hasKeyAndValue("Volume")) { + if (!dictionary.hasValue("Volume")) { LERROR("No volume dictionary specified."); } ghoul::Dictionary volumeDictionary = dictionary.value("Volume"); - std::string volumeFilename; - if (volumeDictionary.getValue("Filename", volumeFilename)) { - _volumeFilename = absPath(volumeFilename); + if (volumeDictionary.hasValue("Filename")) { + _volumeFilename = absPath(volumeDictionary.value("Filename")); } else { - LERROR("No volume filename specified."); + LERROR("No volume filename specified"); } - glm::vec3 volumeDimensions = glm::vec3(0.f); - if (volumeDictionary.getValue("Dimensions", volumeDimensions)) { - _volumeDimensions = static_cast(volumeDimensions); + + if (volumeDictionary.hasValue("Dimensions")) { + _volumeDimensions = volumeDictionary.value("Dimensions"); } else { - LERROR("No volume dimensions specified."); + LERROR("No volume dimensions specifieds"); } - glm::vec3 volumeSize = glm::vec3(0.f); - if (volumeDictionary.getValue("Size", volumeSize)) { - _volumeSize = volumeSize; + + if (volumeDictionary.hasValue("Size")) { + _volumeSize = volumeDictionary.value("Size"); } else { LERROR("No volume dimensions specified."); @@ -314,32 +290,32 @@ RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) _downScaleVolumeRendering.setVisibility(properties::Property::Visibility::Developer); if (volumeDictionary.hasKey(DownscaleVolumeRenderingInfo.identifier)) { - _downScaleVolumeRendering = - volumeDictionary.value(DownscaleVolumeRenderingInfo.identifier); + _downScaleVolumeRendering = static_cast( + volumeDictionary.value(DownscaleVolumeRenderingInfo.identifier) + ); } - if (!dictionary.hasKeyAndValue("Points")) { + if (!dictionary.hasValue("Points")) { LERROR("No points dictionary specified."); } ghoul::Dictionary pointsDictionary = dictionary.value("Points"); - std::string pointsFilename; - if (pointsDictionary.getValue("Filename", pointsFilename)) { - _pointsFilename = absPath(pointsFilename); + if (pointsDictionary.hasValue("Filename")) { + _pointsFilename = absPath(pointsDictionary.value("Filename")); } else { LERROR("No points filename specified."); } - if (pointsDictionary.hasKeyAndValue(EnabledPointsRatioInfo.identifier)) { + if (pointsDictionary.hasValue(EnabledPointsRatioInfo.identifier)) { _enabledPointsRatio = static_cast( pointsDictionary.value(EnabledPointsRatioInfo.identifier) ); } - std::string pointSpreadFunctionTexturePath; - if (pointsDictionary.getValue("Texture", pointSpreadFunctionTexturePath)) { - _pointSpreadFunctionTexturePath = absPath(pointSpreadFunctionTexturePath); + if (pointsDictionary.hasValue("Texture")) { + _pointSpreadFunctionTexturePath = + absPath(pointsDictionary.value("Texture")); _pointSpreadFunctionFile = std::make_unique( _pointSpreadFunctionTexturePath ); diff --git a/modules/galaxy/tasks/milkywayconversiontask.cpp b/modules/galaxy/tasks/milkywayconversiontask.cpp index ec985ad917..992a6328db 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.cpp +++ b/modules/galaxy/tasks/milkywayconversiontask.cpp @@ -49,12 +49,24 @@ MilkywayConversionTask::MilkywayConversionTask(const ghoul::Dictionary& dictiona : _inFirstIndex(0) , _inNSlices(0) { - dictionary.getValue(KeyInFilenamePrefix, _inFilenamePrefix); - dictionary.getValue(KeyInFilenameSuffix, _inFilenameSuffix); - dictionary.getValue(KeyInFirstIndex, _inFirstIndex); - dictionary.getValue(KeyInNSlices, _inNSlices); - dictionary.getValue(KeyOutFilename, _outFilename); - dictionary.getValue(KeyOutDimensions, _outDimensions); + if (dictionary.hasKey(KeyInFilenamePrefix)) { + _inFilenamePrefix = dictionary.value(KeyInFilenamePrefix); + } + if (dictionary.hasKey(KeyInFilenameSuffix)) { + _inFilenameSuffix = dictionary.value(KeyInFilenameSuffix); + } + if (dictionary.hasKey(KeyInFirstIndex)) { + _inFirstIndex = static_cast(dictionary.value(KeyInFirstIndex)); + } + if (dictionary.hasKey(KeyInNSlices)) { + _inNSlices = static_cast(dictionary.value(KeyInNSlices)); + } + if (dictionary.hasKey(KeyOutFilename)) { + _outFilename = dictionary.value(KeyOutFilename); + } + if (dictionary.hasKey(KeyOutDimensions)) { + _outDimensions = dictionary.value(KeyOutDimensions); + } } std::string MilkywayConversionTask::description() { diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index b37cc025e9..217839b9f1 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -180,28 +180,28 @@ GlobeBrowsingModule::GlobeBrowsingModule() void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { using namespace globebrowsing; - if (dict.hasKeyAndValue(WMSCacheEnabledInfo.identifier)) { + if (dict.hasValue(WMSCacheEnabledInfo.identifier)) { _wmsCacheEnabled = dict.value(WMSCacheEnabledInfo.identifier); } - if (dict.hasKeyAndValue(OfflineModeInfo.identifier)) { + if (dict.hasValue(OfflineModeInfo.identifier)) { _offlineMode = dict.value(OfflineModeInfo.identifier); } - if (dict.hasKeyAndValue(WMSCacheLocationInfo.identifier)) { + if (dict.hasValue(WMSCacheLocationInfo.identifier)) { _wmsCacheLocation = dict.value(WMSCacheLocationInfo.identifier); } - if (dict.hasKeyAndValue(WMSCacheSizeInfo.identifier)) { + if (dict.hasValue(WMSCacheSizeInfo.identifier)) { _wmsCacheSizeMB = static_cast( dict.value(WMSCacheSizeInfo.identifier) ); } - if (dict.hasKeyAndValue(TileCacheSizeInfo.identifier)) { + if (dict.hasValue(TileCacheSizeInfo.identifier)) { _tileCacheSizeMB = static_cast( dict.value(TileCacheSizeInfo.identifier) ); } // Sanity check - const bool noWarning = dict.hasKeyAndValue("NoWarning") ? + const bool noWarning = dict.hasValue("NoWarning") ? dict.value("NoWarning") : false; diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 779dbd9947..411b7c7035 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -334,14 +334,14 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary, _globe = globe; // Reads labels' file and build cache file if necessary - if (dictionary.empty()) { + if (dictionary.isEmpty()) { return; } - std::string labelsFile; - bool successLabels = dictionary.getValue(KeyLabelsFileName, labelsFile); - if (!successLabels) { + if (!dictionary.hasValue(KeyLabelsFileName)) { return; } + + std::string labelsFile = dictionary.value(KeyLabelsFileName); bool loadSuccess = loadLabelsData(absPath(labelsFile)); if (!loadSuccess) { return; @@ -357,7 +357,9 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary, } if (dictionary.hasKey(LabelsFontSizeInfo.identifier)) { - _labelsFontSize = dictionary.value(LabelsFontSizeInfo.identifier); + _labelsFontSize = static_cast( + dictionary.value(LabelsFontSizeInfo.identifier) + ); _labelsFontSize.onChange([this]() { initializeFonts(); }); } @@ -368,15 +370,19 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary, } if (dictionary.hasKey(LabelsMinHeightInfo.identifier)) { - _labelsMinHeight = dictionary.value(LabelsMinHeightInfo.identifier); + _labelsMinHeight = static_cast( + dictionary.value(LabelsMinHeightInfo.identifier) + ); } if (dictionary.hasKey(LabelsColorInfo.identifier)) { - _labelsColor = dictionary.value(LabelsColorInfo.identifier); + _labelsColor = dictionary.value(LabelsColorInfo.identifier); } if (dictionary.hasKey(LabelsOpacityInfo.identifier)) { - _labelsOpacity = dictionary.value(LabelsOpacityInfo.identifier); + _labelsOpacity = static_cast( + dictionary.value(LabelsOpacityInfo.identifier) + ); } if (dictionary.hasKey(LabelsFadeInEnabledInfo.identifier)) { @@ -384,8 +390,8 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary, } if (dictionary.hasKey(LabelsFadeInStartingDistanceInfo.identifier)) { - _labelsFadeInDist = dictionary.value( - LabelsFadeInStartingDistanceInfo.identifier + _labelsFadeInDist = static_cast( + dictionary.value(LabelsFadeInStartingDistanceInfo.identifier) ); } @@ -396,20 +402,20 @@ void GlobeLabelsComponent::initialize(const ghoul::Dictionary& dictionary, } if (dictionary.hasKey(LabelsFadeOutStartingDistanceInfo.identifier)) { - _labelsFadeOutDist = dictionary.value( - LabelsFadeOutStartingDistanceInfo.identifier + _labelsFadeOutDist = static_cast( + dictionary.value(LabelsFadeOutStartingDistanceInfo.identifier) ); } if (dictionary.hasKey(LabelsMinSizeInfo.identifier)) { _labelsMinSize = static_cast( - dictionary.value(LabelsMinSizeInfo.identifier) + dictionary.value(LabelsMinSizeInfo.identifier) ); } if (dictionary.hasKey(LabelsMaxSizeInfo.identifier)) { _labelsMaxSize = static_cast( - dictionary.value(LabelsMaxSizeInfo.identifier) + dictionary.value(LabelsMaxSizeInfo.identifier) ); } diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index fc65e5501e..cce9ee5797 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -233,7 +233,7 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, documentation::testSpecificationAndThrow(Documentation(), layerDict, "Layer"); layergroupid::TypeID typeID; - if (layerDict.hasKeyAndValue("Type")) { + if (layerDict.hasValue("Type")) { const std::string& typeString = layerDict.value("Type"); typeID = ghoul::from_string(typeString); } @@ -246,7 +246,7 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, initializeBasedOnType(typeID, layerDict); - if (layerDict.hasKeyAndValue(EnabledInfo.identifier)) { + if (layerDict.hasValue(EnabledInfo.identifier)) { _enabled = layerDict.value(EnabledInfo.identifier); } @@ -256,7 +256,7 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, } bool padTiles = true; - if (layerDict.hasKeyAndValue(KeyPadTiles)) { + if (layerDict.hasValue(KeyPadTiles)) { padTiles = layerDict.value(KeyPadTiles); } @@ -264,25 +264,27 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, _padTilePixelStartOffset = initData.tilePixelStartOffset; _padTilePixelSizeDifference = initData.tilePixelSizeDifference; - if (layerDict.hasKeyAndValue(KeySettings)) { + if (layerDict.hasValue(KeySettings)) { ghoul::Dictionary dict = layerDict.value(KeySettings); - if (dict.hasKeyAndValue(KeyOpacity)) { - _renderSettings.opacity = dict.value(KeyOpacity); + if (dict.hasValue(KeyOpacity)) { + _renderSettings.opacity = static_cast(dict.value(KeyOpacity)); } - if (dict.hasKeyAndValue(KeyGamma)) { - _renderSettings.gamma = dict.value(KeyGamma); + if (dict.hasValue(KeyGamma)) { + _renderSettings.gamma = static_cast(dict.value(KeyGamma)); } - if (dict.hasKeyAndValue(KeyMultiplier)) { - _renderSettings.multiplier = dict.value(KeyMultiplier); + if (dict.hasValue(KeyMultiplier)) { + _renderSettings.multiplier = static_cast( + dict.value(KeyMultiplier) + ); } - if (dict.hasKeyAndValue(KeyOffset)) { - _renderSettings.offset = dict.value(KeyOffset); + if (dict.hasValue(KeyOffset)) { + _renderSettings.offset = static_cast(dict.value(KeyOffset)); } } - if (layerDict.hasKeyAndValue(KeyAdjustment)) { + if (layerDict.hasValue(KeyAdjustment)) { _layerAdjustment.setValuesFromDictionary( layerDict.value(KeyAdjustment) ); @@ -300,7 +302,7 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict, } // Initialize blend mode - if (layerDict.hasKeyAndValue(BlendModeInfo.identifier)) { + if (layerDict.hasValue(BlendModeInfo.identifier)) { using namespace layergroupid; std::string blendMode = layerDict.value(BlendModeInfo.identifier); BlendModeID blendModeID = ghoul::from_string(blendMode); @@ -512,8 +514,8 @@ void Layer::initializeBasedOnType(layergroupid::TypeID id, ghoul::Dictionary ini case layergroupid::TypeID::ByLevelTileLayer: { // We add the id to the dictionary since it needs to be known by // the tile provider - initDict.setValue(KeyLayerGroupID, _layerGroupId); - if (initDict.hasKeyAndValue(KeyName)) { + initDict.setValue(KeyLayerGroupID, static_cast(_layerGroupId)); + if (initDict.hasKey(KeyName) && initDict.hasValue(KeyName)) { std::string name = initDict.value(KeyName); LDEBUG("Initializing tile provider for layer: '" + name + "'"); } @@ -521,8 +523,8 @@ void Layer::initializeBasedOnType(layergroupid::TypeID id, ghoul::Dictionary ini break; } case layergroupid::TypeID::SolidColor: { - if (initDict.hasKeyAndValue(ColorInfo.identifier)) { - _solidColor = initDict.value(ColorInfo.identifier); + if (initDict.hasValue(ColorInfo.identifier)) { + _solidColor = initDict.value(ColorInfo.identifier); } break; } diff --git a/modules/globebrowsing/src/layeradjustment.cpp b/modules/globebrowsing/src/layeradjustment.cpp index 2497b4ac2c..3e6a1e25c9 100644 --- a/modules/globebrowsing/src/layeradjustment.cpp +++ b/modules/globebrowsing/src/layeradjustment.cpp @@ -127,20 +127,23 @@ void LayerAdjustment::setValuesFromDictionary(const ghoul::Dictionary& adjustmen "LayerAdjustment" ); - if (adjustmentDict.hasKeyAndValue(KeyType)) { + if (adjustmentDict.hasValue(KeyType)) { std::string dictType = adjustmentDict.value(KeyType); _typeOption = static_cast( ghoul::from_string(dictType) ); } - if (adjustmentDict.hasKeyAndValue(KeyChromaKeyColor)) { - glm::vec3 dictChromaKeyColor = adjustmentDict.value(KeyChromaKeyColor); + if (adjustmentDict.hasValue(KeyChromaKeyColor)) { + glm::vec3 dictChromaKeyColor = + adjustmentDict.value(KeyChromaKeyColor); _chromaKeyColor = std::move(dictChromaKeyColor); } - if (adjustmentDict.hasKeyAndValue(KeyChromaKeyTolerance)) { - float dictChromaKeyTolerance = adjustmentDict.value(KeyChromaKeyTolerance); + if (adjustmentDict.hasValue(KeyChromaKeyTolerance)) { + float dictChromaKeyTolerance = static_cast( + adjustmentDict.value(KeyChromaKeyTolerance) + ); _chromaKeyTolerance = dictChromaKeyTolerance; } } diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index b546ae894e..5f7f791c1d 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -66,7 +66,7 @@ void LayerGroup::setLayersFromDict(const ghoul::Dictionary& dict) { catch (const ghoul::RuntimeError& e) { LERRORC(e.component, e.message); - if (layerDict.hasKeyAndValue(KeyFallback)) { + if (layerDict.hasValue(KeyFallback)) { LWARNING("Unable to create layer. Initializing fallback layer."); ghoul::Dictionary fallbackLayerDict = layerDict.value(KeyFallback); @@ -124,7 +124,7 @@ Layer* LayerGroup::addLayer(const ghoul::Dictionary& layerDict) { LERROR("Error adding layer. " + ghoul::to_string(res)); } - if (!layerDict.hasKeyAndValue("Identifier")) { + if (!layerDict.hasValue("Identifier")) { LERROR("'Identifier' must be specified for layer."); return nullptr; } diff --git a/modules/globebrowsing/src/layermanager.cpp b/modules/globebrowsing/src/layermanager.cpp index 76178af1ea..6c1a5cb696 100644 --- a/modules/globebrowsing/src/layermanager.cpp +++ b/modules/globebrowsing/src/layermanager.cpp @@ -61,10 +61,8 @@ void LayerManager::initialize(const ghoul::Dictionary& layerGroupsDict) { _layerGroups[i] = std::make_unique(layergroupid::GroupID(i)); } - const std::vector& layerGroupNamesInDict = layerGroupsDict.keys(); - // Create all the layer groups - for (const std::string& groupName : layerGroupNamesInDict) { + for (std::string_view groupName : layerGroupsDict.keys()) { layergroupid::GroupID id = ghoul::from_string(groupName); if (id != layergroupid::GroupID::Unknown) { @@ -72,7 +70,7 @@ void LayerManager::initialize(const ghoul::Dictionary& layerGroupsDict) { _layerGroups[static_cast(id)]->setLayersFromDict(d); } else { - LWARNINGC("LayerManager", "Unknown layer group: " + groupName); + LWARNINGC("LayerManager", fmt::format("Unknown layer group: {}", groupName)); } } diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index a58b9de396..c04da1c695 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -550,25 +550,26 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) _generalProperties.currentLodScaleFactor.setReadOnly(true); // Read the radii in to its own dictionary - if (dictionary.hasKeyAndValue(KeyRadii)) { - _ellipsoid = Ellipsoid(dictionary.value(KeyRadii)); + if (dictionary.hasValue(KeyRadii)) { + _ellipsoid = Ellipsoid(dictionary.value(KeyRadii)); setBoundingSphere(static_cast(_ellipsoid.maximumRadius())); } - else if (dictionary.hasKeyAndValue(KeyRadii)) { + else if (dictionary.hasValue(KeyRadii)) { const double radius = dictionary.value(KeyRadii); _ellipsoid = Ellipsoid({ radius, radius, radius }); setBoundingSphere(static_cast(_ellipsoid.maximumRadius())); } - if (dictionary.hasValue("PerformShading")) { + if (dictionary.hasKey("PerformShading")) { _generalProperties.performShading = dictionary.value("PerformShading"); } // Init layer manager ghoul::Dictionary layersDictionary; - if (!dictionary.getValue(KeyLayers, layersDictionary)) { + if (!dictionary.hasValue(KeyLayers)) { throw ghoul::RuntimeError(std::string(KeyLayers) + " must be specified"); } + layersDictionary = dictionary.value(KeyLayers); _layerManager.initialize(layersDictionary); @@ -635,21 +636,25 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) //================================================================ //======== Reads Shadow (Eclipses) Entries in mod file =========== //================================================================ - ghoul::Dictionary shadowDictionary; - bool success = dictionary.getValue(KeyShadowGroup, shadowDictionary); + bool success = dictionary.hasValue(KeyShadowGroup); bool disableShadows = false; if (success) { + ghoul::Dictionary shadowDictionary = + dictionary.value(KeyShadowGroup); std::vector> sourceArray; unsigned int sourceCounter = 1; while (success) { - std::string sourceName; - success = shadowDictionary.getValue(KeyShadowSource + - std::to_string(sourceCounter) + ".Name", sourceName); + std::string keyName = + KeyShadowSource + std::to_string(sourceCounter) + ".Name"; + std::string keyRadius = + KeyShadowSource + std::to_string(sourceCounter) + ".Radius"; + + success = shadowDictionary.hasValue(keyName); if (success) { - double sourceRadius; - success = shadowDictionary.getValue(KeyShadowSource + - std::to_string(sourceCounter) + ".Radius", sourceRadius); + std::string sourceName = shadowDictionary.value(keyName); + success = shadowDictionary.hasValue(keyRadius); if (success) { + double sourceRadius = shadowDictionary.value(keyRadius); sourceArray.emplace_back(sourceName, sourceRadius); } else { @@ -668,14 +673,17 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) std::vector> casterArray; unsigned int casterCounter = 1; while (success) { - std::string casterName; - success = shadowDictionary.getValue(KeyShadowCaster + - std::to_string(casterCounter) + ".Name", casterName); + std::string keyName = + KeyShadowCaster + std::to_string(casterCounter) + ".Name"; + std::string keyRadius = + KeyShadowCaster + std::to_string(casterCounter) + ".Radius"; + success = shadowDictionary.hasValue(keyName); + if (success) { - double casterRadius; - success = shadowDictionary.getValue(KeyShadowCaster + - std::to_string(casterCounter) + ".Radius", casterRadius); + std::string casterName = shadowDictionary.value(keyName); + success = shadowDictionary.hasValue(keyRadius); if (success) { + double casterRadius = shadowDictionary.value(keyRadius); casterArray.emplace_back(casterName, casterRadius); } else { @@ -706,18 +714,15 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) } // Labels Dictionary - if (dictionary.hasKeyAndValue(KeyLabels)) { + if (dictionary.hasValue(KeyLabels)) { _labelsDictionary = dictionary.value(KeyLabels); } // Components - if (dictionary.hasKey("Rings")) { + if (dictionary.hasValue("Rings")) { _ringsComponent.initialize(); addPropertySubOwner(_ringsComponent); _hasRings = true; - - ghoul::Dictionary ringsDic; - dictionary.getValue("Rings", ringsDic); } if (dictionary.hasKey("Shadows")) { @@ -730,7 +735,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) } void RenderableGlobe::initializeGL() { - if (!_labelsDictionary.empty()) { + if (!_labelsDictionary.isEmpty()) { _globeLabelsComponent.initialize(_labelsDictionary, this); addPropertySubOwner(_globeLabelsComponent); } @@ -1796,7 +1801,7 @@ void RenderableGlobe::recompileShaders() { for (int i = 0; i < layergroupid::NUM_LAYER_GROUPS; ++i) { layerGroupNames.setValue( std::to_string(i), - layergroupid::LAYER_GROUP_IDENTIFIERS[i] + std::string(layergroupid::LAYER_GROUP_IDENTIFIERS[i]) ); } shaderDictionary.setValue("layerGroups", layerGroupNames); diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp index 20134f04d0..76b21efaf6 100644 --- a/modules/globebrowsing/src/ringscomponent.cpp +++ b/modules/globebrowsing/src/ringscomponent.cpp @@ -182,12 +182,12 @@ RingsComponent::RingsComponent(const ghoul::Dictionary& dictionary) { using ghoul::filesystem::File; - if (dictionary.hasKey("Rings")) { + if (dictionary.hasValue("Rings")) { // @TODO (abock, 2019-12-16) It would be better to not store the dictionary long // term and rather extract the values directly here. This would require a bit of // a rewrite in the RenderableGlobe class to not create the RingsComponent in the // class-initializer list though - dictionary.getValue("Rings", _ringsDictionary); + _ringsDictionary = dictionary.value("Rings"); } documentation::testSpecificationAndThrow( @@ -214,8 +214,8 @@ void RingsComponent::initialize() { ); _textureFile = std::make_unique(_texturePath); - if (_ringsDictionary.hasKeyAndValue(OffsetInfo.identifier)) { - _offset = _ringsDictionary.value(OffsetInfo.identifier); + if (_ringsDictionary.hasValue(OffsetInfo.identifier)) { + _offset = _ringsDictionary.value(OffsetInfo.identifier); } addProperty(_offset); @@ -224,14 +224,14 @@ void RingsComponent::initialize() { _textureFile->setCallback([&](const File&) { _textureIsDirty = true; }); - if (_ringsDictionary.hasKeyAndValue(NightFactorInfo.identifier)) { + if (_ringsDictionary.hasValue(NightFactorInfo.identifier)) { _nightFactor = static_cast( _ringsDictionary.value(NightFactorInfo.identifier) ); } addProperty(_nightFactor); - if (_ringsDictionary.hasKeyAndValue(ColorFilterInfo.identifier)) { + if (_ringsDictionary.hasValue(ColorFilterInfo.identifier)) { _colorFilter = static_cast( _ringsDictionary.value(ColorFilterInfo.identifier) ); @@ -239,8 +239,8 @@ void RingsComponent::initialize() { // Shadow Mapping Quality Controls if (_ringsDictionary.hasKey(ZFightingPercentageInfo.identifier)) { - _zFightingPercentage = _ringsDictionary.value( - ZFightingPercentageInfo.identifier + _zFightingPercentage = static_cast( + _ringsDictionary.value(ZFightingPercentageInfo.identifier) ); } addProperty(_zFightingPercentage); diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index 33ecbb05bf..dda7625b5a 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -158,7 +158,7 @@ documentation::Documentation ShadowComponent::Documentation() { }, { DepthMapSizeInfo.identifier, - new Vector2ListVerifier, + new Vector2ListVerifier, Optional::Yes, DepthMapSizeInfo.description } @@ -175,12 +175,12 @@ ShadowComponent::ShadowComponent(const ghoul::Dictionary& dictionary) { using ghoul::filesystem::File; - if (dictionary.hasKey("Shadows")) { + if (dictionary.hasValue("Shadows")) { // @TODO (abock, 2019-12-16) It would be better to not store the dictionary long // term and rather extract the values directly here. This would require a bit of // a rewrite in the RenderableGlobe class to not create the ShadowComponent in the // class-initializer list though - dictionary.getValue("Shadows", _shadowMapDictionary); + _shadowMapDictionary = dictionary.value("Shadows"); } documentation::testSpecificationAndThrow( @@ -191,15 +191,15 @@ ShadowComponent::ShadowComponent(const ghoul::Dictionary& dictionary) if (_shadowMapDictionary.hasKey(DistanceFractionInfo.identifier)) { _distanceFraction = static_cast( - _shadowMapDictionary.value(DistanceFractionInfo.identifier) + _shadowMapDictionary.value(DistanceFractionInfo.identifier) ); } _saveDepthTexture.onChange([&]() { _executeDepthTextureSave = true; }); if (_shadowMapDictionary.hasKey(DepthMapSizeInfo.identifier)) { - glm::vec2 depthMapSize = - _shadowMapDictionary.value(DepthMapSizeInfo.identifier); + glm::dvec2 depthMapSize = + _shadowMapDictionary.value(DepthMapSizeInfo.identifier); _shadowDepthTextureWidth = static_cast(depthMapSize.x); _shadowDepthTextureHeight = static_cast(depthMapSize.y); _dynamicDepthTextureRes = false; diff --git a/modules/globebrowsing/src/tileprovider.cpp b/modules/globebrowsing/src/tileprovider.cpp index 7c2f757a52..322b2f69e3 100644 --- a/modules/globebrowsing/src/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider.cpp @@ -349,7 +349,7 @@ std::unique_ptr initTileProvider(TemporalTileProvider& t, FileSys.expandPathTokens(gdalDatasetXml, IgnoredTokens); - t.initDict.setValue(KeyFilePath, gdalDatasetXml); + t.initDict.setValue(KeyFilePath, gdalDatasetXml); return std::make_unique(t.initDict); } @@ -489,7 +489,7 @@ bool readFilePath(TemporalTileProvider& t) { // File path was not a path to a file but a GDAL config or empty ghoul::filesystem::File f(t.filePath); if (FileSys.fileExists(f)) { - t.initDict.setValue(temporal::KeyBasePath, f.directoryName()); + t.initDict.setValue(temporal::KeyBasePath, f.directoryName()); } t.gdalXmlTemplate = consumeTemporalMetaData(t, xml); @@ -560,26 +560,27 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) tileCache = global::moduleEngine->module()->tileCache(); name = "Name unspecified"; - if (dictionary.hasKeyAndValue("Name")) { + if (dictionary.hasValue("Name")) { name = dictionary.value("Name"); } std::string _loggerCat = "DefaultTileProvider (" + name + ")"; // 1. Get required Keys filePath = dictionary.value(KeyFilePath); - layerGroupID = dictionary.value("LayerGroupID"); + layerGroupID = + static_cast(dictionary.value("LayerGroupID")); // 2. Initialize default values for any optional Keys // getValue does not work for integers int pixelSize = 0; - if (dictionary.hasKeyAndValue(defaultprovider::KeyTilePixelSize)) { + if (dictionary.hasValue(defaultprovider::KeyTilePixelSize)) { pixelSize = static_cast( dictionary.value(defaultprovider::KeyTilePixelSize) ); LDEBUG(fmt::format("Default pixel size overridden: {}", pixelSize)); } - if (dictionary.hasKeyAndValue(defaultprovider::KeyPadTiles)) { + if (dictionary.hasValue(defaultprovider::KeyPadTiles)) { padTiles = dictionary.value(defaultprovider::KeyPadTiles); } @@ -595,7 +596,7 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) default: performPreProcessing = false; break; } - if (dictionary.hasKeyAndValue(defaultprovider::KeyPerformPreProcessing)) { + if (dictionary.hasValue(defaultprovider::KeyPerformPreProcessing)) { performPreProcessing = dictionary.value( defaultprovider::KeyPerformPreProcessing ); @@ -653,7 +654,7 @@ SizeReferenceTileProvider::SizeReferenceTileProvider(const ghoul::Dictionary& di font = global::fontManager->font("Mono", static_cast(fontSize)); - if (dictionary.hasKeyAndValue(sizereferenceprovider::KeyRadii)) { + if (dictionary.hasValue(sizereferenceprovider::KeyRadii)) { ellipsoid = dictionary.value(sizereferenceprovider::KeyRadii); } } @@ -684,7 +685,7 @@ TileProviderByIndex::TileProviderByIndex(const ghoul::Dictionary& dictionary) { ); layergroupid::TypeID typeID; - if (defaultProviderDict.hasKeyAndValue("Type")) { + if (defaultProviderDict.hasValue("Type")) { const std::string& t = defaultProviderDict.value("Type"); typeID = ghoul::from_string(t); @@ -724,7 +725,7 @@ TileProviderByIndex::TileProviderByIndex(const ghoul::Dictionary& dictionary) { const TileIndex tileIndex(x, y, static_cast(level)); layergroupid::TypeID providerTypeID = layergroupid::TypeID::DefaultTileLayer; - if (defaultProviderDict.hasKeyAndValue("Type")) { + if (defaultProviderDict.hasValue("Type")) { const std::string& t = defaultProviderDict.value("Type"); providerTypeID = ghoul::from_string(t); @@ -751,11 +752,11 @@ TileProviderByLevel::TileProviderByLevel(const ghoul::Dictionary& dictionary) { type = Type::ByLevelTileProvider; - layergroupid::GroupID layerGroupID = dictionary.value( - bylevelprovider::KeyLayerGroupID + layergroupid::GroupID layerGroupID = static_cast( + dictionary.value(bylevelprovider::KeyLayerGroupID) ); - if (dictionary.hasKeyAndValue(bylevelprovider::KeyProviders)) { + if (dictionary.hasValue(bylevelprovider::KeyProviders)) { ghoul::Dictionary providers = dictionary.value( bylevelprovider::KeyProviders ); @@ -772,10 +773,14 @@ TileProviderByLevel::TileProviderByLevel(const ghoul::Dictionary& dictionary) { ghoul::Dictionary providerDict = levelProviderDict.value( bylevelprovider::KeyTileProvider ); - providerDict.setValue(bylevelprovider::KeyLayerGroupID, layerGroupID); + providerDict.setValue( + bylevelprovider::KeyLayerGroupID, + static_cast(layerGroupID) + ); layergroupid::TypeID typeID; - if (providerDict.hasKeyAndValue("Type")) { + if (providerDict.hasValue("Type")) + { const std::string& typeString = providerDict.value("Type"); typeID = ghoul::from_string(typeString); diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp index 4d20ef70f0..673de3341a 100644 --- a/modules/imgui/src/renderproperties.cpp +++ b/modules/imgui/src/renderproperties.cpp @@ -125,7 +125,9 @@ void renderOptionProperty(Property* prop, const std::string& ownerName, const std::string& name = p->guiName(); ImGui::PushID((ownerName + "." + name).c_str()); bool isReadOnly = false; - p->metaData().getValue("isReadOnly", isReadOnly); + if (p->metaData().hasValue("isReadOnly")) { + isReadOnly = p->metaData().value("isReadOnly"); + } int value = *p; const std::vector& options = p->options(); diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 35e17aae52..3bb482b0cf 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -331,7 +331,7 @@ void DataCygnet::subscribeToGroup() { "dataOptionsChanged", [&](const ghoul::Dictionary& dict) { LDEBUG(identifier() + " Event dataOptionsChanged"); - if (dict.hasKeyAndValue>("dataOptions")) { + if (dict.hasValue>("dataOptions")) { _dataOptions = dict.value>("dataOptions"); } } @@ -342,8 +342,8 @@ void DataCygnet::subscribeToGroup() { "normValuesChanged", [&](const ghoul::Dictionary& dict) { LDEBUG(identifier() + " Event normValuesChanged"); - if (dict.hasKeyAndValue("normValues")) { - _normValues = dict.value("normValues"); + if (dict.hasValue("normValues")) { + _normValues = dict.value("normValues"); } } ); @@ -353,8 +353,8 @@ void DataCygnet::subscribeToGroup() { "backgroundValuesChanged", [&](const ghoul::Dictionary& dict) { LDEBUG(identifier() + " Event backgroundValuesChanged"); - if (dict.hasKeyAndValue("backgroundValues")) { - _backgroundValues = dict.value("backgroundValues"); + if (dict.hasValue("backgroundValues")) { + _backgroundValues = dict.value("backgroundValues"); } } ); diff --git a/modules/iswa/rendering/datasphere.cpp b/modules/iswa/rendering/datasphere.cpp index 208e3af6ef..0a118ae761 100644 --- a/modules/iswa/rendering/datasphere.cpp +++ b/modules/iswa/rendering/datasphere.cpp @@ -38,7 +38,7 @@ namespace openspace { DataSphere::DataSphere(const ghoul::Dictionary& dictionary) : DataCygnet(dictionary) { - _radius = dictionary.value("Radius"); + _radius = static_cast(dictionary.value("Radius")); } DataSphere::~DataSphere() {} diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 43963773c5..bfadd6b66a 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -95,12 +95,16 @@ ghoul::Event& IswaBaseGroup::groupEvent() { void IswaBaseGroup::registerProperties() { _enabled.onChange([this]() { LDEBUG("Group " + identifier() + " published enabledChanged"); - _groupEvent.publish("enabledChanged", ghoul::Dictionary({{"enabled", _enabled}})); + ghoul::Dictionary d; + d.setValue("enabled", _enabled.value()); + _groupEvent.publish("enabledChanged", d); }); _alpha.onChange([this]() { LDEBUG("Group " + identifier() + " published alphaChanged"); - _groupEvent.publish("alphaChanged", ghoul::Dictionary({ { "alpha", _alpha } })); + ghoul::Dictionary d; + d.setValue("alpha", static_cast(_alpha)); + _groupEvent.publish("alphaChanged", d); }); diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index 651ff8561b..b43e0fc0ac 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -63,39 +63,60 @@ IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) { // This changed from setIdentifier to setGuiName, 2018-03-14 ---abock std::string name; - dictionary.getValue("Name", name); + if (dictionary.hasValue("Name")) { + name = dictionary.value("Name"); + } setGuiName(name); - float renderableId; - dictionary.getValue("Id", renderableId); - float updateTime; - dictionary.getValue("UpdateTime", updateTime); - glm::vec4 spatialScale = glm::vec4(0.f); - dictionary.getValue("SpatialScale", spatialScale); - glm::vec3 min = glm::vec3(0.f); - dictionary.getValue("GridMin", min); - glm::vec3 max = glm::vec3(0.f); - dictionary.getValue("GridMax", max); - dictionary.getValue("Frame",_data.frame); - dictionary.getValue("CoordinateType", _data.coordinateType); - float xOffset = 0.f; - dictionary.getValue("XOffset", xOffset); + _data.id = static_cast(dictionary.value("Id")); + _data.updateTime = static_cast(dictionary.value("UpdateTime")); - dictionary.getValue("Group", _data.groupName); + _data.spatialScale = glm::dvec4(0.f); + if (dictionary.hasValue("SpatialScale")) { + _data.spatialScale = dictionary.value("SpatialScale"); + } - _data.id = static_cast(renderableId); - _data.updateTime = static_cast(updateTime); - _data.spatialScale = spatialScale; - _data.gridMin = min; - _data.gridMax = max; + _data.gridMin = glm::dvec3(0.f); + if (dictionary.hasValue("GridMin")) { + _data.gridMin = dictionary.value("GridMin"); + } - glm::vec3 scale = glm::vec3((max.x - min.x), (max.y - min.y), (max.z - min.z)); + _data.gridMax = glm::dvec3(0.f); + if (dictionary.hasValue("GridMax")) { + _data.gridMax = dictionary.value("GridMax"); + } + + if (dictionary.hasKey("Frame") && dictionary.hasValue("Frame")) { + _data.frame = dictionary.value("Frame"); + } + if (dictionary.hasValue("CoordinateType")) { + _data.coordinateType = dictionary.value("CoordinateType"); + } + + + double xOffset = 0.f; + if (dictionary.hasValue("XOffset")) { + xOffset = dictionary.value("XOffset"); + } + if (dictionary.hasValue("Group")) { + _data.groupName = dictionary.value("Group"); + } + + + glm::vec3 scale = glm::vec3( + _data.gridMax.x - _data.gridMin.x, + _data.gridMax.y - _data.gridMin.y, + _data.gridMax.z - _data.gridMin.z + ); _data.scale = scale; glm::vec3 offset = glm::vec3( - (min.x + (std::abs(min.x) + std::abs(max.x)) / 2.f) + xOffset, - (min.y + (std::abs(min.y) + std::abs(max.y)) / 2.f), - (min.z + (std::abs(min.z) + std::abs(max.z)) / 2.f) + (_data.gridMin.x + + (std::abs(_data.gridMin.x) + std::abs(_data.gridMax.x)) / 2.f) + xOffset, + (_data.gridMin.y + + (std::abs(_data.gridMin.y) + std::abs(_data.gridMax.y)) / 2.f), + (_data.gridMin.z + + (std::abs(_data.gridMin.z) + std::abs(_data.gridMax.z)) / 2.f) ); _data.offset = offset; @@ -271,7 +292,7 @@ void IswaCygnet::initializeGroup() { "alphaChanged", [&](const ghoul::Dictionary& dict) { LDEBUG(identifier() + " Event alphaChanged"); - _alpha = dict.value("alpha"); + _alpha = static_cast(dict.value("alpha")); } ); diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index 33a6275dab..bed12f1534 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -110,21 +110,19 @@ IswaDataGroup::~IswaDataGroup() {} void IswaDataGroup::registerProperties() { _useLog.onChange([this]() { LDEBUG("Group " + identifier() + " published useLogChanged"); - _groupEvent.publish( - "useLogChanged", - ghoul::Dictionary({ { "useLog", _useLog.value() } }) - ); + ghoul::Dictionary d; + d.setValue("useLog", _useLog.value()); + _groupEvent.publish("useLogChanged", d); }); _useHistogram.onChange([this]() { LDEBUG("Group " + identifier() + " published useHistogramChanged"); - _groupEvent.publish( - "useHistogramChanged", - ghoul::Dictionary({ { "useHistogram", _useHistogram.value() } }) - ); + ghoul::Dictionary d; + d.setValue("useHistogram", _useHistogram.value()); + _groupEvent.publish("useHistogramChanged", d); }); - //If autofiler is on, background values property should be hidden + // If autofiler is on, background values property should be hidden _autoFilter.onChange([this]() { LDEBUG("Group " + identifier() + " published autoFilterChanged"); // If autofiler is selected, use _dataProcessor to set backgroundValues @@ -139,40 +137,36 @@ void IswaDataGroup::registerProperties() { _backgroundValues.setVisibility(properties::Property::Visibility::All); //_backgroundValues.setVisible(true); } - _groupEvent.publish( - "autoFilterChanged", - ghoul::Dictionary({ { "autoFilter", _autoFilter.value() } }) - ); + ghoul::Dictionary d; + d.setValue("autoFilter", _autoFilter.value()); + _groupEvent.publish("autoFilterChanged", d); }); _normValues.onChange([this]() { LDEBUG("Group " + identifier() + " published normValuesChanged"); - _groupEvent.publish( - "normValuesChanged", - ghoul::Dictionary({ { "normValues", _normValues.value() } }) - ); + ghoul::Dictionary d; + d.setValue("normValues", glm::dvec2(_normValues.value())); + _groupEvent.publish("normValuesChanged", d); }); _backgroundValues.onChange([this]() { LDEBUG("Group " + identifier() + " published backgroundValuesChanged"); - _groupEvent.publish( - "backgroundValuesChanged", - ghoul::Dictionary({ { "backgroundValues", _backgroundValues.value() } }) - ); + ghoul::Dictionary d; + d.setValue("backgroundValues", glm::dvec2(_backgroundValues.value())); + _groupEvent.publish("backgroundValuesChanged", d); }); _transferFunctionsFile.onChange([this]() { LDEBUG("Group " + identifier() + " published transferFunctionsChanged"); - _groupEvent.publish( - "transferFunctionsChanged", - ghoul::Dictionary({ { "transferFunctions", _transferFunctionsFile.value() } }) - ); + ghoul::Dictionary d; + d.setValue("transferFunctionsChanged", _transferFunctionsFile.value()); + _groupEvent.publish("transferFunctionsChanged", d); }); _dataOptions.onChange([this]() { LDEBUG("Group " + identifier() + " published dataOptionsChanged"); ghoul::Dictionary dict; - dict.setValue>("dataOptions", _dataOptions.value()); + dict.setValue("dataOptions", _dataOptions.value()); _groupEvent.publish("dataOptionsChanged", dict); }); } diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index 8d6928ba93..f5416c97cf 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -89,10 +89,9 @@ void IswaKameleonGroup::setFieldlineInfo(std::string fieldlineIndexFile, void IswaKameleonGroup::registerProperties() { _resolution.onChange([this]() { LDEBUG("Group " + identifier() + " published resolutionChanged"); - _groupEvent.publish( - "resolutionChanged", - ghoul::Dictionary({ { "resolution", _resolution.value() } }) - ); + ghoul::Dictionary d; + d.setValue("resolution", static_cast(_resolution)); + _groupEvent.publish("resolutionChanged", d); }); _fieldlines.onChange([this]() { updateFieldlineSeeds(); }); @@ -190,7 +189,9 @@ void IswaKameleonGroup::changeCdf(std::string path) { clearFieldlines(); updateFieldlineSeeds(); - _groupEvent.publish("cdfChanged", ghoul::Dictionary({ { "path", std::move(path) } })); + ghoul::Dictionary d; + d.setValue("path", std::move(path)); + _groupEvent.publish("cdfChanged", d); } } //namespace openspace diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index 93a42400d8..5edb425e9c 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -74,13 +74,18 @@ KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) addProperty(_slice); addProperty(_fieldlines); - dictionary.getValue("kwPath", _kwPath); + if (dictionary.hasValue("kwPath")) { + _kwPath = dictionary.value("kwPath"); + } - std::string fieldlineIndexFile; - dictionary.getValue("fieldlineSeedsIndexFile", _fieldlineIndexFile); + if (dictionary.hasValue("fieldlineSeedsIndexFile")) { + _fieldlineIndexFile = dictionary.value("fieldlineSeedsIndexFile"); + } std::string axis; - dictionary.getValue("axisCut", axis); + if (dictionary.hasValue("axisCut")) { + axis = dictionary.value("axisCut"); + } if (axis == "x") { _cut = Cut::X; @@ -356,14 +361,14 @@ void KameleonPlane::subscribeToGroup() { ghoul::Event& groupEvent = _group->groupEvent(); groupEvent.subscribe(identifier(), "resolutionChanged", [&](ghoul::Dictionary dict) { LDEBUG(identifier() + " Event resolutionChanged"); - if (dict.hasKeyAndValue("resolution")) { - _resolution = dict.value("resolution"); + if (dict.hasKey("resolution") && dict.hasValue("resolution")) { + _resolution = static_cast(dict.value("resolution")); } }); groupEvent.subscribe(identifier(), "cdfChanged", [&](ghoul::Dictionary dict) { LDEBUG(identifier() + " Event cdfChanged"); - if (dict.hasKeyAndValue("path")) { + if (dict.hasKey("path") && dict.hasValue("path")) { const std::string& path = dict.value("path"); changeKwPath(path); } diff --git a/modules/iswa/util/iswamanager_lua.inl b/modules/iswa/util/iswamanager_lua.inl index b5e8dbbc70..21f5acc491 100644 --- a/modules/iswa/util/iswamanager_lua.inl +++ b/modules/iswa/util/iswamanager_lua.inl @@ -91,8 +91,8 @@ int iswa_addScreenSpaceCygnet(lua_State* L) { } else { d.setValue("Name", name); - d.setValue("Type", "ScreenSpaceCygnet"); - d.setValue("UpdateInterval", static_cast(updateInterval)); + d.setValue("Type", std::string("ScreenSpaceCygnet")); + d.setValue("UpdateInterval", static_cast(updateInterval)); std::unique_ptr s( ScreenSpaceRenderable::createFromDictionary(d) diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 9bba62ea06..8c7fabbc64 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -179,13 +179,13 @@ void KameleonVolumeReader::addAttributeToDictionary(ghoul::Dictionary& dictionar ccmc::Attribute::AttributeType type = attr.getAttributeType(); switch (type) { case ccmc::Attribute::AttributeType::FLOAT: - dictionary.setValue(key, attr.getAttributeFloat()); + dictionary.setValue(key, static_cast(attr.getAttributeFloat())); return; case ccmc::Attribute::AttributeType::INT: - dictionary.setValue(key, attr.getAttributeInt()); + dictionary.setValue(key, attr.getAttributeInt()); return; case ccmc::Attribute::AttributeType::STRING: - dictionary.setValue(key, attr.getAttributeString()); + dictionary.setValue(key, attr.getAttributeString()); return; } } @@ -215,10 +215,10 @@ ghoul::Dictionary KameleonVolumeReader::readMetaData() const { variableDictionary.setValue(variableName, variableAttributesDictionary); } - return { - { "globalAttributes", std::move(globalAttributesDictionary) }, - { "variableAttributes", std::move(variableDictionary) } - }; + ghoul::Dictionary res; + res.setValue("globalAttributes", std::move(globalAttributesDictionary)); + res.setValue("variableAttributes", std::move(variableDictionary)); + return res; } std::string KameleonVolumeReader::simulationStart() const { diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 2a97b063ab..9aac55d4cd 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -154,70 +154,76 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict , _transferFunctionPath(TransferFunctionInfo) , _cache(CacheInfo) { - if (dictionary.hasKeyAndValue(KeyDimensions)) { - _dimensions = dictionary.value(KeyDimensions); + if (dictionary.hasValue(KeyDimensions)) { + _dimensions = dictionary.value(KeyDimensions); } else { LWARNING("No dimensions specified for volumetric data, falling back to 32^3"); _dimensions = glm::uvec3(32); } - _stepSize = dictionary.value(KeyStepSize); + _stepSize = static_cast(dictionary.value(KeyStepSize)); - if (dictionary.hasKeyAndValue(KeyTransferFunction)) { + if (dictionary.hasValue(KeyTransferFunction)) { _transferFunctionPath = dictionary.value(KeyTransferFunction); _transferFunction = std::make_shared( _transferFunctionPath, [](const openspace::TransferFunction&) {} ); } - if (dictionary.hasKeyAndValue(KeySource)) { + if (dictionary.hasValue(KeySource)) { _sourcePath = absPath(dictionary.value(KeySource)); } - if (dictionary.hasKeyAndValue(KeyVariable)) { + if (dictionary.hasValue(KeyVariable)) { _variable = dictionary.value(KeyVariable); } - if (dictionary.hasKeyAndValue(KeyLowerDomainBound)) { - _lowerDomainBound = dictionary.value(KeyLowerDomainBound); + if (dictionary.hasValue(KeyLowerDomainBound)) { + _lowerDomainBound = dictionary.value(KeyLowerDomainBound); } else { _autoDomainBounds = true; } - if (dictionary.hasKeyAndValue(KeyUpperDomainBound)) { - _upperDomainBound = dictionary.value(KeyUpperDomainBound); + if (dictionary.hasValue(KeyUpperDomainBound)) { + _upperDomainBound = dictionary.value(KeyUpperDomainBound); } else { _autoDomainBounds = true; } - if (dictionary.hasKeyAndValue(KeyDomainScale)) { - _domainScale = dictionary.value(KeyDomainScale); + if (dictionary.hasValue(KeyDomainScale)) { + _domainScale = dictionary.value(KeyDomainScale); } - if (dictionary.hasKeyAndValue(KeyLowerValueBound)) { - _lowerValueBound = dictionary.value(KeyLowerValueBound); + if (dictionary.hasValue(KeyLowerValueBound)) { + _lowerValueBound = static_cast( + dictionary.value(KeyLowerValueBound) + ); } else { _autoValueBounds = true; } - if (dictionary.hasKeyAndValue(KeyUpperValueBound)) { - _upperValueBound = dictionary.value(KeyUpperValueBound); + if (dictionary.hasValue(KeyUpperValueBound)) { + _upperValueBound = static_cast( + dictionary.value(KeyUpperValueBound) + ); } else { _autoValueBounds = true; } ghoul::Dictionary clipPlanesDictionary; - dictionary.getValue(KeyClipPlanes, clipPlanesDictionary); + if (dictionary.hasValue(KeyClipPlanes)) { + clipPlanesDictionary = dictionary.value(KeyClipPlanes); + } _clipPlanes = std::make_shared(clipPlanesDictionary); _clipPlanes->setIdentifier("clipPlanes"); _clipPlanes->setGuiName("Clip Planes"); - if (dictionary.hasKeyAndValue(KeyCache)) { + if (dictionary.hasValue(KeyCache)) { _cache = dictionary.value(KeyCache); } @@ -231,7 +237,7 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict ); _gridType.setValue(static_cast(volume::VolumeGridType::Cartesian)); - if (dictionary.hasKeyAndValue(KeyGridType)) { + if (dictionary.hasValue(KeyGridType)) { const std::string& gridType = dictionary.value(KeyGridType); if (gridType == ValueSphericalGridType) { _gridType.setValue(static_cast(volume::VolumeGridType::Spherical)); diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index e3ea77df4c..7a63f10c34 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -67,15 +67,10 @@ void KameleonDocumentationTask::perform(const Task::ProgressCallback & progressC ghoul::Dictionary kameleonDictionary = reader.readMetaData(); progressCallback(0.33f); - ghoul::Dictionary dictionary = { - { "kameleon", std::move(kameleonDictionary) }, - { "version", - std::to_string(OPENSPACE_VERSION_MAJOR) + "." + - std::to_string(OPENSPACE_VERSION_MINOR) + "." + - std::to_string(OPENSPACE_VERSION_PATCH) - }, - { "input", _inputPath } - }; + ghoul::Dictionary dictionary; + dictionary.setValue("kameleon", std::move(kameleonDictionary)); + dictionary.setValue("version", std::string(OPENSPACE_VERSION_NUMBER)); + dictionary.setValue("input", _inputPath); std::string json = ghoul::formatJson(dictionary); progressCallback(0.66f); diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp index f8cbd48c9a..9b59b0a723 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp @@ -128,12 +128,18 @@ KameleonVolumeToRawTask::KameleonVolumeToRawTask(const ghoul::Dictionary& dictio _rawVolumeOutputPath = absPath(dictionary.value(KeyRawVolumeOutput)); _dictionaryOutputPath = absPath(dictionary.value(KeyDictionaryOutput)); _variable = dictionary.value(KeyVariable); - _dimensions = glm::uvec3(dictionary.value(KeyDimensions)); + _dimensions = glm::uvec3(dictionary.value(KeyDimensions)); - if (!dictionary.getValue(KeyLowerDomainBound, _lowerDomainBound)) { + if (dictionary.hasKey(KeyLowerDomainBound)) { + _lowerDomainBound = dictionary.value(KeyLowerDomainBound); + } + else { _autoDomainBounds = true; } - if (!dictionary.getValue(KeyUpperDomainBound, _upperDomainBound)) { + if (dictionary.hasKey(KeyUpperDomainBound)) { + _upperDomainBound = dictionary.value(KeyUpperDomainBound); + } + else { _autoDomainBounds = true; } } @@ -190,13 +196,13 @@ void KameleonVolumeToRawTask::perform(const Task::ProgressCallback& progressCall } outputMetadata.setValue(KeyTime, time); - outputMetadata.setValue(KeyDimensions, glm::vec3(_dimensions)); - outputMetadata.setValue(KeyLowerDomainBound, _lowerDomainBound); - outputMetadata.setValue(KeyUpperDomainBound, _upperDomainBound); + outputMetadata.setValue(KeyDimensions, glm::dvec3(_dimensions)); + outputMetadata.setValue(KeyLowerDomainBound, glm::dvec3(_lowerDomainBound)); + outputMetadata.setValue(KeyUpperDomainBound, glm::dvec3(_upperDomainBound)); - outputMetadata.setValue(KeyMinValue, static_cast(reader.minValue(_variable))); - outputMetadata.setValue(KeyMaxValue, static_cast(reader.maxValue(_variable))); - outputMetadata.setValue(KeyVisUnit, reader.getVisUnit(_variable)); + outputMetadata.setValue(KeyMinValue, reader.minValue(_variable)); + outputMetadata.setValue(KeyMaxValue, reader.maxValue(_variable)); + outputMetadata.setValue(KeyVisUnit, reader.getVisUnit(_variable)); std::string metadataString = ghoul::formatLua(outputMetadata); diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index abf4100fa9..583e5a3833 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -169,7 +169,7 @@ RenderableMultiresVolume::RenderableMultiresVolume(const ghoul::Dictionary& dict ) , _scaling(ScalingInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) { - if (dictionary.hasKeyAndValue(KeyDataSource)) { + if (dictionary.hasValue(KeyDataSource)) { _filename = absPath(dictionary.value(KeyDataSource)); } else { @@ -177,39 +177,39 @@ RenderableMultiresVolume::RenderableMultiresVolume(const ghoul::Dictionary& dict return; } - if (dictionary.hasKeyAndValue(KeyErrorHistogramsSource)) { + if (dictionary.hasValue(KeyErrorHistogramsSource)) { _errorHistogramsPath = absPath( dictionary.value(KeyErrorHistogramsSource) ); } - if (dictionary.hasKeyAndValue("ScalingExponent")) { + if (dictionary.hasValue("ScalingExponent")) { _scalingExponent = static_cast(dictionary.value("ScalingExponent")); } - if (dictionary.hasKeyAndValue("StepSizeCoefficient")) { + if (dictionary.hasValue("StepSizeCoefficient")) { _stepSizeCoefficient = static_cast( dictionary.value("StepSizeCoefficient") ); } - if (dictionary.hasKeyAndValue("Scaling")) { - _scaling = dictionary.value("Scaling"); + if (dictionary.hasValue("Scaling")) { + _scaling = dictionary.value("Scaling"); } - if (dictionary.hasKeyAndValue("Translation")) { - _translation = dictionary.value("Translation"); + if (dictionary.hasValue("Translation")) { + _translation = dictionary.value("Translation"); } - if (dictionary.hasKeyAndValue("Rotation")) { - _rotation = dictionary.value("Rotation"); + if (dictionary.hasValue("Rotation")) { + _rotation = dictionary.value("Rotation"); } - std::string startTimeString, endTimeString; - - bool hasTimeData = dictionary.getValue(KeyStartTime, startTimeString) && - dictionary.getValue(KeyEndTime, endTimeString); - if (hasTimeData) { + if (dictionary.hasValue(KeyStartTime) && + dictionary.hasValue(KeyEndTime)) + { + std::string startTimeString = dictionary.value(KeyStartTime); + std::string endTimeString = dictionary.value(KeyEndTime); _startTime = SpiceManager::ref().ephemerisTimeFromDate(startTimeString); _endTime = SpiceManager::ref().ephemerisTimeFromDate(endTimeString); _loop = false; @@ -219,7 +219,7 @@ RenderableMultiresVolume::RenderableMultiresVolume(const ghoul::Dictionary& dict LWARNING("Node does not provide time information. Viewing one image / frame"); } - if (dictionary.hasKeyAndValue(KeyTransferFunction)) { + if (dictionary.hasValue(KeyTransferFunction)) { _transferFunctionPath = absPath( dictionary.value(KeyTransferFunction) ); @@ -254,7 +254,7 @@ RenderableMultiresVolume::RenderableMultiresVolume(const ghoul::Dictionary& dict _tsp = std::make_shared(_filename); _atlasManager = std::make_shared(_tsp.get()); - if (dictionary.hasKeyAndValue(KeyBrickSelector)) { + if (dictionary.hasValue(KeyBrickSelector)) { _selectorName = dictionary.value(KeyBrickSelector); } diff --git a/modules/server/servermodule.cpp b/modules/server/servermodule.cpp index a7a3df6ae3..17f8950aa9 100644 --- a/modules/server/servermodule.cpp +++ b/modules/server/servermodule.cpp @@ -84,7 +84,7 @@ void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) { } ghoul::Dictionary interfaces = configuration.value(KeyInterfaces); - for (const std::string& key : interfaces.keys()) { + for (std::string_view key : interfaces.keys()) { ghoul::Dictionary interfaceDictionary = interfaces.value(key); // @TODO (abock, 2019-09-17); This is a hack to make the parsing of the diff --git a/modules/server/src/jsonconverters.cpp b/modules/server/src/jsonconverters.cpp index 84ede19de5..b258832c2f 100644 --- a/modules/server/src/jsonconverters.cpp +++ b/modules/server/src/jsonconverters.cpp @@ -72,20 +72,9 @@ namespace ghoul { void to_json(json& j, const Dictionary& dictionary) { json object; - for (const std::string& key : dictionary.keys()) { - if (dictionary.hasValue(key)) { - const glm::vec4 v = dictionary.value(key); - object[key] = json::array({ v[0], v[1], v[2], v[3] }); - } - else if (dictionary.hasValue(key)) { - const glm::vec3 v = dictionary.value(key); - object[key] = json::array({ v[0], v[1], v[2] }); - } - else if (dictionary.hasValue(key)) { - const glm::vec2 v = dictionary.value(key); - object[key] = json::array({ v[0], v[1] }); - } - else if (dictionary.hasValue(key)) { + for (std::string_view k : dictionary.keys()) { + std::string key = std::string(k); + if (dictionary.hasValue(key)) { const glm::dvec4 v = dictionary.value(key); object[key] = json::array({ v[0], v[1], v[2], v[3] }); } @@ -97,18 +86,12 @@ void to_json(json& j, const Dictionary& dictionary) { const glm::dvec2 v = dictionary.value(key); object[key] = json::array({ v[0], v[1] }); } - else if (dictionary.hasValue(key)) { - object[key] = dictionary.value(key); - } else if (dictionary.hasValue(key)) { object[key] = dictionary.value(key); } else if (dictionary.hasValue(key)) { object[key] = dictionary.value(key); } - else if (dictionary.hasValue(key)) { - object[key] = dictionary.value(key); - } else if (dictionary.hasValue(key)) { object[key] = dictionary.value(key); } diff --git a/modules/server/src/serverinterface.cpp b/modules/server/src/serverinterface.cpp index d5f8ca6517..4b8136474e 100644 --- a/modules/server/src/serverinterface.cpp +++ b/modules/server/src/serverinterface.cpp @@ -137,7 +137,7 @@ ServerInterface::ServerInterface(const ghoul::Dictionary& config) if (config.hasValue(key)) { const ghoul::Dictionary& dict = config.value(key); std::vector v; - for (const std::string& k : dict.keys()) { + for (std::string_view k : dict.keys()) { v.push_back(dict.value(k)); } list.set(v); diff --git a/modules/space/rendering/renderableorbitalkepler.cpp b/modules/space/rendering/renderableorbitalkepler.cpp index 5c2ef5427f..8c4a12b238 100644 --- a/modules/space/rendering/renderableorbitalkepler.cpp +++ b/modules/space/rendering/renderableorbitalkepler.cpp @@ -378,27 +378,32 @@ RenderableOrbitalKepler::RenderableOrbitalKepler(const ghoul::Dictionary& dict) _path = dict.value(PathInfo.identifier); _segmentQuality = static_cast(dict.value(SegmentQualityInfo.identifier)); - if (dict.hasKeyAndValue(LineColorInfo.identifier)) { - _appearance.lineColor = dict.value(LineColorInfo.identifier); + if (dict.hasValue(LineColorInfo.identifier)) { + _appearance.lineColor = dict.value(LineColorInfo.identifier); } - _appearance.lineFade = dict.hasKeyAndValue(TrailFadeInfo.identifier) ? + _appearance.lineFade = + dict.hasValue(TrailFadeInfo.identifier) ? static_cast(dict.value(TrailFadeInfo.identifier)) : 20.f; - _upperLimit = dict.hasKeyAndValue(UpperLimitInfo.identifier) ? + _upperLimit = + dict.hasValue(UpperLimitInfo.identifier) ? static_cast(dict.value(UpperLimitInfo.identifier)) : 0u; - _startRenderIdx = dict.hasKeyAndValue(StartRenderIdxInfo.identifier) ? + _startRenderIdx = + dict.hasValue(StartRenderIdxInfo.identifier) ? static_cast(dict.value(StartRenderIdxInfo.identifier)) : 0u; - _sizeRender = dict.hasKeyAndValue(RenderSizeInfo.identifier) ? + _sizeRender = + dict.hasValue(RenderSizeInfo.identifier) ? static_cast(dict.value(RenderSizeInfo.identifier)) : 0u; - _appearance.lineWidth = dict.hasKeyAndValue(LineWidthInfo.identifier) ? + _appearance.lineWidth = + dict.hasValue(LineWidthInfo.identifier) ? static_cast(dict.value(LineWidthInfo.identifier)) : 2.f; @@ -418,12 +423,13 @@ RenderableOrbitalKepler::RenderableOrbitalKepler(const ghoul::Dictionary& dict) _startRenderIdxCallbackHandle = _startRenderIdx.onChange(_updateStartRenderIdxSelect); _sizeRenderCallbackHandle = _sizeRender.onChange(_updateRenderSizeSelect); - if (dict.hasKeyAndValue(RenderBinModeInfo.identifier)) { - openspace::Renderable::RenderBin cfgRenderBin = RenderBinConversion.at( + if (dict.hasValue(RenderBinModeInfo.identifier)) { + Renderable::RenderBin cfgRenderBin = RenderBinConversion.at( dict.value(RenderBinModeInfo.identifier) ); setRenderBin(cfgRenderBin); - } else { + } + else { setRenderBin(Renderable::RenderBin::PostDeferredTransparent); } } diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index ac786e9b82..bbd4550381 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -152,8 +152,8 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) _texturePath = absPath(dictionary.value(TextureInfo.identifier)); _textureFile = std::make_unique(_texturePath); - if (dictionary.hasKeyAndValue(OffsetInfo.identifier)) { - _offset = dictionary.value(OffsetInfo.identifier); + if (dictionary.hasValue(OffsetInfo.identifier)) { + _offset = dictionary.value(OffsetInfo.identifier); } addProperty(_offset); @@ -162,14 +162,14 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) _textureFile->setCallback([&](const File&) { _textureIsDirty = true; }); - if (dictionary.hasKeyAndValue(NightFactorInfo.identifier)) { + if (dictionary.hasValue(NightFactorInfo.identifier)) { _nightFactor = static_cast( dictionary.value(NightFactorInfo.identifier) ); } addProperty(_nightFactor); - if (dictionary.hasKeyAndValue(ColorFilterInfo.identifier)) { + if (dictionary.hasValue(ColorFilterInfo.identifier)) { _colorFilter = static_cast( dictionary.value(ColorFilterInfo.identifier) ); diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 075f180901..0812c5f1bc 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -694,7 +694,7 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) addPropertySubOwner(_moffatMethodOwner); if (dictionary.hasKey(FadeInDistancesInfo.identifier)) { - glm::vec2 v = dictionary.value(FadeInDistancesInfo.identifier); + glm::vec2 v = dictionary.value(FadeInDistancesInfo.identifier); _fadeInDistance = v; _disableFadeInDistance = false; addProperty(_fadeInDistance); diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 36a15ab76e..bcc496971d 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -78,14 +78,14 @@ SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) "SimpleSphereGeometry" ); - if (dictionary.hasKeyAndValue(RadiusInfo.identifier)) { + if (dictionary.hasValue(RadiusInfo.identifier)) { const float r = static_cast( dictionary.value(RadiusInfo.identifier) ); _radius = { r, r, r }; } else { - _radius = dictionary.value(RadiusInfo.identifier); + _radius = dictionary.value(RadiusInfo.identifier); } _segments = static_cast(dictionary.value(SegmentsInfo.identifier)); diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index 07004cbf7e..aa18aeff12 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -110,13 +110,13 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) _sourceFrame = dictionary.value(SourceInfo.identifier); _destinationFrame = dictionary.value(DestinationInfo.identifier); - if (dictionary.hasKeyAndValue(KeyKernels)) { + if (dictionary.hasValue(KeyKernels)) { SpiceManager::ref().loadKernel(dictionary.value(KeyKernels)); } - else if (dictionary.hasKeyAndValue(KeyKernels)) { + else if (dictionary.hasValue(KeyKernels)) { ghoul::Dictionary kernels = dictionary.value(KeyKernels); for (size_t i = 1; i <= kernels.size(); ++i) { - if (!kernels.hasKeyAndValue(std::to_string(i))) { + if (!kernels.hasValue(std::to_string(i))) { throw ghoul::RuntimeError("Kernels has to be an array-style table"); } @@ -126,8 +126,8 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(TimeFrameInfo.identifier)) { - ghoul::Dictionary timeFrameDictionary; - dictionary.getValue(TimeFrameInfo.identifier, timeFrameDictionary); + ghoul::Dictionary timeFrameDictionary = + dictionary.value(TimeFrameInfo.identifier); _timeFrame = TimeFrame::createFromDictionary(timeFrameDictionary); if (_timeFrame == nullptr) { throw ghoul::RuntimeError("Invalid dictionary for TimeFrame."); diff --git a/modules/space/spacemodule.cpp b/modules/space/spacemodule.cpp index e720068f87..154e409721 100644 --- a/modules/space/spacemodule.cpp +++ b/modules/space/spacemodule.cpp @@ -107,7 +107,7 @@ void SpaceModule::internalInitialize(const ghoul::Dictionary& dictionary) { ghoul_assert(fGeometry, "Planet geometry factory was not created"); fGeometry->registerClass("SimpleSphere"); - if (dictionary.hasKeyAndValue(SpiceExceptionInfo.identifier)) { + if (dictionary.hasValue(SpiceExceptionInfo.identifier)) { _showSpiceExceptions = dictionary.value(SpiceExceptionInfo.identifier); } } diff --git a/modules/space/translation/tletranslation.cpp b/modules/space/translation/tletranslation.cpp index add42596de..26d8b3b5fa 100644 --- a/modules/space/translation/tletranslation.cpp +++ b/modules/space/translation/tletranslation.cpp @@ -253,7 +253,7 @@ TLETranslation::TLETranslation(const ghoul::Dictionary& dictionary) { const std::string& file = dictionary.value(KeyFile); int lineNum = 1; - if (dictionary.hasKeyAndValue(KeyLineNumber)) { + if (dictionary.hasValue(KeyLineNumber)) { lineNum = static_cast(dictionary.value(KeyLineNumber)); } readTLEFile(file, lineNum); diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp index 425538476a..4a2da16dd6 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp @@ -119,11 +119,11 @@ RenderableCrawlingLine::RenderableCrawlingLine(const ghoul::Dictionary& dictiona _target = dictionary.value(KeyTarget); _instrumentName = dictionary.value(KeyInstrument); - _lineColorBegin = dictionary.value( + _lineColorBegin = dictionary.value( std::string(KeyColor) + "." + KeyColorStart ); - _lineColorEnd = dictionary.value( + _lineColorEnd = dictionary.value( std::string(KeyColor) + "." + KeyColorEnd ); } diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index 12b7986138..37afa313b8 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -314,7 +314,7 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) ); std::string ia = std::string(KeyInstrument) + "." + KeyInstrumentAberration; - if (dictionary.hasKeyAndValue(ia)) { + if (dictionary.hasValue(ia)) { const std::string& ac = dictionary.value(ia); _instrument.aberrationCorrection = SpiceManager::AberrationCorrection(ac); } @@ -328,9 +328,9 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(KeyFrameConversions)) { ghoul::Dictionary fc = dictionary.value(KeyFrameConversions); - for (const std::string& key : fc.keys()) { + for (std::string_view key : fc.keys()) { global::moduleEngine->module()->addFrame( - key, + std::string(key), fc.value(key) ); } diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 25b3a38e60..7cdfd267bd 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -137,11 +137,13 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di dictionary.value(keyProjection) ); - float boundingSphereRadius = 1.0e9; - dictionary.getValue(keyBoundingSphereRadius, boundingSphereRadius); + double boundingSphereRadius = 1.0e9; + if (dictionary.hasValue(keyBoundingSphereRadius)) { + boundingSphereRadius = dictionary.value(keyBoundingSphereRadius); + } setBoundingSphere(boundingSphereRadius); - if (dictionary.hasKeyAndValue(PerformShadingInfo.identifier)) { + if (dictionary.hasValue(PerformShadingInfo.identifier)) { _performShading = dictionary.value(PerformShadingInfo.identifier); } @@ -197,7 +199,7 @@ void RenderableModelProjection::initializeGL() { _projectionComponent.initializeGL(); - float bs = boundingSphere(); + double bs = boundingSphere(); _geometry->initialize(this); setBoundingSphere(bs); // ignore bounding sphere set by geometry. } @@ -436,7 +438,7 @@ void RenderableModelProjection::attitudeParameters(double time) { const glm::vec3 cpos = p * 10000.0; const float distance = glm::length(cpos); - const float radius = boundingSphere(); + const double radius = boundingSphere(); _projectorMatrix = _projectionComponent.computeProjectorMatrix( cpos, @@ -445,8 +447,8 @@ void RenderableModelProjection::attitudeParameters(double time) { _instrumentMatrix, _projectionComponent.fieldOfViewY(), _projectionComponent.aspectRatio(), - distance - radius, - distance + radius, + static_cast(distance - radius), + static_cast(distance + radius), _boresight ); } diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp index 29e1768614..52113eacec 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp @@ -54,17 +54,26 @@ namespace { namespace openspace { -RenderablePlaneProjection::RenderablePlaneProjection(const ghoul::Dictionary& dictionary) - : Renderable(dictionary) +RenderablePlaneProjection::RenderablePlaneProjection(const ghoul::Dictionary& dict) + : Renderable(dict) { - dictionary.getValue(KeySpacecraft, _spacecraft); - dictionary.getValue(KeyInstrument, _instrument); - dictionary.getValue(KeyMoving, _moving); - dictionary.getValue(KeyName, _name); - dictionary.getValue(KeyTarget, _defaultTarget); - - if (dictionary.hasKeyAndValue(KeyTexture)) { - _texturePath = dictionary.value(KeyTexture); + if (dict.hasValue(KeySpacecraft)) { + _spacecraft = dict.value(KeySpacecraft); + } + if (dict.hasValue(KeyInstrument)) { + _instrument = dict.value(KeyInstrument); + } + if (dict.hasValue(KeyMoving)) { + _moving = dict.value(KeyMoving); + } + if (dict.hasValue(KeyName)) { + _name = dict.value(KeyName); + } + if (dict.hasValue(KeyTarget)) { + _defaultTarget = dict.value(KeyTarget); + } + if (dict.hasValue(KeyTexture)) { + _texturePath = dict.value(KeyTexture); _texturePath = absPath(_texturePath); _textureFile = std::make_unique(_texturePath); } diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp index e7adc0985c..ac0620fba6 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp @@ -234,7 +234,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& _colorTexturePaths.onChange([this](){ _colorTextureDirty = true; }); addProperty(_colorTexturePaths); - if (dict.hasKeyAndValue(ColorTexturePathsInfo.identifier)) { + if (dict.hasValue(ColorTexturePathsInfo.identifier)) { const ghoul::Dictionary& value = dict.value( ColorTexturePathsInfo.identifier ); @@ -278,7 +278,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& addProperty(_heightMapTexturePaths); - if (dict.hasKeyAndValue(HeightTexturePathsInfo.identifier)) { + if (dict.hasValue(HeightTexturePathsInfo.identifier)) { const ghoul::Dictionary& value = dict.value( HeightTexturePathsInfo.identifier ); @@ -315,12 +315,14 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& addProperty(_addHeightMapTexturePath); - if (dict.hasKeyAndValue(MeridianShiftInfo.identifier)) { + if (dict.hasValue(MeridianShiftInfo.identifier)) { _meridianShift = dict.value(MeridianShiftInfo.identifier); } - float radius = std::pow(10.f, 9.f); - dict.getValue(KeyRadius, radius); + double radius = std::pow(10.0, 9.0); + if (dict.hasValue(KeyRadius)) { + radius = dict.value(KeyRadius); + } setBoundingSphere(radius); addPropertySubOwner(_geometry.get()); diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp index 76e3159a78..e04067c67d 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp @@ -226,7 +226,7 @@ RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dict if (dictionary.hasKey(ShadowColorInfo.identifier)) { - _shadowColor = dictionary.value(ShadowLengthInfo.identifier); + _shadowColor = dictionary.value(ShadowLengthInfo.identifier); } _shadowColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_shadowColor); diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index d665bd7252..efec287d3b 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -73,28 +73,36 @@ HongKangParser::HongKangParser(std::string name, std::string fileName, , _potentialTargets(std::move(potentialTargets)) { //get the different instrument types - const std::vector& decoders = translationDictionary.keys(); //for each decoder (assuming might have more if hong makes changes) - for (const std::string& decoderType : decoders) { + for (std::string_view decoderType : translationDictionary.keys()) { //create dictionary containing all {playbookKeys , spice IDs} if (decoderType == "Instrument") { - ghoul::Dictionary typeDictionary; - translationDictionary.getValue(decoderType, typeDictionary); + if (!translationDictionary.hasKey(decoderType) || + !translationDictionary.hasValue(decoderType)) + { + continue; + } + + ghoul::Dictionary typeDictionary = + translationDictionary.value(decoderType); // for each playbook call -> create a Decoder object - const std::vector& keys = typeDictionary.keys(); - for (const std::string& key : keys) { - const std::string& currentKey = decoderType + "." + key; + for (std::string_view key : typeDictionary.keys()) { + const std::string& currentKey = fmt::format("{}.{}", decoderType, key); ghoul::Dictionary decoderDictionary; - translationDictionary.getValue(currentKey, decoderDictionary); + if (translationDictionary.hasValue(currentKey)) { + decoderDictionary = translationDictionary.value( + currentKey + ); + } std::unique_ptr decoder = Decoder::createFromDictionary( decoderDictionary, - decoderType + std::string(decoderType) ); //insert decoder to map - this will be used in the parser to determine //behavioral characteristics of each instrument - _fileTranslation[key] = std::move(decoder); + _fileTranslation[std::string(key)] = std::move(decoder); } } //Hong's playbook needs _only_ instrument translation though. diff --git a/modules/spacecraftinstruments/util/instrumentdecoder.cpp b/modules/spacecraftinstruments/util/instrumentdecoder.cpp index a5b04f79ba..9d2a73d3cf 100644 --- a/modules/spacecraftinstruments/util/instrumentdecoder.cpp +++ b/modules/spacecraftinstruments/util/instrumentdecoder.cpp @@ -38,7 +38,7 @@ namespace { namespace openspace { InstrumentDecoder::InstrumentDecoder(const ghoul::Dictionary& dictionary) { - if (dictionary.hasKeyAndValue(KeyDetector)) { + if (dictionary.hasValue(KeyDetector)) { _type = dictionary.value(KeyDetector); std::for_each( _type.begin(), @@ -51,14 +51,14 @@ InstrumentDecoder::InstrumentDecoder(const ghoul::Dictionary& dictionary) { throw ghoul::RuntimeError("Instrument has not provided detector type"); } - if (dictionary.hasKeyAndValue(KeyStopCommand) && _type == "SCANNER"){ - dictionary.getValue(KeyStopCommand, _stopCommand); + if (dictionary.hasValue(KeyStopCommand) && _type == "SCANNER") { + _stopCommand = dictionary.value(KeyStopCommand); } else { LWARNING("Scanner must provide stop command, please check mod file."); } - if (dictionary.hasKeyAndValue(KeySpice)) { + if (dictionary.hasValue(KeySpice)) { ghoul::Dictionary spiceDictionary = dictionary.value(KeySpice); _spiceIDs.resize(spiceDictionary.size()); diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp index 0aad439d9d..29bbf20d43 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp @@ -54,13 +54,14 @@ InstrumentTimesParser::InstrumentTimesParser(std::string name, std::string seque _target = inputDict.value(KeyTargetBody); ghoul::Dictionary instruments = inputDict.value(KeyInstruments); - for (const std::string& key : instruments.keys()) { + for (std::string_view key : instruments.keys()) { ghoul::Dictionary instrument = instruments.value(key); ghoul::Dictionary files = instrument.value(KeyInstrumentFiles); - _fileTranslation[key] = Decoder::createFromDictionary(instrument, KeyInstrument); + _fileTranslation[std::string(key)] = + Decoder::createFromDictionary(instrument, KeyInstrument); for (size_t i = 0; i < files.size(); i++) { std::string filename = files.value(std::to_string(i + 1)); - _instrumentFiles[key].push_back(std::move(filename)); + _instrumentFiles[std::string(key)].push_back(std::move(filename)); } } } diff --git a/modules/spacecraftinstruments/util/labelparser.cpp b/modules/spacecraftinstruments/util/labelparser.cpp index 27159934e0..a242b69427 100644 --- a/modules/spacecraftinstruments/util/labelparser.cpp +++ b/modules/spacecraftinstruments/util/labelparser.cpp @@ -43,60 +43,73 @@ namespace { namespace openspace { LabelParser::LabelParser(std::string name, std::string fileName, - const ghoul::Dictionary& translationDictionary) + const ghoul::Dictionary& dictionary) : _name(std::move(name)) , _fileName(std::move(fileName)) { // get the different instrument types - const std::vector& decoders = translationDictionary.keys(); // for each decoder (assuming might have more if hong makes changes) - for (const std::string& decoderStr : decoders) { - ghoul::Dictionary typeDictionary; - translationDictionary.getValue(decoderStr, typeDictionary); + for (std::string_view decoderStr : dictionary.keys()) { + if (!dictionary.hasValue(decoderStr)) { + continue; + } - //create dictionary containing all {playbookKeys , spice IDs} + ghoul::Dictionary typeDict = dictionary.value(decoderStr); + + // create dictionary containing all {playbookKeys , spice IDs} if (decoderStr == "Instrument") { // for each playbook call -> create a Decoder object - const std::vector& keys = typeDictionary.keys(); - for (const std::string& key : keys) { - std::string currentKey = decoderStr + "." + key; + for (std::string_view key : typeDict.keys()) { + std::string currentKey = fmt::format("{}.{}", decoderStr, key); - ghoul::Dictionary decoderDictionary = - translationDictionary.value(currentKey); + if (!dictionary.hasValue(currentKey)) { + continue; + } + ghoul::Dictionary decoderDict = + dictionary.value(currentKey); std::unique_ptr decoder = Decoder::createFromDictionary( - decoderDictionary, - decoderStr + decoderDict, + std::string(decoderStr) ); // insert decoder to map - this will be used in the parser to determine // behavioral characteristics of each instrument - _fileTranslation[key] = std::move(decoder); + _fileTranslation[std::string(key)] = std::move(decoder); } } if (decoderStr == "Target") { - ghoul::Dictionary specsOfInterestDictionary; - typeDictionary.getValue(keySpecs, specsOfInterestDictionary); - - _specsOfInterest.resize(specsOfInterestDictionary.size()); - for (size_t n = 0; n < _specsOfInterest.size(); ++n) { - std::string readMe; - specsOfInterestDictionary.getValue(std::to_string(n + 1), readMe); - _specsOfInterest[n] = readMe; + if (!typeDict.hasValue(keySpecs) || + !typeDict.hasValue(keySpecs)) + { + continue; } - ghoul::Dictionary convertDictionary; - typeDictionary.getValue(keyConvert, convertDictionary); - const std::vector& keys = convertDictionary.keys(); - for (const std::string& key : keys) { - ghoul::Dictionary itemDictionary; - convertDictionary.getValue(key, itemDictionary); + ghoul::Dictionary specsOfInterestDict = + typeDict.value(keySpecs); + + _specsOfInterest.resize(specsOfInterestDict.size()); + for (size_t n = 0; n < _specsOfInterest.size(); ++n) { + std::string key = std::to_string(n + 1); + if (specsOfInterestDict.hasValue(key)) { + std::string readMe = specsOfInterestDict.value(key); + _specsOfInterest[n] = readMe; + } + } + ghoul::Dictionary convertDict = typeDict.value(keyConvert); + + for (std::string_view key : convertDict.keys()) { + if (!convertDict.hasValue(key)) { + continue; + } + + ghoul::Dictionary itemDict = convertDict.value(key); std::unique_ptr decoder = Decoder::createFromDictionary( - itemDictionary, - decoderStr + itemDict, + std::string(decoderStr) ); // insert decoder to map - this will be used in the parser to determine // behavioral characteristics of each instrument - _fileTranslation[key] = std::move(decoder); + _fileTranslation[std::string(key)] = std::move(decoder); }; } } diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index efc015676a..bee2586dfc 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -259,7 +259,7 @@ void ProjectionComponent::initialize(const std::string& identifier, dictionary.value(keyProjAberration) ); - if (dictionary.hasKeyAndValue(keyPotentialTargets)) { + if (dictionary.hasValue(keyPotentialTargets)) { const ghoul::Dictionary& potentialTargets = dictionary.value( keyPotentialTargets ); @@ -272,15 +272,15 @@ void ProjectionComponent::initialize(const std::string& identifier, } } - if (dictionary.hasKeyAndValue(keyNeedsTextureMapDilation)) { + if (dictionary.hasValue(keyNeedsTextureMapDilation)) { _dilation.isEnabled = dictionary.value(keyNeedsTextureMapDilation); } - if (dictionary.hasKeyAndValue(keyNeedsShadowing)) { + if (dictionary.hasValue(keyNeedsShadowing)) { _shadowing.isEnabled = dictionary.value(keyNeedsShadowing); } - if (dictionary.hasKeyAndValue(keyTextureMapAspectRatio)) { + if (dictionary.hasValue(keyTextureMapAspectRatio)) { _projectionTextureAspectRatio = static_cast(dictionary.value(keyTextureMapAspectRatio)); } @@ -307,14 +307,16 @@ void ProjectionComponent::initialize(const std::string& identifier, } const std::string& sequenceType = dictionary.value(keySequenceType); - //Important: client must define translation-list in mod file IFF playbook + // Important: client must define translation-list in mod file IFF playbook if (!dictionary.hasKey(keyTranslation)) { LWARNING("No playbook translation provided, spice calls must match playbook!"); return; } ghoul::Dictionary translationDictionary; - dictionary.getValue(keyTranslation, translationDictionary); + if (dictionary.hasValue(keyTranslation)) { + translationDictionary = dictionary.value(keyTranslation); + } std::vector> parsers; for (std::string& sequenceSource : sequenceSources) { @@ -386,14 +388,17 @@ void ProjectionComponent::initialize(const std::string& identifier, dictionary.value(keyTimesSequenceDir) ); ghoul::Dictionary timesTranslationDictionary; - dictionary.getValue(keyTimesTranslation, timesTranslationDictionary); + if (dictionary.hasValue(keyTimesTranslation)) { + timesTranslationDictionary = + dictionary.value(keyTimesTranslation); + } parsers.push_back( std::make_unique( identifier, std::move(timesSequenceSource), timesTranslationDictionary - ) + ) ); } } diff --git a/modules/spacecraftinstruments/util/targetdecoder.cpp b/modules/spacecraftinstruments/util/targetdecoder.cpp index 6787d2f75d..3786e50273 100644 --- a/modules/spacecraftinstruments/util/targetdecoder.cpp +++ b/modules/spacecraftinstruments/util/targetdecoder.cpp @@ -31,9 +31,11 @@ namespace openspace { TargetDecoder::TargetDecoder(const ghoul::Dictionary& dictionary) : _type("TARGET") { _names.resize(dictionary.size()); for (size_t i = 0; i < _names.size(); ++i) { - std::string readMe; - dictionary.getValue(std::to_string(i + 1), readMe); - _names[i] = readMe; + std::string key = std::to_string(i + 1); + if (dictionary.hasKey(key) && dictionary.hasValue(key)) { + std::string readMe = dictionary.value(key); + _names[i] = readMe; + } } } diff --git a/modules/spout/screenspacespout.cpp b/modules/spout/screenspacespout.cpp index db1cec61b1..27c1b7be10 100644 --- a/modules/spout/screenspacespout.cpp +++ b/modules/spout/screenspacespout.cpp @@ -94,7 +94,7 @@ ScreenSpaceSpout::ScreenSpaceSpout(const ghoul::Dictionary& dictionary) ); std::string identifier; - if (dictionary.hasKeyAndValue(KeyIdentifier)) { + if (dictionary.hasValue(KeyIdentifier)) { identifier = dictionary.value(KeyIdentifier); } else { diff --git a/modules/sync/syncmodule.cpp b/modules/sync/syncmodule.cpp index 1d36c420c2..2eff3324c4 100644 --- a/modules/sync/syncmodule.cpp +++ b/modules/sync/syncmodule.cpp @@ -56,7 +56,7 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) { KeyHttpSynchronizationRepositories ); - for (const std::string& key : dictionary.keys()) { + for (std::string_view key : dictionary.keys()) { _synchronizationRepositories.push_back(dictionary.value(key)); } } diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index d7b3e61348..4057b33b5e 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -162,7 +162,7 @@ UrlSynchronization::UrlSynchronization(const ghoul::Dictionary& dict, } } - if (dict.hasKeyAndValue(KeyOverride)) { + if (dict.hasValue(KeyOverride)) { _forceOverride = dict.value(KeyOverride); } } diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index be0ce3d6b4..3ad1bfde2b 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -95,47 +95,46 @@ RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) , _color(ColorInfo, glm::vec3(1.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(1.f)) , _downScaleVolumeRendering(DownscaleVolumeRenderingInfo, 1.f, 0.1f, 1.f) { - if (dictionary.hasKeyAndValue(ScalingExponentInfo.identifier)) { + if (dictionary.hasValue(ScalingExponentInfo.identifier)) { _scalingExponent = static_cast( dictionary.value(ScalingExponentInfo.identifier) ); } - if (dictionary.hasKeyAndValue(SizeInfo.identifier)) { - _size = dictionary.value(SizeInfo.identifier); + if (dictionary.hasValue(SizeInfo.identifier)) { + _size = dictionary.value(SizeInfo.identifier); } - if (dictionary.hasKeyAndValue(TranslationInfo.identifier)) { - _translation = dictionary.value(TranslationInfo.identifier); + if (dictionary.hasValue(TranslationInfo.identifier)) { + _translation = dictionary.value(TranslationInfo.identifier); } - if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { - _rotation = dictionary.value(RotationInfo.identifier); + if (dictionary.hasValue(RotationInfo.identifier)) { + _rotation = dictionary.value(RotationInfo.identifier); } - if (dictionary.hasKeyAndValue(ColorInfo.identifier)) { - _color = dictionary.value(ColorInfo.identifier); + if (dictionary.hasValue(ColorInfo.identifier)) { + _color = dictionary.value(ColorInfo.identifier); } - if (dictionary.hasKeyAndValue(StepSizeInfo.identifier)) { + if (dictionary.hasValue(StepSizeInfo.identifier)) { _stepSize = static_cast(dictionary.value(StepSizeInfo.identifier)); } - _downScaleVolumeRendering.setVisibility( - openspace::properties::Property::Visibility::Developer - ); + _downScaleVolumeRendering.setVisibility(properties::Property::Visibility::Developer); if (dictionary.hasKey("Downscale")) { - _downScaleVolumeRendering = dictionary.value("Downscale"); + _downScaleVolumeRendering = static_cast( + dictionary.value("Downscale") + ); } if (dictionary.hasKey("Steps")) { - _rayCastSteps = static_cast(dictionary.value("Steps")); + _rayCastSteps = static_cast(dictionary.value("Steps")); } else { LINFO("Number of raycasting steps not specified for ToyVolume." " Using default value."); } - } RenderableToyVolume::~RenderableToyVolume() {} diff --git a/modules/volume/rawvolumemetadata.cpp b/modules/volume/rawvolumemetadata.cpp index 10a956a6f1..fc287fefbc 100644 --- a/modules/volume/rawvolumemetadata.cpp +++ b/modules/volume/rawvolumemetadata.cpp @@ -56,28 +56,30 @@ RawVolumeMetadata RawVolumeMetadata::createFromDictionary( ); RawVolumeMetadata metadata; - metadata.dimensions = dictionary.value(KeyDimensions); + metadata.dimensions = dictionary.value(KeyDimensions); - metadata.hasDomainBounds = dictionary.hasValue(KeyLowerDomainBound) && - dictionary.hasValue(KeyUpperDomainBound); + metadata.hasDomainBounds = dictionary.hasValue(KeyLowerDomainBound) && + dictionary.hasValue(KeyUpperDomainBound); if (metadata.hasDomainBounds) { - metadata.lowerDomainBound = dictionary.value(KeyLowerDomainBound); - metadata.upperDomainBound = dictionary.value(KeyUpperDomainBound); + metadata.lowerDomainBound = dictionary.value(KeyLowerDomainBound); + metadata.upperDomainBound = dictionary.value(KeyUpperDomainBound); } - metadata.hasDomainUnit = dictionary.hasValue(KeyDomainUnit); + metadata.hasDomainUnit = static_cast( + dictionary.hasValue(KeyDomainUnit) + ); if (metadata.hasDomainUnit) { metadata.domainUnit = dictionary.value(KeyDomainUnit); } - metadata.hasValueRange = dictionary.hasValue(KeyMinValue) && - dictionary.hasValue(KeyMaxValue); + metadata.hasValueRange = dictionary.hasValue(KeyMinValue) && + dictionary.hasValue(KeyMaxValue); if (metadata.hasValueRange) { - metadata.minValue = dictionary.value(KeyMinValue); - metadata.maxValue = dictionary.value(KeyMaxValue); + metadata.minValue = static_cast(dictionary.value(KeyMinValue)); + metadata.maxValue = static_cast(dictionary.value(KeyMaxValue)); } - metadata.hasValueUnit = dictionary.hasValue(KeyValueUnit); + metadata.hasValueUnit = static_cast(dictionary.hasValue(KeyValueUnit)); if (metadata.hasValueUnit) { metadata.valueUnit = dictionary.value(KeyValueUnit); } @@ -93,23 +95,23 @@ RawVolumeMetadata RawVolumeMetadata::createFromDictionary( ghoul::Dictionary RawVolumeMetadata::dictionary() { ghoul::Dictionary dict; - dict.setValue(KeyDimensions, dimensions); - dict.setValue(KeyGridType, gridTypeToString(gridType)); + dict.setValue(KeyDimensions, glm::dvec3(dimensions)); + dict.setValue(KeyGridType, gridTypeToString(gridType)); if (hasDomainUnit) { - dict.setValue(KeyDomainUnit, domainUnit); + dict.setValue(KeyDomainUnit, domainUnit); } if (hasDomainBounds) { - dict.setValue(KeyLowerDomainBound, lowerDomainBound); - dict.setValue(KeyUpperDomainBound, upperDomainBound); + dict.setValue(KeyLowerDomainBound, glm::dvec3(lowerDomainBound)); + dict.setValue(KeyUpperDomainBound, glm::dvec3(upperDomainBound)); } if (hasValueRange) { - dict.setValue(KeyMinValue, minValue); - dict.setValue(KeyMaxValue, maxValue); + dict.setValue(KeyMinValue, static_cast(minValue)); + dict.setValue(KeyMaxValue, static_cast(maxValue)); } if (hasDomainUnit) { - dict.setValue(KeyValueUnit, valueUnit); + dict.setValue(KeyValueUnit, valueUnit); } if (hasTime) { @@ -118,7 +120,7 @@ ghoul::Dictionary RawVolumeMetadata::dictionary() { if (timeString.back() == 'Z') { timeString = timeString.substr(0, timeString.size() - 1); } - dict.setValue(KeyTime, std::string(timeString)); + dict.setValue(KeyTime, std::string(timeString)); } return dict; } @@ -131,7 +133,7 @@ documentation::Documentation RawVolumeMetadata::Documentation() { { { KeyDimensions, - new Vector3Verifier, + new DoubleVector3Verifier, Optional::No, "Specifies the number of grid cells in each dimension", }, @@ -143,13 +145,13 @@ documentation::Documentation RawVolumeMetadata::Documentation() { }, { KeyLowerDomainBound, - new Vector3Verifier, + new DoubleVector3Verifier, Optional::Yes, "Specifies the lower domain bounds in the model coordinate system", }, { KeyUpperDomainBound, - new Vector3Verifier, + new DoubleVector3Verifier, Optional::Yes, "Specifies the upper domain bounds in the model coordinate system", }, diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index 970b755900..f21734682f 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -203,22 +203,24 @@ RenderableTimeVaryingVolume::RenderableTimeVaryingVolume( }); _gridType = static_cast(volume::VolumeGridType::Cartesian); - if (dictionary.hasKeyAndValue(KeyStepSize)) { - _stepSize = dictionary.value(KeyStepSize); + if (dictionary.hasValue(KeyStepSize)) { + _stepSize = static_cast(dictionary.value(KeyStepSize)); } - if (dictionary.hasKeyAndValue(KeySecondsBefore)) { - _secondsBefore = dictionary.value(KeySecondsBefore); + if (dictionary.hasValue(KeySecondsBefore)) { + _secondsBefore = static_cast(dictionary.value(KeySecondsBefore)); } - _secondsAfter = dictionary.value(KeySecondsAfter); + _secondsAfter = static_cast(dictionary.value(KeySecondsAfter)); ghoul::Dictionary clipPlanesDictionary; - dictionary.getValue(KeyClipPlanes, clipPlanesDictionary); + if (dictionary.hasValue(KeyClipPlanes)) { + clipPlanesDictionary.value(KeyClipPlanes); + } _clipPlanes = std::make_shared(clipPlanesDictionary); _clipPlanes->setIdentifier("clipPlanes"); _clipPlanes->setGuiName("Clip Planes"); - if (dictionary.hasKeyAndValue(KeyGridType)) { + if (dictionary.hasValue(KeyGridType)) { VolumeGridType gridType = volume::parseGridType( dictionary.value(KeyGridType) ); diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 11f5f613fc..910955c2b6 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -43,8 +43,8 @@ VolumeClipPlane::VolumeClipPlane(const ghoul::Dictionary& dictionary) glm::vec2(2.f, 1.f) ) { - _normal = dictionary.value("Normal"); - _offsets = dictionary.value("Offsets"); + _normal = dictionary.value("Normal"); + _offsets = dictionary.value("Offsets"); addProperty(_normal); addProperty(_offsets); diff --git a/modules/volume/rendering/volumeclipplanes.cpp b/modules/volume/rendering/volumeclipplanes.cpp index 89fb6eea6c..4e1f448ded 100644 --- a/modules/volume/rendering/volumeclipplanes.cpp +++ b/modules/volume/rendering/volumeclipplanes.cpp @@ -34,14 +34,13 @@ VolumeClipPlanes::VolumeClipPlanes(const ghoul::Dictionary& dictionary) // @TODO Missing documentation , _nClipPlanes({ "nClipPlanes", "Number of clip planes", "" }, 0, 0, 10) { - const std::vector& keys = dictionary.keys(); - for (const std::string& key : keys) { + for (std::string_view key : dictionary.keys()) { ghoul::Dictionary cutPlaneDictionary = dictionary.value(key); VolumeClipPlane clipPlane = VolumeClipPlane(cutPlaneDictionary); - clipPlane.setIdentifier(key); + clipPlane.setIdentifier(std::string(key)); _clipPlanes.push_back(std::move(clipPlane)); } - _nClipPlanes = static_cast(keys.size()); + _nClipPlanes = static_cast(dictionary.keys().size()); } void VolumeClipPlanes::initialize() { diff --git a/modules/volume/tasks/generaterawvolumetask.cpp b/modules/volume/tasks/generaterawvolumetask.cpp index d7ef4401be..d47b4514b5 100644 --- a/modules/volume/tasks/generaterawvolumetask.cpp +++ b/modules/volume/tasks/generaterawvolumetask.cpp @@ -61,11 +61,11 @@ GenerateRawVolumeTask::GenerateRawVolumeTask(const ghoul::Dictionary& dictionary _rawVolumeOutputPath = absPath(dictionary.value(KeyRawVolumeOutput)); _dictionaryOutputPath = absPath(dictionary.value(KeyDictionaryOutput)); - _dimensions = glm::uvec3(dictionary.value(KeyDimensions)); + _dimensions = glm::uvec3(dictionary.value(KeyDimensions)); _time = dictionary.value(KeyTime); _valueFunctionLua = dictionary.value(KeyValueFunction); - _lowerDomainBound = dictionary.value(KeyLowerDomainBound); - _upperDomainBound = dictionary.value(KeyUpperDomainBound); + _lowerDomainBound = dictionary.value(KeyLowerDomainBound); + _upperDomainBound = dictionary.value(KeyUpperDomainBound); } std::string GenerateRawVolumeTask::description() { diff --git a/modules/volume/transferfunction.cpp b/modules/volume/transferfunction.cpp index b45f9b04fb..7776d09634 100644 --- a/modules/volume/transferfunction.cpp +++ b/modules/volume/transferfunction.cpp @@ -109,18 +109,15 @@ void TransferFunction::loadEnvelopesFromFile(const std::string& path) { ghoul::Dictionary dictionary; ghoul::lua::loadDictionaryFromFile(path, dictionary, L); - const std::vector& tfKeys = dictionary.keys(); - for (const std::string& key : tfKeys) { + for (std::string_view key : dictionary.keys()) { ghoul::Dictionary tfDictionary = dictionary.value(key); - const std::vector& envelopeKeys = tfDictionary.keys(); - for (const std::string& envelopeKey : envelopeKeys) { + for (std::string_view envelopeKey : tfDictionary.keys()) { ghoul::Dictionary envelopeDictionary = tfDictionary.value(envelopeKey); - const std::vector& pointKeys = envelopeDictionary.keys(); Envelope env; std::vector tmpVec; - for (const std::string& pointKey : pointKeys) { + for (std::string_view pointKey : envelopeDictionary.keys()) { ghoul::Dictionary pointDictionary = envelopeDictionary.value(pointKey); @@ -128,9 +125,13 @@ void TransferFunction::loadEnvelopesFromFile(const std::string& path) { pointDictionary.value("position"); std::string color = pointDictionary.value("color"); - float posX = positionDictionary.value("x"); - float posY = positionDictionary.value("y"); - tmpVec.emplace_back(color, posX, posY); + double posX = positionDictionary.value("x"); + double posY = positionDictionary.value("y"); + tmpVec.emplace_back( + color, + static_cast(posX), + static_cast(posY) + ); } env.setPoints(tmpVec); _envelopes.emplace_back(env); diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index 6fb0d66494..e64ce4d65f 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -73,7 +73,7 @@ ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary &dictionary) { std::string identifier; - if (dictionary.hasKeyAndValue(KeyIdentifier)) { + if (dictionary.hasValue(KeyIdentifier)) { identifier = dictionary.value(KeyIdentifier); } else { @@ -82,7 +82,7 @@ ScreenSpaceBrowser::ScreenSpaceBrowser(const ghoul::Dictionary &dictionary) identifier = makeUniqueIdentifier(identifier); setIdentifier(identifier); - if (dictionary.hasKeyAndValue(UrlInfo.identifier)) { + if (dictionary.hasValue(UrlInfo.identifier)) { _url = dictionary.value(UrlInfo.identifier); } diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index ec43227d68..f1cd8e0256 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -129,14 +129,14 @@ std::string WebBrowserModule::findHelperExecutable() { void WebBrowserModule::internalInitialize(const ghoul::Dictionary& dictionary) { ZoneScoped - if (dictionary.hasKeyAndValue("WebHelperLocation")) { + if (dictionary.hasValue("WebHelperLocation")) { _webHelperLocation = absPath(dictionary.value("WebHelperLocation")); } else { _webHelperLocation = findHelperExecutable(); } - if (dictionary.hasKeyAndValue("Enabled")) { + if (dictionary.hasValue("Enabled")) { _enabled = dictionary.value("Enabled"); } diff --git a/screenshots b/screenshots new file mode 120000 index 0000000000..5086d070a4 --- /dev/null +++ b/screenshots @@ -0,0 +1 @@ +E:/screenshots \ No newline at end of file diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index b9cd12c220..9ec5ce4201 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -200,8 +200,8 @@ TestResult testSpecification(const Documentation& documentation, for (const auto& p : documentation.entries) { if (p.key == DocumentationEntry::Wildcard) { - for (const std::string& key : dictionary.keys()) { - applyVerifier(*(p.verifier), key); + for (std::string_view key : dictionary.keys()) { + applyVerifier(*(p.verifier), std::string(key)); } } else { diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index d1d1327ad9..255acab5ff 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -32,23 +32,23 @@ namespace openspace::documentation { // The explicit template instantiations for many of the commonly used template values // This cuts down on the compilation time by only compiling these once -template struct Vector2Verifier; +//template struct Vector2Verifier; template struct Vector2Verifier; template struct Vector2Verifier; -template struct Vector3Verifier; +//template struct Vector3Verifier; template struct Vector3Verifier; template struct Vector3Verifier; -template struct Vector4Verifier; +//template struct Vector4Verifier; template struct Vector4Verifier; template struct Vector4Verifier; -template struct Vector2ListVerifier; +//template struct Vector2ListVerifier; template struct Vector2ListVerifier; template struct Vector2ListVerifier; -template struct Vector3ListVerifier; +//template struct Vector3ListVerifier; template struct Vector3ListVerifier; template struct Vector3ListVerifier; -template struct Vector4ListVerifier; +//template struct Vector4ListVerifier; template struct Vector4ListVerifier; template struct Vector4ListVerifier; @@ -100,13 +100,13 @@ template struct AnnotationVerifier; template struct AnnotationVerifier; template struct AnnotationVerifier; template struct AnnotationVerifier; -template struct AnnotationVerifier; +//template struct AnnotationVerifier; template struct AnnotationVerifier; template struct AnnotationVerifier; -template struct AnnotationVerifier; +//template struct AnnotationVerifier; template struct AnnotationVerifier; template struct AnnotationVerifier; -template struct AnnotationVerifier; +//template struct AnnotationVerifier; template struct AnnotationVerifier; template struct AnnotationVerifier; @@ -115,13 +115,13 @@ template struct DeprecatedVerifier; template struct DeprecatedVerifier; template struct DeprecatedVerifier; template struct DeprecatedVerifier; -template struct DeprecatedVerifier; +//template struct DeprecatedVerifier; template struct DeprecatedVerifier; template struct DeprecatedVerifier; -template struct DeprecatedVerifier; +//template struct DeprecatedVerifier; template struct DeprecatedVerifier; template struct DeprecatedVerifier; -template struct DeprecatedVerifier; +//template struct DeprecatedVerifier; template struct DeprecatedVerifier; template struct DeprecatedVerifier; @@ -136,7 +136,7 @@ std::string DoubleVerifier::type() const { TestResult IntVerifier::operator()(const ghoul::Dictionary & dict, const std::string & key) const { - if (dict.hasKeyAndValue(key)) { + if (dict.hasValue(key)) { // We we have a key and the value is int, we are done return { true, {}, {} }; } @@ -184,7 +184,7 @@ TableVerifier::TableVerifier(std::vector documentationEntrie TestResult TableVerifier::operator()(const ghoul::Dictionary& dictionary, const std::string& key) const { - if (dictionary.hasKeyAndValue(key)) { + if (dictionary.hasValue(key)) { ghoul::Dictionary d = dictionary.value(key); TestResult res = testSpecification({documentations}, d); diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index e70a905d8f..1b21d963a4 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -154,10 +154,11 @@ namespace { ghoul::Dictionary d = ghoul::lua::value(L); std::map res; + std::vector keys = d.keys(); for (size_t i = 0; i < d.size(); ++i) { - std::string key = d.keys()[i]; + std::string_view key = keys[i]; std::string v = d.value(key); - res[std::move(key)] = std::move(v); + res[std::string(key)] = std::move(v); } value = res; } @@ -166,10 +167,11 @@ namespace { ghoul::Dictionary d = ghoul::lua::value(L); std::map res; + std::vector keys = d.keys(); for (size_t i = 0; i < d.size(); ++i) { - std::string key = d.keys()[i]; + std::string_view key = keys[i]; ghoul::Dictionary v = d.value(key); - res[std::move(key)] = std::move(v); + res[std::string(key)] = std::move(v); } value = res; } @@ -178,11 +180,17 @@ namespace { Configuration::Logging& v = static_cast(value); ghoul::Dictionary d = ghoul::lua::value(L); - d.getValue(KeyLogLevel, v.level); - d.getValue(KeyImmediateFlush, v.forceImmediateFlush); - d.getValue(KeyCapabilitiesVerbosity, v.capabilitiesVerbosity); + if (d.hasValue(KeyLogLevel)) { + v.level = d.value(KeyLogLevel); + } + if (d.hasValue(KeyImmediateFlush)) { + v.forceImmediateFlush = d.value(KeyImmediateFlush); + } + if (d.hasValue(KeyCapabilitiesVerbosity)) { + v.capabilitiesVerbosity = d.value(KeyCapabilitiesVerbosity); + } - if (d.hasKeyAndValue(KeyLogs)) { + if (d.hasValue(KeyLogs)) { ghoul::Dictionary l = d.value(KeyLogs); std::vector res; for (size_t i = 1; i <= l.size(); ++i) { @@ -196,18 +204,24 @@ namespace { Configuration::DocumentationInfo& v = static_cast(value); ghoul::Dictionary d = ghoul::lua::value(L); - - d.getValue(KeyDocumentationPath, v.path); + if (d.hasValue(KeyDocumentationPath)) { + v.path = d.value(KeyDocumentationPath); + } } // NOLINTNEXTLINE else if constexpr (std::is_same_v) { Configuration::LoadingScreen& v = static_cast(value); ghoul::Dictionary d = ghoul::lua::value(L); - - d.getValue(KeyShowMessage, v.isShowingMessages); - d.getValue(KeyShowNodeNames, v.isShowingNodeNames); - d.getValue(KeyShowProgressbar, v.isShowingProgressbar); + if (d.hasValue(KeyShowMessage)) { + v.isShowingMessages = d.value(KeyShowMessage); + } + if (d.hasValue(KeyShowNodeNames)) { + v.isShowingNodeNames = d.value(KeyShowNodeNames); + } + if (d.hasValue(KeyShowProgressbar)) { + v.isShowingProgressbar = d.value(KeyShowProgressbar); + } } // NOLINTNEXTLINE else if constexpr (std::is_same_v) { @@ -215,10 +229,14 @@ namespace { static_cast(value); ghoul::Dictionary d = ghoul::lua::value(L); - d.getValue(KeyActivate, v.isActive); - d.getValue(KeySynchronous, v.isSynchronous); + if (d.hasValue(KeyActivate)) { + v.isActive = d.value(KeyActivate); + } + if (d.hasValue(KeySynchronous)) { + v.isSynchronous = d.value(KeySynchronous); + } - if (d.hasKeyAndValue(KeyFilterIdentifier)) { + if (d.hasValue(KeyFilterIdentifier)) { ghoul::Dictionary f = d.value(KeyFilterIdentifier); std::vector res; @@ -226,11 +244,17 @@ namespace { Configuration::OpenGLDebugContext::IdentifierFilter filter; ghoul::Dictionary fi = f.value(std::to_string(i)); - double id = static_cast(filter.identifier); - fi.getValue(KeyIdentifier, id); - filter.identifier = static_cast(id); - fi.getValue(KeySource, filter.source); - fi.getValue(KeyType, filter.type); + if (fi.hasValue(KeyIdentifier)) { + filter.identifier = static_cast( + fi.value(KeyIdentifier) + ); + } + if (fi.hasValue(KeySource)) { + filter.source = fi.value(KeySource); + } + if (fi.hasValue(KeyType)) { + filter.type = fi.value(KeyType); + } res.push_back(filter); } @@ -238,7 +262,7 @@ namespace { v.identifierFilters = res; } - if (d.hasKeyAndValue(KeyFilterSeverity)) { + if (d.hasValue(KeyFilterSeverity)) { ghoul::Dictionary f = d.value(KeyFilterSeverity); std::vector res; @@ -253,14 +277,24 @@ namespace { Configuration::HTTPProxy& v = static_cast(value); ghoul::Dictionary d = ghoul::lua::value(L); - d.getValue(KeyActivate, v.usingHttpProxy); - d.getValue(KeyAddress, v.address); - double p = static_cast(v.port); - d.getValue(KeyPort, p); - v.port = static_cast(p); - d.getValue(KeyAuthentication, v.authentication); - d.getValue(KeyUser, v.user); - d.getValue(KeyPassword, v.password); + if (d.hasValue(KeyActivate)) { + v.usingHttpProxy = d.value(KeyActivate); + } + if (d.hasValue(KeyAddress)) { + v.address = d.value(KeyAddress); + } + if (d.hasValue(KeyPort)) { + v.port = static_cast(d.value(KeyPort)); + } + if (d.hasValue(KeyAuthentication)) { + v.authentication = d.value(KeyAuthentication); + } + if (d.hasValue(KeyUser)) { + v.user = d.value(KeyUser); + } + if (d.hasValue(KeyPassword)) { + v.password = d.value(KeyPassword); + } } else { value = ghoul::lua::value(L); diff --git a/src/engine/logfactory.cpp b/src/engine/logfactory.cpp index 4a57a6944d..3ff1178f30 100644 --- a/src/engine/logfactory.cpp +++ b/src/engine/logfactory.cpp @@ -127,27 +127,27 @@ std::unique_ptr createLog(const ghoul::Dictionary& dictiona // the rest are optional bool append = true; - if (dictionary.hasKeyAndValue(KeyAppend)) { + if (dictionary.hasValue(KeyAppend)) { append = dictionary.value(KeyAppend); } bool timeStamp = true; - if (dictionary.hasKeyAndValue(KeyTimeStamping)) { + if (dictionary.hasValue(KeyTimeStamping)) { timeStamp = dictionary.value(KeyTimeStamping); } bool dateStamp = true; - if (dictionary.hasKeyAndValue(KeyDateStamping)) { + if (dictionary.hasValue(KeyDateStamping)) { dateStamp = dictionary.value(KeyDateStamping); } bool categoryStamp = true; - if (dictionary.hasKeyAndValue(KeyCategoryStamping)) { + if (dictionary.hasValue(KeyCategoryStamping)) { categoryStamp = dictionary.value(KeyCategoryStamping); } bool logLevelStamp = true; - if (dictionary.hasKeyAndValue(KeyLogLevelStamping)) { + if (dictionary.hasValue(KeyLogLevelStamping)) { logLevelStamp = dictionary.value(KeyLogLevelStamping); } std::string logLevel; - if (dictionary.hasKeyAndValue(KeyLogLevel)) { + if (dictionary.hasValue(KeyLogLevel)) { logLevel = dictionary.value(KeyLogLevel); } diff --git a/src/mission/mission.cpp b/src/mission/mission.cpp index e4d5d70f2a..a37f7972ac 100644 --- a/src/mission/mission.cpp +++ b/src/mission/mission.cpp @@ -85,10 +85,12 @@ documentation::Documentation MissionPhase::Documentation() { MissionPhase::MissionPhase(const ghoul::Dictionary& dictionary) { _name = dictionary.value(KeyName); - dictionary.getValue(KeyDescription, _description); + if (dictionary.hasValue(KeyDescription)) { + _description = dictionary.value(KeyDescription); + } - ghoul::Dictionary childDicts; - if (dictionary.getValue(KeyPhases, childDicts)) { + if (dictionary.hasValue(KeyPhases)) { + ghoul::Dictionary childDicts = dictionary.value(KeyPhases); // This is a nested mission phase _subphases.reserve(childDicts.size()); for (size_t i = 0; i < childDicts.size(); ++i) { @@ -111,9 +113,9 @@ MissionPhase::MissionPhase(const ghoul::Dictionary& dictionary) { timeRangeSubPhases.end = _subphases.back().timeRange().end; // user may specify an overall time range. In that case expand this timerange. - ghoul::Dictionary timeRangeDict; - if (dictionary.getValue(KeyTimeRange, timeRangeDict)) { - TimeRange overallTimeRange(timeRangeDict); + if (dictionary.hasValue(KeyTimeRange)) { + ghoul::Dictionary range = dictionary.value(KeyTimeRange); + TimeRange overallTimeRange(range); if (!overallTimeRange.includes(timeRangeSubPhases)) { throw ghoul::RuntimeError( "User specified time range must at least include its subphases'", @@ -130,8 +132,9 @@ MissionPhase::MissionPhase(const ghoul::Dictionary& dictionary) { } } else { - ghoul::Dictionary timeRangeDict; - if (dictionary.getValue(KeyTimeRange, timeRangeDict)) { + if (dictionary.hasValue(KeyTimeRange)) { + ghoul::Dictionary timeRangeDict = + dictionary.value(KeyTimeRange); _timeRange = TimeRange(timeRangeDict); // throws exception if unable to parse } else { diff --git a/src/properties/property.cpp b/src/properties/property.cpp index 85f2f6fdd9..3b576bf2ed 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -37,7 +37,7 @@ namespace { constexpr const char* MetaDataKeyVisibility = "Visibility"; constexpr const char* MetaDataKeyReadOnly = "isReadOnly"; - constexpr const char* _metaDataKeyViewPrefix = "view."; + constexpr const char* _metaDataKeyViewPrefix = "view"; } // namespace @@ -185,9 +185,12 @@ void Property::setGroupIdentifier(std::string groupId) { } std::string Property::groupIdentifier() const { - std::string result; - _metaData.getValue(MetaDataKeyGroup, result); - return result; + if (_metaData.hasValue(MetaDataKeyGroup)) { + return _metaData.value(MetaDataKeyGroup); + } + else { + return ""; + } } void Property::setVisibility(Visibility visibility) { @@ -208,17 +211,19 @@ void Property::setReadOnly(bool state) { } void Property::setViewOption(std::string option, bool value) { - _metaData.setValue( - _metaDataKeyViewPrefix + std::move(option), - value, - ghoul::Dictionary::CreateIntermediate::Yes - ); + ghoul::Dictionary d; + d.setValue(option, value); + _metaData.setValue(_metaDataKeyViewPrefix, d); } bool Property::viewOption(const std::string& option, bool defaultValue) const { - bool v = defaultValue; - _metaData.getValue(_metaDataKeyViewPrefix + option, v); - return v; + ghoul::Dictionary d = _metaData.value(_metaDataKeyViewPrefix); + if (d.hasKey(option)) { + return d.value(option); + } + else { + return defaultValue; + } } const ghoul::Dictionary& Property::metaData() const { @@ -350,7 +355,7 @@ std::string Property::generateMetaDataJsonDescription() const { const std::string& vis = VisibilityConverter.at(visibility); bool isReadOnly = false; - if (_metaData.hasKey(MetaDataKeyReadOnly)) { + if (_metaData.hasValue(MetaDataKeyReadOnly)) { isReadOnly = _metaData.value(MetaDataKeyReadOnly); } diff --git a/src/rendering/dashboarditem.cpp b/src/rendering/dashboarditem.cpp index 183f3e2b06..0fd432a4e9 100644 --- a/src/rendering/dashboarditem.cpp +++ b/src/rendering/dashboarditem.cpp @@ -114,7 +114,7 @@ DashboardItem::DashboardItem(const ghoul::Dictionary& dictionary) std::string identifier = dictionary.value(IdentifierInfo.identifier); setIdentifier(std::move(identifier)); - if (dictionary.hasKeyAndValue(GuiNameInfo.identifier)) { + if (dictionary.hasValue(GuiNameInfo.identifier)) { std::string guiName = dictionary.value(GuiNameInfo.identifier); setGuiName(std::move(guiName)); } @@ -170,6 +170,12 @@ DashboardTextItem::DashboardTextItem(const ghoul::Dictionary& dictionary, float , _fontName(FontNameInfo, fontName) , _fontSize(FontSizeInfo, fontSize, 6.f, 144.f, 1.f) { + documentation::testSpecificationAndThrow( + Documentation(), + dictionary, + "DashboardTextItem" + ); + if (dictionary.hasKey(FontNameInfo.identifier)) { _fontName = dictionary.value(FontNameInfo.identifier); } diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index d985bc8b74..5bf6a22c55 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -1010,7 +1010,7 @@ void FramebufferRenderer::updateRaycastData() { try { ghoul::Dictionary outsideDict = dict; - outsideDict.setValue("getEntryPath", GetEntryOutsidePath); + outsideDict.setValue("getEntryPath", std::string(GetEntryOutsidePath)); _raycastPrograms[raycaster] = ghoul::opengl::ProgramObject::Build( "Volume " + std::to_string(data.id) + " raycast", absPath(vsPath), @@ -1023,7 +1023,7 @@ void FramebufferRenderer::updateRaycastData() { try { ghoul::Dictionary insideDict = dict; - insideDict.setValue("getEntryPath", GetEntryInsidePath); + insideDict.setValue("getEntryPath", std::string(GetEntryInsidePath)); _insideRaycastPrograms[raycaster] = ghoul::opengl::ProgramObject::Build( "Volume " + std::to_string(data.id) + " inside raycast", absPath("${SHADERS}/framebuffer/resolveframebuffer.vert"), diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 6ed258b7e7..fc42616d8f 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -130,16 +130,15 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary) // I can't come up with a good reason not to do this for all renderables registerUpdateRenderBinFromOpacity(); - if (dictionary.hasKeyAndValue(KeyTag)) { + if (dictionary.hasValue(KeyTag)) { std::string tagName = dictionary.value(KeyTag); if (!tagName.empty()) { addTag(std::move(tagName)); } } - else if (dictionary.hasKeyAndValue(KeyTag)) { + else if (dictionary.hasValue(KeyTag)) { const ghoul::Dictionary& tagNames = dictionary.value(KeyTag); - const std::vector& keys = tagNames.keys(); - for (const std::string& key : keys) { + for (std::string_view key : tagNames.keys()) { std::string tagName = tagNames.value(key); if (!tagName.empty()) { addTag(std::move(tagName)); @@ -152,9 +151,7 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary) } if (dictionary.hasKey(OpacityInfo.identifier)) { - _opacity = static_cast(dictionary.value( - OpacityInfo.identifier) - ); + _opacity = static_cast(dictionary.value(OpacityInfo.identifier)); } addProperty(_enabled); @@ -188,11 +185,11 @@ void Renderable::update(const UpdateData&) {} void Renderable::render(const RenderData&, RendererTasks&) {} -void Renderable::setBoundingSphere(float boundingSphere) { +void Renderable::setBoundingSphere(double boundingSphere) { _boundingSphere = boundingSphere; } -float Renderable::boundingSphere() const { +double Renderable::boundingSphere() const { return _boundingSphere; } diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 35a0b144bc..25450bd22c 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -406,14 +406,14 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary if (_useRadiusAzimuthElevation) { if (dictionary.hasKey(RadiusAzimuthElevationInfo.identifier)) { - _raePosition = dictionary.value( + _raePosition = dictionary.value( RadiusAzimuthElevationInfo.identifier ); } } else { if (dictionary.hasKey(CartesianPositionInfo.identifier)) { - _cartesianPosition = dictionary.value( + _cartesianPosition = dictionary.value( CartesianPositionInfo.identifier ); } @@ -436,16 +436,15 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary _faceCamera = dictionary.value(FaceCameraInfo.identifier); } - if (dictionary.hasKeyAndValue(KeyTag)) { + if (dictionary.hasValue(KeyTag)) { std::string tagName = dictionary.value(KeyTag); if (!tagName.empty()) { addTag(std::move(tagName)); } } - else if (dictionary.hasKeyAndValue(KeyTag)) { + else if (dictionary.hasValue(KeyTag)) { const ghoul::Dictionary& tagNames = dictionary.value(KeyTag); - const std::vector& keys = tagNames.keys(); - for (const std::string& key : keys) { + for (std::string_view key : tagNames.keys()) { std::string tagName = tagNames.value(key); if (!tagName.empty()) { addTag(std::move(tagName)); @@ -519,16 +518,24 @@ void ScreenSpaceRenderable::createShaders() { ghoul::Dictionary dict = ghoul::Dictionary(); auto res = global::windowDelegate->currentDrawBufferResolution(); - ghoul::Dictionary rendererData = { - { "fragmentRendererPath", "${SHADERS}/framebuffer/renderframebuffer.frag" }, - { "windowWidth" , res.x }, - { "windowHeight" , res.y }, - { "hdrExposure", global::renderEngine->hdrExposure() }, - { "disableHDR", global::renderEngine->isHdrDisabled() } - }; + ghoul::Dictionary rendererData; + rendererData.setValue( + "fragmentRendererPath", + std::string("${SHADERS}/framebuffer/renderframebuffer.frag") + ); + rendererData.setValue("windowWidth", res.x); + rendererData.setValue("windowHeight", res.y); + rendererData.setValue( + "hdrExposure", + static_cast(global::renderEngine->hdrExposure()) + ); + rendererData.setValue("disableHDR", global::renderEngine->isHdrDisabled()); dict.setValue("rendererData", rendererData); - dict.setValue("fragmentPath", "${MODULE_BASE}/shaders/screenspace_fs.glsl"); + dict.setValue( + "fragmentPath", + std::string("${MODULE_BASE}/shaders/screenspace_fs.glsl") + ); _shader = ghoul::opengl::ProgramObject::Build( "ScreenSpaceProgram", absPath("${MODULE_BASE}/shaders/screenspace_vs.glsl"), diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index e9386d1c22..5816b81109 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -299,13 +299,30 @@ bool AssetLoader::loadAsset(Asset* asset) { ghoul::lua::luaDictionaryFromState(*_luaState, metaDict); Asset::MetaInformation meta; - metaDict.getValue(MetaInformationName, meta.name); - metaDict.getValue(MetaInformationVersion, meta.version); - metaDict.getValue(MetaInformationDescription, meta.description); - metaDict.getValue(MetaInformationAuthor, meta.author); - metaDict.getValue(MetaInformationURL, meta.url); - metaDict.getValue(MetaInformationLicense, meta.license); - if (metaDict.hasKey(MetaInformationIdentifiers)) { + if (metaDict.hasValue(MetaInformationName)) { + meta.name = metaDict.value(MetaInformationName); + + } + if (metaDict.hasValue(MetaInformationVersion)) { + meta.version = metaDict.value(MetaInformationVersion); + + } + if (metaDict.hasValue(MetaInformationDescription)) { + meta.description = + metaDict.value(MetaInformationDescription); + + } + if (metaDict.hasValue(MetaInformationAuthor)) { + meta.author = metaDict.value(MetaInformationAuthor); + + } + if (metaDict.hasValue(MetaInformationURL)) { + meta.url = metaDict.value(MetaInformationURL); + } + if (metaDict.hasValue(MetaInformationLicense)) { + meta.license = metaDict.value(MetaInformationLicense); + } + if (metaDict.hasValue(MetaInformationIdentifiers)) { ghoul::Dictionary iddict = metaDict.value(MetaInformationIdentifiers); for (size_t i = 1; i <= iddict.size(); ++i) { diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index ae734c2a5d..559e4496f0 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -430,11 +430,10 @@ SceneGraphNode* Scene::loadNode(const ghoul::Dictionary& nodeDictionary) { // TODO: Throw exception LERROR("Dependencies did not have the corrent type"); } - ghoul::Dictionary nodeDependencies; - nodeDictionary.getValue(SceneGraphNode::KeyDependencies, nodeDependencies); + ghoul::Dictionary nodeDependencies = + nodeDictionary.value(SceneGraphNode::KeyDependencies); - const std::vector& keys = nodeDependencies.keys(); - for (const std::string& key : keys) { + for (std::string_view key : nodeDependencies.keys()) { std::string value = nodeDependencies.value(key); dependencyNames.push_back(value); } diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index aebb135f3c..887d335d05 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -182,13 +182,13 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } if (dictionary.hasKey(BoundingSphereInfo.identifier)) { - result->_boundingSphere = dictionary.value(BoundingSphereInfo.identifier); + result->_boundingSphere = dictionary.value(BoundingSphereInfo.identifier); result->_boundingSphere.setVisibility(properties::Property::Visibility::All); } if (dictionary.hasKey(KeyTransformTranslation)) { - ghoul::Dictionary translationDictionary; - dictionary.getValue(KeyTransformTranslation, translationDictionary); + ghoul::Dictionary translationDictionary = + dictionary.value(KeyTransformTranslation); result->_transform.translation = Translation::createFromDictionary( translationDictionary ); @@ -207,8 +207,8 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } if (dictionary.hasKey(KeyTransformRotation)) { - ghoul::Dictionary rotationDictionary; - dictionary.getValue(KeyTransformRotation, rotationDictionary); + ghoul::Dictionary rotationDictionary = + dictionary.value(KeyTransformRotation); result->_transform.rotation = Rotation::createFromDictionary(rotationDictionary); if (result->_transform.rotation == nullptr) { LERROR(fmt::format( @@ -225,8 +225,8 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } if (dictionary.hasKey(KeyTransformScale)) { - ghoul::Dictionary scaleDictionary; - dictionary.getValue(KeyTransformScale, scaleDictionary); + ghoul::Dictionary scaleDictionary = + dictionary.value(KeyTransformScale); result->_transform.scale = Scale::createFromDictionary(scaleDictionary); if (result->_transform.scale == nullptr) { LERROR(fmt::format( @@ -241,8 +241,8 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } if (dictionary.hasKey(KeyTimeFrame)) { - ghoul::Dictionary timeFrameDictionary; - dictionary.getValue(KeyTimeFrame, timeFrameDictionary); + ghoul::Dictionary timeFrameDictionary = + dictionary.value(KeyTimeFrame); result->_timeFrame = TimeFrame::createFromDictionary(timeFrameDictionary); if (result->_timeFrame == nullptr) { LERROR(fmt::format( @@ -260,8 +260,8 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( // We initialize the renderable last as it probably has the most dependencies if (dictionary.hasValue(KeyRenderable)) { - ghoul::Dictionary renderableDictionary; - dictionary.getValue(KeyRenderable, renderableDictionary); + ghoul::Dictionary renderableDictionary = + dictionary.value(KeyRenderable); renderableDictionary.setValue(KeyIdentifier, result->_identifier); @@ -293,17 +293,16 @@ ghoul::mm_unique_ptr SceneGraphNode::createFromDictionary( } if (dictionary.hasKey(KeyTag)) { - if (dictionary.hasKeyAndValue(KeyTag)) { + if (dictionary.hasValue(KeyTag)) { std::string tagName = dictionary.value(KeyTag); if (!tagName.empty()) { result->addTag(std::move(tagName)); } } - else if (dictionary.hasKeyAndValue(KeyTag)) { + else if (dictionary.hasValue(KeyTag)) { ghoul::Dictionary tagNames = dictionary.value(KeyTag); - std::vector keys = tagNames.keys(); std::string tagName; - for (const std::string& key : keys) { + for (std::string_view key : tagNames.keys()) { tagName = tagNames.value(key); if (!tagName.empty()) { result->addTag(std::move(tagName)); @@ -341,15 +340,13 @@ SceneGraphNode::SceneGraphNode() global::memoryManager->PersistentMemory.alloc() ) } - , _boundingSphere(properties::FloatProperty(BoundingSphereInfo, 0.f)) + , _boundingSphere(BoundingSphereInfo, 0.0) , _computeScreenSpaceValues(ComputeScreenSpaceInfo, false) - , _screenSpacePosition( - properties::IVec2Property(ScreenSpacePositionInfo, glm::ivec2(-1, -1)) - ) - , _screenVisibility(properties::BoolProperty(ScreenVisibilityInfo, false)) - , _distFromCamToNode(properties::DoubleProperty(DistanceFromCamToNodeInfo, -1.0)) - , _screenSizeRadius(properties::DoubleProperty(ScreenSizeRadiusInfo, 0)) - , _visibilityDistance(properties::FloatProperty(VisibilityDistanceInfo, 6e10f)) + , _screenSpacePosition(ScreenSpacePositionInfo, glm::ivec2(-1, -1)) + , _screenVisibility(ScreenVisibilityInfo, false) + , _distFromCamToNode(DistanceFromCamToNodeInfo, -1.0) + , _screenSizeRadius(ScreenSizeRadiusInfo, 0) + , _visibilityDistance(VisibilityDistanceInfo, 6e10f) { addProperty(_computeScreenSpaceValues); addProperty(_screenSpacePosition); @@ -888,7 +885,7 @@ std::vector SceneGraphNode::children() const { return nodes; } -float SceneGraphNode::boundingSphere() const { +double SceneGraphNode::boundingSphere() const { return _boundingSphere; } diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index 2606a7431e..0354e6e73d 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -95,19 +95,19 @@ ScriptScheduler::ScheduledScript::ScheduledScript(const ghoul::Dictionary& dicti // If a universal script is specified, retrieve it and add a ; as a separator so that // it can be added to the other scripts std::string universal; - dictionary.getValue(KeyUniversalScript, universal); - if (!universal.empty()) { - universal += ";"; + if (dictionary.hasValue(KeyUniversalScript)) { + universal = dictionary.value(KeyUniversalScript); + if (!universal.empty()) { + universal += ";"; + } } - if (dictionary.hasKeyAndValue(KeyForwardScript)) { - forwardScript = - universal + dictionary.value(KeyForwardScript); + if (dictionary.hasValue(KeyForwardScript)) { + forwardScript = universal + dictionary.value(KeyForwardScript); } - if (dictionary.hasKeyAndValue(KeyBackwardScript)) { - backwardScript = - universal + dictionary.value(KeyBackwardScript); + if (dictionary.hasValue(KeyBackwardScript)) { + backwardScript = universal + dictionary.value(KeyBackwardScript); } } diff --git a/src/scripting/scriptscheduler_lua.inl b/src/scripting/scriptscheduler_lua.inl index 0d8bbe44cb..3c889014f3 100644 --- a/src/scripting/scriptscheduler_lua.inl +++ b/src/scripting/scriptscheduler_lua.inl @@ -56,46 +56,23 @@ int loadScheduledScript(lua_State* L) { std::string time = ghoul::lua::value(L, 1); std::string forwardScript = ghoul::lua::value(L, 2); - if (nArguments == 2) { - global::scriptScheduler->loadScripts({ - { - "1", - ghoul::Dictionary { - { KeyTime, std::move(time) }, - { KeyForwardScript, std::move(forwardScript) } - } - } - }); - } - else if (nArguments == 3) { + ghoul::Dictionary script; + script.setValue(KeyTime, std::move(time)); + script.setValue(KeyForwardScript, std::move(forwardScript)); + + if (nArguments == 3) { std::string backwardScript = ghoul::lua::value(L, 3); - global::scriptScheduler->loadScripts({ - { - "1", - ghoul::Dictionary { - { KeyTime, std::move(time) }, - { KeyForwardScript, std::move(forwardScript) }, - { KeyBackwardScript, std::move(backwardScript) } - } - } - }); + script.setValue(KeyBackwardScript, std::move(backwardScript)); } else if (nArguments == 4) { std::string backwardScript = ghoul::lua::value(L, 3); + script.setValue(KeyBackwardScript, std::move(backwardScript)); std::string universalScript = ghoul::lua::value(L, 4); - - global::scriptScheduler->loadScripts({ - { - "1", - ghoul::Dictionary { - { KeyTime, std::move(time) }, - { KeyForwardScript, std::move(forwardScript) }, - { KeyBackwardScript, std::move(backwardScript) }, - { KeyUniversalScript, std::move(universalScript) } - } - } - }); + script.setValue(KeyUniversalScript, std::move(universalScript)); } + ghoul::Dictionary list; + list.setValue("1", std::move(script)); + global::scriptScheduler->loadScripts(list); lua_settop(L, 0); diff --git a/src/util/taskloader.cpp b/src/util/taskloader.cpp index 75778d07d3..47bdad9ce9 100644 --- a/src/util/taskloader.cpp +++ b/src/util/taskloader.cpp @@ -44,16 +44,15 @@ std::vector> TaskLoader::tasksFromDictionary( { std::vector> tasks; - const std::vector& keys = tasksDictionary.keys(); - for (const std::string& key : keys) { - std::string taskName; - ghoul::Dictionary subTask; - if (tasksDictionary.getValue(key, taskName)) { + for (std::string_view key : tasksDictionary.keys()) { + if (tasksDictionary.hasValue(key)) { + std::string taskName = tasksDictionary.value(key); const std::string path = taskName + ".task"; std::vector> subTasks = tasksFromFile(path); std::move(subTasks.begin(), subTasks.end(), std::back_inserter(tasks)); } - else if (tasksDictionary.getValue(key, subTask)) { + else if (tasksDictionary.hasValue(key)) { + ghoul::Dictionary subTask = tasksDictionary.value(key); const std::string& taskType = subTask.value("Type"); std::unique_ptr task = Task::createFromDictionary(subTask); if (!task) { diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index 183283dd69..72d32baacb 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -86,7 +86,7 @@ int time_setDeltaTimeSteps(lua_State* L) { for (size_t i = 1; i <= nItems; ++i) { std::string key = std::to_string(i); - if (dict.hasKeyAndValue(key)) { + if (dict.hasValue(key)) { const double time = dict.value(key); inputDeltaTimes.push_back(time); } diff --git a/src/util/timerange.cpp b/src/util/timerange.cpp index 537181a19f..e60867a28a 100644 --- a/src/util/timerange.cpp +++ b/src/util/timerange.cpp @@ -73,13 +73,9 @@ TimeRange::TimeRange(const ghoul::Dictionary& dict) { bool TimeRange::initializeFromDictionary(const ghoul::Dictionary& dict, TimeRange& timeRange) { - std::string startTimeStr; - std::string endTimeStr; - - bool success = true; - success &= dict.getValue(KeyStart, startTimeStr); - success &= dict.getValue(KeyEnd, endTimeStr); - if (success) { + if (dict.hasValue(KeyStart) && dict.hasValue(KeyEnd)) { + std::string startTimeStr = dict.value(KeyStart); + std::string endTimeStr = dict.value(KeyEnd); // Parse to date. // @TODO converting string to time stamp should not rely on Spice timeRange.start = SpiceManager::ref().ephemerisTimeFromDate(startTimeStr); diff --git a/tests/test_documentation.cpp b/tests/test_documentation.cpp index 9961d13cdc..2507e044c4 100644 --- a/tests/test_documentation.cpp +++ b/tests/test_documentation.cpp @@ -323,26 +323,24 @@ TEST_CASE("Documentation: BoolVerifier", "[documentation]") { {{ "Bool", new BoolVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", true } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", true); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", 0); + TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Bool"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "Bool2", 0 } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("Bool2", 0); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); @@ -358,17 +356,15 @@ TEST_CASE("Documentation: DoubleVerifier", "[documentation]") { {{ "Double", new DoubleVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 0.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 0.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -376,9 +372,8 @@ TEST_CASE("Documentation: DoubleVerifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "Double"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist{ - { "Double2" , 0.0 } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("Double2", 0.0); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -393,23 +388,20 @@ TEST_CASE("Documentation: IntVerifier", "[documentation]") { {{ "Int", new IntVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 0 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Int", 0.0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Int", 0.0); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 0.1 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 0.1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -417,9 +409,8 @@ TEST_CASE("Documentation: IntVerifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "Int"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "Int2", 0 } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("Int2", 0); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -435,25 +426,22 @@ TEST_CASE("Documentation: StringVerifier", "[documentation]") { {{ "String", new StringVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "String", ""s } - }; + ghoul::Dictionary positive; + positive.setValue("String", ""s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("String", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "String"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "String2", ""s } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("String2", ""s); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -468,25 +456,22 @@ TEST_CASE("Documentation: TableVerifierType", "[documentation]") { {{ "Table", new TableVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "Table", ghoul::Dictionary{} } - }; + ghoul::Dictionary positive; + positive.setValue("Table", ghoul::Dictionary()); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Table", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Table", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Table"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "Table2", ghoul::Dictionary{} } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("Table2", ghoul::Dictionary()); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -502,48 +487,43 @@ TEST_CASE("Documentation: StringListVerifierType", "[documentation]") { { { "StringList", new StringListVerifier, Optional::No } } }; - ghoul::Dictionary positive { - { - "StringList", - ghoul::Dictionary { - { "1", "a"s }, - { "2", "b"s }, - { "3", "c"s } - } - } - }; + ghoul::Dictionary positive; + { + ghoul::Dictionary inner; + inner.setValue("1", "a"s); + inner.setValue("2", "b"s); + inner.setValue("3", "c"s); + positive.setValue("StringList", inner); + } TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "StringList", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("StringList", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "StringList"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { - "StringList", - ghoul::Dictionary { - { "1", "a"s }, - { "2", "b"s }, - { "3", 2.0 } - } - } - }; + + ghoul::Dictionary negative2; + { + ghoul::Dictionary inner; + inner.setValue("1", "a"s); + inner.setValue("2", "b"s); + inner.setValue("3", 2.0); + negative2.setValue("StringList", inner); + } negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "StringList.3"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "StringList2", ghoul::Dictionary{} } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("StringList2", ghoul::Dictionary()); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -559,48 +539,42 @@ TEST_CASE("Documentation: IntListVerifierType", "[documentation]") { { { "IntList", new IntListVerifier, Optional::No } } }; - ghoul::Dictionary positive { - { - "IntList", - ghoul::Dictionary{ - { "1", 1 }, - { "2", 2 }, - { "3", 3 } + ghoul::Dictionary positive; + { + ghoul::Dictionary inner; + inner.setValue("1", 1); + inner.setValue("2", 2); + inner.setValue("3", 3); + positive.setValue("IntList", inner); } - } - }; TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative{ - { "IntList", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("IntList", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "IntList"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { - "IntList", - ghoul::Dictionary{ - { "1", "a"s }, - { "2", 1 }, - { "3", 2 } + ghoul::Dictionary negative2; + { + ghoul::Dictionary inner; + inner.setValue("1", "a"s); + inner.setValue("2", 1); + inner.setValue("3", 2); + negative2.setValue("IntList", inner); } - } - }; negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "IntList.1"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeExist { - { "IntList2", ghoul::Dictionary{} } - }; + ghoul::Dictionary negativeExist; + negativeExist.setValue("IntList2", ghoul::Dictionary()); negativeRes = testSpecification(doc, negativeExist); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -622,37 +596,34 @@ TEST_CASE("Documentation: MixedVerifiers", "[documentation]") { } }; - ghoul::Dictionary positive { - { "Bool", true }, - { "Double", 0.0 }, - { "Int", 0 }, - { "String", ""s }, - { "Table", ghoul::Dictionary{} } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", true); + positive.setValue("Double", 0.0); + positive.setValue("Int", 0); + positive.setValue("String", ""s); + positive.setValue("Table", ghoul::Dictionary()); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative1 { - { "Bool", true }, - { "Double", 1 }, - { "Int", 0 }, - { "String", ""s }, - { "Table", ghoul::Dictionary{} } - }; + ghoul::Dictionary negative1; + negative1.setValue("Bool", true); + negative1.setValue("Double", 1); + negative1.setValue("Int", 0); + negative1.setValue("String", ""s); + negative1.setValue("Table", ghoul::Dictionary()); TestResult negativeRes = testSpecification(doc, negative1); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Double"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "Bool", true }, - { "Double", 0.0 }, - { "Int", ""s }, - { "String", 1 }, - { "Table", ghoul::Dictionary{} } - }; + ghoul::Dictionary negative2; + negative2.setValue("Bool", true); + negative2.setValue("Double", 0.0); + negative2.setValue("Int", ""s); + negative2.setValue("String", 1); + negative2.setValue("Table", ghoul::Dictionary()); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -684,79 +655,97 @@ TEST_CASE("Documentation: NestedTables", "[documentation]") { } }; - ghoul::Dictionary positive { - { "Outer_Int", 1 }, - { "Outer_Table", ghoul::Dictionary { - { "Inner_Double", 0.0 }, - { "Inner_String", ""s } - }}, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", 0.0 }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", 0 } - }} - }} - }; + ghoul::Dictionary positive; + positive.setValue("Outer_Int", 1); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double", 0.0); + inner.setValue("Inner_String", ""s); + positive.setValue("Outer_Table", inner); + } + positive.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", 0.0); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", 0); + inner.setValue("Inner_Table", innerInner); + } + positive.setValue("Outer_Table2", inner); + } TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negativeSimple { - { "Outer_Int", 1 }, - { "Outer_Table", 0}, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", 0.0 }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", 0 } - }} - }} - }; + ghoul::Dictionary negativeSimple; + negativeSimple.setValue("Outer_Int", 1); + negativeSimple.setValue("Outer_Table", 0); + negativeSimple.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", 0.0); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", 0); + inner.setValue("Inner_Table", innerInner); + } + negativeSimple.setValue("Outer_Table2", inner); + } TestResult negativeRes = testSpecification(doc, negativeSimple); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Outer_Table"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeInner { - { "Outer_Int", 1 }, - { "Outer_Table", ghoul::Dictionary { - { "Inner_Double", ""s }, - { "Inner_String", ""s } - }}, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", 0.0 }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", 0 } - }} - }} - }; + ghoul::Dictionary negativeInner; + negativeInner.setValue("Outer_Int", 1); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double", ""s); + inner.setValue("Inner_String", ""s); + negativeInner.setValue("Outer_Table", inner); + } + negativeInner.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", 0.0); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", 0); + inner.setValue("Inner_Table", innerInner); + } + negativeInner.setValue("Outer_Table2", inner); + } negativeRes = testSpecification(doc, negativeInner); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Outer_Table.Inner_Double"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeInner2 { - { "Outer_Int", 1 }, - { "Outer_Table", ghoul::Dictionary { - { "Inner_Double", ""s }, - { "Inner_String", 0.0 } - }}, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", 0.0 }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", 0 } - }} - }} - }; + ghoul::Dictionary negativeInner2; + negativeInner2.setValue("Outer_Int", 1); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double", ""s); + inner.setValue("Inner_String", 0.0); + negativeInner2.setValue("Outer_Table", inner); + } + negativeInner2.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", 0.0); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", 0); + inner.setValue("Inner_Table", innerInner); + } + negativeInner2.setValue("Outer_Table2", inner); + } negativeRes = testSpecification(doc, negativeInner2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -765,21 +754,26 @@ TEST_CASE("Documentation: NestedTables", "[documentation]") { REQUIRE(negativeRes.offenses[1].offender == "Outer_Table.Inner_String"); REQUIRE(negativeRes.offenses[1].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeInnerSeparate { - { "Outer_Int", 1 }, - { "Outer_Table", ghoul::Dictionary { - { "Inner_Double", ""s }, - { "Inner_String", ""s } - } }, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", ""s }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", 0 } - }} - }} - }; + ghoul::Dictionary negativeInnerSeparate; + negativeInnerSeparate.setValue("Outer_Int", 1); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double", ""s); + inner.setValue("Inner_String", ""s); + negativeInnerSeparate.setValue("Outer_Table", inner); + } + negativeInnerSeparate.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", ""s); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", 0); + inner.setValue("Inner_Table", innerInner); + } + negativeInnerSeparate.setValue("Outer_Table2", inner); + } negativeRes = testSpecification(doc, negativeInnerSeparate); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -788,21 +782,26 @@ TEST_CASE("Documentation: NestedTables", "[documentation]") { REQUIRE(negativeRes.offenses[1].offender == "Outer_Table2.Inner_Double2"); REQUIRE(negativeRes.offenses[1].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negativeInnerFull { - { "Outer_Int", 1 }, - { "Outer_Table", ghoul::Dictionary { - { "Inner_Double", ""s }, - { "Inner_String", ""s } - } }, - { "Outer_Double", 0.0 }, - { "Outer_Table2", ghoul::Dictionary { - { "Inner_Double2", ""s }, - { "Inner_String2", ""s }, - { "Inner_Table", ghoul::Dictionary { - { "Inner_Inner_Int", ""s } - }} - }} - }; + ghoul::Dictionary negativeInnerFull; + negativeInnerFull.setValue("Outer_Int", 1); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double", ""s); + inner.setValue("Inner_String", ""s); + negativeInnerFull.setValue("Outer_Table", inner); + } + negativeInnerFull.setValue("Outer_Double", 0.0); + { + ghoul::Dictionary inner; + inner.setValue("Inner_Double2", ""s); + inner.setValue("Inner_String2", ""s); + { + ghoul::Dictionary innerInner; + innerInner.setValue("Inner_Inner_Int", ""s); + inner.setValue("Inner_Table", innerInner); + } + negativeInnerFull.setValue("Outer_Table2", inner); + } negativeRes = testSpecification(doc, negativeInnerFull); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 3); @@ -826,42 +825,37 @@ TEST_CASE("Documentation: Optional", "[documentation]") { } }; - ghoul::Dictionary positive { - { "Bool_Force", true } - }; + ghoul::Dictionary positive; + positive.setValue("Bool_Force", true); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Bool_Force", true }, - { "Bool_Optional", true } - }; + ghoul::Dictionary positive2; + positive2.setValue("Bool_Force", true); + positive2.setValue("Bool_Optional", true); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - }; + ghoul::Dictionary negative; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Bool_Force"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::MissingKey); - ghoul::Dictionary negative2 { - { "Bool_Optional", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("Bool_Optional", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Bool_Force"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::MissingKey); - ghoul::Dictionary negative3 { - { "Bool_Force", true }, - { "Bool_Optional", 1 } - }; + ghoul::Dictionary negative3; + negative3.setValue("Bool_Force", true); + negative3.setValue("Bool_Optional", 1); negativeRes = testSpecification(doc, negative3); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -891,37 +885,38 @@ TEST_CASE("Documentation: Required In Optional", "[documentation]") { }} }; - ghoul::Dictionary positive { - { - "a", ghoul::Dictionary{ - { "b", 1 } - } - } - }; + ghoul::Dictionary positive; + { + ghoul::Dictionary inner; + inner.setValue("b", 1); + positive.setValue("a", inner); + } TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { - "a", ghoul::Dictionary{ - { "b", 1 }, - { "c", 2 } - } - } - }; + ghoul::Dictionary positive2; + { + ghoul::Dictionary inner; + inner.setValue("b", 1); + inner.setValue("c", 2); + positive2.setValue("a", inner); + } positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive3 {}; + ghoul::Dictionary positive3; positiveRes = testSpecification(doc, positive3); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "c", 2 }}} - }; + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("c", 2); + negative.setValue("a", inner); + } TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -936,25 +931,22 @@ TEST_CASE("Documentation: Exhaustive", "[documentation]") { {{ "Int", new IntVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "Int" , 1 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "False_Int", 1 } - }; + ghoul::Dictionary negative; + negative.setValue("False_Int", 1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Int"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::MissingKey); - ghoul::Dictionary negative2 { - { "Double", 2.0 } - }; + ghoul::Dictionary negative2; + negative2.setValue("Double", 2.0); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -972,16 +964,22 @@ TEST_CASE("Documentation: Nested Exhaustive", "[documentation]") { }} }; - ghoul::Dictionary positive { - { "Table", ghoul::Dictionary{{ "a", 1 }}} - }; + ghoul::Dictionary positive; + { + ghoul::Dictionary inner; + inner.setValue("a", 1); + positive.setValue("Table", inner); + } TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Table", ghoul::Dictionary{{ "b", 2.0 }}} - }; + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("b", 2.0); + negative.setValue("Table", inner); + } TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -999,9 +997,8 @@ TEST_CASE("Documentation: Empty Entries Non Exhaustive", "[documentation]") { REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "a", 1 } - }; + ghoul::Dictionary positive2; + positive2.setValue("a", 1); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); @@ -1018,16 +1015,18 @@ TEST_CASE("Documentation: Empty Nested Exhaustive", "[documentation]") { }} }; - ghoul::Dictionary positive { - { "Table", ghoul::Dictionary() } - }; + ghoul::Dictionary positive; + positive.setValue("Table", ghoul::Dictionary()); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Table", ghoul::Dictionary{ { "a", 1 }}} - }; + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("a", 1); + negative.setValue("Table", inner); + } TestResult negativeRes = testSpecification(doc, negative); REQUIRE(negativeRes.success); REQUIRE(negativeRes.offenses.empty()); @@ -1040,16 +1039,14 @@ TEST_CASE("Documentation: Less Int", "[documentation]") { {{ "Int", new IntLessVerifier(5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 0 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 10 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 10); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1064,16 +1061,14 @@ TEST_CASE("Documentation: Less Double", "[documentation]") { {{ "Double", new DoubleLessVerifier(5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 0.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 0.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 10.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 10.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1088,23 +1083,20 @@ TEST_CASE("Documentation: LessEqual Int", "[documentation]") { {{ "Int", new IntLessEqualVerifier(5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 0 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positiveEqual { - { "Int", 5 } - }; + ghoul::Dictionary positiveEqual; + positiveEqual.setValue("Int", 5); positiveRes = testSpecification(doc, positiveEqual); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 10 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 10); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1119,23 +1111,20 @@ TEST_CASE("Documentation: LessEqual Double", "[documentation]") { {{ "Double", new DoubleLessEqualVerifier(5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 0.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 0.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positiveEqual { - { "Double", 5.0 } - }; + ghoul::Dictionary positiveEqual; + positiveEqual.setValue("Double", 5.0); positiveRes = testSpecification(doc, positiveEqual); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 10.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 10.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1150,16 +1139,14 @@ TEST_CASE("Documentation: Greater Int", "[documentation]") { {{ "Int", new IntGreaterVerifier(5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 10 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 10); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1174,16 +1161,14 @@ TEST_CASE("Documentation: Greater Double", "[documentation]") { {{ "Double", new DoubleGreaterVerifier(5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 10.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 10.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 0.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 0.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1198,23 +1183,20 @@ TEST_CASE("Documentation: GreaterEqual Int", "[documentation]") { {{ "Int", new IntGreaterEqualVerifier(5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 10 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 10); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positiveEqual { - { "Int", 5 } - }; + ghoul::Dictionary positiveEqual; + positiveEqual.setValue("Int", 5); positiveRes = testSpecification(doc, positiveEqual); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1229,23 +1211,20 @@ TEST_CASE("Documentation: GreaterEqual Double", "[documentation]") { {{ "Double", new DoubleGreaterEqualVerifier(5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 10.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 10.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positiveEqual { - { "Double", 5.0 } - }; + ghoul::Dictionary positiveEqual; + positiveEqual.setValue("Double", 5.0); positiveRes = testSpecification(doc, positiveEqual); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 0.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 0.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1260,16 +1239,14 @@ TEST_CASE("Documentation: Equal Bool", "[documentation]") { {{ "Bool", new BoolEqualVerifier(true), Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", true} - }; + ghoul::Dictionary positive; + positive.setValue("Bool", true); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", false } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", false); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1284,16 +1261,14 @@ TEST_CASE("Documentation: Equal Int", "[documentation]") { {{ "Int", new IntEqualVerifier(1), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 1} - }; + ghoul::Dictionary positive; + positive.setValue("Int", 1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1308,16 +1283,14 @@ TEST_CASE("Documentation: Equal Double", "[documentation]") { {{ "Double", new DoubleEqualVerifier(1.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 1.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 1.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 0.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 0.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1333,16 +1306,14 @@ TEST_CASE("Documentation: Equal String", "[documentation]") { {{ "String", new StringEqualVerifier("string"s), Optional::No }} }; - ghoul::Dictionary positive { - { "String", "string"s } - }; + ghoul::Dictionary positive; + positive.setValue("String", "string"s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", "no_string"s } - }; + ghoul::Dictionary negative; + negative.setValue("String", "no_string"s); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1357,16 +1328,14 @@ TEST_CASE("Documentation: Unequal Bool", "[documentation]") { {{ "Bool", new BoolUnequalVerifier(true), Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", false } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", false); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", true } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", true); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1381,16 +1350,14 @@ TEST_CASE("Documentation: Unequal Int", "[documentation]") { {{ "Int", new IntUnequalVerifier(1), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 0 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 1 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1405,16 +1372,14 @@ TEST_CASE("Documentation: Unequal Double", "[documentation]") { {{ "Double", new DoubleUnequalVerifier(1.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 0.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 0.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 1.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 1.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1430,16 +1395,14 @@ TEST_CASE("Documentation: Unequal String", "[documentation]") { {{ "String", new StringUnequalVerifier("string"s), Optional::No }} }; - ghoul::Dictionary positive { - { "String", "no_string"s } - }; + ghoul::Dictionary positive; + positive.setValue("String", "no_string"s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", "string"s } - }; + ghoul::Dictionary negative; + negative.setValue("String", "string"s); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1454,16 +1417,14 @@ TEST_CASE("Documentation: List Bool", "[documentation]") { {{ "Bool" , new BoolInListVerifier({ true }), Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", true } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", true); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", false } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", false); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1478,23 +1439,20 @@ TEST_CASE("Documentation: List Int", "[documentation]") { {{ "Int" , new IntInListVerifier({ 0, 1, 2 }), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 1 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Int", 2 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Int", 2); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 5 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 5); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1509,23 +1467,20 @@ TEST_CASE("Documentation: List Double", "[documentation]") { {{ "Double" , new DoubleInListVerifier({ 0.0, 1.0, 2.0 }), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 1.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 1.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Double", 2.0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Double", 2.0); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 5.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 5.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1541,23 +1496,20 @@ TEST_CASE("Documentation: List String", "[documentation]") { {{ "String" , new StringInListVerifier({ "0"s, "1"s, "2"s }), Optional::No }} }; - ghoul::Dictionary positive { - { "String", "1"s } - }; + ghoul::Dictionary positive; + positive.setValue("String", "1"s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "String", "2"s } - }; + ghoul::Dictionary positive2; + positive2.setValue("String", "2"s); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", "5"s } - }; + ghoul::Dictionary negative; + negative.setValue("String", "5"s); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1572,16 +1524,14 @@ TEST_CASE("Documentation: NotList Bool", "[documentation]") { {{ "Bool" , new BoolNotInListVerifier({ true }), Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", false } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", false); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", true } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", true); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1596,23 +1546,20 @@ TEST_CASE("Documentation: NotList Int", "[documentation]") { {{ "Int" , new IntNotInListVerifier({ 0, 1, 2 }), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", -1 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", -1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Int", 3 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Int", 3); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 2 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 2); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1627,23 +1574,20 @@ TEST_CASE("Documentation: NotList Double", "[documentation]") { {{ "Double" , new DoubleNotInListVerifier({ 0.0, 1.0, 2.0 }), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", -1.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", -1.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Double", 3.0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Double", 3.0); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 1.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 1.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1659,23 +1603,20 @@ TEST_CASE("Documentation: NotList String", "[documentation]") { {{ "String" , new StringNotInListVerifier({ "0"s, "1"s, "2"s }), Optional::No }} }; - ghoul::Dictionary positive { - { "String", "string"s } - }; + ghoul::Dictionary positive; + positive.setValue("String", "string"s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "String", "foo_string"s } - }; + ghoul::Dictionary positive2; + positive2.setValue("String", "foo_string"s); positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", "1"s } - }; + ghoul::Dictionary negative; + negative.setValue("String", "1"s); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1690,16 +1631,14 @@ TEST_CASE("Documentation: Annotation Bool", "[documentation]") { {{ "Bool", new BoolAnnotationVerifier("Bool"), Optional::No }} }; - ghoul::Dictionary positive { - { "Bool", true } - }; + ghoul::Dictionary positive; + positive.setValue("Bool", true); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Bool", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("Bool", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1714,16 +1653,14 @@ TEST_CASE("Documentation: Annotation Int", "[documentation]") { {{ "Int", new IntAnnotationVerifier("Int"), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 1 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 1.1 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 1.1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1738,16 +1675,14 @@ TEST_CASE("Documentation: Annotation Double", "[documentation]") { {{ "Double", new DoubleAnnotationVerifier("Double"), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 0.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 0.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", true } - }; + ghoul::Dictionary negative; + negative.setValue("Double", true); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1763,16 +1698,14 @@ TEST_CASE("Documentation: Annotation String", "[documentation]") { {{ "String", new StringAnnotationVerifier("String"), Optional::No }} }; - ghoul::Dictionary positive { - { "String", ""s } - }; + ghoul::Dictionary positive; + positive.setValue("String", ""s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "String", 1 } - }; + ghoul::Dictionary negative; + negative.setValue("String", 1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1787,16 +1720,14 @@ TEST_CASE("Documentation: Annotation Table", "[documentation]") { {{ "Table", new TableAnnotationVerifier("Table"), Optional::No }} }; - ghoul::Dictionary positive { - { "Table", ghoul::Dictionary{} } - }; + ghoul::Dictionary positive; + positive.setValue("Table", ghoul::Dictionary()); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Table", 1 } - }; + ghoul::Dictionary negative; + negative.setValue("Table", 1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1811,30 +1742,26 @@ TEST_CASE("Documentation: InRange Int", "[documentation]") { {{ "Int", new InRangeVerifier(0, 5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", 2 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", 2); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Int", 0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Int", 0); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive3 { - { "Int", 5 } - }; + ghoul::Dictionary positive3; + positive3.setValue("Int", 5); positiveRes = testSpecification(doc, positive3); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 10 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 10); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1849,37 +1776,32 @@ TEST_CASE("Documentation: InRange Double", "[documentation]") { {{ "Double", new InRangeVerifier(0.0, 5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", 2.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", 2.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Double", 0.0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Double", 0.0); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive3 { - { "Double", 5.0 } - }; + ghoul::Dictionary positive3; + positive3.setValue("Double", 5.0); positiveRes = testSpecification(doc, positive3); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive4 { - { "Double", 1.5 } - }; + ghoul::Dictionary positive4; + positive4.setValue("Double", 1.5); positiveRes = testSpecification(doc, positive4); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 10.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 10.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1894,41 +1816,36 @@ TEST_CASE("Documentation: NotInRange Int", "[documentation]") { {{ "Int", new NotInRangeVerifier(0, 5), Optional::No }} }; - ghoul::Dictionary positive { - { "Int", -1 } - }; + ghoul::Dictionary positive; + positive.setValue("Int", -1); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Int", 6 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Int", 6); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Int", 2 } - }; + ghoul::Dictionary negative; + negative.setValue("Int", 2); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Int"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative2 { - { "Int", 0 } - }; + ghoul::Dictionary negative2; + negative2.setValue("Int", 0); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Int"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative3 { - { "Int", 5 } - }; + ghoul::Dictionary negative3; + negative3.setValue("Int", 5); negativeRes = testSpecification(doc, negative3); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1943,41 +1860,36 @@ TEST_CASE("Documentation: NotInRange Double", "[documentation]") { {{ "Double", new NotInRangeVerifier(0.0, 5.0), Optional::No }} }; - ghoul::Dictionary positive { - { "Double", -1.0 } - }; + ghoul::Dictionary positive; + positive.setValue("Double", -1.0); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "Double", 6.0 } - }; + ghoul::Dictionary positive2; + positive2.setValue("Double", 6.0); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Double", 0.0 } - }; + ghoul::Dictionary negative; + negative.setValue("Double", 0.0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Double"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative2 { - { "Double", 5.0 } - }; + ghoul::Dictionary negative2; + negative2.setValue("Double", 5.0); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Double"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative3 { - { "Double", 2.5 } - }; + ghoul::Dictionary negative3; + negative3.setValue("Double", 2.5); negativeRes = testSpecification(doc, negative3); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -1992,31 +1904,28 @@ TEST_CASE("Documentation: Wildcard", "[documentation]") { {{ DocumentationEntry::Wildcard, new IntVerifier, Optional::No }} }; - ghoul::Dictionary positive { - { "a", 1 }, - { "b", 2 }, - { "c", 3 } - }; + ghoul::Dictionary positive; + positive.setValue("a", 1); + positive.setValue("b", 2); + positive.setValue("c", 3); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", false }, - { "b", 2 }, - { "c", 3 } - }; + ghoul::Dictionary negative; + negative.setValue("a", false); + negative.setValue("b", 2); + negative.setValue("c", 3); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", false }, - { "b", false }, - { "c", 3 } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", false); + negative2.setValue("b", false); + negative2.setValue("c", 3); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -2025,11 +1934,10 @@ TEST_CASE("Documentation: Wildcard", "[documentation]") { REQUIRE(negativeRes.offenses[1].offender == "b"); REQUIRE(negativeRes.offenses[1].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative3 { - { "a", false }, - { "b", false }, - { "c", false } - }; + ghoul::Dictionary negative3; + negative3.setValue("a", false); + negative3.setValue("b", false); + negative3.setValue("c", false); negativeRes = testSpecification(doc, negative3); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 3); @@ -2051,20 +1959,18 @@ TEST_CASE("Documentation: Wildcard Mixed", "[documentation]") { } }; - ghoul::Dictionary positive { - { "a", 1 }, - { "b", 8 }, - { "c", 3 } - }; + ghoul::Dictionary positive; + positive.setValue("a", 1); + positive.setValue("b", 8); + positive.setValue("c", 3); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", false }, - { "b", 2 }, - { "c", 3 } - }; + ghoul::Dictionary negative; + negative.setValue("a", false); + negative.setValue("b", 2); + negative.setValue("c", 3); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -2073,11 +1979,10 @@ TEST_CASE("Documentation: Wildcard Mixed", "[documentation]") { REQUIRE(negativeRes.offenses[1].offender == "b"); REQUIRE(negativeRes.offenses[1].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative2 { - { "a", false }, - { "b", false }, - { "c", 3 } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", false); + negative2.setValue("b", false); + negative2.setValue("c", 3); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -2086,11 +1991,10 @@ TEST_CASE("Documentation: Wildcard Mixed", "[documentation]") { REQUIRE(negativeRes.offenses[1].offender == "b"); REQUIRE(negativeRes.offenses[1].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative3 { - { "a", false }, - { "b", 1 }, - { "c", false } - }; + ghoul::Dictionary negative3; + negative3.setValue("a", false); + negative3.setValue("b", 1); + negative3.setValue("c", false); negativeRes = testSpecification(doc, negative3); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 3); @@ -2101,11 +2005,10 @@ TEST_CASE("Documentation: Wildcard Mixed", "[documentation]") { REQUIRE(negativeRes.offenses[2].offender == "c"); REQUIRE(negativeRes.offenses[2].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative4 { - { "a", false }, - { "b", 10 }, - { "c", false } - }; + ghoul::Dictionary negative4; + negative4.setValue("a", false); + negative4.setValue("b", 10); + negative4.setValue("c", false); negativeRes = testSpecification(doc, negative4); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 2); @@ -2132,25 +2035,31 @@ TEST_CASE("Documentation: Referencing", "[documentation]") { { "Table", new ReferencingVerifier("referenced_id"), Optional::No } }}; - ghoul::Dictionary positive { - { "Table", ghoul::Dictionary{ { "a", 1 }, { "b", 2.0 } }} + ghoul::Dictionary positive; + { + ghoul::Dictionary inner; + inner.setValue("a", 1); + inner.setValue("b", 2.0); + positive.setValue("Table", inner); }; - TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "Table", 1 } - }; + ghoul::Dictionary negative; + negative.setValue("Table", 1); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "Table"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "Table", ghoul::Dictionary{ { "a", 1 }, { "b", true }}} + ghoul::Dictionary negative2; + { + ghoul::Dictionary inner; + inner.setValue("a", 1); + inner.setValue("b", true); + negative2.setValue("Table", inner); }; negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); @@ -2162,9 +2071,13 @@ TEST_CASE("Documentation: Referencing", "[documentation]") { Documentation wrongDoc {{ { "Table", new ReferencingVerifier("WRONG"), Optional::No } } }; - ghoul::Dictionary wrongNegative { - { "Table", ghoul::Dictionary{ { "a", 1 },{ "b", 2.0 } } } - }; + ghoul::Dictionary wrongNegative; + { + ghoul::Dictionary inner; + inner.setValue("a", 1); + inner.setValue("b", 2.0); + wrongNegative.setValue("Table", inner); + } negativeRes = testSpecification(wrongDoc, wrongNegative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2189,25 +2102,22 @@ TEST_CASE("Documentation: AndOperator", "[documentation]") { } }; - ghoul::Dictionary positive { - { "a", 4 } - }; + ghoul::Dictionary positive; + positive.setValue("a", 4); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", 0 } - }; + ghoul::Dictionary negative; + negative.setValue("a", 0); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); - ghoul::Dictionary negative2 { - { "a", 8 } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", 8); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2223,23 +2133,20 @@ TEST_CASE("Documentation: OrOperator", "[documentation]") { {{ "a", new OrVerifier({ new StringVerifier, new IntVerifier }), Optional::No }} }; - ghoul::Dictionary positive { - { "a", ""s } - }; + ghoul::Dictionary positive; + positive.setValue("a", ""s); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary positive2 { - { "a", 1 } - }; + ghoul::Dictionary positive2; + positive2.setValue("a", 1); positiveRes = testSpecification(doc, positive2); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", false } - }; + ghoul::Dictionary negative; + negative.setValue("a", false); TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2247,39 +2154,6 @@ TEST_CASE("Documentation: OrOperator", "[documentation]") { REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::Verification); } -TEST_CASE("Documentation: BoolVector2Verifier", "[documentation]") { - using namespace openspace::documentation; - - Documentation doc { - {{ "a", new BoolVector2Verifier, Optional::No }} - }; - - ghoul::Dictionary positive { - { "a", glm::bvec2(true) } - }; - TestResult positiveRes = testSpecification(doc, positive); - REQUIRE(positiveRes.success); - REQUIRE(positiveRes.offenses.empty()); - - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true }, { "2", 1.0 } } } - }; - TestResult negativeRes = testSpecification(doc, negative); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - - ghoul::Dictionary negative2 { - { "a", true } - }; - negativeRes = testSpecification(doc, negative2); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); -} - TEST_CASE("Documentation: IntVector2Verifier", "[documentation]") { using namespace openspace::documentation; @@ -2287,15 +2161,18 @@ TEST_CASE("Documentation: IntVector2Verifier", "[documentation]") { { { "a", new IntVector2Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::ivec2(2) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::ivec2(2)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1 } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2303,9 +2180,8 @@ TEST_CASE("Documentation: IntVector2Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2320,15 +2196,18 @@ TEST_CASE("Documentation: DoubleVector2Verifier", "[documentation]") { { { "a", new DoubleVector2Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dvec2(2.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dvec2(2.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true }, { "2", 1.0 } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2336,42 +2215,8 @@ TEST_CASE("Documentation: DoubleVector2Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; - negativeRes = testSpecification(doc, negative2); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); -} - -TEST_CASE("Documentation: BoolVector3Verifier", "[documentation]") { - using namespace openspace::documentation; - - Documentation doc { - { { "a", new BoolVector3Verifier, Optional::No } } - }; - - ghoul::Dictionary positive { - { "a", glm::bvec3(true) } - }; - TestResult positiveRes = testSpecification(doc, positive); - REQUIRE(positiveRes.success); - REQUIRE(positiveRes.offenses.empty()); - - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 }, { "3", "s" } } } - }; - TestResult negativeRes = testSpecification(doc, negative); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2381,20 +2226,25 @@ TEST_CASE("Documentation: BoolVector3Verifier", "[documentation]") { TEST_CASE("Documentation: IntVector3Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new IntVector3Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::ivec3(2) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::ivec3(2)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1 }, { "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2402,9 +2252,8 @@ TEST_CASE("Documentation: IntVector3Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2414,20 +2263,25 @@ TEST_CASE("Documentation: IntVector3Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleVector3Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleVector3Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dvec3(2.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dvec3(2.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 }, { "3", "s"} } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2435,42 +2289,8 @@ TEST_CASE("Documentation: DoubleVector3Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; - negativeRes = testSpecification(doc, negative2); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); -} - -TEST_CASE("Documentation: BoolVector4Verifier", "[documentation]") { - using namespace openspace::documentation; - - Documentation doc { - { { "a", new BoolVector4Verifier, Optional::No } } - }; - - ghoul::Dictionary positive { - { "a", glm::bvec4(true) } - }; - TestResult positiveRes = testSpecification(doc, positive); - REQUIRE(positiveRes.success); - REQUIRE(positiveRes.offenses.empty()); - - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 }, { "3", "s" }, { "4", 1 }}} - }; - TestResult negativeRes = testSpecification(doc, negative); - REQUIRE_FALSE(negativeRes.success); - REQUIRE(negativeRes.offenses.size() == 1); - REQUIRE(negativeRes.offenses[0].offender == "a"); - REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2480,20 +2300,26 @@ TEST_CASE("Documentation: BoolVector4Verifier", "[documentation]") { TEST_CASE("Documentation: IntVector4Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new IntVector4Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::ivec4(2) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::ivec4(2)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1 },{ "3", "s" }, { "4", 1 } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1); + inner.setValue("3", "s"s); + inner.setValue("4", 1); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2501,9 +2327,8 @@ TEST_CASE("Documentation: IntVector4Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2{ - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2513,20 +2338,26 @@ TEST_CASE("Documentation: IntVector4Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleVector4Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleVector4Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dvec4(2.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dvec4(2.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" }, { "4", 1 } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + inner.setValue("4", 1); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2534,9 +2365,8 @@ TEST_CASE("Documentation: DoubleVector4Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2546,20 +2376,25 @@ TEST_CASE("Documentation: DoubleVector4Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix2x2Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix2x2Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat2x2(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat2x2(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary { { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2567,9 +2402,8 @@ TEST_CASE("Documentation: DoubleMatrix2x2Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2579,30 +2413,34 @@ TEST_CASE("Documentation: DoubleMatrix2x2Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix2x3Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix2x3Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat2x3(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat2x3(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } - }; + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); + } TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2612,20 +2450,25 @@ TEST_CASE("Documentation: DoubleMatrix2x3Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix2x4Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix2x4Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat2x4(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat2x4(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2633,9 +2476,8 @@ TEST_CASE("Documentation: DoubleMatrix2x4Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2645,20 +2487,25 @@ TEST_CASE("Documentation: DoubleMatrix2x4Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix3x2Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix3x2Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat3x2(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat3x2(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2666,9 +2513,8 @@ TEST_CASE("Documentation: DoubleMatrix3x2Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2678,20 +2524,25 @@ TEST_CASE("Documentation: DoubleMatrix3x2Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix3x3Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix3x3Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat3x3(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat3x3(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2699,9 +2550,8 @@ TEST_CASE("Documentation: DoubleMatrix3x3Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2711,20 +2561,25 @@ TEST_CASE("Documentation: DoubleMatrix3x3Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix3x4Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix3x4Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat3x4(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat3x4(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2732,9 +2587,8 @@ TEST_CASE("Documentation: DoubleMatrix3x4Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2744,20 +2598,25 @@ TEST_CASE("Documentation: DoubleMatrix3x4Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix4x2Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix4x2Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat4x2(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat4x2(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2765,9 +2624,8 @@ TEST_CASE("Documentation: DoubleMatrix4x2Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2777,20 +2635,25 @@ TEST_CASE("Documentation: DoubleMatrix4x2Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix4x3Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix4x3Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat4x3(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat4x3(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2798,9 +2661,8 @@ TEST_CASE("Documentation: DoubleMatrix4x3Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2810,20 +2672,25 @@ TEST_CASE("Documentation: DoubleMatrix4x3Verifier", "[documentation]") { TEST_CASE("Documentation: DoubleMatrix4x4Verifier", "[documentation]") { using namespace openspace::documentation; + using namespace std::string_literals; Documentation doc { { { "a", new DoubleMatrix4x4Verifier, Optional::No } } }; - ghoul::Dictionary positive { - { "a", glm::dmat4x4(1.0) } - }; + ghoul::Dictionary positive; + positive.setValue("a", glm::dmat4x4(1.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - ghoul::Dictionary negative { - { "a", ghoul::Dictionary{ { "1", true },{ "2", 1.0 },{ "3", "s" } } } + ghoul::Dictionary negative; + { + ghoul::Dictionary inner; + inner.setValue("1", true); + inner.setValue("2", 1.0); + inner.setValue("3", "s"s); + negative.setValue("a", inner); }; TestResult negativeRes = testSpecification(doc, negative); REQUIRE_FALSE(negativeRes.success); @@ -2831,9 +2698,8 @@ TEST_CASE("Documentation: DoubleMatrix4x4Verifier", "[documentation]") { REQUIRE(negativeRes.offenses[0].offender == "a"); REQUIRE(negativeRes.offenses[0].reason == TestResult::Offense::Reason::WrongType); - ghoul::Dictionary negative2 { - { "a", true } - }; + ghoul::Dictionary negative2; + negative2.setValue("a", true); negativeRes = testSpecification(doc, negative2); REQUIRE_FALSE(negativeRes.success); REQUIRE(negativeRes.offenses.size() == 1); @@ -2850,62 +2716,49 @@ TEST_CASE("Documentation: DeprecatedVerifier", "[documentation]") { { "int" , new IntDeprecatedVerifier, Optional::No }, { "double", new DoubleDeprecatedVerifier, Optional::No }, { "string" , new StringDeprecatedVerifier, Optional::No }, - { "boolvec2", new DeprecatedVerifier, Optional::No }, { "intvec2", new DeprecatedVerifier, Optional::No }, { "doublevec2", new DeprecatedVerifier, Optional::No }, - { "boolvec3", new DeprecatedVerifier, Optional::No }, { "intvec3", new DeprecatedVerifier, Optional::No }, { "doublevec3", new DeprecatedVerifier, Optional::No }, - { "boolvec4", new DeprecatedVerifier, Optional::No }, { "intvec4", new DeprecatedVerifier, Optional::No }, { "doublevec4", new DeprecatedVerifier, Optional::No } }}; - ghoul::Dictionary positive { - { "bool", true }, - { "int", 1 }, - { "double", 2.0 }, - { "string" , ""s }, - { "boolvec2", glm::bvec2(false) }, - { "intvec2", glm::ivec2(0) }, - { "doublevec2", glm::dvec2(0.0) }, - { "boolvec3", glm::bvec3(false) }, - { "intvec3", glm::ivec3(0) }, - { "doublevec3", glm::dvec3(0.0) }, - { "boolvec4", glm::bvec4(false) }, - { "intvec4", glm::ivec4(0) }, - { "doublevec4", glm::dvec4(0.0) } - }; + ghoul::Dictionary positive; + positive.setValue("bool", true); + positive.setValue("int", 1); + positive.setValue("double", 2.0); + positive.setValue("string", ""s); + positive.setValue("intvec2", glm::ivec2(0)); + positive.setValue("doublevec2", glm::dvec2(0.0)); + positive.setValue("intvec3", glm::ivec3(0)); + positive.setValue("doublevec3", glm::dvec3(0.0)); + positive.setValue("intvec4", glm::ivec4(0)); + positive.setValue("doublevec4", glm::dvec4(0.0)); TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); REQUIRE(positiveRes.warnings.size() == 13); REQUIRE(positiveRes.warnings[0].offender == "bool"); REQUIRE(positiveRes.warnings[0].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[1].offender == "boolvec2"); + REQUIRE(positiveRes.warnings[1].offender == "double"); REQUIRE(positiveRes.warnings[1].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[2].offender == "boolvec3"); + REQUIRE(positiveRes.warnings[2].offender == "doublevec2"); REQUIRE(positiveRes.warnings[2].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[3].offender == "boolvec4"); + REQUIRE(positiveRes.warnings[3].offender == "doublevec3"); REQUIRE(positiveRes.warnings[3].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[4].offender == "double"); + REQUIRE(positiveRes.warnings[4].offender == "doublevec4"); REQUIRE(positiveRes.warnings[4].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[5].offender == "doublevec2"); + REQUIRE(positiveRes.warnings[5].offender == "int"); REQUIRE(positiveRes.warnings[5].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[6].offender == "doublevec3"); + REQUIRE(positiveRes.warnings[6].offender == "intvec2"); REQUIRE(positiveRes.warnings[6].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[7].offender == "doublevec4"); + REQUIRE(positiveRes.warnings[7].offender == "intvec3"); REQUIRE(positiveRes.warnings[7].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[8].offender == "int"); + REQUIRE(positiveRes.warnings[8].offender == "intvec4"); REQUIRE(positiveRes.warnings[8].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[9].offender == "intvec2"); + REQUIRE(positiveRes.warnings[9].offender == "string"); REQUIRE(positiveRes.warnings[9].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[10].offender == "intvec3"); - REQUIRE(positiveRes.warnings[10].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[11].offender == "intvec4"); - REQUIRE(positiveRes.warnings[11].reason == TestResult::Warning::Reason::Deprecated); - REQUIRE(positiveRes.warnings[12].offender == "string"); - REQUIRE(positiveRes.warnings[12].reason == TestResult::Warning::Reason::Deprecated); } TEST_CASE("Documentation: Verifier Type Post Conditions", "[documentation]") { @@ -2918,13 +2771,10 @@ TEST_CASE("Documentation: Verifier Type Post Conditions", "[documentation]") { REQUIRE(StringVerifier().type() != ""); REQUIRE(TableVerifier().type() != ""); - REQUIRE(BoolVector2Verifier().type() != ""); REQUIRE(IntVector2Verifier().type() != ""); REQUIRE(DoubleVector2Verifier().type() != ""); - REQUIRE(BoolVector3Verifier().type() != ""); REQUIRE(IntVector3Verifier().type() != ""); REQUIRE(DoubleVector3Verifier().type() != ""); - REQUIRE(BoolVector4Verifier().type() != ""); REQUIRE(IntVector4Verifier().type() != ""); REQUIRE(DoubleVector4Verifier().type() != ""); @@ -2965,13 +2815,10 @@ TEST_CASE("Documentation: Verifier Type Post Conditions", "[documentation]") { REQUIRE(DoubleAnnotationVerifier("A"s).type() != ""); REQUIRE(StringAnnotationVerifier("A"s).type() != ""); REQUIRE(TableAnnotationVerifier("A"s).type() != ""); - REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); - REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); - REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); REQUIRE(AnnotationVerifier("A"s).type() != ""); @@ -2980,13 +2827,10 @@ TEST_CASE("Documentation: Verifier Type Post Conditions", "[documentation]") { REQUIRE(DoubleDeprecatedVerifier().type() != ""); REQUIRE(StringDeprecatedVerifier().type() != ""); REQUIRE(TableDeprecatedVerifier().type() != ""); - REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); - REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); - REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); REQUIRE(DeprecatedVerifier().type() != ""); @@ -3003,13 +2847,10 @@ TEST_CASE("Documentation: Verifier Documentation Post Conditions", "[documentati REQUIRE(StringVerifier().documentation() != ""); REQUIRE(TableVerifier().documentation() != ""); - REQUIRE(BoolVector2Verifier().documentation() != ""); REQUIRE(IntVector2Verifier().documentation() != ""); REQUIRE(DoubleVector2Verifier().documentation() != ""); - REQUIRE(BoolVector3Verifier().documentation() != ""); REQUIRE(IntVector3Verifier().documentation() != ""); REQUIRE(DoubleVector3Verifier().documentation() != ""); - REQUIRE(BoolVector4Verifier().documentation() != ""); REQUIRE(IntVector4Verifier().documentation() != ""); REQUIRE(DoubleVector4Verifier().documentation() != ""); @@ -3050,13 +2891,10 @@ TEST_CASE("Documentation: Verifier Documentation Post Conditions", "[documentati REQUIRE(DoubleAnnotationVerifier("A"s).documentation() != ""); REQUIRE(StringAnnotationVerifier("A"s).documentation() != ""); REQUIRE(TableAnnotationVerifier("A"s).documentation() != ""); - REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); - REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); - REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); REQUIRE(AnnotationVerifier("A"s).documentation() != ""); @@ -3065,13 +2903,10 @@ TEST_CASE("Documentation: Verifier Documentation Post Conditions", "[documentati REQUIRE(DoubleDeprecatedVerifier().documentation() != ""); REQUIRE(StringDeprecatedVerifier().documentation() != ""); REQUIRE(TableDeprecatedVerifier().documentation() != ""); - REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); - REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); - REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); REQUIRE(DeprecatedVerifier().documentation() != ""); diff --git a/tests/test_scriptscheduler.cpp b/tests/test_scriptscheduler.cpp index fc3b2d9b40..cf60e88dc2 100644 --- a/tests/test_scriptscheduler.cpp +++ b/tests/test_scriptscheduler.cpp @@ -42,14 +42,17 @@ TEST_CASE("ScriptScheduler: Simple Forward", "[scriptscheduler]") { ScriptScheduler scheduler; - ghoul::Dictionary testDictionary = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary; + testDictionary.setValue("Time", "2000 JAN 03"s); + testDictionary.setValue("ForwardScript", "ForwardScript1"s); + testDictionary.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary); + } scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ { "1", testDictionary } }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -70,26 +73,24 @@ TEST_CASE("ScriptScheduler: Multiple Forward Single Jump", "[scriptscheduler]") using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); - }; - + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -114,25 +115,24 @@ TEST_CASE("ScriptScheduler: Multiple Forward Ordering", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } ScriptScheduler scheduler; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -154,18 +154,18 @@ TEST_CASE("ScriptScheduler: Simple Backward", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary; + testDictionary.setValue("Time", "2000 JAN 03"s); + testDictionary.setValue("ForwardScript", "ForwardScript1"s); + testDictionary.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 05")); - scheduler.loadScripts({ - { "1", testDictionary } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 04")); REQUIRE(res.first == res.second); @@ -186,25 +186,24 @@ TEST_CASE("ScriptScheduler: Multiple Backward Single Jump", "[scriptscheduler]") using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); REQUIRE(res.first == res.second); @@ -229,25 +228,24 @@ TEST_CASE("ScriptScheduler: Multiple Backward Ordering", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); REQUIRE(res.first == res.second); @@ -299,25 +297,24 @@ TEST_CASE("ScriptScheduler: Forward Backwards", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 04")); REQUIRE(std::distance(res.first, res.second) == 1); @@ -346,25 +343,24 @@ TEST_CASE("ScriptScheduler: Rewind", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); REQUIRE(std::distance(res.first, res.second) == 2); @@ -409,31 +405,29 @@ TEST_CASE("ScriptScheduler: All Scripts", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); - ghoul::Dictionary testDictionary3 = { - { "Time", "2000 JAN 10"s }, - { "ForwardScript", "ForwardScript3"s }, - { "BackwardScript", "BackwardScript3"s } - }; + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts.setValue("2", testDictionary2); + + ghoul::Dictionary testDictionary3; + testDictionary3.setValue("Time", "2000 JAN 10"s); + testDictionary3.setValue("ForwardScript", "ForwardScript3"s); + testDictionary3.setValue("BackwardScript", "BackwardScript3"s); + scripts.setValue("3", testDictionary3); + } - scheduler.loadScripts({ - { "1", testDictionary1 }, - { "2", testDictionary2 }, - { "3", testDictionary3 } - }); + ScriptScheduler scheduler; + scheduler.loadScripts(scripts); auto allScripts = scheduler.allScripts(); REQUIRE(allScripts.size() == 3); @@ -453,17 +447,17 @@ TEST_CASE("ScriptScheduler: Jump Equal", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03 12:00:00"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - scheduler.loadScripts({ - { "1", testDictionary1 } - }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 03 11:00:00")); REQUIRE(res.first == res.second); @@ -491,15 +485,17 @@ TEST_CASE("ScriptScheduler: Same Time", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", scripts); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03 12:00:00"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - scheduler.loadScripts({ { "1", testDictionary1 } }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 03 12:00:00")); REQUIRE(std::distance(res.first, res.second) == 1); @@ -520,15 +516,17 @@ TEST_CASE("ScriptScheduler: Multi Inner Jump", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts.setValue("1", testDictionary1); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03 12:00:00"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - scheduler.loadScripts({ { "1", testDictionary1 } }); + scheduler.loadScripts(scripts); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 03 10:00:00")); REQUIRE(res.first == res.second); @@ -558,25 +556,29 @@ TEST_CASE( using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } - }; ScriptScheduler scheduler; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -602,23 +604,28 @@ TEST_CASE("ScriptScheduler: Multiple Forward Ordering Multiple Load" "[scriptsch using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } ScriptScheduler scheduler; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -643,23 +650,28 @@ TEST_CASE( using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } + + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); REQUIRE(res.first == res.second); @@ -689,21 +701,27 @@ TEST_CASE( ScriptScheduler scheduler; - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); std::pair res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); @@ -726,23 +744,28 @@ TEST_CASE("ScriptScheduler: Forward Backwards Multiple Load", "[scriptscheduler] using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } + + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 04")); REQUIRE(std::distance(res.first, res.second) == 1); @@ -771,23 +794,28 @@ TEST_CASE("ScriptScheduler: Rewind Multiple Load", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", scripts1); + } + + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", testDictionary2); + } + ScriptScheduler scheduler; - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); REQUIRE(std::distance(res.first, res.second) == 2); @@ -810,30 +838,37 @@ TEST_CASE("ScriptScheduler: All Scripts Multiple Load", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", testDictionary1); + } + + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", scripts2); + } + + ghoul::Dictionary scripts3; + { + ghoul::Dictionary testDictionary3; + testDictionary3.setValue("Time", "2000 JAN 10"s); + testDictionary3.setValue("ForwardScript", "ForwardScript3"s); + testDictionary3.setValue("BackwardScript", "BackwardScript3"s); + scripts3.setValue("1", testDictionary3); + } + ScriptScheduler scheduler; - - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - - ghoul::Dictionary testDictionary3 = { - { "Time", "2000 JAN 10"s }, - { "ForwardScript", "ForwardScript3"s }, - { "BackwardScript", "BackwardScript3"s } - }; - - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 } }); - scheduler.loadScripts({ { "1", testDictionary3 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); + scheduler.loadScripts(scripts3); auto allScripts = scheduler.allScripts(); REQUIRE(allScripts.size() == 3); @@ -853,29 +888,35 @@ TEST_CASE("ScriptScheduler: All Scripts Mixed Load", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; + + + ghoul::Dictionary scripts1; + { + ghoul::Dictionary testDictionary1; + testDictionary1.setValue("Time", "2000 JAN 03"s); + testDictionary1.setValue("ForwardScript", "ForwardScript1"s); + testDictionary1.setValue("BackwardScript", "BackwardScript1"s); + scripts1.setValue("1", testDictionary1); + } + + ghoul::Dictionary scripts2; + { + ghoul::Dictionary testDictionary2; + testDictionary2.setValue("Time", "2000 JAN 05"s); + testDictionary2.setValue("ForwardScript", "ForwardScript2"s); + testDictionary2.setValue("BackwardScript", "BackwardScript2"s); + scripts2.setValue("1", scripts2); + + ghoul::Dictionary testDictionary3; + testDictionary3.setValue("Time", "2000 JAN 10"s); + testDictionary3.setValue("ForwardScript", "ForwardScript3"s); + testDictionary3.setValue("BackwardScript", "BackwardScript3"s); + scripts2.setValue("2", testDictionary3); + } + ScriptScheduler scheduler; - - - ghoul::Dictionary testDictionary1 = { - { "Time", "2000 JAN 03"s }, - { "ForwardScript", "ForwardScript1"s }, - { "BackwardScript", "BackwardScript1"s } - }; - - ghoul::Dictionary testDictionary2 = { - { "Time", "2000 JAN 05"s }, - { "ForwardScript", "ForwardScript2"s }, - { "BackwardScript", "BackwardScript2"s } - }; - - ghoul::Dictionary testDictionary3 = { - { "Time", "2000 JAN 10"s }, - { "ForwardScript", "ForwardScript3"s }, - { "BackwardScript", "BackwardScript3"s } - }; - - scheduler.loadScripts({ { "1", testDictionary1 } }); - scheduler.loadScripts({ { "1", testDictionary2 }, { "2", testDictionary3 } }); + scheduler.loadScripts(scripts1); + scheduler.loadScripts(scripts2); auto allScripts = scheduler.allScripts(); REQUIRE(allScripts.size() == 3); From 7004c02b86ee0e32d3b95e08094561dba3ba537f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 15:26:51 +0100 Subject: [PATCH 074/147] Happy new year --- CMakeLists.txt | 2 +- LICENSE.md | 2 +- apps/CMakeLists.txt | 2 +- apps/OpenSpace-MinVR/CMakeLists.txt | 2 +- apps/OpenSpace-MinVR/main.cpp | 2 +- apps/OpenSpace/CMakeLists.txt | 2 +- apps/OpenSpace/ext/launcher/CMakeLists.txt | 2 +- apps/OpenSpace/ext/launcher/include/filesystemaccess.h | 2 +- apps/OpenSpace/ext/launcher/include/launcherwindow.h | 2 +- .../ext/launcher/include/profile/additionalscriptsdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/cameradialog.h | 2 +- .../OpenSpace/ext/launcher/include/profile/deltatimesdialog.h | 2 +- .../ext/launcher/include/profile/keybindingsdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/line.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/metadialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/profileedit.h | 2 +- .../OpenSpace/ext/launcher/include/profile/propertiesdialog.h | 2 +- apps/OpenSpace/ext/launcher/include/profile/timedialog.h | 2 +- apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp | 2 +- apps/OpenSpace/ext/launcher/src/launcherwindow.cpp | 2 +- .../ext/launcher/src/profile/additionalscriptsdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/line.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp | 2 +- apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp | 2 +- apps/OpenSpace/ext/sgct | 2 +- apps/OpenSpace/main.cpp | 2 +- apps/Sync/CMakeLists.txt | 2 +- apps/Sync/main.cpp | 2 +- apps/TaskRunner/CMakeLists.txt | 2 +- apps/TaskRunner/main.cpp | 2 +- apps/Wormhole/CMakeLists.txt | 2 +- apps/Wormhole/main.cpp | 2 +- ext/CMakeLists.txt | 2 +- ext/ghoul | 2 +- include/openspace/documentation/core_registration.h | 2 +- include/openspace/documentation/documentation.h | 2 +- include/openspace/documentation/documentationengine.h | 2 +- include/openspace/documentation/documentationgenerator.h | 2 +- include/openspace/documentation/verifier.h | 2 +- include/openspace/documentation/verifier.inl | 2 +- include/openspace/engine/configuration.h | 2 +- include/openspace/engine/downloadmanager.h | 2 +- include/openspace/engine/globals.h | 2 +- include/openspace/engine/globalscallbacks.h | 2 +- include/openspace/engine/logfactory.h | 2 +- include/openspace/engine/moduleengine.h | 2 +- include/openspace/engine/moduleengine.inl | 2 +- include/openspace/engine/openspaceengine.h | 2 +- include/openspace/engine/syncengine.h | 2 +- include/openspace/engine/virtualpropertymanager.h | 2 +- include/openspace/engine/windowdelegate.h | 2 +- include/openspace/interaction/camerainteractionstates.h | 2 +- include/openspace/interaction/delayedvariable.h | 2 +- include/openspace/interaction/delayedvariable.inl | 2 +- include/openspace/interaction/externinteraction.h | 2 +- include/openspace/interaction/inputstate.h | 2 +- include/openspace/interaction/interactionmonitor.h | 2 +- include/openspace/interaction/interpolator.h | 2 +- include/openspace/interaction/interpolator.inl | 2 +- include/openspace/interaction/joystickcamerastates.h | 2 +- include/openspace/interaction/joystickinputstate.h | 2 +- include/openspace/interaction/keybindingmanager.h | 2 +- include/openspace/interaction/keyframenavigator.h | 2 +- include/openspace/interaction/mousecamerastates.h | 2 +- include/openspace/interaction/navigationhandler.h | 2 +- include/openspace/interaction/orbitalnavigator.h | 2 +- include/openspace/interaction/scriptcamerastates.h | 2 +- include/openspace/interaction/sessionrecording.h | 2 +- include/openspace/interaction/sessionrecording.inl | 2 +- include/openspace/interaction/shortcutmanager.h | 2 +- .../openspace/interaction/tasks/convertrecfileversiontask.h | 2 +- include/openspace/interaction/tasks/convertrecformattask.h | 2 +- include/openspace/interaction/touchbar.h | 2 +- include/openspace/interaction/websocketcamerastates.h | 2 +- include/openspace/interaction/websocketinputstate.h | 2 +- include/openspace/json.h | 2 +- include/openspace/mission/mission.h | 2 +- include/openspace/mission/missionmanager.h | 2 +- include/openspace/network/messagestructures.h | 2 +- include/openspace/network/parallelconnection.h | 2 +- include/openspace/network/parallelpeer.h | 2 +- include/openspace/network/parallelserver.h | 2 +- include/openspace/properties/matrix/dmat2property.h | 2 +- include/openspace/properties/matrix/dmat2x3property.h | 2 +- include/openspace/properties/matrix/dmat2x4property.h | 2 +- include/openspace/properties/matrix/dmat3property.h | 2 +- include/openspace/properties/matrix/dmat3x2property.h | 2 +- include/openspace/properties/matrix/dmat3x4property.h | 2 +- include/openspace/properties/matrix/dmat4property.h | 2 +- include/openspace/properties/matrix/dmat4x2property.h | 2 +- include/openspace/properties/matrix/dmat4x3property.h | 2 +- include/openspace/properties/matrix/mat2property.h | 2 +- include/openspace/properties/matrix/mat2x3property.h | 2 +- include/openspace/properties/matrix/mat2x4property.h | 2 +- include/openspace/properties/matrix/mat3property.h | 2 +- include/openspace/properties/matrix/mat3x2property.h | 2 +- include/openspace/properties/matrix/mat3x4property.h | 2 +- include/openspace/properties/matrix/mat4property.h | 2 +- include/openspace/properties/matrix/mat4x2property.h | 2 +- include/openspace/properties/matrix/mat4x3property.h | 2 +- include/openspace/properties/numericalproperty.h | 2 +- include/openspace/properties/numericalproperty.inl | 2 +- include/openspace/properties/optionproperty.h | 2 +- include/openspace/properties/property.h | 2 +- include/openspace/properties/propertydelegate.h | 2 +- include/openspace/properties/propertydelegate.inl | 2 +- include/openspace/properties/propertyowner.h | 2 +- include/openspace/properties/scalar/boolproperty.h | 2 +- include/openspace/properties/scalar/charproperty.h | 2 +- include/openspace/properties/scalar/doubleproperty.h | 2 +- include/openspace/properties/scalar/floatproperty.h | 2 +- include/openspace/properties/scalar/intproperty.h | 2 +- include/openspace/properties/scalar/longdoubleproperty.h | 2 +- include/openspace/properties/scalar/longlongproperty.h | 2 +- include/openspace/properties/scalar/longproperty.h | 2 +- include/openspace/properties/scalar/shortproperty.h | 2 +- include/openspace/properties/scalar/signedcharproperty.h | 2 +- include/openspace/properties/scalar/ucharproperty.h | 2 +- include/openspace/properties/scalar/uintproperty.h | 2 +- include/openspace/properties/scalar/ulonglongproperty.h | 2 +- include/openspace/properties/scalar/ulongproperty.h | 2 +- include/openspace/properties/scalar/ushortproperty.h | 2 +- include/openspace/properties/scalar/wcharproperty.h | 2 +- include/openspace/properties/selectionproperty.h | 2 +- include/openspace/properties/stringlistproperty.h | 2 +- include/openspace/properties/stringproperty.h | 2 +- include/openspace/properties/templateproperty.h | 2 +- include/openspace/properties/templateproperty.inl | 2 +- include/openspace/properties/triggerproperty.h | 2 +- include/openspace/properties/vector/bvec2property.h | 2 +- include/openspace/properties/vector/bvec3property.h | 2 +- include/openspace/properties/vector/bvec4property.h | 2 +- include/openspace/properties/vector/dvec2property.h | 2 +- include/openspace/properties/vector/dvec3property.h | 2 +- include/openspace/properties/vector/dvec4property.h | 2 +- include/openspace/properties/vector/ivec2property.h | 2 +- include/openspace/properties/vector/ivec3property.h | 2 +- include/openspace/properties/vector/ivec4property.h | 2 +- include/openspace/properties/vector/uvec2property.h | 2 +- include/openspace/properties/vector/uvec3property.h | 2 +- include/openspace/properties/vector/uvec4property.h | 2 +- include/openspace/properties/vector/vec2property.h | 2 +- include/openspace/properties/vector/vec3property.h | 2 +- include/openspace/properties/vector/vec4property.h | 2 +- include/openspace/query/query.h | 2 +- include/openspace/rendering/abufferrenderer.h | 2 +- include/openspace/rendering/dashboard.h | 2 +- include/openspace/rendering/dashboarditem.h | 2 +- include/openspace/rendering/deferredcaster.h | 2 +- include/openspace/rendering/deferredcasterlistener.h | 2 +- include/openspace/rendering/deferredcastermanager.h | 2 +- include/openspace/rendering/framebufferrenderer.h | 2 +- include/openspace/rendering/helper.h | 2 +- include/openspace/rendering/loadingscreen.h | 2 +- include/openspace/rendering/luaconsole.h | 2 +- include/openspace/rendering/raycasterlistener.h | 2 +- include/openspace/rendering/raycastermanager.h | 2 +- include/openspace/rendering/renderable.h | 2 +- include/openspace/rendering/renderengine.h | 2 +- include/openspace/rendering/renderer.h | 2 +- include/openspace/rendering/screenspacerenderable.h | 2 +- include/openspace/rendering/transferfunction.h | 2 +- include/openspace/rendering/volume.h | 2 +- include/openspace/rendering/volumeraycaster.h | 2 +- include/openspace/scene/asset.h | 2 +- include/openspace/scene/assetlistener.h | 2 +- include/openspace/scene/assetloader.h | 2 +- include/openspace/scene/assetmanager.h | 2 +- include/openspace/scene/lightsource.h | 2 +- include/openspace/scene/profile.h | 2 +- include/openspace/scene/rotation.h | 2 +- include/openspace/scene/scale.h | 2 +- include/openspace/scene/scene.h | 2 +- include/openspace/scene/scenegraphnode.h | 2 +- include/openspace/scene/sceneinitializer.h | 2 +- include/openspace/scene/scenelicensewriter.h | 2 +- include/openspace/scene/timeframe.h | 2 +- include/openspace/scene/translation.h | 2 +- include/openspace/scripting/lualibrary.h | 2 +- include/openspace/scripting/scriptengine.h | 2 +- include/openspace/scripting/scriptscheduler.h | 2 +- include/openspace/scripting/systemcapabilitiesbinding.h | 2 +- include/openspace/util/blockplaneintersectiongeometry.h | 2 +- include/openspace/util/boxgeometry.h | 2 +- include/openspace/util/camera.h | 2 +- include/openspace/util/concurrentjobmanager.h | 2 +- include/openspace/util/concurrentjobmanager.inl | 2 +- include/openspace/util/concurrentqueue.h | 2 +- include/openspace/util/concurrentqueue.inl | 2 +- include/openspace/util/coordinateconversion.h | 2 +- include/openspace/util/distanceconstants.h | 2 +- include/openspace/util/distanceconversion.h | 2 +- include/openspace/util/factorymanager.h | 2 +- include/openspace/util/factorymanager.inl | 2 +- include/openspace/util/histogram.h | 2 +- include/openspace/util/httprequest.h | 2 +- include/openspace/util/job.h | 2 +- include/openspace/util/keys.h | 2 +- include/openspace/util/memorymanager.h | 2 +- include/openspace/util/mouse.h | 2 +- include/openspace/util/openspacemodule.h | 2 +- include/openspace/util/progressbar.h | 2 +- include/openspace/util/resourcesynchronization.h | 2 +- include/openspace/util/screenlog.h | 2 +- include/openspace/util/sphere.h | 2 +- include/openspace/util/spicemanager.h | 2 +- include/openspace/util/syncable.h | 2 +- include/openspace/util/syncbuffer.h | 2 +- include/openspace/util/syncbuffer.inl | 2 +- include/openspace/util/syncdata.h | 2 +- include/openspace/util/syncdata.inl | 2 +- include/openspace/util/synchronizationwatcher.h | 2 +- include/openspace/util/task.h | 2 +- include/openspace/util/taskloader.h | 2 +- include/openspace/util/threadpool.h | 2 +- include/openspace/util/time.h | 2 +- include/openspace/util/timeconversion.h | 2 +- include/openspace/util/timeline.h | 2 +- include/openspace/util/timeline.inl | 2 +- include/openspace/util/timemanager.h | 2 +- include/openspace/util/timerange.h | 2 +- include/openspace/util/touch.h | 2 +- include/openspace/util/transformationmanager.h | 2 +- include/openspace/util/updatestructures.h | 2 +- include/openspace/util/versionchecker.h | 2 +- modules/CMakeLists.txt | 2 +- modules/atmosphere/CMakeLists.txt | 2 +- modules/atmosphere/atmospheremodule.cpp | 2 +- modules/atmosphere/atmospheremodule.h | 2 +- modules/atmosphere/rendering/atmospheredeferredcaster.cpp | 2 +- modules/atmosphere/rendering/atmospheredeferredcaster.h | 2 +- modules/atmosphere/rendering/renderableatmosphere.cpp | 2 +- modules/atmosphere/rendering/renderableatmosphere.h | 2 +- modules/atmosphere/shaders/atmosphere_common.glsl | 2 +- modules/atmosphere/shaders/atmosphere_deferred_fs.glsl | 2 +- modules/atmosphere/shaders/atmosphere_deferred_vs.glsl | 2 +- modules/atmosphere/shaders/deltaE_calc_fs.glsl | 2 +- modules/atmosphere/shaders/deltaE_calc_vs.glsl | 2 +- modules/atmosphere/shaders/deltaJ_calc_fs.glsl | 2 +- modules/atmosphere/shaders/deltaJ_calc_gs.glsl | 2 +- modules/atmosphere/shaders/deltaJ_calc_vs.glsl | 2 +- modules/atmosphere/shaders/deltaS_calc_fs.glsl | 2 +- modules/atmosphere/shaders/deltaS_calc_gs.glsl | 2 +- modules/atmosphere/shaders/deltaS_calc_vs.glsl | 2 +- modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl | 2 +- modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl | 2 +- modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl | 2 +- modules/atmosphere/shaders/inScattering_calc_fs.glsl | 2 +- modules/atmosphere/shaders/inScattering_calc_gs.glsl | 2 +- modules/atmosphere/shaders/inScattering_calc_vs.glsl | 2 +- modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl | 2 +- modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl | 2 +- modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl | 2 +- modules/atmosphere/shaders/irradiance_calc_fs.glsl | 2 +- modules/atmosphere/shaders/irradiance_calc_vs.glsl | 2 +- modules/atmosphere/shaders/irradiance_final_fs.glsl | 2 +- modules/atmosphere/shaders/irradiance_final_vs.glsl | 2 +- modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl | 2 +- modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl | 2 +- modules/atmosphere/shaders/transmittance_calc_fs.glsl | 2 +- modules/atmosphere/shaders/transmittance_calc_vs.glsl | 2 +- modules/base/CMakeLists.txt | 2 +- modules/base/basemodule.cpp | 2 +- modules/base/basemodule.h | 2 +- modules/base/dashboard/dashboarditemangle.cpp | 2 +- modules/base/dashboard/dashboarditemangle.h | 2 +- modules/base/dashboard/dashboarditemdate.cpp | 2 +- modules/base/dashboard/dashboarditemdate.h | 2 +- modules/base/dashboard/dashboarditemdistance.cpp | 2 +- modules/base/dashboard/dashboarditemdistance.h | 2 +- modules/base/dashboard/dashboarditemframerate.cpp | 2 +- modules/base/dashboard/dashboarditemframerate.h | 2 +- modules/base/dashboard/dashboarditemmission.cpp | 2 +- modules/base/dashboard/dashboarditemmission.h | 2 +- modules/base/dashboard/dashboarditemparallelconnection.cpp | 2 +- modules/base/dashboard/dashboarditemparallelconnection.h | 2 +- modules/base/dashboard/dashboarditempropertyvalue.cpp | 2 +- modules/base/dashboard/dashboarditempropertyvalue.h | 2 +- modules/base/dashboard/dashboarditemsimulationincrement.cpp | 2 +- modules/base/dashboard/dashboarditemsimulationincrement.h | 2 +- modules/base/dashboard/dashboarditemspacing.cpp | 2 +- modules/base/dashboard/dashboarditemspacing.h | 2 +- modules/base/dashboard/dashboarditemtext.cpp | 2 +- modules/base/dashboard/dashboarditemtext.h | 2 +- modules/base/dashboard/dashboarditemvelocity.cpp | 2 +- modules/base/dashboard/dashboarditemvelocity.h | 2 +- modules/base/lightsource/cameralightsource.cpp | 2 +- modules/base/lightsource/cameralightsource.h | 2 +- modules/base/lightsource/scenegraphlightsource.cpp | 2 +- modules/base/lightsource/scenegraphlightsource.h | 2 +- modules/base/rendering/grids/renderableboxgrid.cpp | 2 +- modules/base/rendering/grids/renderableboxgrid.h | 2 +- modules/base/rendering/grids/renderablegrid.cpp | 2 +- modules/base/rendering/grids/renderablegrid.h | 2 +- modules/base/rendering/grids/renderableradialgrid.cpp | 2 +- modules/base/rendering/grids/renderableradialgrid.h | 2 +- modules/base/rendering/grids/renderablesphericalgrid.cpp | 2 +- modules/base/rendering/grids/renderablesphericalgrid.h | 2 +- modules/base/rendering/modelgeometry.cpp | 2 +- modules/base/rendering/modelgeometry.h | 2 +- modules/base/rendering/multimodelgeometry.cpp | 2 +- modules/base/rendering/multimodelgeometry.h | 2 +- modules/base/rendering/renderablecartesianaxes.cpp | 2 +- modules/base/rendering/renderablecartesianaxes.h | 2 +- modules/base/rendering/renderablelabels.cpp | 2 +- modules/base/rendering/renderablelabels.h | 2 +- modules/base/rendering/renderablemodel.cpp | 2 +- modules/base/rendering/renderablemodel.h | 2 +- modules/base/rendering/renderablenodeline.cpp | 2 +- modules/base/rendering/renderablenodeline.h | 2 +- modules/base/rendering/renderableplane.cpp | 2 +- modules/base/rendering/renderableplane.h | 2 +- modules/base/rendering/renderableplaneimagelocal.cpp | 2 +- modules/base/rendering/renderableplaneimagelocal.h | 2 +- modules/base/rendering/renderableplaneimageonline.cpp | 2 +- modules/base/rendering/renderableplaneimageonline.h | 2 +- modules/base/rendering/renderablesphere.cpp | 2 +- modules/base/rendering/renderablesphere.h | 2 +- modules/base/rendering/renderabletrail.cpp | 2 +- modules/base/rendering/renderabletrail.h | 2 +- modules/base/rendering/renderabletrailorbit.cpp | 2 +- modules/base/rendering/renderabletrailorbit.h | 2 +- modules/base/rendering/renderabletrailtrajectory.cpp | 2 +- modules/base/rendering/renderabletrailtrajectory.h | 2 +- modules/base/rendering/screenspacedashboard.cpp | 2 +- modules/base/rendering/screenspacedashboard.h | 2 +- modules/base/rendering/screenspaceframebuffer.cpp | 2 +- modules/base/rendering/screenspaceframebuffer.h | 2 +- modules/base/rendering/screenspaceimagelocal.cpp | 2 +- modules/base/rendering/screenspaceimagelocal.h | 2 +- modules/base/rendering/screenspaceimageonline.cpp | 2 +- modules/base/rendering/screenspaceimageonline.h | 2 +- modules/base/rotation/constantrotation.cpp | 2 +- modules/base/rotation/constantrotation.h | 2 +- modules/base/rotation/fixedrotation.cpp | 2 +- modules/base/rotation/fixedrotation.h | 2 +- modules/base/rotation/luarotation.cpp | 2 +- modules/base/rotation/luarotation.h | 2 +- modules/base/rotation/staticrotation.cpp | 2 +- modules/base/rotation/staticrotation.h | 2 +- modules/base/rotation/timelinerotation.cpp | 2 +- modules/base/rotation/timelinerotation.h | 2 +- modules/base/scale/luascale.cpp | 2 +- modules/base/scale/luascale.h | 2 +- modules/base/scale/nonuniformstaticscale.cpp | 2 +- modules/base/scale/nonuniformstaticscale.h | 2 +- modules/base/scale/staticscale.cpp | 2 +- modules/base/scale/staticscale.h | 2 +- modules/base/scale/timedependentscale.cpp | 2 +- modules/base/scale/timedependentscale.h | 2 +- modules/base/shaders/axes_fs.glsl | 2 +- modules/base/shaders/axes_vs.glsl | 2 +- modules/base/shaders/grid_fs.glsl | 2 +- modules/base/shaders/grid_vs.glsl | 2 +- modules/base/shaders/imageplane_fs.glsl | 2 +- modules/base/shaders/imageplane_vs.glsl | 2 +- modules/base/shaders/line_fs.glsl | 2 +- modules/base/shaders/line_vs.glsl | 2 +- modules/base/shaders/model_fs.glsl | 2 +- modules/base/shaders/model_vs.glsl | 2 +- modules/base/shaders/plane_fs.glsl | 2 +- modules/base/shaders/plane_vs.glsl | 2 +- modules/base/shaders/renderabletrail_apple_fs.glsl | 2 +- modules/base/shaders/renderabletrail_apple_vs.glsl | 2 +- modules/base/shaders/renderabletrail_fs.glsl | 2 +- modules/base/shaders/renderabletrail_vs.glsl | 2 +- modules/base/shaders/screenspace_fs.glsl | 2 +- modules/base/shaders/screenspace_vs.glsl | 2 +- modules/base/shaders/sphere_fs.glsl | 2 +- modules/base/shaders/sphere_vs.glsl | 2 +- modules/base/timeframe/timeframeinterval.cpp | 2 +- modules/base/timeframe/timeframeinterval.h | 2 +- modules/base/timeframe/timeframeunion.cpp | 2 +- modules/base/timeframe/timeframeunion.h | 2 +- modules/base/translation/luatranslation.cpp | 2 +- modules/base/translation/luatranslation.h | 2 +- modules/base/translation/statictranslation.cpp | 2 +- modules/base/translation/statictranslation.h | 2 +- modules/base/translation/timelinetranslation.cpp | 2 +- modules/base/translation/timelinetranslation.h | 2 +- modules/cefwebgui/CMakeLists.txt | 2 +- modules/cefwebgui/cefwebguimodule.cpp | 2 +- modules/cefwebgui/cefwebguimodule.h | 2 +- modules/cefwebgui/include/guikeyboardhandler.h | 2 +- modules/cefwebgui/include/guirenderhandler.h | 2 +- modules/cefwebgui/shaders/gui_fs.glsl | 2 +- modules/cefwebgui/shaders/gui_vs.glsl | 2 +- modules/cefwebgui/src/guikeyboardhandler.cpp | 2 +- modules/cefwebgui/src/guirenderhandler.cpp | 2 +- modules/debugging/CMakeLists.txt | 2 +- modules/debugging/debuggingmodule.cpp | 2 +- modules/debugging/debuggingmodule.h | 2 +- modules/debugging/rendering/debugrenderer.cpp | 2 +- modules/debugging/rendering/debugrenderer.h | 2 +- modules/debugging/rendering/debugshader_fs.glsl | 2 +- modules/debugging/rendering/debugshader_vs.glsl | 2 +- modules/debugging/rendering/renderabledebugplane.cpp | 2 +- modules/debugging/rendering/renderabledebugplane.h | 2 +- modules/digitaluniverse/CMakeLists.txt | 2 +- modules/digitaluniverse/digitaluniversemodule.cpp | 2 +- modules/digitaluniverse/digitaluniversemodule.h | 2 +- .../digitaluniverse/rendering/renderablebillboardscloud.cpp | 2 +- modules/digitaluniverse/rendering/renderablebillboardscloud.h | 2 +- modules/digitaluniverse/rendering/renderabledumeshes.cpp | 2 +- modules/digitaluniverse/rendering/renderabledumeshes.h | 2 +- modules/digitaluniverse/rendering/renderableplanescloud.cpp | 2 +- modules/digitaluniverse/rendering/renderableplanescloud.h | 2 +- modules/digitaluniverse/rendering/renderablepoints.cpp | 2 +- modules/digitaluniverse/rendering/renderablepoints.h | 2 +- modules/digitaluniverse/shaders/billboard_fs.glsl | 2 +- modules/digitaluniverse/shaders/billboard_gs.glsl | 2 +- modules/digitaluniverse/shaders/billboard_vs.glsl | 2 +- modules/digitaluniverse/shaders/billboardpolygon_fs.glsl | 2 +- modules/digitaluniverse/shaders/billboardpolygon_gs.glsl | 2 +- modules/digitaluniverse/shaders/billboardpolygon_vs.glsl | 2 +- modules/digitaluniverse/shaders/dumesh_fs.glsl | 2 +- modules/digitaluniverse/shaders/dumesh_vs.glsl | 2 +- modules/digitaluniverse/shaders/plane_fs.glsl | 2 +- modules/digitaluniverse/shaders/plane_vs.glsl | 2 +- modules/digitaluniverse/shaders/points_fs.glsl | 2 +- modules/digitaluniverse/shaders/points_gs.glsl | 2 +- modules/digitaluniverse/shaders/points_sprite_fs.glsl | 2 +- modules/digitaluniverse/shaders/points_vs.glsl | 2 +- modules/digitaluniverse/shaders/pointssprite_fs.glsl | 2 +- modules/digitaluniverse/shaders/pointssprite_vs.glsl | 2 +- modules/exoplanets/CMakeLists.txt | 2 +- modules/exoplanets/exoplanetshelper.cpp | 2 +- modules/exoplanets/exoplanetshelper.h | 2 +- modules/exoplanets/exoplanetsmodule.cpp | 2 +- modules/exoplanets/exoplanetsmodule.h | 2 +- modules/exoplanets/exoplanetsmodule_lua.inl | 2 +- modules/exoplanets/rendering/renderableorbitdisc.cpp | 2 +- modules/exoplanets/rendering/renderableorbitdisc.h | 2 +- modules/exoplanets/shaders/orbitdisc_fs.glsl | 2 +- modules/exoplanets/shaders/orbitdisc_vs.glsl | 2 +- modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp | 2 +- modules/exoplanets/tasks/exoplanetsdatapreparationtask.h | 2 +- modules/fieldlines/CMakeLists.txt | 2 +- modules/fieldlines/fieldlinesmodule.cpp | 2 +- modules/fieldlines/fieldlinesmodule.h | 2 +- modules/fieldlines/rendering/renderablefieldlines.cpp | 2 +- modules/fieldlines/rendering/renderablefieldlines.h | 2 +- modules/fieldlines/shaders/fieldline_fs.glsl | 2 +- modules/fieldlines/shaders/fieldline_gs.glsl | 2 +- modules/fieldlines/shaders/fieldline_vs.glsl | 2 +- modules/fieldlinessequence/CMakeLists.txt | 2 +- modules/fieldlinessequence/fieldlinessequencemodule.cpp | 2 +- modules/fieldlinessequence/fieldlinessequencemodule.h | 2 +- .../rendering/renderablefieldlinessequence.cpp | 2 +- .../rendering/renderablefieldlinessequence.h | 2 +- modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl | 2 +- modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl | 2 +- modules/fieldlinessequence/util/commons.cpp | 2 +- modules/fieldlinessequence/util/commons.h | 2 +- modules/fieldlinessequence/util/fieldlinesstate.cpp | 2 +- modules/fieldlinessequence/util/fieldlinesstate.h | 2 +- modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp | 2 +- modules/fieldlinessequence/util/kameleonfieldlinehelper.h | 2 +- modules/fitsfilereader/CMakeLists.txt | 2 +- modules/fitsfilereader/fitsfilereadermodule.cpp | 2 +- modules/fitsfilereader/fitsfilereadermodule.h | 2 +- modules/fitsfilereader/include/fitsfilereader.h | 2 +- modules/fitsfilereader/src/fitsfilereader.cpp | 2 +- modules/gaia/CMakeLists.txt | 2 +- modules/gaia/gaiamodule.cpp | 2 +- modules/gaia/gaiamodule.h | 2 +- modules/gaia/rendering/gaiaoptions.h | 2 +- modules/gaia/rendering/octreeculler.cpp | 2 +- modules/gaia/rendering/octreeculler.h | 2 +- modules/gaia/rendering/octreemanager.cpp | 2 +- modules/gaia/rendering/octreemanager.h | 2 +- modules/gaia/rendering/renderablegaiastars.cpp | 2 +- modules/gaia/rendering/renderablegaiastars.h | 2 +- modules/gaia/shaders/gaia_billboard_fs.glsl | 2 +- modules/gaia/shaders/gaia_billboard_ge.glsl | 2 +- modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl | 2 +- modules/gaia/shaders/gaia_point_fs.glsl | 2 +- modules/gaia/shaders/gaia_point_ge.glsl | 2 +- modules/gaia/shaders/gaia_ssbo_vs.glsl | 2 +- modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl | 2 +- modules/gaia/shaders/gaia_tonemapping_point_fs.glsl | 2 +- modules/gaia/shaders/gaia_tonemapping_vs.glsl | 2 +- modules/gaia/shaders/gaia_vbo_vs.glsl | 2 +- modules/gaia/tasks/constructoctreetask.cpp | 2 +- modules/gaia/tasks/constructoctreetask.h | 2 +- modules/gaia/tasks/readfilejob.cpp | 2 +- modules/gaia/tasks/readfilejob.h | 2 +- modules/gaia/tasks/readfitstask.cpp | 2 +- modules/gaia/tasks/readfitstask.h | 2 +- modules/gaia/tasks/readspecktask.cpp | 2 +- modules/gaia/tasks/readspecktask.h | 2 +- modules/galaxy/CMakeLists.txt | 2 +- modules/galaxy/galaxymodule.cpp | 2 +- modules/galaxy/galaxymodule.h | 2 +- modules/galaxy/rendering/galaxyraycaster.cpp | 2 +- modules/galaxy/rendering/galaxyraycaster.h | 2 +- modules/galaxy/rendering/renderablegalaxy.cpp | 2 +- modules/galaxy/rendering/renderablegalaxy.h | 2 +- modules/galaxy/shaders/billboard_fs.glsl | 2 +- modules/galaxy/shaders/billboard_ge.glsl | 2 +- modules/galaxy/shaders/billboard_vs.glsl | 2 +- modules/galaxy/shaders/points_fs.glsl | 2 +- modules/galaxy/shaders/points_vs.glsl | 2 +- modules/galaxy/shaders/raycasterbounds_fs.glsl | 2 +- modules/galaxy/shaders/raycasterbounds_vs.glsl | 2 +- modules/galaxy/tasks/milkywayconversiontask.cpp | 2 +- modules/galaxy/tasks/milkywayconversiontask.h | 2 +- modules/galaxy/tasks/milkywaypointsconversiontask.cpp | 2 +- modules/galaxy/tasks/milkywaypointsconversiontask.h | 2 +- modules/globebrowsing/CMakeLists.txt | 2 +- modules/globebrowsing/globebrowsingmodule.cpp | 2 +- modules/globebrowsing/globebrowsingmodule.h | 2 +- modules/globebrowsing/globebrowsingmodule_lua.inl | 2 +- modules/globebrowsing/shaders/blending.hglsl | 2 +- modules/globebrowsing/shaders/globalrenderer_vs.glsl | 2 +- modules/globebrowsing/shaders/localrenderer_vs.glsl | 2 +- modules/globebrowsing/shaders/renderer_fs.glsl | 2 +- modules/globebrowsing/shaders/rings_fs.glsl | 2 +- modules/globebrowsing/shaders/rings_geom_fs.glsl | 2 +- modules/globebrowsing/shaders/rings_geom_vs.glsl | 2 +- modules/globebrowsing/shaders/rings_vs.glsl | 2 +- modules/globebrowsing/shaders/smviewer_fs.glsl | 2 +- modules/globebrowsing/shaders/smviewer_vs.glsl | 2 +- modules/globebrowsing/shaders/texturetilemapping.hglsl | 2 +- modules/globebrowsing/shaders/tile.hglsl | 2 +- modules/globebrowsing/shaders/tileheight.hglsl | 2 +- modules/globebrowsing/shaders/tilevertexskirt.hglsl | 2 +- modules/globebrowsing/src/asynctiledataprovider.cpp | 2 +- modules/globebrowsing/src/asynctiledataprovider.h | 2 +- modules/globebrowsing/src/basictypes.h | 2 +- modules/globebrowsing/src/dashboarditemglobelocation.cpp | 2 +- modules/globebrowsing/src/dashboarditemglobelocation.h | 2 +- modules/globebrowsing/src/ellipsoid.cpp | 2 +- modules/globebrowsing/src/ellipsoid.h | 2 +- modules/globebrowsing/src/gdalwrapper.cpp | 2 +- modules/globebrowsing/src/gdalwrapper.h | 2 +- modules/globebrowsing/src/geodeticpatch.cpp | 2 +- modules/globebrowsing/src/geodeticpatch.h | 2 +- modules/globebrowsing/src/globelabelscomponent.cpp | 2 +- modules/globebrowsing/src/globelabelscomponent.h | 2 +- modules/globebrowsing/src/globetranslation.cpp | 2 +- modules/globebrowsing/src/globetranslation.h | 2 +- modules/globebrowsing/src/gpulayergroup.cpp | 2 +- modules/globebrowsing/src/gpulayergroup.h | 2 +- modules/globebrowsing/src/layer.cpp | 2 +- modules/globebrowsing/src/layer.h | 2 +- modules/globebrowsing/src/layeradjustment.cpp | 2 +- modules/globebrowsing/src/layeradjustment.h | 2 +- modules/globebrowsing/src/layergroup.cpp | 2 +- modules/globebrowsing/src/layergroup.h | 2 +- modules/globebrowsing/src/layergroupid.h | 2 +- modules/globebrowsing/src/layermanager.cpp | 2 +- modules/globebrowsing/src/layermanager.h | 2 +- modules/globebrowsing/src/layerrendersettings.cpp | 2 +- modules/globebrowsing/src/layerrendersettings.h | 2 +- modules/globebrowsing/src/lrucache.h | 2 +- modules/globebrowsing/src/lrucache.inl | 2 +- modules/globebrowsing/src/lruthreadpool.h | 2 +- modules/globebrowsing/src/lruthreadpool.inl | 2 +- modules/globebrowsing/src/memoryawaretilecache.cpp | 2 +- modules/globebrowsing/src/memoryawaretilecache.h | 2 +- modules/globebrowsing/src/prioritizingconcurrentjobmanager.h | 2 +- .../globebrowsing/src/prioritizingconcurrentjobmanager.inl | 2 +- modules/globebrowsing/src/rawtile.h | 2 +- modules/globebrowsing/src/rawtiledatareader.cpp | 2 +- modules/globebrowsing/src/rawtiledatareader.h | 2 +- modules/globebrowsing/src/renderableglobe.cpp | 2 +- modules/globebrowsing/src/renderableglobe.h | 2 +- modules/globebrowsing/src/ringscomponent.cpp | 2 +- modules/globebrowsing/src/ringscomponent.h | 2 +- modules/globebrowsing/src/shadowcomponent.cpp | 2 +- modules/globebrowsing/src/shadowcomponent.h | 2 +- modules/globebrowsing/src/skirtedgrid.cpp | 2 +- modules/globebrowsing/src/skirtedgrid.h | 2 +- modules/globebrowsing/src/tileindex.cpp | 2 +- modules/globebrowsing/src/tileindex.h | 2 +- modules/globebrowsing/src/tileloadjob.cpp | 2 +- modules/globebrowsing/src/tileloadjob.h | 2 +- modules/globebrowsing/src/tileprovider.cpp | 2 +- modules/globebrowsing/src/tileprovider.h | 2 +- modules/globebrowsing/src/tiletextureinitdata.cpp | 2 +- modules/globebrowsing/src/tiletextureinitdata.h | 2 +- modules/globebrowsing/src/timequantizer.cpp | 2 +- modules/globebrowsing/src/timequantizer.h | 2 +- modules/imgui/CMakeLists.txt | 2 +- modules/imgui/ext/imgui/CMakeLists.txt | 2 +- modules/imgui/imguimodule.cpp | 2 +- modules/imgui/imguimodule.h | 2 +- modules/imgui/include/gui.h | 2 +- modules/imgui/include/guiassetcomponent.h | 2 +- modules/imgui/include/guicomponent.h | 2 +- modules/imgui/include/guifilepathcomponent.h | 2 +- modules/imgui/include/guigibscomponent.h | 2 +- modules/imgui/include/guiglobebrowsingcomponent.h | 2 +- modules/imgui/include/guihelpcomponent.h | 2 +- modules/imgui/include/guiiswacomponent.h | 2 +- modules/imgui/include/guijoystickcomponent.h | 2 +- modules/imgui/include/guimemorycomponent.h | 2 +- modules/imgui/include/guimissioncomponent.h | 2 +- modules/imgui/include/guiparallelcomponent.h | 2 +- modules/imgui/include/guipropertycomponent.h | 2 +- modules/imgui/include/guishortcutscomponent.h | 2 +- modules/imgui/include/guispacetimecomponent.h | 2 +- modules/imgui/include/imgui_include.h | 2 +- modules/imgui/include/renderproperties.h | 2 +- modules/imgui/shaders/gui_fs.glsl | 2 +- modules/imgui/shaders/gui_vs.glsl | 2 +- modules/imgui/src/gui.cpp | 2 +- modules/imgui/src/guiassetcomponent.cpp | 2 +- modules/imgui/src/guicomponent.cpp | 2 +- modules/imgui/src/guifilepathcomponent.cpp | 2 +- modules/imgui/src/guigibscomponent.cpp | 2 +- modules/imgui/src/guiglobebrowsingcomponent.cpp | 2 +- modules/imgui/src/guihelpcomponent.cpp | 2 +- modules/imgui/src/guiiswacomponent.cpp | 2 +- modules/imgui/src/guijoystickcomponent.cpp | 2 +- modules/imgui/src/guimemorycomponent.cpp | 2 +- modules/imgui/src/guimissioncomponent.cpp | 2 +- modules/imgui/src/guiparallelcomponent.cpp | 2 +- modules/imgui/src/guipropertycomponent.cpp | 2 +- modules/imgui/src/guishortcutscomponent.cpp | 2 +- modules/imgui/src/guispacetimecomponent.cpp | 2 +- modules/imgui/src/renderproperties.cpp | 2 +- modules/iswa/CMakeLists.txt | 2 +- modules/iswa/iswamodule.cpp | 2 +- modules/iswa/iswamodule.h | 2 +- modules/iswa/rendering/datacygnet.cpp | 2 +- modules/iswa/rendering/datacygnet.h | 2 +- modules/iswa/rendering/dataplane.cpp | 2 +- modules/iswa/rendering/dataplane.h | 2 +- modules/iswa/rendering/datasphere.cpp | 2 +- modules/iswa/rendering/datasphere.h | 2 +- modules/iswa/rendering/iswabasegroup.cpp | 2 +- modules/iswa/rendering/iswabasegroup.h | 2 +- modules/iswa/rendering/iswacygnet.cpp | 2 +- modules/iswa/rendering/iswacygnet.h | 2 +- modules/iswa/rendering/iswadatagroup.cpp | 2 +- modules/iswa/rendering/iswadatagroup.h | 2 +- modules/iswa/rendering/iswakameleongroup.cpp | 2 +- modules/iswa/rendering/iswakameleongroup.h | 2 +- modules/iswa/rendering/kameleonplane.cpp | 2 +- modules/iswa/rendering/kameleonplane.h | 2 +- modules/iswa/rendering/screenspacecygnet.cpp | 2 +- modules/iswa/rendering/screenspacecygnet.h | 2 +- modules/iswa/rendering/texturecygnet.cpp | 2 +- modules/iswa/rendering/texturecygnet.h | 2 +- modules/iswa/rendering/textureplane.cpp | 2 +- modules/iswa/rendering/textureplane.h | 2 +- modules/iswa/shaders/dataplane_fs.glsl | 2 +- modules/iswa/shaders/dataplane_vs.glsl | 2 +- modules/iswa/shaders/datasphere_fs.glsl | 2 +- modules/iswa/shaders/datasphere_vs.glsl | 2 +- modules/iswa/shaders/textureplane_fs.glsl | 2 +- modules/iswa/shaders/textureplane_vs.glsl | 2 +- modules/iswa/util/dataprocessor.cpp | 2 +- modules/iswa/util/dataprocessor.h | 2 +- modules/iswa/util/dataprocessorjson.cpp | 2 +- modules/iswa/util/dataprocessorjson.h | 2 +- modules/iswa/util/dataprocessorkameleon.cpp | 2 +- modules/iswa/util/dataprocessorkameleon.h | 2 +- modules/iswa/util/dataprocessortext.cpp | 2 +- modules/iswa/util/dataprocessortext.h | 2 +- modules/iswa/util/iswamanager.cpp | 2 +- modules/iswa/util/iswamanager.h | 2 +- modules/iswa/util/iswamanager_lua.inl | 2 +- modules/kameleon/CMakeLists.txt | 2 +- modules/kameleon/include/kameleonhelper.h | 2 +- modules/kameleon/include/kameleonwrapper.h | 2 +- modules/kameleon/kameleonmodule.cpp | 2 +- modules/kameleon/kameleonmodule.h | 2 +- modules/kameleon/src/kameleonhelper.cpp | 2 +- modules/kameleon/src/kameleonwrapper.cpp | 2 +- modules/kameleonvolume/CMakeLists.txt | 2 +- modules/kameleonvolume/kameleonvolumemodule.cpp | 2 +- modules/kameleonvolume/kameleonvolumemodule.h | 2 +- modules/kameleonvolume/kameleonvolumereader.cpp | 2 +- modules/kameleonvolume/kameleonvolumereader.h | 2 +- modules/kameleonvolume/rendering/renderablekameleonvolume.cpp | 2 +- modules/kameleonvolume/rendering/renderablekameleonvolume.h | 2 +- modules/kameleonvolume/tasks/kameleondocumentationtask.cpp | 2 +- modules/kameleonvolume/tasks/kameleondocumentationtask.h | 2 +- modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp | 2 +- modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h | 2 +- modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp | 2 +- modules/kameleonvolume/tasks/kameleonvolumetorawtask.h | 2 +- modules/multiresvolume/CMakeLists.txt | 2 +- modules/multiresvolume/multiresvolumemodule.cpp | 2 +- modules/multiresvolume/multiresvolumemodule.h | 2 +- modules/multiresvolume/rendering/atlasmanager.cpp | 2 +- modules/multiresvolume/rendering/atlasmanager.h | 2 +- modules/multiresvolume/rendering/brickcover.cpp | 2 +- modules/multiresvolume/rendering/brickcover.h | 2 +- modules/multiresvolume/rendering/brickmanager.cpp | 2 +- modules/multiresvolume/rendering/brickmanager.h | 2 +- modules/multiresvolume/rendering/brickselection.cpp | 2 +- modules/multiresvolume/rendering/brickselection.h | 2 +- modules/multiresvolume/rendering/brickselector.h | 2 +- modules/multiresvolume/rendering/errorhistogrammanager.cpp | 2 +- modules/multiresvolume/rendering/errorhistogrammanager.h | 2 +- modules/multiresvolume/rendering/histogrammanager.cpp | 2 +- modules/multiresvolume/rendering/histogrammanager.h | 2 +- .../multiresvolume/rendering/localerrorhistogrammanager.cpp | 2 +- modules/multiresvolume/rendering/localerrorhistogrammanager.h | 2 +- modules/multiresvolume/rendering/localtfbrickselector.cpp | 2 +- modules/multiresvolume/rendering/localtfbrickselector.h | 2 +- modules/multiresvolume/rendering/multiresvolumeraycaster.cpp | 2 +- modules/multiresvolume/rendering/multiresvolumeraycaster.h | 2 +- modules/multiresvolume/rendering/renderablemultiresvolume.cpp | 2 +- modules/multiresvolume/rendering/renderablemultiresvolume.h | 2 +- modules/multiresvolume/rendering/shenbrickselector.cpp | 2 +- modules/multiresvolume/rendering/shenbrickselector.h | 2 +- modules/multiresvolume/rendering/simpletfbrickselector.cpp | 2 +- modules/multiresvolume/rendering/simpletfbrickselector.h | 2 +- modules/multiresvolume/rendering/tfbrickselector.cpp | 2 +- modules/multiresvolume/rendering/tfbrickselector.h | 2 +- modules/multiresvolume/rendering/tsp.cpp | 2 +- modules/multiresvolume/rendering/tsp.h | 2 +- modules/multiresvolume/shaders/boundsFs.glsl | 2 +- modules/multiresvolume/shaders/boundsVs.glsl | 2 +- modules/multiresvolume/shaders/helper.glsl | 2 +- modules/multiresvolume/shaders/raycast.glsl | 2 +- modules/server/CMakeLists.txt | 2 +- modules/server/include/connection.h | 2 +- modules/server/include/connectionpool.h | 2 +- modules/server/include/jsonconverters.h | 2 +- modules/server/include/serverinterface.h | 2 +- modules/server/include/topics/authorizationtopic.h | 2 +- modules/server/include/topics/bouncetopic.h | 2 +- modules/server/include/topics/documentationtopic.h | 2 +- modules/server/include/topics/flightcontrollertopic.h | 2 +- modules/server/include/topics/getpropertytopic.h | 2 +- modules/server/include/topics/luascripttopic.h | 2 +- modules/server/include/topics/sessionrecordingtopic.h | 2 +- modules/server/include/topics/setpropertytopic.h | 2 +- modules/server/include/topics/shortcuttopic.h | 2 +- modules/server/include/topics/subscriptiontopic.h | 2 +- modules/server/include/topics/timetopic.h | 2 +- modules/server/include/topics/topic.h | 2 +- modules/server/include/topics/triggerpropertytopic.h | 2 +- modules/server/include/topics/versiontopic.h | 2 +- modules/server/servermodule.cpp | 2 +- modules/server/servermodule.h | 2 +- modules/server/src/connection.cpp | 2 +- modules/server/src/connectionpool.cpp | 2 +- modules/server/src/jsonconverters.cpp | 2 +- modules/server/src/serverinterface.cpp | 2 +- modules/server/src/topics/authorizationtopic.cpp | 2 +- modules/server/src/topics/bouncetopic.cpp | 2 +- modules/server/src/topics/documentationtopic.cpp | 2 +- modules/server/src/topics/flightcontrollertopic.cpp | 2 +- modules/server/src/topics/getpropertytopic.cpp | 2 +- modules/server/src/topics/luascripttopic.cpp | 2 +- modules/server/src/topics/sessionrecordingtopic.cpp | 2 +- modules/server/src/topics/setpropertytopic.cpp | 2 +- modules/server/src/topics/shortcuttopic.cpp | 2 +- modules/server/src/topics/subscriptiontopic.cpp | 2 +- modules/server/src/topics/timetopic.cpp | 2 +- modules/server/src/topics/topic.cpp | 2 +- modules/server/src/topics/triggerpropertytopic.cpp | 2 +- modules/server/src/topics/versiontopic.cpp | 2 +- modules/space/CMakeLists.txt | 2 +- modules/space/rendering/planetgeometry.cpp | 2 +- modules/space/rendering/planetgeometry.h | 2 +- modules/space/rendering/renderableconstellationbounds.cpp | 2 +- modules/space/rendering/renderableconstellationbounds.h | 2 +- modules/space/rendering/renderableorbitalkepler.cpp | 2 +- modules/space/rendering/renderableorbitalkepler.h | 2 +- modules/space/rendering/renderablerings.cpp | 2 +- modules/space/rendering/renderablerings.h | 2 +- modules/space/rendering/renderablesatellites.cpp | 2 +- modules/space/rendering/renderablesatellites.h | 2 +- modules/space/rendering/renderablesmallbody.cpp | 2 +- modules/space/rendering/renderablesmallbody.h | 2 +- modules/space/rendering/renderablestars.cpp | 2 +- modules/space/rendering/renderablestars.h | 2 +- modules/space/rendering/simplespheregeometry.cpp | 2 +- modules/space/rendering/simplespheregeometry.h | 2 +- modules/space/rotation/spicerotation.cpp | 2 +- modules/space/rotation/spicerotation.h | 2 +- modules/space/shaders/constellationbounds_fs.glsl | 2 +- modules/space/shaders/constellationbounds_vs.glsl | 2 +- modules/space/shaders/convolution_fs.glsl | 2 +- modules/space/shaders/convolution_vs.glsl | 2 +- modules/space/shaders/debrisViz_fs.glsl | 2 +- modules/space/shaders/debrisViz_vs.glsl | 2 +- modules/space/shaders/psfToTexture_fs.glsl | 2 +- modules/space/shaders/psfToTexture_vs.glsl | 2 +- modules/space/shaders/rings_fs.glsl | 2 +- modules/space/shaders/rings_vs.glsl | 2 +- modules/space/shaders/star_fs.glsl | 2 +- modules/space/shaders/star_ge.glsl | 2 +- modules/space/shaders/star_vs.glsl | 2 +- modules/space/spacemodule.cpp | 2 +- modules/space/spacemodule.h | 2 +- modules/space/tasks/generatedebrisvolumetask.cpp | 2 +- modules/space/tasks/generatedebrisvolumetask.h | 2 +- modules/space/translation/horizonstranslation.cpp | 2 +- modules/space/translation/horizonstranslation.h | 2 +- modules/space/translation/keplertranslation.cpp | 2 +- modules/space/translation/keplertranslation.h | 2 +- modules/space/translation/spicetranslation.cpp | 2 +- modules/space/translation/spicetranslation.h | 2 +- modules/space/translation/tletranslation.cpp | 2 +- modules/space/translation/tletranslation.h | 2 +- modules/spacecraftinstruments/CMakeLists.txt | 2 +- .../dashboard/dashboarditeminstruments.cpp | 2 +- .../dashboard/dashboarditeminstruments.h | 2 +- .../rendering/renderablecrawlingline.cpp | 2 +- .../spacecraftinstruments/rendering/renderablecrawlingline.h | 2 +- modules/spacecraftinstruments/rendering/renderablefov.cpp | 2 +- modules/spacecraftinstruments/rendering/renderablefov.h | 2 +- .../rendering/renderablemodelprojection.cpp | 2 +- .../rendering/renderablemodelprojection.h | 2 +- .../rendering/renderableplaneprojection.cpp | 2 +- .../rendering/renderableplaneprojection.h | 2 +- .../rendering/renderableplanetprojection.cpp | 2 +- .../rendering/renderableplanetprojection.h | 2 +- .../rendering/renderableshadowcylinder.cpp | 2 +- .../rendering/renderableshadowcylinder.h | 2 +- modules/spacecraftinstruments/shaders/crawlingline_fs.glsl | 2 +- modules/spacecraftinstruments/shaders/crawlingline_vs.glsl | 2 +- modules/spacecraftinstruments/shaders/dilation_fs.glsl | 2 +- modules/spacecraftinstruments/shaders/dilation_vs.glsl | 2 +- modules/spacecraftinstruments/shaders/fov_fs.glsl | 2 +- modules/spacecraftinstruments/shaders/fov_vs.glsl | 2 +- .../shaders/renderableModelDepth_fs.glsl | 2 +- .../shaders/renderableModelDepth_vs.glsl | 2 +- .../shaders/renderableModelProjection_fs.glsl | 2 +- .../shaders/renderableModelProjection_vs.glsl | 2 +- modules/spacecraftinstruments/shaders/renderableModel_fs.glsl | 2 +- modules/spacecraftinstruments/shaders/renderableModel_vs.glsl | 2 +- .../shaders/renderablePlanetProjection_fs.glsl | 2 +- .../shaders/renderablePlanetProjection_vs.glsl | 2 +- .../spacecraftinstruments/shaders/renderablePlanet_fs.glsl | 2 +- .../spacecraftinstruments/shaders/renderablePlanet_vs.glsl | 2 +- .../spacecraftinstruments/shaders/terminatorshadow_fs.glsl | 2 +- .../spacecraftinstruments/shaders/terminatorshadow_vs.glsl | 2 +- modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp | 2 +- modules/spacecraftinstruments/spacecraftinstrumentsmodule.h | 2 +- modules/spacecraftinstruments/util/decoder.cpp | 2 +- modules/spacecraftinstruments/util/decoder.h | 2 +- modules/spacecraftinstruments/util/hongkangparser.cpp | 2 +- modules/spacecraftinstruments/util/hongkangparser.h | 2 +- modules/spacecraftinstruments/util/image.h | 2 +- modules/spacecraftinstruments/util/imagesequencer.cpp | 2 +- modules/spacecraftinstruments/util/imagesequencer.h | 2 +- modules/spacecraftinstruments/util/instrumentdecoder.cpp | 2 +- modules/spacecraftinstruments/util/instrumentdecoder.h | 2 +- modules/spacecraftinstruments/util/instrumenttimesparser.cpp | 2 +- modules/spacecraftinstruments/util/instrumenttimesparser.h | 2 +- modules/spacecraftinstruments/util/labelparser.cpp | 2 +- modules/spacecraftinstruments/util/labelparser.h | 2 +- modules/spacecraftinstruments/util/projectioncomponent.cpp | 2 +- modules/spacecraftinstruments/util/projectioncomponent.h | 2 +- modules/spacecraftinstruments/util/scannerdecoder.cpp | 2 +- modules/spacecraftinstruments/util/scannerdecoder.h | 2 +- modules/spacecraftinstruments/util/sequenceparser.cpp | 2 +- modules/spacecraftinstruments/util/sequenceparser.h | 2 +- modules/spacecraftinstruments/util/targetdecoder.cpp | 2 +- modules/spacecraftinstruments/util/targetdecoder.h | 2 +- modules/spout/CMakeLists.txt | 2 +- modules/spout/renderableplanespout.cpp | 2 +- modules/spout/renderableplanespout.h | 2 +- modules/spout/screenspacespout.cpp | 2 +- modules/spout/screenspacespout.h | 2 +- modules/spout/spoutlibrary.h | 2 +- modules/spout/spoutmodule.cpp | 2 +- modules/spout/spoutmodule.h | 2 +- modules/sync/CMakeLists.txt | 2 +- modules/sync/syncmodule.cpp | 2 +- modules/sync/syncmodule.h | 2 +- modules/sync/syncs/httpsynchronization.cpp | 2 +- modules/sync/syncs/httpsynchronization.h | 2 +- modules/sync/syncs/urlsynchronization.cpp | 2 +- modules/sync/syncs/urlsynchronization.h | 2 +- modules/sync/tasks/syncassettask.cpp | 2 +- modules/sync/tasks/syncassettask.h | 2 +- modules/touch/CMakeLists.txt | 2 +- modules/touch/ext/CMakeLists.txt | 2 +- modules/touch/include/directinputsolver.h | 2 +- modules/touch/include/touchinteraction.h | 2 +- modules/touch/include/touchmarker.h | 2 +- modules/touch/include/tuioear.h | 2 +- modules/touch/include/win32_touch.h | 2 +- modules/touch/shaders/marker_fs.glsl | 2 +- modules/touch/shaders/marker_vs.glsl | 2 +- modules/touch/src/directinputsolver.cpp | 2 +- modules/touch/src/touchinteraction.cpp | 2 +- modules/touch/src/touchmarker.cpp | 2 +- modules/touch/src/tuioear.cpp | 2 +- modules/touch/src/win32_touch.cpp | 2 +- modules/touch/touchmodule.cpp | 2 +- modules/touch/touchmodule.h | 2 +- modules/toyvolume/CMakeLists.txt | 2 +- modules/toyvolume/rendering/renderabletoyvolume.cpp | 2 +- modules/toyvolume/rendering/renderabletoyvolume.h | 2 +- modules/toyvolume/rendering/toyvolumeraycaster.cpp | 2 +- modules/toyvolume/rendering/toyvolumeraycaster.h | 2 +- modules/toyvolume/shaders/boundsfs.glsl | 2 +- modules/toyvolume/shaders/boundsvs.glsl | 2 +- modules/toyvolume/shaders/raycast.glsl | 2 +- modules/toyvolume/toyvolumemodule.cpp | 2 +- modules/toyvolume/toyvolumemodule.h | 2 +- modules/vislab/CMakeLists.txt | 2 +- modules/vislab/rendering/renderabledistancelabel.cpp | 2 +- modules/vislab/rendering/renderabledistancelabel.h | 2 +- modules/vislab/vislabmodule.h | 2 +- modules/volume/CMakeLists.txt | 2 +- modules/volume/envelope.cpp | 2 +- modules/volume/envelope.h | 2 +- modules/volume/linearlrucache.h | 2 +- modules/volume/linearlrucache.inl | 2 +- modules/volume/lrucache.h | 2 +- modules/volume/lrucache.inl | 2 +- modules/volume/rawvolume.h | 2 +- modules/volume/rawvolume.inl | 2 +- modules/volume/rawvolumemetadata.cpp | 2 +- modules/volume/rawvolumemetadata.h | 2 +- modules/volume/rawvolumereader.h | 2 +- modules/volume/rawvolumereader.inl | 2 +- modules/volume/rawvolumewriter.h | 2 +- modules/volume/rawvolumewriter.inl | 2 +- modules/volume/rendering/basicvolumeraycaster.cpp | 2 +- modules/volume/rendering/basicvolumeraycaster.h | 2 +- modules/volume/rendering/renderabletimevaryingvolume.cpp | 2 +- modules/volume/rendering/renderabletimevaryingvolume.h | 2 +- modules/volume/rendering/volumeclipplane.cpp | 2 +- modules/volume/rendering/volumeclipplane.h | 2 +- modules/volume/rendering/volumeclipplanes.cpp | 2 +- modules/volume/rendering/volumeclipplanes.h | 2 +- modules/volume/shaders/boundsfs.glsl | 2 +- modules/volume/shaders/boundsvs.glsl | 2 +- modules/volume/shaders/helper.glsl | 2 +- modules/volume/shaders/raycast.glsl | 2 +- modules/volume/tasks/generaterawvolumetask.cpp | 2 +- modules/volume/tasks/generaterawvolumetask.h | 2 +- modules/volume/textureslicevolumereader.h | 2 +- modules/volume/textureslicevolumereader.inl | 2 +- modules/volume/transferfunction.cpp | 2 +- modules/volume/transferfunction.h | 2 +- modules/volume/transferfunctionhandler.cpp | 2 +- modules/volume/transferfunctionhandler.h | 2 +- modules/volume/transferfunctionproperty.cpp | 2 +- modules/volume/transferfunctionproperty.h | 2 +- modules/volume/volumegridtype.cpp | 2 +- modules/volume/volumegridtype.h | 2 +- modules/volume/volumemodule.cpp | 2 +- modules/volume/volumemodule.h | 2 +- modules/volume/volumesampler.h | 2 +- modules/volume/volumesampler.inl | 2 +- modules/volume/volumeutils.cpp | 2 +- modules/volume/volumeutils.h | 2 +- modules/webbrowser/CMakeLists.txt | 2 +- modules/webbrowser/cmake/cef_support.cmake | 2 +- modules/webbrowser/cmake/webbrowser_helpers.cmake | 2 +- modules/webbrowser/include/browserclient.h | 2 +- modules/webbrowser/include/browserinstance.h | 2 +- modules/webbrowser/include/cefhost.h | 2 +- modules/webbrowser/include/defaultbrowserlauncher.h | 2 +- modules/webbrowser/include/eventhandler.h | 2 +- modules/webbrowser/include/screenspacebrowser.h | 2 +- modules/webbrowser/include/webbrowserapp.h | 2 +- modules/webbrowser/include/webkeyboardhandler.h | 2 +- modules/webbrowser/include/webrenderhandler.h | 2 +- modules/webbrowser/shaders/screenspace_fs.glsl | 2 +- modules/webbrowser/shaders/screenspace_vs.glsl | 2 +- modules/webbrowser/src/browserclient.cpp | 2 +- modules/webbrowser/src/browserinstance.cpp | 2 +- modules/webbrowser/src/cefhost.cpp | 2 +- modules/webbrowser/src/defaultbrowserlauncher.cpp | 2 +- modules/webbrowser/src/eventhandler.cpp | 2 +- modules/webbrowser/src/processhelpermac.cpp | 2 +- modules/webbrowser/src/processhelperwindows.cpp | 2 +- modules/webbrowser/src/screenspacebrowser.cpp | 2 +- modules/webbrowser/src/webbrowserapp.cpp | 2 +- modules/webbrowser/src/webkeyboardhandler.cpp | 2 +- modules/webbrowser/src/webrenderhandler.cpp | 2 +- modules/webbrowser/webbrowsermodule.cpp | 2 +- modules/webbrowser/webbrowsermodule.h | 2 +- modules/webgui/CMakeLists.txt | 2 +- modules/webgui/cmake/nodejs_support.cmake | 2 +- modules/webgui/webguimodule.cpp | 2 +- modules/webgui/webguimodule.h | 2 +- shaders/PowerScaling/powerScalingMath.hglsl | 2 +- shaders/PowerScaling/powerScaling_fs.hglsl | 2 +- shaders/PowerScaling/powerScaling_vs.hglsl | 2 +- shaders/abuffer/abufferfragment.glsl | 2 +- shaders/abuffer/abufferresources.glsl | 2 +- shaders/abuffer/boundsabuffer.frag | 2 +- shaders/abuffer/raycasterdata.glsl | 2 +- shaders/abuffer/renderabuffer.frag | 2 +- shaders/abuffer/renderabuffer.vert | 2 +- shaders/abuffer/resolveabuffer.frag | 2 +- shaders/abuffer/resolveabuffer.vert | 2 +- shaders/abuffer/resolvehelpers.glsl | 2 +- shaders/blending.glsl | 2 +- shaders/floatoperations.glsl | 2 +- shaders/fragment.glsl | 2 +- shaders/framebuffer/exitframebuffer.frag | 2 +- shaders/framebuffer/fxaa.frag | 2 +- shaders/framebuffer/fxaa.vert | 2 +- shaders/framebuffer/hdrAndFiltering.frag | 2 +- shaders/framebuffer/hdrAndFiltering.vert | 2 +- shaders/framebuffer/inside.glsl | 2 +- shaders/framebuffer/mergeDownscaledVolume.frag | 2 +- shaders/framebuffer/mergeDownscaledVolume.vert | 2 +- shaders/framebuffer/nOneStripMSAA.frag | 2 +- shaders/framebuffer/nOneStripMSAA.vert | 2 +- shaders/framebuffer/outside.glsl | 2 +- shaders/framebuffer/raycastframebuffer.frag | 2 +- shaders/framebuffer/renderframebuffer.frag | 2 +- shaders/framebuffer/resolveframebuffer.vert | 2 +- shaders/hdr.glsl | 2 +- shaders/rand.glsl | 2 +- src/CMakeLists.txt | 2 +- src/documentation/core_registration.cpp | 2 +- src/documentation/documentation.cpp | 2 +- src/documentation/documentationengine.cpp | 2 +- src/documentation/documentationgenerator.cpp | 2 +- src/documentation/verifier.cpp | 2 +- src/engine/configuration.cpp | 2 +- src/engine/configuration_doc.inl | 2 +- src/engine/downloadmanager.cpp | 2 +- src/engine/globals.cpp | 2 +- src/engine/globalscallbacks.cpp | 2 +- src/engine/logfactory.cpp | 2 +- src/engine/moduleengine.cpp | 2 +- src/engine/moduleengine_lua.inl | 2 +- src/engine/openspaceengine.cpp | 2 +- src/engine/openspaceengine_lua.inl | 2 +- src/engine/syncengine.cpp | 2 +- src/engine/virtualpropertymanager.cpp | 2 +- src/interaction/camerainteractionstates.cpp | 2 +- src/interaction/externinteraction.cpp | 2 +- src/interaction/inputstate.cpp | 2 +- src/interaction/interactionmonitor.cpp | 2 +- src/interaction/joystickcamerastates.cpp | 2 +- src/interaction/joystickinputstate.cpp | 2 +- src/interaction/keybindingmanager.cpp | 2 +- src/interaction/keybindingmanager_lua.inl | 2 +- src/interaction/keyframenavigator.cpp | 2 +- src/interaction/mousecamerastates.cpp | 2 +- src/interaction/navigationhandler.cpp | 2 +- src/interaction/navigationhandler_lua.inl | 2 +- src/interaction/orbitalnavigator.cpp | 2 +- src/interaction/scriptcamerastates.cpp | 2 +- src/interaction/sessionrecording.cpp | 2 +- src/interaction/sessionrecording_lua.inl | 2 +- src/interaction/shortcutmanager.cpp | 2 +- src/interaction/shortcutmanager_lua.inl | 2 +- src/interaction/tasks/convertrecfileversiontask.cpp | 2 +- src/interaction/tasks/convertrecformattask.cpp | 2 +- src/interaction/touchbar.mm | 2 +- src/interaction/websocketcamerastates.cpp | 2 +- src/interaction/websocketinputstate.cpp | 2 +- src/mission/mission.cpp | 2 +- src/mission/missionmanager.cpp | 2 +- src/mission/missionmanager_lua.inl | 2 +- src/network/parallelconnection.cpp | 2 +- src/network/parallelpeer.cpp | 2 +- src/network/parallelpeer_lua.inl | 2 +- src/network/parallelserver.cpp | 2 +- src/openspace.cpp | 4 ++-- src/properties/matrix/dmat2property.cpp | 2 +- src/properties/matrix/dmat2x3property.cpp | 2 +- src/properties/matrix/dmat2x4property.cpp | 2 +- src/properties/matrix/dmat3property.cpp | 2 +- src/properties/matrix/dmat3x2property.cpp | 2 +- src/properties/matrix/dmat3x4property.cpp | 2 +- src/properties/matrix/dmat4property.cpp | 2 +- src/properties/matrix/dmat4x2property.cpp | 2 +- src/properties/matrix/dmat4x3property.cpp | 2 +- src/properties/matrix/mat2property.cpp | 2 +- src/properties/matrix/mat2x3property.cpp | 2 +- src/properties/matrix/mat2x4property.cpp | 2 +- src/properties/matrix/mat3property.cpp | 2 +- src/properties/matrix/mat3x2property.cpp | 2 +- src/properties/matrix/mat3x4property.cpp | 2 +- src/properties/matrix/mat4property.cpp | 2 +- src/properties/matrix/mat4x2property.cpp | 2 +- src/properties/matrix/mat4x3property.cpp | 2 +- src/properties/optionproperty.cpp | 2 +- src/properties/property.cpp | 2 +- src/properties/propertyowner.cpp | 2 +- src/properties/scalar/boolproperty.cpp | 2 +- src/properties/scalar/charproperty.cpp | 2 +- src/properties/scalar/doubleproperty.cpp | 2 +- src/properties/scalar/floatproperty.cpp | 2 +- src/properties/scalar/intproperty.cpp | 2 +- src/properties/scalar/longdoubleproperty.cpp | 2 +- src/properties/scalar/longlongproperty.cpp | 2 +- src/properties/scalar/longproperty.cpp | 2 +- src/properties/scalar/shortproperty.cpp | 2 +- src/properties/scalar/signedcharproperty.cpp | 2 +- src/properties/scalar/ucharproperty.cpp | 2 +- src/properties/scalar/uintproperty.cpp | 2 +- src/properties/scalar/ulonglongproperty.cpp | 2 +- src/properties/scalar/ulongproperty.cpp | 2 +- src/properties/scalar/ushortproperty.cpp | 2 +- src/properties/scalar/wcharproperty.cpp | 2 +- src/properties/selectionproperty.cpp | 2 +- src/properties/stringlistproperty.cpp | 2 +- src/properties/stringproperty.cpp | 2 +- src/properties/triggerproperty.cpp | 2 +- src/properties/vector/bvec2property.cpp | 2 +- src/properties/vector/bvec3property.cpp | 2 +- src/properties/vector/bvec4property.cpp | 2 +- src/properties/vector/dvec2property.cpp | 2 +- src/properties/vector/dvec3property.cpp | 2 +- src/properties/vector/dvec4property.cpp | 2 +- src/properties/vector/ivec2property.cpp | 2 +- src/properties/vector/ivec3property.cpp | 2 +- src/properties/vector/ivec4property.cpp | 2 +- src/properties/vector/uvec2property.cpp | 2 +- src/properties/vector/uvec3property.cpp | 2 +- src/properties/vector/uvec4property.cpp | 2 +- src/properties/vector/vec2property.cpp | 2 +- src/properties/vector/vec3property.cpp | 2 +- src/properties/vector/vec4property.cpp | 2 +- src/query/query.cpp | 2 +- src/rendering/abufferrenderer.cpp | 2 +- src/rendering/dashboard.cpp | 2 +- src/rendering/dashboard_lua.inl | 2 +- src/rendering/dashboarditem.cpp | 2 +- src/rendering/deferredcastermanager.cpp | 2 +- src/rendering/framebufferrenderer.cpp | 2 +- src/rendering/helper.cpp | 2 +- src/rendering/loadingscreen.cpp | 2 +- src/rendering/luaconsole.cpp | 2 +- src/rendering/raycastermanager.cpp | 2 +- src/rendering/renderable.cpp | 2 +- src/rendering/renderengine.cpp | 2 +- src/rendering/renderengine_lua.inl | 2 +- src/rendering/screenspacerenderable.cpp | 2 +- src/rendering/transferfunction.cpp | 2 +- src/rendering/volumeraycaster.cpp | 2 +- src/scene/asset.cpp | 2 +- src/scene/assetloader.cpp | 2 +- src/scene/assetloader_lua.inl | 2 +- src/scene/assetmanager.cpp | 2 +- src/scene/assetmanager_lua.inl | 2 +- src/scene/lightsource.cpp | 2 +- src/scene/profile.cpp | 2 +- src/scene/profile_lua.inl | 2 +- src/scene/rotation.cpp | 2 +- src/scene/scale.cpp | 2 +- src/scene/scene.cpp | 2 +- src/scene/scene_lua.inl | 2 +- src/scene/scenegraphnode.cpp | 2 +- src/scene/scenegraphnode_doc.inl | 2 +- src/scene/sceneinitializer.cpp | 2 +- src/scene/scenelicensewriter.cpp | 2 +- src/scene/timeframe.cpp | 2 +- src/scene/translation.cpp | 2 +- src/scripting/lualibrary.cpp | 2 +- src/scripting/scriptengine.cpp | 2 +- src/scripting/scriptengine_lua.inl | 2 +- src/scripting/scriptscheduler.cpp | 2 +- src/scripting/scriptscheduler_lua.inl | 2 +- src/scripting/systemcapabilitiesbinding.cpp | 2 +- src/util/blockplaneintersectiongeometry.cpp | 2 +- src/util/boxgeometry.cpp | 2 +- src/util/camera.cpp | 2 +- src/util/coordinateconversion.cpp | 2 +- src/util/distanceconversion.cpp | 2 +- src/util/factorymanager.cpp | 2 +- src/util/histogram.cpp | 2 +- src/util/httprequest.cpp | 2 +- src/util/keys.cpp | 2 +- src/util/openspacemodule.cpp | 2 +- src/util/progressbar.cpp | 2 +- src/util/resourcesynchronization.cpp | 2 +- src/util/screenlog.cpp | 2 +- src/util/sphere.cpp | 2 +- src/util/spicemanager.cpp | 2 +- src/util/spicemanager_lua.inl | 2 +- src/util/syncbuffer.cpp | 2 +- src/util/synchronizationwatcher.cpp | 2 +- src/util/task.cpp | 2 +- src/util/taskloader.cpp | 2 +- src/util/threadpool.cpp | 2 +- src/util/time.cpp | 2 +- src/util/time_lua.inl | 2 +- src/util/timeconversion.cpp | 2 +- src/util/timeline.cpp | 2 +- src/util/timemanager.cpp | 2 +- src/util/timerange.cpp | 2 +- src/util/touch.cpp | 2 +- src/util/transformationmanager.cpp | 2 +- src/util/versionchecker.cpp | 2 +- support/cmake/application_definition.cmake | 2 +- support/cmake/global_variables.cmake | 2 +- support/cmake/module_common.cmake | 2 +- support/cmake/module_definition.cmake | 2 +- support/cmake/openspace_header.template | 2 +- support/cmake/packaging.cmake | 2 +- support/cmake/set_openspace_compile_settings.cmake | 2 +- support/coding/new_files.py | 2 +- tests/CMakeLists.txt | 2 +- tests/main.cpp | 2 +- tests/regression/517.cpp | 2 +- tests/test_assetloader.cpp | 2 +- tests/test_concurrentjobmanager.cpp | 2 +- tests/test_concurrentqueue.cpp | 2 +- tests/test_documentation.cpp | 2 +- tests/test_iswamanager.cpp | 2 +- tests/test_latlonpatch.cpp | 2 +- tests/test_lrucache.cpp | 2 +- tests/test_luaconversions.cpp | 2 +- tests/test_optionproperty.cpp | 2 +- tests/test_profile.cpp | 2 +- tests/test_rawvolumeio.cpp | 2 +- tests/test_scriptscheduler.cpp | 2 +- tests/test_spicemanager.cpp | 2 +- tests/test_temporaltileprovider.cpp | 2 +- tests/test_timeline.cpp | 2 +- tests/test_timequantizer.cpp | 2 +- 1232 files changed, 1233 insertions(+), 1233 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a67edff2d8..800fe645df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/LICENSE.md b/LICENSE.md index 4e0881c01c..de2f93f1ad 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014-2020 +Copyright (c) 2014-2021 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 9e5f74234a..cbc8540483 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/OpenSpace-MinVR/CMakeLists.txt b/apps/OpenSpace-MinVR/CMakeLists.txt index a13829c550..f83661443e 100644 --- a/apps/OpenSpace-MinVR/CMakeLists.txt +++ b/apps/OpenSpace-MinVR/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/OpenSpace-MinVR/main.cpp b/apps/OpenSpace-MinVR/main.cpp index cd1191434b..80d2be0229 100644 --- a/apps/OpenSpace-MinVR/main.cpp +++ b/apps/OpenSpace-MinVR/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 0e7c35c378..2ccf23c951 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/OpenSpace/ext/launcher/CMakeLists.txt b/apps/OpenSpace/ext/launcher/CMakeLists.txt index 573d872042..2ab5cf90ac 100644 --- a/apps/OpenSpace/ext/launcher/CMakeLists.txt +++ b/apps/OpenSpace/ext/launcher/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h index 4538e33835..e0bcc51d56 100644 --- a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h +++ b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/launcherwindow.h b/apps/OpenSpace/ext/launcher/include/launcherwindow.h index 6b7283ea23..a8be7350a4 100644 --- a/apps/OpenSpace/ext/launcher/include/launcherwindow.h +++ b/apps/OpenSpace/ext/launcher/include/launcherwindow.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h index c8288565bc..563a0ec5a7 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h index 4bb35e62f2..0e81238f1c 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h index 375fae968b..1274297db1 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h index 1426e3ff39..26f538a6fa 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h index 34b497b34a..eeb6a32c06 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index 2dae14f531..744a1db8ac 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h index 42d9a0e162..f242f19e42 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/line.h b/apps/OpenSpace/ext/launcher/include/profile/line.h index ebe27607dc..12d2aa9658 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/line.h +++ b/apps/OpenSpace/ext/launcher/include/profile/line.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index 9c0ec0bd5a..f20d680f92 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h index f3a79acdfd..51c500f972 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index c15e95ccb7..6ca0c5b209 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h index 6ad0ea05be..7c12634fdd 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h index a04e4cf2e7..0938bc8659 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h index 9a0a6c4421..394b477f0f 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp index 91489868f1..7c9634b47e 100644 --- a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp +++ b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 200affb7d7..6d50f5788c 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp index 30a6ccec84..7c584e2f13 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp index d0cf730c76..9993f43ce9 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp index 7ad1f07e09..e08f79d3ec 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp index 16b7ba2b77..60bd29f6e2 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index ce586a449f..c5adbc8c6d 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp index b78a132443..33db001533 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp index df51a77bf6..8ea5dcf272 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/line.cpp b/apps/OpenSpace/ext/launcher/src/profile/line.cpp index 336dc722a0..c7f2821cf1 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/line.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/line.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp index ce4c6d58dc..9af27989c7 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp index c96c206426..1edba2fdee 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp index 217ea9e5d8..5f7ad9f7f4 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp index 3141d8f9c3..2b945851a4 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp index 5ae897d8b8..8e1f9477f9 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp index 678b5bf504..03d9526b82 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index aac6ab65af..fed1f55a0b 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit aac6ab65afba7df7ba07b04da9da7b57ecacbbb3 +Subproject commit fed1f55a0b259a70a5ad8461a4e56f07990609f1 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index fc36b9fc21..8272be8ef4 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/Sync/CMakeLists.txt b/apps/Sync/CMakeLists.txt index b42b225459..58ba3cbf69 100644 --- a/apps/Sync/CMakeLists.txt +++ b/apps/Sync/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/Sync/main.cpp b/apps/Sync/main.cpp index 7ea54a745a..1de9e7aad5 100644 --- a/apps/Sync/main.cpp +++ b/apps/Sync/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/TaskRunner/CMakeLists.txt b/apps/TaskRunner/CMakeLists.txt index d7265796fc..c000cb973f 100644 --- a/apps/TaskRunner/CMakeLists.txt +++ b/apps/TaskRunner/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/TaskRunner/main.cpp b/apps/TaskRunner/main.cpp index ce7f27e2cc..cd2c1be9ac 100644 --- a/apps/TaskRunner/main.cpp +++ b/apps/TaskRunner/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/Wormhole/CMakeLists.txt b/apps/Wormhole/CMakeLists.txt index 70f356153b..2478659808 100644 --- a/apps/Wormhole/CMakeLists.txt +++ b/apps/Wormhole/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/Wormhole/main.cpp b/apps/Wormhole/main.cpp index 487244aef8..adfec873be 100644 --- a/apps/Wormhole/main.cpp +++ b/apps/Wormhole/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index 67b61476fe..0010d35d22 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/ext/ghoul b/ext/ghoul index 81645c130c..5fd49e6caf 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 81645c130c6c391469d78a67bb39f84bfd650212 +Subproject commit 5fd49e6caff87b4da310a349d81d672933ad2914 diff --git a/include/openspace/documentation/core_registration.h b/include/openspace/documentation/core_registration.h index 90176260a9..9c79012a39 100644 --- a/include/openspace/documentation/core_registration.h +++ b/include/openspace/documentation/core_registration.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/documentation/documentation.h b/include/openspace/documentation/documentation.h index f6dac77b15..d01bcd1c82 100644 --- a/include/openspace/documentation/documentation.h +++ b/include/openspace/documentation/documentation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index 4fc4065f8d..a5d0d7a4c0 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/documentation/documentationgenerator.h b/include/openspace/documentation/documentationgenerator.h index 8b5a165880..103187675f 100644 --- a/include/openspace/documentation/documentationgenerator.h +++ b/include/openspace/documentation/documentationgenerator.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/documentation/verifier.h b/include/openspace/documentation/verifier.h index 2f8802e8bc..4817be5492 100644 --- a/include/openspace/documentation/verifier.h +++ b/include/openspace/documentation/verifier.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 974bb2977e..7d9eb83b18 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index 65811a23fc..5ba443cf7e 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index 9769089855..26b0fa21f6 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/globals.h b/include/openspace/engine/globals.h index 2a1b946491..c308a08bf7 100644 --- a/include/openspace/engine/globals.h +++ b/include/openspace/engine/globals.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/globalscallbacks.h b/include/openspace/engine/globalscallbacks.h index cc06979e97..0a4544a33e 100644 --- a/include/openspace/engine/globalscallbacks.h +++ b/include/openspace/engine/globalscallbacks.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/logfactory.h b/include/openspace/engine/logfactory.h index 4d023ec9e9..7b48b5a82e 100644 --- a/include/openspace/engine/logfactory.h +++ b/include/openspace/engine/logfactory.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h index fb2c14c00b..cc23589a4c 100644 --- a/include/openspace/engine/moduleengine.h +++ b/include/openspace/engine/moduleengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/moduleengine.inl b/include/openspace/engine/moduleengine.inl index 7853a64eb1..d00009950f 100644 --- a/include/openspace/engine/moduleengine.inl +++ b/include/openspace/engine/moduleengine.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 6ccae1f19a..a2204ace37 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index 67902b34ee..a962694aa0 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/virtualpropertymanager.h b/include/openspace/engine/virtualpropertymanager.h index 5d0701797f..d2054868f1 100644 --- a/include/openspace/engine/virtualpropertymanager.h +++ b/include/openspace/engine/virtualpropertymanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/engine/windowdelegate.h b/include/openspace/engine/windowdelegate.h index b5b978c8dc..04e698cbe0 100644 --- a/include/openspace/engine/windowdelegate.h +++ b/include/openspace/engine/windowdelegate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/camerainteractionstates.h b/include/openspace/interaction/camerainteractionstates.h index 43912f6d5c..ba51a74348 100644 --- a/include/openspace/interaction/camerainteractionstates.h +++ b/include/openspace/interaction/camerainteractionstates.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/delayedvariable.h b/include/openspace/interaction/delayedvariable.h index fd2a653820..7ecec27b00 100644 --- a/include/openspace/interaction/delayedvariable.h +++ b/include/openspace/interaction/delayedvariable.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/delayedvariable.inl b/include/openspace/interaction/delayedvariable.inl index 2d36d5fbfa..e0e18a84e1 100644 --- a/include/openspace/interaction/delayedvariable.inl +++ b/include/openspace/interaction/delayedvariable.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/externinteraction.h b/include/openspace/interaction/externinteraction.h index a0478c86e1..f112c47df3 100644 --- a/include/openspace/interaction/externinteraction.h +++ b/include/openspace/interaction/externinteraction.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/inputstate.h b/include/openspace/interaction/inputstate.h index 443899df35..5cb71905c7 100644 --- a/include/openspace/interaction/inputstate.h +++ b/include/openspace/interaction/inputstate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/interactionmonitor.h b/include/openspace/interaction/interactionmonitor.h index b8c7a8b2b9..112b788f32 100644 --- a/include/openspace/interaction/interactionmonitor.h +++ b/include/openspace/interaction/interactionmonitor.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/interpolator.h b/include/openspace/interaction/interpolator.h index d872e1706d..d9674f6f61 100644 --- a/include/openspace/interaction/interpolator.h +++ b/include/openspace/interaction/interpolator.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/interpolator.inl b/include/openspace/interaction/interpolator.inl index d28f07f573..35c5bca308 100644 --- a/include/openspace/interaction/interpolator.inl +++ b/include/openspace/interaction/interpolator.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/joystickcamerastates.h b/include/openspace/interaction/joystickcamerastates.h index f98dda8783..fd0098e933 100644 --- a/include/openspace/interaction/joystickcamerastates.h +++ b/include/openspace/interaction/joystickcamerastates.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/joystickinputstate.h b/include/openspace/interaction/joystickinputstate.h index 66c46ee11c..ced81f4013 100644 --- a/include/openspace/interaction/joystickinputstate.h +++ b/include/openspace/interaction/joystickinputstate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/keybindingmanager.h b/include/openspace/interaction/keybindingmanager.h index 054f490b6a..e837da5c36 100644 --- a/include/openspace/interaction/keybindingmanager.h +++ b/include/openspace/interaction/keybindingmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/keyframenavigator.h b/include/openspace/interaction/keyframenavigator.h index 5d98fe412e..767aced843 100644 --- a/include/openspace/interaction/keyframenavigator.h +++ b/include/openspace/interaction/keyframenavigator.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/mousecamerastates.h b/include/openspace/interaction/mousecamerastates.h index 719dcd6926..c1aae53864 100644 --- a/include/openspace/interaction/mousecamerastates.h +++ b/include/openspace/interaction/mousecamerastates.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/navigationhandler.h b/include/openspace/interaction/navigationhandler.h index 600456a50d..68d34498b2 100644 --- a/include/openspace/interaction/navigationhandler.h +++ b/include/openspace/interaction/navigationhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/orbitalnavigator.h b/include/openspace/interaction/orbitalnavigator.h index eec6daf2fb..a8e2a02697 100644 --- a/include/openspace/interaction/orbitalnavigator.h +++ b/include/openspace/interaction/orbitalnavigator.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/scriptcamerastates.h b/include/openspace/interaction/scriptcamerastates.h index c70814bac4..df5fa5a612 100644 --- a/include/openspace/interaction/scriptcamerastates.h +++ b/include/openspace/interaction/scriptcamerastates.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 4e2ce1faef..51aaaf6686 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/sessionrecording.inl b/include/openspace/interaction/sessionrecording.inl index 62c8b4b04b..d77b364052 100644 --- a/include/openspace/interaction/sessionrecording.inl +++ b/include/openspace/interaction/sessionrecording.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/shortcutmanager.h b/include/openspace/interaction/shortcutmanager.h index 4f901f9f42..d1043cf74b 100644 --- a/include/openspace/interaction/shortcutmanager.h +++ b/include/openspace/interaction/shortcutmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/tasks/convertrecfileversiontask.h b/include/openspace/interaction/tasks/convertrecfileversiontask.h index 98a5a51da6..a707146095 100644 --- a/include/openspace/interaction/tasks/convertrecfileversiontask.h +++ b/include/openspace/interaction/tasks/convertrecfileversiontask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index 17df5c5c4e..9258d70406 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/touchbar.h b/include/openspace/interaction/touchbar.h index 3b769a03f9..153652852f 100644 --- a/include/openspace/interaction/touchbar.h +++ b/include/openspace/interaction/touchbar.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/websocketcamerastates.h b/include/openspace/interaction/websocketcamerastates.h index 3dffe9d690..f36660a649 100644 --- a/include/openspace/interaction/websocketcamerastates.h +++ b/include/openspace/interaction/websocketcamerastates.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/interaction/websocketinputstate.h b/include/openspace/interaction/websocketinputstate.h index 7c59c89089..a1908d6f69 100644 --- a/include/openspace/interaction/websocketinputstate.h +++ b/include/openspace/interaction/websocketinputstate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/json.h b/include/openspace/json.h index 8a3a645ced..940842fdec 100644 --- a/include/openspace/json.h +++ b/include/openspace/json.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h index 3cb5c8caf1..d5b55c5c7b 100644 --- a/include/openspace/mission/mission.h +++ b/include/openspace/mission/mission.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/mission/missionmanager.h b/include/openspace/mission/missionmanager.h index 97522d490d..dddf0797ec 100644 --- a/include/openspace/mission/missionmanager.h +++ b/include/openspace/mission/missionmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index 3fe350ddab..f9e7492ebf 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index f70e87ed16..5763cbf700 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/network/parallelpeer.h b/include/openspace/network/parallelpeer.h index 293f433794..ff9c718da4 100644 --- a/include/openspace/network/parallelpeer.h +++ b/include/openspace/network/parallelpeer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/network/parallelserver.h b/include/openspace/network/parallelserver.h index 684ac62f2a..f6fbeff7a0 100644 --- a/include/openspace/network/parallelserver.h +++ b/include/openspace/network/parallelserver.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat2property.h b/include/openspace/properties/matrix/dmat2property.h index 030e9b710c..617e56d186 100644 --- a/include/openspace/properties/matrix/dmat2property.h +++ b/include/openspace/properties/matrix/dmat2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat2x3property.h b/include/openspace/properties/matrix/dmat2x3property.h index 4885a392c0..825d639204 100644 --- a/include/openspace/properties/matrix/dmat2x3property.h +++ b/include/openspace/properties/matrix/dmat2x3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat2x4property.h b/include/openspace/properties/matrix/dmat2x4property.h index 20eb77fcda..ba3898edad 100644 --- a/include/openspace/properties/matrix/dmat2x4property.h +++ b/include/openspace/properties/matrix/dmat2x4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat3property.h b/include/openspace/properties/matrix/dmat3property.h index 9c2543d7d2..486e2ad9c3 100644 --- a/include/openspace/properties/matrix/dmat3property.h +++ b/include/openspace/properties/matrix/dmat3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat3x2property.h b/include/openspace/properties/matrix/dmat3x2property.h index 5824b869ee..e823466c34 100644 --- a/include/openspace/properties/matrix/dmat3x2property.h +++ b/include/openspace/properties/matrix/dmat3x2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat3x4property.h b/include/openspace/properties/matrix/dmat3x4property.h index 39c83f408d..87521b8724 100644 --- a/include/openspace/properties/matrix/dmat3x4property.h +++ b/include/openspace/properties/matrix/dmat3x4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat4property.h b/include/openspace/properties/matrix/dmat4property.h index cd7b9b3eb1..3788742621 100644 --- a/include/openspace/properties/matrix/dmat4property.h +++ b/include/openspace/properties/matrix/dmat4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat4x2property.h b/include/openspace/properties/matrix/dmat4x2property.h index a1bea90a79..7205415c08 100644 --- a/include/openspace/properties/matrix/dmat4x2property.h +++ b/include/openspace/properties/matrix/dmat4x2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/dmat4x3property.h b/include/openspace/properties/matrix/dmat4x3property.h index 8ed951cffb..0e028317b8 100644 --- a/include/openspace/properties/matrix/dmat4x3property.h +++ b/include/openspace/properties/matrix/dmat4x3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat2property.h b/include/openspace/properties/matrix/mat2property.h index f500659e08..42fea778cb 100644 --- a/include/openspace/properties/matrix/mat2property.h +++ b/include/openspace/properties/matrix/mat2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat2x3property.h b/include/openspace/properties/matrix/mat2x3property.h index 2ba18f51e1..4ad90b4c51 100644 --- a/include/openspace/properties/matrix/mat2x3property.h +++ b/include/openspace/properties/matrix/mat2x3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat2x4property.h b/include/openspace/properties/matrix/mat2x4property.h index 98820e069a..54508d5535 100644 --- a/include/openspace/properties/matrix/mat2x4property.h +++ b/include/openspace/properties/matrix/mat2x4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat3property.h b/include/openspace/properties/matrix/mat3property.h index dd2104482e..fbbd272390 100644 --- a/include/openspace/properties/matrix/mat3property.h +++ b/include/openspace/properties/matrix/mat3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat3x2property.h b/include/openspace/properties/matrix/mat3x2property.h index 88c157d3bf..42290b8fbd 100644 --- a/include/openspace/properties/matrix/mat3x2property.h +++ b/include/openspace/properties/matrix/mat3x2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat3x4property.h b/include/openspace/properties/matrix/mat3x4property.h index 294e77b82f..ee26c13adf 100644 --- a/include/openspace/properties/matrix/mat3x4property.h +++ b/include/openspace/properties/matrix/mat3x4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat4property.h b/include/openspace/properties/matrix/mat4property.h index abf0e01e61..50ddd70c40 100644 --- a/include/openspace/properties/matrix/mat4property.h +++ b/include/openspace/properties/matrix/mat4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat4x2property.h b/include/openspace/properties/matrix/mat4x2property.h index a688965a86..a30aec4c13 100644 --- a/include/openspace/properties/matrix/mat4x2property.h +++ b/include/openspace/properties/matrix/mat4x2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/matrix/mat4x3property.h b/include/openspace/properties/matrix/mat4x3property.h index 231d253c0d..fa63aa6c9e 100644 --- a/include/openspace/properties/matrix/mat4x3property.h +++ b/include/openspace/properties/matrix/mat4x3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index d66ec0e99c..53f2122125 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index eb4504ae84..7417c2a212 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index 1165337d56..cfe6fa168d 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 3ca1fac4af..eda38ae4c6 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/propertydelegate.h b/include/openspace/properties/propertydelegate.h index cd2c0e7979..f107a00878 100644 --- a/include/openspace/properties/propertydelegate.h +++ b/include/openspace/properties/propertydelegate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/propertydelegate.inl b/include/openspace/properties/propertydelegate.inl index d09a4f615e..6486381916 100644 --- a/include/openspace/properties/propertydelegate.inl +++ b/include/openspace/properties/propertydelegate.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h index 48a26bb079..d37c6d7b9b 100644 --- a/include/openspace/properties/propertyowner.h +++ b/include/openspace/properties/propertyowner.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/boolproperty.h b/include/openspace/properties/scalar/boolproperty.h index e478e3318a..71932957a0 100644 --- a/include/openspace/properties/scalar/boolproperty.h +++ b/include/openspace/properties/scalar/boolproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/charproperty.h b/include/openspace/properties/scalar/charproperty.h index 07ab7ad040..bce7e2b672 100644 --- a/include/openspace/properties/scalar/charproperty.h +++ b/include/openspace/properties/scalar/charproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/doubleproperty.h b/include/openspace/properties/scalar/doubleproperty.h index 2f11f14277..f0ad097207 100644 --- a/include/openspace/properties/scalar/doubleproperty.h +++ b/include/openspace/properties/scalar/doubleproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/floatproperty.h b/include/openspace/properties/scalar/floatproperty.h index a19df16279..5812c05179 100644 --- a/include/openspace/properties/scalar/floatproperty.h +++ b/include/openspace/properties/scalar/floatproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/intproperty.h b/include/openspace/properties/scalar/intproperty.h index ec5c528ac2..06ea74f47d 100644 --- a/include/openspace/properties/scalar/intproperty.h +++ b/include/openspace/properties/scalar/intproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/longdoubleproperty.h b/include/openspace/properties/scalar/longdoubleproperty.h index 768bba53f1..065c80aff1 100644 --- a/include/openspace/properties/scalar/longdoubleproperty.h +++ b/include/openspace/properties/scalar/longdoubleproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/longlongproperty.h b/include/openspace/properties/scalar/longlongproperty.h index eedcff1a82..f754ee2a33 100644 --- a/include/openspace/properties/scalar/longlongproperty.h +++ b/include/openspace/properties/scalar/longlongproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/longproperty.h b/include/openspace/properties/scalar/longproperty.h index ed23a04a6f..b77efc39ea 100644 --- a/include/openspace/properties/scalar/longproperty.h +++ b/include/openspace/properties/scalar/longproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/shortproperty.h b/include/openspace/properties/scalar/shortproperty.h index a8cf97126e..3bd3c5af9b 100644 --- a/include/openspace/properties/scalar/shortproperty.h +++ b/include/openspace/properties/scalar/shortproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/signedcharproperty.h b/include/openspace/properties/scalar/signedcharproperty.h index 9419e9a7e2..6f177f1219 100644 --- a/include/openspace/properties/scalar/signedcharproperty.h +++ b/include/openspace/properties/scalar/signedcharproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/ucharproperty.h b/include/openspace/properties/scalar/ucharproperty.h index 4439157256..0e35a5c482 100644 --- a/include/openspace/properties/scalar/ucharproperty.h +++ b/include/openspace/properties/scalar/ucharproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/uintproperty.h b/include/openspace/properties/scalar/uintproperty.h index 12b40502fa..dcbc60ee57 100644 --- a/include/openspace/properties/scalar/uintproperty.h +++ b/include/openspace/properties/scalar/uintproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/ulonglongproperty.h b/include/openspace/properties/scalar/ulonglongproperty.h index c852b42554..2adc241bd4 100644 --- a/include/openspace/properties/scalar/ulonglongproperty.h +++ b/include/openspace/properties/scalar/ulonglongproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/ulongproperty.h b/include/openspace/properties/scalar/ulongproperty.h index fdb283b2aa..862cce3e69 100644 --- a/include/openspace/properties/scalar/ulongproperty.h +++ b/include/openspace/properties/scalar/ulongproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/ushortproperty.h b/include/openspace/properties/scalar/ushortproperty.h index d58c9e12f7..5a166ddd98 100644 --- a/include/openspace/properties/scalar/ushortproperty.h +++ b/include/openspace/properties/scalar/ushortproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/scalar/wcharproperty.h b/include/openspace/properties/scalar/wcharproperty.h index 9ede24d24c..321067bd84 100644 --- a/include/openspace/properties/scalar/wcharproperty.h +++ b/include/openspace/properties/scalar/wcharproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 871faf1c7e..30749ca9b3 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/stringlistproperty.h b/include/openspace/properties/stringlistproperty.h index 7078bdaecb..b929273cf3 100644 --- a/include/openspace/properties/stringlistproperty.h +++ b/include/openspace/properties/stringlistproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/stringproperty.h b/include/openspace/properties/stringproperty.h index 2ad56eb387..e869528c5b 100644 --- a/include/openspace/properties/stringproperty.h +++ b/include/openspace/properties/stringproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index eb55526ee1..e4bd1d9257 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index f8bdb0ecd3..2cadcc91c3 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/triggerproperty.h b/include/openspace/properties/triggerproperty.h index cd741a1101..1980938914 100644 --- a/include/openspace/properties/triggerproperty.h +++ b/include/openspace/properties/triggerproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/bvec2property.h b/include/openspace/properties/vector/bvec2property.h index 76e81000fc..d830934a8d 100644 --- a/include/openspace/properties/vector/bvec2property.h +++ b/include/openspace/properties/vector/bvec2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/bvec3property.h b/include/openspace/properties/vector/bvec3property.h index 65aeb2ffc7..e800cd040e 100644 --- a/include/openspace/properties/vector/bvec3property.h +++ b/include/openspace/properties/vector/bvec3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/bvec4property.h b/include/openspace/properties/vector/bvec4property.h index b551d624ef..9c007f8f42 100644 --- a/include/openspace/properties/vector/bvec4property.h +++ b/include/openspace/properties/vector/bvec4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/dvec2property.h b/include/openspace/properties/vector/dvec2property.h index 66985a611f..a6d72d8e48 100644 --- a/include/openspace/properties/vector/dvec2property.h +++ b/include/openspace/properties/vector/dvec2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/dvec3property.h b/include/openspace/properties/vector/dvec3property.h index 974d4133e8..782f1c63d2 100644 --- a/include/openspace/properties/vector/dvec3property.h +++ b/include/openspace/properties/vector/dvec3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/dvec4property.h b/include/openspace/properties/vector/dvec4property.h index 13b6ffa47d..e4e85dc79d 100644 --- a/include/openspace/properties/vector/dvec4property.h +++ b/include/openspace/properties/vector/dvec4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/ivec2property.h b/include/openspace/properties/vector/ivec2property.h index 59b4bc89f4..720afa62e8 100644 --- a/include/openspace/properties/vector/ivec2property.h +++ b/include/openspace/properties/vector/ivec2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/ivec3property.h b/include/openspace/properties/vector/ivec3property.h index d24f44e85d..0a68a8e7dd 100644 --- a/include/openspace/properties/vector/ivec3property.h +++ b/include/openspace/properties/vector/ivec3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/ivec4property.h b/include/openspace/properties/vector/ivec4property.h index 597516ba0e..9e076f009d 100644 --- a/include/openspace/properties/vector/ivec4property.h +++ b/include/openspace/properties/vector/ivec4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/uvec2property.h b/include/openspace/properties/vector/uvec2property.h index ff647091c8..cd8ee273e6 100644 --- a/include/openspace/properties/vector/uvec2property.h +++ b/include/openspace/properties/vector/uvec2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/uvec3property.h b/include/openspace/properties/vector/uvec3property.h index cff5d16233..a0cae39791 100644 --- a/include/openspace/properties/vector/uvec3property.h +++ b/include/openspace/properties/vector/uvec3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/uvec4property.h b/include/openspace/properties/vector/uvec4property.h index ccd4a97fbc..57111530a4 100644 --- a/include/openspace/properties/vector/uvec4property.h +++ b/include/openspace/properties/vector/uvec4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/vec2property.h b/include/openspace/properties/vector/vec2property.h index 1a9709a728..e17bf88f99 100644 --- a/include/openspace/properties/vector/vec2property.h +++ b/include/openspace/properties/vector/vec2property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/vec3property.h b/include/openspace/properties/vector/vec3property.h index 1795c705a0..902226eed3 100644 --- a/include/openspace/properties/vector/vec3property.h +++ b/include/openspace/properties/vector/vec3property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/properties/vector/vec4property.h b/include/openspace/properties/vector/vec4property.h index bc66aafab8..35b5b4c6a6 100644 --- a/include/openspace/properties/vector/vec4property.h +++ b/include/openspace/properties/vector/vec4property.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/query/query.h b/include/openspace/query/query.h index 18253a75d0..2a1ff53d5a 100644 --- a/include/openspace/query/query.h +++ b/include/openspace/query/query.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/abufferrenderer.h b/include/openspace/rendering/abufferrenderer.h index 3505c13292..5769c1e28c 100644 --- a/include/openspace/rendering/abufferrenderer.h +++ b/include/openspace/rendering/abufferrenderer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/dashboard.h b/include/openspace/rendering/dashboard.h index 019b086773..f8cbbfa55c 100644 --- a/include/openspace/rendering/dashboard.h +++ b/include/openspace/rendering/dashboard.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/dashboarditem.h b/include/openspace/rendering/dashboarditem.h index e51faf6a11..11013a5d28 100644 --- a/include/openspace/rendering/dashboarditem.h +++ b/include/openspace/rendering/dashboarditem.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/deferredcaster.h b/include/openspace/rendering/deferredcaster.h index 32e8592f4e..0f33e1894e 100644 --- a/include/openspace/rendering/deferredcaster.h +++ b/include/openspace/rendering/deferredcaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/deferredcasterlistener.h b/include/openspace/rendering/deferredcasterlistener.h index 067ec2afb6..003b5da515 100644 --- a/include/openspace/rendering/deferredcasterlistener.h +++ b/include/openspace/rendering/deferredcasterlistener.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/deferredcastermanager.h b/include/openspace/rendering/deferredcastermanager.h index 0d6623e066..95a2b05aee 100644 --- a/include/openspace/rendering/deferredcastermanager.h +++ b/include/openspace/rendering/deferredcastermanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index 52df76befd..ce4c00fb86 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/helper.h b/include/openspace/rendering/helper.h index a776dfb25d..f82fabe5a0 100644 --- a/include/openspace/rendering/helper.h +++ b/include/openspace/rendering/helper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/loadingscreen.h b/include/openspace/rendering/loadingscreen.h index 5e3900e8eb..2d618b42ad 100644 --- a/include/openspace/rendering/loadingscreen.h +++ b/include/openspace/rendering/loadingscreen.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/luaconsole.h b/include/openspace/rendering/luaconsole.h index 2c4e0e21a9..d00e3e9029 100644 --- a/include/openspace/rendering/luaconsole.h +++ b/include/openspace/rendering/luaconsole.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/raycasterlistener.h b/include/openspace/rendering/raycasterlistener.h index 5a0af12e7d..486a52c917 100644 --- a/include/openspace/rendering/raycasterlistener.h +++ b/include/openspace/rendering/raycasterlistener.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/raycastermanager.h b/include/openspace/rendering/raycastermanager.h index 8aa36ab6d1..2043e7c315 100644 --- a/include/openspace/rendering/raycastermanager.h +++ b/include/openspace/rendering/raycastermanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 042cea6e0d..884d10bee1 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 0762e54043..000595f69e 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/renderer.h b/include/openspace/rendering/renderer.h index b587e640f6..6a9243592d 100644 --- a/include/openspace/rendering/renderer.h +++ b/include/openspace/rendering/renderer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index 7270c91e10..189ae16d12 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/transferfunction.h b/include/openspace/rendering/transferfunction.h index a65f746415..cdad470af7 100644 --- a/include/openspace/rendering/transferfunction.h +++ b/include/openspace/rendering/transferfunction.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/volume.h b/include/openspace/rendering/volume.h index c3d40bcaf7..14a4dc9d18 100644 --- a/include/openspace/rendering/volume.h +++ b/include/openspace/rendering/volume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/rendering/volumeraycaster.h b/include/openspace/rendering/volumeraycaster.h index 1534c51ff8..000a963ff4 100644 --- a/include/openspace/rendering/volumeraycaster.h +++ b/include/openspace/rendering/volumeraycaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/asset.h b/include/openspace/scene/asset.h index 7fd8afd13f..d20f42ccd2 100644 --- a/include/openspace/scene/asset.h +++ b/include/openspace/scene/asset.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/assetlistener.h b/include/openspace/scene/assetlistener.h index 62041a919f..60546b521e 100644 --- a/include/openspace/scene/assetlistener.h +++ b/include/openspace/scene/assetlistener.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/assetloader.h b/include/openspace/scene/assetloader.h index 5d0b72c007..779e98e892 100644 --- a/include/openspace/scene/assetloader.h +++ b/include/openspace/scene/assetloader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/assetmanager.h b/include/openspace/scene/assetmanager.h index 8ed157d56d..cec0176a17 100644 --- a/include/openspace/scene/assetmanager.h +++ b/include/openspace/scene/assetmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/lightsource.h b/include/openspace/scene/lightsource.h index ff754e6efb..98aa7b69d8 100644 --- a/include/openspace/scene/lightsource.h +++ b/include/openspace/scene/lightsource.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h index cb539cbe35..28a3a360eb 100644 --- a/include/openspace/scene/profile.h +++ b/include/openspace/scene/profile.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/rotation.h b/include/openspace/scene/rotation.h index ce6970716e..28b2ec8f5c 100644 --- a/include/openspace/scene/rotation.h +++ b/include/openspace/scene/rotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/scale.h b/include/openspace/scene/scale.h index ef9230d32d..36b5e08398 100644 --- a/include/openspace/scene/scale.h +++ b/include/openspace/scene/scale.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index 3f9f5e6d7e..fc22f6d1e2 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index 2120f0b27c..879a78a352 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/sceneinitializer.h b/include/openspace/scene/sceneinitializer.h index eb1a4e4c6b..9f7eff48e6 100644 --- a/include/openspace/scene/sceneinitializer.h +++ b/include/openspace/scene/sceneinitializer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/scenelicensewriter.h b/include/openspace/scene/scenelicensewriter.h index 8a10eb56bf..e0eb6be2d6 100644 --- a/include/openspace/scene/scenelicensewriter.h +++ b/include/openspace/scene/scenelicensewriter.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/timeframe.h b/include/openspace/scene/timeframe.h index ec66a07b0b..592eda123f 100644 --- a/include/openspace/scene/timeframe.h +++ b/include/openspace/scene/timeframe.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scene/translation.h b/include/openspace/scene/translation.h index f40e90bd17..074b90bbb2 100644 --- a/include/openspace/scene/translation.h +++ b/include/openspace/scene/translation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scripting/lualibrary.h b/include/openspace/scripting/lualibrary.h index 275d485adc..1c123f6014 100644 --- a/include/openspace/scripting/lualibrary.h +++ b/include/openspace/scripting/lualibrary.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index 8914527778..5890e6bb7e 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scripting/scriptscheduler.h b/include/openspace/scripting/scriptscheduler.h index 98327cf41e..7612186de5 100644 --- a/include/openspace/scripting/scriptscheduler.h +++ b/include/openspace/scripting/scriptscheduler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/scripting/systemcapabilitiesbinding.h b/include/openspace/scripting/systemcapabilitiesbinding.h index af4e524fe9..4744167acb 100644 --- a/include/openspace/scripting/systemcapabilitiesbinding.h +++ b/include/openspace/scripting/systemcapabilitiesbinding.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/blockplaneintersectiongeometry.h b/include/openspace/util/blockplaneintersectiongeometry.h index e4f4703f8b..37e9e7d134 100644 --- a/include/openspace/util/blockplaneintersectiongeometry.h +++ b/include/openspace/util/blockplaneintersectiongeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/boxgeometry.h b/include/openspace/util/boxgeometry.h index 9d42e83d1f..d9c82388c6 100644 --- a/include/openspace/util/boxgeometry.h +++ b/include/openspace/util/boxgeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/camera.h b/include/openspace/util/camera.h index 0ea6ca7285..7321b5b85a 100644 --- a/include/openspace/util/camera.h +++ b/include/openspace/util/camera.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/concurrentjobmanager.h b/include/openspace/util/concurrentjobmanager.h index ddb4331294..6f5ed0abf3 100644 --- a/include/openspace/util/concurrentjobmanager.h +++ b/include/openspace/util/concurrentjobmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/concurrentjobmanager.inl b/include/openspace/util/concurrentjobmanager.inl index f53897d514..a49dff3da9 100644 --- a/include/openspace/util/concurrentjobmanager.inl +++ b/include/openspace/util/concurrentjobmanager.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/concurrentqueue.h b/include/openspace/util/concurrentqueue.h index 83d7a1aa62..fe37fe705b 100644 --- a/include/openspace/util/concurrentqueue.h +++ b/include/openspace/util/concurrentqueue.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/concurrentqueue.inl b/include/openspace/util/concurrentqueue.inl index 4f150dda2c..7ebf62f2da 100644 --- a/include/openspace/util/concurrentqueue.inl +++ b/include/openspace/util/concurrentqueue.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/coordinateconversion.h b/include/openspace/util/coordinateconversion.h index 7dcce4ad6e..b6ba2ec7d5 100644 --- a/include/openspace/util/coordinateconversion.h +++ b/include/openspace/util/coordinateconversion.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/distanceconstants.h b/include/openspace/util/distanceconstants.h index e488cce1f9..695e463324 100644 --- a/include/openspace/util/distanceconstants.h +++ b/include/openspace/util/distanceconstants.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/distanceconversion.h b/include/openspace/util/distanceconversion.h index fb37657915..79258ba131 100644 --- a/include/openspace/util/distanceconversion.h +++ b/include/openspace/util/distanceconversion.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/factorymanager.h b/include/openspace/util/factorymanager.h index 7d04502609..443a756f1f 100644 --- a/include/openspace/util/factorymanager.h +++ b/include/openspace/util/factorymanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/factorymanager.inl b/include/openspace/util/factorymanager.inl index 0718c3be15..7c389c72a7 100644 --- a/include/openspace/util/factorymanager.inl +++ b/include/openspace/util/factorymanager.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/histogram.h b/include/openspace/util/histogram.h index 92e21898a0..3b2a2c5641 100644 --- a/include/openspace/util/histogram.h +++ b/include/openspace/util/histogram.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/httprequest.h b/include/openspace/util/httprequest.h index 1cbade7885..7bfd0ac35c 100644 --- a/include/openspace/util/httprequest.h +++ b/include/openspace/util/httprequest.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/job.h b/include/openspace/util/job.h index bce9134c69..c37566ee51 100644 --- a/include/openspace/util/job.h +++ b/include/openspace/util/job.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/keys.h b/include/openspace/util/keys.h index c1bb9bc651..cc7b3fbb71 100644 --- a/include/openspace/util/keys.h +++ b/include/openspace/util/keys.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/memorymanager.h b/include/openspace/util/memorymanager.h index 7fa289263c..e6f8771d9e 100644 --- a/include/openspace/util/memorymanager.h +++ b/include/openspace/util/memorymanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/mouse.h b/include/openspace/util/mouse.h index a215afa244..1539b353bf 100644 --- a/include/openspace/util/mouse.h +++ b/include/openspace/util/mouse.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index 78918d05b1..3040eff52e 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/progressbar.h b/include/openspace/util/progressbar.h index 8667500c9e..e3e1957b69 100644 --- a/include/openspace/util/progressbar.h +++ b/include/openspace/util/progressbar.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/resourcesynchronization.h b/include/openspace/util/resourcesynchronization.h index 9a96ea6d2c..790439a76f 100644 --- a/include/openspace/util/resourcesynchronization.h +++ b/include/openspace/util/resourcesynchronization.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/screenlog.h b/include/openspace/util/screenlog.h index ed8de1228e..57673b2170 100644 --- a/include/openspace/util/screenlog.h +++ b/include/openspace/util/screenlog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/sphere.h b/include/openspace/util/sphere.h index a0e1557b63..1167c4e4f2 100644 --- a/include/openspace/util/sphere.h +++ b/include/openspace/util/sphere.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 3c2cada852..fc22791ed7 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/syncable.h b/include/openspace/util/syncable.h index f3c19e7afd..4a8590948e 100644 --- a/include/openspace/util/syncable.h +++ b/include/openspace/util/syncable.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index 58c55981fc..54a1f5f0fa 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/syncbuffer.inl b/include/openspace/util/syncbuffer.inl index 3414ed687e..73b684b3ff 100644 --- a/include/openspace/util/syncbuffer.inl +++ b/include/openspace/util/syncbuffer.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/syncdata.h b/include/openspace/util/syncdata.h index 7f3552c5a5..cee6820737 100644 --- a/include/openspace/util/syncdata.h +++ b/include/openspace/util/syncdata.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/syncdata.inl b/include/openspace/util/syncdata.inl index b0a39e4ae0..7d1d93fc00 100644 --- a/include/openspace/util/syncdata.inl +++ b/include/openspace/util/syncdata.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/synchronizationwatcher.h b/include/openspace/util/synchronizationwatcher.h index d830218cb8..1afb1c5dab 100644 --- a/include/openspace/util/synchronizationwatcher.h +++ b/include/openspace/util/synchronizationwatcher.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/task.h b/include/openspace/util/task.h index ef7e280dcd..3b25a987a7 100644 --- a/include/openspace/util/task.h +++ b/include/openspace/util/task.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/taskloader.h b/include/openspace/util/taskloader.h index 6a598df9e5..01c0ed5363 100644 --- a/include/openspace/util/taskloader.h +++ b/include/openspace/util/taskloader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/threadpool.h b/include/openspace/util/threadpool.h index ba596fc732..8f6c639145 100644 --- a/include/openspace/util/threadpool.h +++ b/include/openspace/util/threadpool.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/time.h b/include/openspace/util/time.h index 9a08d6a704..b09bae84e6 100644 --- a/include/openspace/util/time.h +++ b/include/openspace/util/time.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/timeconversion.h b/include/openspace/util/timeconversion.h index 0ec2feca49..51063e0661 100644 --- a/include/openspace/util/timeconversion.h +++ b/include/openspace/util/timeconversion.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/timeline.h b/include/openspace/util/timeline.h index ea2b31f135..1f2936cf40 100644 --- a/include/openspace/util/timeline.h +++ b/include/openspace/util/timeline.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/timeline.inl b/include/openspace/util/timeline.inl index 5ceae3d875..21d46e741b 100644 --- a/include/openspace/util/timeline.inl +++ b/include/openspace/util/timeline.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/timemanager.h b/include/openspace/util/timemanager.h index 658b5f08a3..1e213abb0a 100644 --- a/include/openspace/util/timemanager.h +++ b/include/openspace/util/timemanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/timerange.h b/include/openspace/util/timerange.h index 8b56bfb996..3585a5e581 100644 --- a/include/openspace/util/timerange.h +++ b/include/openspace/util/timerange.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/touch.h b/include/openspace/util/touch.h index 2f5f1d6deb..341a671c21 100644 --- a/include/openspace/util/touch.h +++ b/include/openspace/util/touch.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/transformationmanager.h b/include/openspace/util/transformationmanager.h index abd1361351..8e204ae528 100644 --- a/include/openspace/util/transformationmanager.h +++ b/include/openspace/util/transformationmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/updatestructures.h b/include/openspace/util/updatestructures.h index 0613821590..5ea1f1fe5b 100644 --- a/include/openspace/util/updatestructures.h +++ b/include/openspace/util/updatestructures.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/include/openspace/util/versionchecker.h b/include/openspace/util/versionchecker.h index fb4c513e45..f7ce2e4865 100644 --- a/include/openspace/util/versionchecker.h +++ b/include/openspace/util/versionchecker.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 3c8e3b2c03..330ad3664b 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/atmosphere/CMakeLists.txt b/modules/atmosphere/CMakeLists.txt index 1c7f7b5d5d..475810d9fb 100644 --- a/modules/atmosphere/CMakeLists.txt +++ b/modules/atmosphere/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/atmosphere/atmospheremodule.cpp b/modules/atmosphere/atmospheremodule.cpp index 94fb594ef0..d243bcec00 100644 --- a/modules/atmosphere/atmospheremodule.cpp +++ b/modules/atmosphere/atmospheremodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/atmospheremodule.h b/modules/atmosphere/atmospheremodule.h index 6b89bc761f..c17be3f83f 100644 --- a/modules/atmosphere/atmospheremodule.h +++ b/modules/atmosphere/atmospheremodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp index c5a86c5172..0a27be4596 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.h b/modules/atmosphere/rendering/atmospheredeferredcaster.h index 8f5cf1b75c..f0f142824a 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.h +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 5c9a375ece..923dc6631e 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/rendering/renderableatmosphere.h b/modules/atmosphere/rendering/renderableatmosphere.h index 685ddf3830..f39f4ed27e 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.h +++ b/modules/atmosphere/rendering/renderableatmosphere.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/atmosphere_common.glsl b/modules/atmosphere/shaders/atmosphere_common.glsl index c806dfab8e..c22b545337 100644 --- a/modules/atmosphere/shaders/atmosphere_common.glsl +++ b/modules/atmosphere/shaders/atmosphere_common.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl index 3fef8ff7a7..caaef43969 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl index f211ee9b42..5d609ded43 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaE_calc_fs.glsl b/modules/atmosphere/shaders/deltaE_calc_fs.glsl index 6ce7053b56..cb93a3284b 100644 --- a/modules/atmosphere/shaders/deltaE_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaE_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaE_calc_vs.glsl b/modules/atmosphere/shaders/deltaE_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/deltaE_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaE_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaJ_calc_fs.glsl b/modules/atmosphere/shaders/deltaJ_calc_fs.glsl index d39e6e2e15..4feb9ff872 100644 --- a/modules/atmosphere/shaders/deltaJ_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaJ_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaJ_calc_gs.glsl b/modules/atmosphere/shaders/deltaJ_calc_gs.glsl index 2756507b85..c68c70a4b3 100644 --- a/modules/atmosphere/shaders/deltaJ_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaJ_calc_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaJ_calc_vs.glsl b/modules/atmosphere/shaders/deltaJ_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/deltaJ_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaJ_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_calc_fs.glsl b/modules/atmosphere/shaders/deltaS_calc_fs.glsl index 055888f2d5..b57dde9e8c 100644 --- a/modules/atmosphere/shaders/deltaS_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_calc_gs.glsl b/modules/atmosphere/shaders/deltaS_calc_gs.glsl index 2756507b85..c68c70a4b3 100644 --- a/modules/atmosphere/shaders/deltaS_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_calc_vs.glsl b/modules/atmosphere/shaders/deltaS_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/deltaS_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl index bc32a189e5..ab60653deb 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl index 61f1cd1805..41e9bed127 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl index 74c77c3837..255f2b1610 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_calc_fs.glsl b/modules/atmosphere/shaders/inScattering_calc_fs.glsl index 6201fc1acb..544b2374a3 100644 --- a/modules/atmosphere/shaders/inScattering_calc_fs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_calc_gs.glsl b/modules/atmosphere/shaders/inScattering_calc_gs.glsl index 5bdbacc9d9..1cb4db902e 100644 --- a/modules/atmosphere/shaders/inScattering_calc_gs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_calc_vs.glsl b/modules/atmosphere/shaders/inScattering_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/inScattering_calc_vs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl index 8bb50ef4bf..ab7c793384 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl index 61f1cd1805..41e9bed127 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl index 74c77c3837..255f2b1610 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_calc_fs.glsl b/modules/atmosphere/shaders/irradiance_calc_fs.glsl index 4891fce05b..67a862b8b7 100644 --- a/modules/atmosphere/shaders/irradiance_calc_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_calc_vs.glsl b/modules/atmosphere/shaders/irradiance_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/irradiance_calc_vs.glsl +++ b/modules/atmosphere/shaders/irradiance_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_final_fs.glsl b/modules/atmosphere/shaders/irradiance_final_fs.glsl index 64b0a547e5..94dc168ab0 100644 --- a/modules/atmosphere/shaders/irradiance_final_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_final_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_final_vs.glsl b/modules/atmosphere/shaders/irradiance_final_vs.glsl index fd0c83d4cb..1ca953fe3c 100644 --- a/modules/atmosphere/shaders/irradiance_final_vs.glsl +++ b/modules/atmosphere/shaders/irradiance_final_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl b/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl index 07ba931806..fcb27b7a9a 100644 --- a/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl b/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl index fad2402e2a..d5a1e43e38 100644 --- a/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/transmittance_calc_fs.glsl b/modules/atmosphere/shaders/transmittance_calc_fs.glsl index 3413b91e41..6e887667bc 100644 --- a/modules/atmosphere/shaders/transmittance_calc_fs.glsl +++ b/modules/atmosphere/shaders/transmittance_calc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/atmosphere/shaders/transmittance_calc_vs.glsl b/modules/atmosphere/shaders/transmittance_calc_vs.glsl index 0f972cb4e3..aead855d65 100644 --- a/modules/atmosphere/shaders/transmittance_calc_vs.glsl +++ b/modules/atmosphere/shaders/transmittance_calc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt index ed840fdc1e..55519e8c01 100644 --- a/modules/base/CMakeLists.txt +++ b/modules/base/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index 13a9679993..6a9ebdce24 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/basemodule.h b/modules/base/basemodule.h index be3e54889c..b757f837fc 100644 --- a/modules/base/basemodule.h +++ b/modules/base/basemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemangle.cpp b/modules/base/dashboard/dashboarditemangle.cpp index d4457ac5b4..42ae2afbf4 100644 --- a/modules/base/dashboard/dashboarditemangle.cpp +++ b/modules/base/dashboard/dashboarditemangle.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemangle.h b/modules/base/dashboard/dashboarditemangle.h index f7f450c57f..b6d234d862 100644 --- a/modules/base/dashboard/dashboarditemangle.h +++ b/modules/base/dashboard/dashboarditemangle.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemdate.cpp b/modules/base/dashboard/dashboarditemdate.cpp index 1534e052af..f47f5b9b44 100644 --- a/modules/base/dashboard/dashboarditemdate.cpp +++ b/modules/base/dashboard/dashboarditemdate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index 80be357f13..602de7b2c9 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index f806f22a90..f973743453 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index 6e95e097fc..bb3b7037ef 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemframerate.cpp b/modules/base/dashboard/dashboarditemframerate.cpp index 93e20cd280..eab94b2e45 100644 --- a/modules/base/dashboard/dashboarditemframerate.cpp +++ b/modules/base/dashboard/dashboarditemframerate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemframerate.h b/modules/base/dashboard/dashboarditemframerate.h index 629a571c1b..17038cc572 100644 --- a/modules/base/dashboard/dashboarditemframerate.h +++ b/modules/base/dashboard/dashboarditemframerate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemmission.cpp b/modules/base/dashboard/dashboarditemmission.cpp index 820df4032f..19493f2046 100644 --- a/modules/base/dashboard/dashboarditemmission.cpp +++ b/modules/base/dashboard/dashboarditemmission.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemmission.h b/modules/base/dashboard/dashboarditemmission.h index 6a610b83ce..bb02551fdf 100644 --- a/modules/base/dashboard/dashboarditemmission.h +++ b/modules/base/dashboard/dashboarditemmission.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index 24bf02adf9..7bdd436a6c 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemparallelconnection.h b/modules/base/dashboard/dashboarditemparallelconnection.h index 27817b20ce..7e13459850 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.h +++ b/modules/base/dashboard/dashboarditemparallelconnection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditempropertyvalue.cpp b/modules/base/dashboard/dashboarditempropertyvalue.cpp index 78893a791a..f39bfaafbe 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.cpp +++ b/modules/base/dashboard/dashboarditempropertyvalue.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditempropertyvalue.h b/modules/base/dashboard/dashboarditempropertyvalue.h index 0986082a07..2f14a3aeff 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.h +++ b/modules/base/dashboard/dashboarditempropertyvalue.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index ec5bdd3152..8df0a80ac8 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index cb2897dec9..7b3367811f 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemspacing.cpp b/modules/base/dashboard/dashboarditemspacing.cpp index 7b9f98977f..b1719cf894 100644 --- a/modules/base/dashboard/dashboarditemspacing.cpp +++ b/modules/base/dashboard/dashboarditemspacing.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemspacing.h b/modules/base/dashboard/dashboarditemspacing.h index d3b48199a8..ca0e258b4b 100644 --- a/modules/base/dashboard/dashboarditemspacing.h +++ b/modules/base/dashboard/dashboarditemspacing.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemtext.cpp b/modules/base/dashboard/dashboarditemtext.cpp index 68eda26a3d..9a461db605 100644 --- a/modules/base/dashboard/dashboarditemtext.cpp +++ b/modules/base/dashboard/dashboarditemtext.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h index 8ccdf89263..648b501805 100644 --- a/modules/base/dashboard/dashboarditemtext.h +++ b/modules/base/dashboard/dashboarditemtext.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemvelocity.cpp b/modules/base/dashboard/dashboarditemvelocity.cpp index acc9b4a4a2..4de13a891c 100644 --- a/modules/base/dashboard/dashboarditemvelocity.cpp +++ b/modules/base/dashboard/dashboarditemvelocity.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/dashboard/dashboarditemvelocity.h b/modules/base/dashboard/dashboarditemvelocity.h index 571c5ffcac..fa2664b2cf 100644 --- a/modules/base/dashboard/dashboarditemvelocity.h +++ b/modules/base/dashboard/dashboarditemvelocity.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/lightsource/cameralightsource.cpp b/modules/base/lightsource/cameralightsource.cpp index ade1fce643..03028c9717 100644 --- a/modules/base/lightsource/cameralightsource.cpp +++ b/modules/base/lightsource/cameralightsource.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/lightsource/cameralightsource.h b/modules/base/lightsource/cameralightsource.h index fea98d94a3..06c082212a 100644 --- a/modules/base/lightsource/cameralightsource.h +++ b/modules/base/lightsource/cameralightsource.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/lightsource/scenegraphlightsource.cpp b/modules/base/lightsource/scenegraphlightsource.cpp index ef59e739e7..7b8a2742a6 100644 --- a/modules/base/lightsource/scenegraphlightsource.cpp +++ b/modules/base/lightsource/scenegraphlightsource.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/lightsource/scenegraphlightsource.h b/modules/base/lightsource/scenegraphlightsource.h index f1d4ed7b52..3a7b75f12d 100644 --- a/modules/base/lightsource/scenegraphlightsource.h +++ b/modules/base/lightsource/scenegraphlightsource.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderableboxgrid.cpp b/modules/base/rendering/grids/renderableboxgrid.cpp index e08b8aee92..6a5e190247 100644 --- a/modules/base/rendering/grids/renderableboxgrid.cpp +++ b/modules/base/rendering/grids/renderableboxgrid.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderableboxgrid.h b/modules/base/rendering/grids/renderableboxgrid.h index 69eaed2727..df20c30304 100644 --- a/modules/base/rendering/grids/renderableboxgrid.h +++ b/modules/base/rendering/grids/renderableboxgrid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index b376a0e340..6ed08dfac0 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderablegrid.h b/modules/base/rendering/grids/renderablegrid.h index 39c3c2d751..41ca5a6408 100644 --- a/modules/base/rendering/grids/renderablegrid.h +++ b/modules/base/rendering/grids/renderablegrid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index 0cc2a3f449..5aa15db3ab 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -3,7 +3,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderableradialgrid.h b/modules/base/rendering/grids/renderableradialgrid.h index cc2abfb7dd..37b655ab8a 100644 --- a/modules/base/rendering/grids/renderableradialgrid.h +++ b/modules/base/rendering/grids/renderableradialgrid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index 22fbc0878b..1d8db012dc 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/grids/renderablesphericalgrid.h b/modules/base/rendering/grids/renderablesphericalgrid.h index 15639132af..986087fff2 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.h +++ b/modules/base/rendering/grids/renderablesphericalgrid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/modelgeometry.cpp b/modules/base/rendering/modelgeometry.cpp index a225d03296..25baaa777a 100644 --- a/modules/base/rendering/modelgeometry.cpp +++ b/modules/base/rendering/modelgeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/modelgeometry.h b/modules/base/rendering/modelgeometry.h index c087d57d7e..4e27ddec04 100644 --- a/modules/base/rendering/modelgeometry.h +++ b/modules/base/rendering/modelgeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/multimodelgeometry.cpp b/modules/base/rendering/multimodelgeometry.cpp index 96bed213a3..714dd767b9 100644 --- a/modules/base/rendering/multimodelgeometry.cpp +++ b/modules/base/rendering/multimodelgeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/multimodelgeometry.h b/modules/base/rendering/multimodelgeometry.h index c8d2c116a9..d5a2d0d1de 100644 --- a/modules/base/rendering/multimodelgeometry.h +++ b/modules/base/rendering/multimodelgeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablecartesianaxes.cpp b/modules/base/rendering/renderablecartesianaxes.cpp index 1eeb32324f..1e2e2d208a 100644 --- a/modules/base/rendering/renderablecartesianaxes.cpp +++ b/modules/base/rendering/renderablecartesianaxes.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablecartesianaxes.h b/modules/base/rendering/renderablecartesianaxes.h index 99741b9fb6..1d3df373bc 100644 --- a/modules/base/rendering/renderablecartesianaxes.h +++ b/modules/base/rendering/renderablecartesianaxes.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablelabels.cpp b/modules/base/rendering/renderablelabels.cpp index 2233379f67..85f686dc93 100644 --- a/modules/base/rendering/renderablelabels.cpp +++ b/modules/base/rendering/renderablelabels.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablelabels.h b/modules/base/rendering/renderablelabels.h index af3b90ece5..a1cad2dd6d 100644 --- a/modules/base/rendering/renderablelabels.h +++ b/modules/base/rendering/renderablelabels.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index c864d02a7b..ec98dc83e8 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index b89cbcf944..67db1e1c39 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index 674f8f31eb..21218e13f4 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablenodeline.h b/modules/base/rendering/renderablenodeline.h index 075f59eea0..fbeddba723 100644 --- a/modules/base/rendering/renderablenodeline.h +++ b/modules/base/rendering/renderablenodeline.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index fd0ee7eac7..37277bd6d0 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplane.h b/modules/base/rendering/renderableplane.h index 4f29066be1..12d9d50ab1 100644 --- a/modules/base/rendering/renderableplane.h +++ b/modules/base/rendering/renderableplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplaneimagelocal.cpp b/modules/base/rendering/renderableplaneimagelocal.cpp index a6d711a046..cd37175f72 100644 --- a/modules/base/rendering/renderableplaneimagelocal.cpp +++ b/modules/base/rendering/renderableplaneimagelocal.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplaneimagelocal.h b/modules/base/rendering/renderableplaneimagelocal.h index 0e428296de..42e7e178c1 100644 --- a/modules/base/rendering/renderableplaneimagelocal.h +++ b/modules/base/rendering/renderableplaneimagelocal.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplaneimageonline.cpp b/modules/base/rendering/renderableplaneimageonline.cpp index 86b93d5bd2..50d8d7d6ec 100644 --- a/modules/base/rendering/renderableplaneimageonline.cpp +++ b/modules/base/rendering/renderableplaneimageonline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderableplaneimageonline.h b/modules/base/rendering/renderableplaneimageonline.h index 10060d8cfb..34c2bc3b1d 100644 --- a/modules/base/rendering/renderableplaneimageonline.h +++ b/modules/base/rendering/renderableplaneimageonline.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index ce1d5d9fc9..8ea072fac1 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderablesphere.h b/modules/base/rendering/renderablesphere.h index 8369aca051..733e906fa4 100644 --- a/modules/base/rendering/renderablesphere.h +++ b/modules/base/rendering/renderablesphere.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index bf00b7edae..0a033b2afc 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h index 41c7437409..a65fc7fa18 100644 --- a/modules/base/rendering/renderabletrail.h +++ b/modules/base/rendering/renderabletrail.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index e2c182744a..7430b52092 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrailorbit.h b/modules/base/rendering/renderabletrailorbit.h index 49c2257e5f..c42ae56d1b 100644 --- a/modules/base/rendering/renderabletrailorbit.h +++ b/modules/base/rendering/renderabletrailorbit.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 0bfc711000..1a5284650a 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/renderabletrailtrajectory.h b/modules/base/rendering/renderabletrailtrajectory.h index 82a97bb968..a06b5298d5 100644 --- a/modules/base/rendering/renderabletrailtrajectory.h +++ b/modules/base/rendering/renderabletrailtrajectory.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index ea5cf6d492..437af84538 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspacedashboard.h b/modules/base/rendering/screenspacedashboard.h index 49b2a8fbed..27b780fc6f 100644 --- a/modules/base/rendering/screenspacedashboard.h +++ b/modules/base/rendering/screenspacedashboard.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index e2d0e6a409..e4b5898bab 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceframebuffer.h b/modules/base/rendering/screenspaceframebuffer.h index e824179bb6..e754ed0513 100644 --- a/modules/base/rendering/screenspaceframebuffer.h +++ b/modules/base/rendering/screenspaceframebuffer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceimagelocal.cpp b/modules/base/rendering/screenspaceimagelocal.cpp index 04bdc57b61..058789cf43 100644 --- a/modules/base/rendering/screenspaceimagelocal.cpp +++ b/modules/base/rendering/screenspaceimagelocal.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceimagelocal.h b/modules/base/rendering/screenspaceimagelocal.h index 0c1fbc711e..615305e746 100644 --- a/modules/base/rendering/screenspaceimagelocal.h +++ b/modules/base/rendering/screenspaceimagelocal.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceimageonline.cpp b/modules/base/rendering/screenspaceimageonline.cpp index 958975fc4b..4a138b5fa9 100644 --- a/modules/base/rendering/screenspaceimageonline.cpp +++ b/modules/base/rendering/screenspaceimageonline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rendering/screenspaceimageonline.h b/modules/base/rendering/screenspaceimageonline.h index 428bee0c3d..2301bc0302 100644 --- a/modules/base/rendering/screenspaceimageonline.h +++ b/modules/base/rendering/screenspaceimageonline.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/constantrotation.cpp b/modules/base/rotation/constantrotation.cpp index ddf508b51e..bbf4f98a9c 100644 --- a/modules/base/rotation/constantrotation.cpp +++ b/modules/base/rotation/constantrotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/constantrotation.h b/modules/base/rotation/constantrotation.h index 91faf7c80f..3b1d0b8ec4 100644 --- a/modules/base/rotation/constantrotation.h +++ b/modules/base/rotation/constantrotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index d071dc8b63..00cbbae1e2 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/fixedrotation.h b/modules/base/rotation/fixedrotation.h index 6c59047c90..5c83657679 100644 --- a/modules/base/rotation/fixedrotation.h +++ b/modules/base/rotation/fixedrotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/luarotation.cpp b/modules/base/rotation/luarotation.cpp index 7fa81592d1..7feb62b165 100644 --- a/modules/base/rotation/luarotation.cpp +++ b/modules/base/rotation/luarotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/luarotation.h b/modules/base/rotation/luarotation.h index 74248480ac..099c7fc06c 100644 --- a/modules/base/rotation/luarotation.h +++ b/modules/base/rotation/luarotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index e11de94e0e..e42acfa361 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/staticrotation.h b/modules/base/rotation/staticrotation.h index c9a647bdec..2c27cdece2 100644 --- a/modules/base/rotation/staticrotation.h +++ b/modules/base/rotation/staticrotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/timelinerotation.cpp b/modules/base/rotation/timelinerotation.cpp index 1e907382b4..46aeb0431a 100644 --- a/modules/base/rotation/timelinerotation.cpp +++ b/modules/base/rotation/timelinerotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/rotation/timelinerotation.h b/modules/base/rotation/timelinerotation.h index 7e1a7d9132..14e18424ae 100644 --- a/modules/base/rotation/timelinerotation.h +++ b/modules/base/rotation/timelinerotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/luascale.cpp b/modules/base/scale/luascale.cpp index f13b485c9a..204a0205f8 100644 --- a/modules/base/scale/luascale.cpp +++ b/modules/base/scale/luascale.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/luascale.h b/modules/base/scale/luascale.h index 1306ec476b..1cfde19c76 100644 --- a/modules/base/scale/luascale.h +++ b/modules/base/scale/luascale.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/nonuniformstaticscale.cpp b/modules/base/scale/nonuniformstaticscale.cpp index cc9a2d487d..b83a3c81b5 100644 --- a/modules/base/scale/nonuniformstaticscale.cpp +++ b/modules/base/scale/nonuniformstaticscale.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/nonuniformstaticscale.h b/modules/base/scale/nonuniformstaticscale.h index ded7951c11..ffc7b9b7d5 100644 --- a/modules/base/scale/nonuniformstaticscale.h +++ b/modules/base/scale/nonuniformstaticscale.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index 4c15f70fae..a246ab4ad9 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/staticscale.h b/modules/base/scale/staticscale.h index f11e95a4ed..197dacbfb7 100644 --- a/modules/base/scale/staticscale.h +++ b/modules/base/scale/staticscale.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/timedependentscale.cpp b/modules/base/scale/timedependentscale.cpp index e6e731d667..255e9a3ad0 100644 --- a/modules/base/scale/timedependentscale.cpp +++ b/modules/base/scale/timedependentscale.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/scale/timedependentscale.h b/modules/base/scale/timedependentscale.h index 3fda4e19ed..f7db93d5e5 100644 --- a/modules/base/scale/timedependentscale.h +++ b/modules/base/scale/timedependentscale.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/axes_fs.glsl b/modules/base/shaders/axes_fs.glsl index 8540409131..037b07aac5 100644 --- a/modules/base/shaders/axes_fs.glsl +++ b/modules/base/shaders/axes_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/axes_vs.glsl b/modules/base/shaders/axes_vs.glsl index 6ae73a55eb..b7d5caae03 100644 --- a/modules/base/shaders/axes_vs.glsl +++ b/modules/base/shaders/axes_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/grid_fs.glsl b/modules/base/shaders/grid_fs.glsl index e0f676a74d..6e0e2cdcab 100644 --- a/modules/base/shaders/grid_fs.glsl +++ b/modules/base/shaders/grid_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/grid_vs.glsl b/modules/base/shaders/grid_vs.glsl index 587048960c..beb95e9059 100644 --- a/modules/base/shaders/grid_vs.glsl +++ b/modules/base/shaders/grid_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/imageplane_fs.glsl b/modules/base/shaders/imageplane_fs.glsl index 2ebb17f323..7c1e1fd019 100644 --- a/modules/base/shaders/imageplane_fs.glsl +++ b/modules/base/shaders/imageplane_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/imageplane_vs.glsl b/modules/base/shaders/imageplane_vs.glsl index 585154a73f..b8160cadee 100644 --- a/modules/base/shaders/imageplane_vs.glsl +++ b/modules/base/shaders/imageplane_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/line_fs.glsl b/modules/base/shaders/line_fs.glsl index 0b8309c319..0045d65d15 100644 --- a/modules/base/shaders/line_fs.glsl +++ b/modules/base/shaders/line_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/line_vs.glsl b/modules/base/shaders/line_vs.glsl index af629e75a2..e83e3a8260 100644 --- a/modules/base/shaders/line_vs.glsl +++ b/modules/base/shaders/line_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index a26843ca2c..33af4938b9 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/model_vs.glsl b/modules/base/shaders/model_vs.glsl index 51350b218d..de916ada58 100644 --- a/modules/base/shaders/model_vs.glsl +++ b/modules/base/shaders/model_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/plane_fs.glsl b/modules/base/shaders/plane_fs.glsl index a3a84d9ab7..f739d6ac32 100644 --- a/modules/base/shaders/plane_fs.glsl +++ b/modules/base/shaders/plane_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/plane_vs.glsl b/modules/base/shaders/plane_vs.glsl index a702df7eee..e93dd95a92 100644 --- a/modules/base/shaders/plane_vs.glsl +++ b/modules/base/shaders/plane_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/renderabletrail_apple_fs.glsl b/modules/base/shaders/renderabletrail_apple_fs.glsl index d89b3cc720..5dfc81231f 100644 --- a/modules/base/shaders/renderabletrail_apple_fs.glsl +++ b/modules/base/shaders/renderabletrail_apple_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/renderabletrail_apple_vs.glsl b/modules/base/shaders/renderabletrail_apple_vs.glsl index aa6224c3af..da699581e9 100644 --- a/modules/base/shaders/renderabletrail_apple_vs.glsl +++ b/modules/base/shaders/renderabletrail_apple_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/renderabletrail_fs.glsl b/modules/base/shaders/renderabletrail_fs.glsl index d08f19b371..27e1402b06 100644 --- a/modules/base/shaders/renderabletrail_fs.glsl +++ b/modules/base/shaders/renderabletrail_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/renderabletrail_vs.glsl b/modules/base/shaders/renderabletrail_vs.glsl index f7f0804fd8..3a6b56ce62 100644 --- a/modules/base/shaders/renderabletrail_vs.glsl +++ b/modules/base/shaders/renderabletrail_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/screenspace_fs.glsl b/modules/base/shaders/screenspace_fs.glsl index dc7d73b601..7c0f7e1b57 100644 --- a/modules/base/shaders/screenspace_fs.glsl +++ b/modules/base/shaders/screenspace_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/screenspace_vs.glsl b/modules/base/shaders/screenspace_vs.glsl index f5c345f7e2..2f057ce33d 100644 --- a/modules/base/shaders/screenspace_vs.glsl +++ b/modules/base/shaders/screenspace_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/sphere_fs.glsl b/modules/base/shaders/sphere_fs.glsl index 3aecbe4355..0a3a97acec 100644 --- a/modules/base/shaders/sphere_fs.glsl +++ b/modules/base/shaders/sphere_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/shaders/sphere_vs.glsl b/modules/base/shaders/sphere_vs.glsl index cf747e4a51..873646d23a 100644 --- a/modules/base/shaders/sphere_vs.glsl +++ b/modules/base/shaders/sphere_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/timeframe/timeframeinterval.cpp b/modules/base/timeframe/timeframeinterval.cpp index 2627d44e6e..1d194527a8 100644 --- a/modules/base/timeframe/timeframeinterval.cpp +++ b/modules/base/timeframe/timeframeinterval.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/timeframe/timeframeinterval.h b/modules/base/timeframe/timeframeinterval.h index 04b5f54cfc..f623285c35 100644 --- a/modules/base/timeframe/timeframeinterval.h +++ b/modules/base/timeframe/timeframeinterval.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/timeframe/timeframeunion.cpp b/modules/base/timeframe/timeframeunion.cpp index f2b8c38548..885888db68 100644 --- a/modules/base/timeframe/timeframeunion.cpp +++ b/modules/base/timeframe/timeframeunion.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/timeframe/timeframeunion.h b/modules/base/timeframe/timeframeunion.h index 27a0344e7b..1346a66809 100644 --- a/modules/base/timeframe/timeframeunion.h +++ b/modules/base/timeframe/timeframeunion.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/luatranslation.cpp b/modules/base/translation/luatranslation.cpp index 1c3d1610b2..8268b30928 100644 --- a/modules/base/translation/luatranslation.cpp +++ b/modules/base/translation/luatranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/luatranslation.h b/modules/base/translation/luatranslation.h index 2951c7e45d..d4a5031ee2 100644 --- a/modules/base/translation/luatranslation.h +++ b/modules/base/translation/luatranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 00efb611b4..616185556d 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/statictranslation.h b/modules/base/translation/statictranslation.h index a786bddfd6..3ad3094f98 100644 --- a/modules/base/translation/statictranslation.h +++ b/modules/base/translation/statictranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/timelinetranslation.cpp b/modules/base/translation/timelinetranslation.cpp index 69d05e62c5..1479825ec3 100644 --- a/modules/base/translation/timelinetranslation.cpp +++ b/modules/base/translation/timelinetranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/base/translation/timelinetranslation.h b/modules/base/translation/timelinetranslation.h index 238922edd0..33e528d9da 100644 --- a/modules/base/translation/timelinetranslation.h +++ b/modules/base/translation/timelinetranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/CMakeLists.txt b/modules/cefwebgui/CMakeLists.txt index 35c27003c4..54d6033373 100644 --- a/modules/cefwebgui/CMakeLists.txt +++ b/modules/cefwebgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index f71ecda914..9812606e11 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/cefwebguimodule.h b/modules/cefwebgui/cefwebguimodule.h index 2d42ed3c66..6f230fd57f 100644 --- a/modules/cefwebgui/cefwebguimodule.h +++ b/modules/cefwebgui/cefwebguimodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/include/guikeyboardhandler.h b/modules/cefwebgui/include/guikeyboardhandler.h index 2a74407adc..051a0ed187 100644 --- a/modules/cefwebgui/include/guikeyboardhandler.h +++ b/modules/cefwebgui/include/guikeyboardhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/include/guirenderhandler.h b/modules/cefwebgui/include/guirenderhandler.h index e03c5cfe1c..8e75b82dfc 100644 --- a/modules/cefwebgui/include/guirenderhandler.h +++ b/modules/cefwebgui/include/guirenderhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/shaders/gui_fs.glsl b/modules/cefwebgui/shaders/gui_fs.glsl index 3b31cb9184..08a149d55a 100644 --- a/modules/cefwebgui/shaders/gui_fs.glsl +++ b/modules/cefwebgui/shaders/gui_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/shaders/gui_vs.glsl b/modules/cefwebgui/shaders/gui_vs.glsl index f8ee811e0a..6044288f45 100644 --- a/modules/cefwebgui/shaders/gui_vs.glsl +++ b/modules/cefwebgui/shaders/gui_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/src/guikeyboardhandler.cpp b/modules/cefwebgui/src/guikeyboardhandler.cpp index 3711fa0629..c22faa6490 100644 --- a/modules/cefwebgui/src/guikeyboardhandler.cpp +++ b/modules/cefwebgui/src/guikeyboardhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/cefwebgui/src/guirenderhandler.cpp b/modules/cefwebgui/src/guirenderhandler.cpp index 325210abb8..6ee0c1c5de 100644 --- a/modules/cefwebgui/src/guirenderhandler.cpp +++ b/modules/cefwebgui/src/guirenderhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/CMakeLists.txt b/modules/debugging/CMakeLists.txt index 5c976e673c..74baa55988 100644 --- a/modules/debugging/CMakeLists.txt +++ b/modules/debugging/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index 6e00c47158..d6b60e2439 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/debuggingmodule.h b/modules/debugging/debuggingmodule.h index 2d30ebcdc9..4bc2056fc8 100644 --- a/modules/debugging/debuggingmodule.h +++ b/modules/debugging/debuggingmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/debugrenderer.cpp b/modules/debugging/rendering/debugrenderer.cpp index b06854cffc..50721f9987 100644 --- a/modules/debugging/rendering/debugrenderer.cpp +++ b/modules/debugging/rendering/debugrenderer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/debugrenderer.h b/modules/debugging/rendering/debugrenderer.h index 310f1cdcb7..62ba47e600 100644 --- a/modules/debugging/rendering/debugrenderer.h +++ b/modules/debugging/rendering/debugrenderer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/debugshader_fs.glsl b/modules/debugging/rendering/debugshader_fs.glsl index 0baca40150..fe3dded6a5 100644 --- a/modules/debugging/rendering/debugshader_fs.glsl +++ b/modules/debugging/rendering/debugshader_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/debugshader_vs.glsl b/modules/debugging/rendering/debugshader_vs.glsl index 359cb7cbc6..33de8fc52f 100644 --- a/modules/debugging/rendering/debugshader_vs.glsl +++ b/modules/debugging/rendering/debugshader_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index a54ab4504d..3b2d0767a5 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/debugging/rendering/renderabledebugplane.h b/modules/debugging/rendering/renderabledebugplane.h index 95d003d435..27294e2a02 100644 --- a/modules/debugging/rendering/renderabledebugplane.h +++ b/modules/debugging/rendering/renderabledebugplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/CMakeLists.txt b/modules/digitaluniverse/CMakeLists.txt index 070b876aa0..8eb459ec5e 100644 --- a/modules/digitaluniverse/CMakeLists.txt +++ b/modules/digitaluniverse/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/digitaluniverse/digitaluniversemodule.cpp b/modules/digitaluniverse/digitaluniversemodule.cpp index a49031dbd4..df89332339 100644 --- a/modules/digitaluniverse/digitaluniversemodule.cpp +++ b/modules/digitaluniverse/digitaluniversemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/digitaluniversemodule.h b/modules/digitaluniverse/digitaluniversemodule.h index 9f1b46c7f8..7890e58082 100644 --- a/modules/digitaluniverse/digitaluniversemodule.h +++ b/modules/digitaluniverse/digitaluniversemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index dbd64dd6e9..c7a0d77cc5 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.h b/modules/digitaluniverse/rendering/renderablebillboardscloud.h index e4e6d40d9b..8bbbf556fc 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.h +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index 3b0182d7c6..f18785a193 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.h b/modules/digitaluniverse/rendering/renderabledumeshes.h index 3a1fa603eb..04d32ae50f 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.h +++ b/modules/digitaluniverse/rendering/renderabledumeshes.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index c1aa4a1c8b..8694956201 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.h b/modules/digitaluniverse/rendering/renderableplanescloud.h index 96d2813edb..2180769f03 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.h +++ b/modules/digitaluniverse/rendering/renderableplanescloud.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderablepoints.cpp b/modules/digitaluniverse/rendering/renderablepoints.cpp index 47202bfa4b..cb9332404b 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.cpp +++ b/modules/digitaluniverse/rendering/renderablepoints.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/rendering/renderablepoints.h b/modules/digitaluniverse/rendering/renderablepoints.h index 1b27786097..b842a90deb 100644 --- a/modules/digitaluniverse/rendering/renderablepoints.h +++ b/modules/digitaluniverse/rendering/renderablepoints.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboard_fs.glsl b/modules/digitaluniverse/shaders/billboard_fs.glsl index d0fd92a9d2..678b20592a 100644 --- a/modules/digitaluniverse/shaders/billboard_fs.glsl +++ b/modules/digitaluniverse/shaders/billboard_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboard_gs.glsl b/modules/digitaluniverse/shaders/billboard_gs.glsl index 8a99969a0a..347a936ad8 100644 --- a/modules/digitaluniverse/shaders/billboard_gs.glsl +++ b/modules/digitaluniverse/shaders/billboard_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboard_vs.glsl b/modules/digitaluniverse/shaders/billboard_vs.glsl index 2a8a25f8ba..98517afeb5 100644 --- a/modules/digitaluniverse/shaders/billboard_vs.glsl +++ b/modules/digitaluniverse/shaders/billboard_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl b/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl index 44b6b55b04..eb3a64fb8c 100644 --- a/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl +++ b/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl b/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl index 7592e9d685..37cdbbd65a 100644 --- a/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl +++ b/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/billboardpolygon_vs.glsl b/modules/digitaluniverse/shaders/billboardpolygon_vs.glsl index 0f972cb4e3..aead855d65 100644 --- a/modules/digitaluniverse/shaders/billboardpolygon_vs.glsl +++ b/modules/digitaluniverse/shaders/billboardpolygon_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/dumesh_fs.glsl b/modules/digitaluniverse/shaders/dumesh_fs.glsl index 6997b13fc1..1e28d7ce69 100644 --- a/modules/digitaluniverse/shaders/dumesh_fs.glsl +++ b/modules/digitaluniverse/shaders/dumesh_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/dumesh_vs.glsl b/modules/digitaluniverse/shaders/dumesh_vs.glsl index ebbdf31643..281d1d0a64 100644 --- a/modules/digitaluniverse/shaders/dumesh_vs.glsl +++ b/modules/digitaluniverse/shaders/dumesh_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/plane_fs.glsl b/modules/digitaluniverse/shaders/plane_fs.glsl index 51b0a869fe..5282ce582e 100644 --- a/modules/digitaluniverse/shaders/plane_fs.glsl +++ b/modules/digitaluniverse/shaders/plane_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/plane_vs.glsl b/modules/digitaluniverse/shaders/plane_vs.glsl index e4e2dd04f6..cb84739b05 100644 --- a/modules/digitaluniverse/shaders/plane_vs.glsl +++ b/modules/digitaluniverse/shaders/plane_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/points_fs.glsl b/modules/digitaluniverse/shaders/points_fs.glsl index ff55cd58d8..a38eb2d5fb 100644 --- a/modules/digitaluniverse/shaders/points_fs.glsl +++ b/modules/digitaluniverse/shaders/points_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/points_gs.glsl b/modules/digitaluniverse/shaders/points_gs.glsl index e2b63ded8d..1a3899336f 100644 --- a/modules/digitaluniverse/shaders/points_gs.glsl +++ b/modules/digitaluniverse/shaders/points_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/points_sprite_fs.glsl b/modules/digitaluniverse/shaders/points_sprite_fs.glsl index f47d8beba2..9aea46b03c 100644 --- a/modules/digitaluniverse/shaders/points_sprite_fs.glsl +++ b/modules/digitaluniverse/shaders/points_sprite_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/points_vs.glsl b/modules/digitaluniverse/shaders/points_vs.glsl index 63d4aa0992..a741bea69e 100644 --- a/modules/digitaluniverse/shaders/points_vs.glsl +++ b/modules/digitaluniverse/shaders/points_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/pointssprite_fs.glsl b/modules/digitaluniverse/shaders/pointssprite_fs.glsl index 6dbf377174..6a6cfdb647 100644 --- a/modules/digitaluniverse/shaders/pointssprite_fs.glsl +++ b/modules/digitaluniverse/shaders/pointssprite_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/digitaluniverse/shaders/pointssprite_vs.glsl b/modules/digitaluniverse/shaders/pointssprite_vs.glsl index a6627b5ad1..7f06ce0d6a 100644 --- a/modules/digitaluniverse/shaders/pointssprite_vs.glsl +++ b/modules/digitaluniverse/shaders/pointssprite_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/CMakeLists.txt b/modules/exoplanets/CMakeLists.txt index e3a77cc7b1..85d59b86a9 100644 --- a/modules/exoplanets/CMakeLists.txt +++ b/modules/exoplanets/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index 3a71287751..17bf9b5fe8 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 97001e9ff1..989ce304b6 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index 201e82a857..bdaea22756 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/exoplanetsmodule.h b/modules/exoplanets/exoplanetsmodule.h index 3a9ea264f4..76058f99b5 100644 --- a/modules/exoplanets/exoplanetsmodule.h +++ b/modules/exoplanets/exoplanetsmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 9f49593221..d1875537b4 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 7f08e92e81..477f561852 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/rendering/renderableorbitdisc.h b/modules/exoplanets/rendering/renderableorbitdisc.h index b7d55b6268..5afd8bd63d 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.h +++ b/modules/exoplanets/rendering/renderableorbitdisc.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/shaders/orbitdisc_fs.glsl b/modules/exoplanets/shaders/orbitdisc_fs.glsl index bf8cb01c5c..7e62e31206 100644 --- a/modules/exoplanets/shaders/orbitdisc_fs.glsl +++ b/modules/exoplanets/shaders/orbitdisc_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/shaders/orbitdisc_vs.glsl b/modules/exoplanets/shaders/orbitdisc_vs.glsl index e998350ce7..80a55c613d 100644 --- a/modules/exoplanets/shaders/orbitdisc_vs.glsl +++ b/modules/exoplanets/shaders/orbitdisc_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 90918c46a1..5d8d10d84f 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h index 15bf3d5d07..ec3c7d823e 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/CMakeLists.txt b/modules/fieldlines/CMakeLists.txt index c252250bd7..d44e7571a1 100644 --- a/modules/fieldlines/CMakeLists.txt +++ b/modules/fieldlines/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/fieldlines/fieldlinesmodule.cpp b/modules/fieldlines/fieldlinesmodule.cpp index 52aeab21f3..22bece4bde 100644 --- a/modules/fieldlines/fieldlinesmodule.cpp +++ b/modules/fieldlines/fieldlinesmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/fieldlinesmodule.h b/modules/fieldlines/fieldlinesmodule.h index e9652bd508..d77a777343 100644 --- a/modules/fieldlines/fieldlinesmodule.h +++ b/modules/fieldlines/fieldlinesmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 039af9ef6a..78a3e8dd51 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/rendering/renderablefieldlines.h b/modules/fieldlines/rendering/renderablefieldlines.h index cc73bd60cf..32142e7116 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.h +++ b/modules/fieldlines/rendering/renderablefieldlines.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/shaders/fieldline_fs.glsl b/modules/fieldlines/shaders/fieldline_fs.glsl index 71b7525467..06e1c73932 100644 --- a/modules/fieldlines/shaders/fieldline_fs.glsl +++ b/modules/fieldlines/shaders/fieldline_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/shaders/fieldline_gs.glsl b/modules/fieldlines/shaders/fieldline_gs.glsl index 16310196d6..e35e7334f5 100644 --- a/modules/fieldlines/shaders/fieldline_gs.glsl +++ b/modules/fieldlines/shaders/fieldline_gs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlines/shaders/fieldline_vs.glsl b/modules/fieldlines/shaders/fieldline_vs.glsl index ceba91ab1f..17b81be056 100644 --- a/modules/fieldlines/shaders/fieldline_vs.glsl +++ b/modules/fieldlines/shaders/fieldline_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/CMakeLists.txt b/modules/fieldlinessequence/CMakeLists.txt index 19e66c8f97..f1a938ea8e 100644 --- a/modules/fieldlinessequence/CMakeLists.txt +++ b/modules/fieldlinessequence/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/fieldlinessequence/fieldlinessequencemodule.cpp b/modules/fieldlinessequence/fieldlinessequencemodule.cpp index 6fd64755c1..35959eb514 100644 --- a/modules/fieldlinessequence/fieldlinessequencemodule.cpp +++ b/modules/fieldlinessequence/fieldlinessequencemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/fieldlinessequencemodule.h b/modules/fieldlinessequence/fieldlinessequencemodule.h index c88ba9f5d5..0ff5276850 100644 --- a/modules/fieldlinessequence/fieldlinessequencemodule.h +++ b/modules/fieldlinessequence/fieldlinessequencemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index f7605379a7..b500fe33c6 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h index 786ec3a861..80281d508a 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl b/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl index fc3d4c47c3..518dd214f4 100644 --- a/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl +++ b/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl b/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl index 400b69a0c5..c6686ace94 100644 --- a/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl +++ b/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/commons.cpp b/modules/fieldlinessequence/util/commons.cpp index 9602b52b9b..9edd49070e 100644 --- a/modules/fieldlinessequence/util/commons.cpp +++ b/modules/fieldlinessequence/util/commons.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/commons.h b/modules/fieldlinessequence/util/commons.h index 7e0d125985..eb85d2c31c 100644 --- a/modules/fieldlinessequence/util/commons.h +++ b/modules/fieldlinessequence/util/commons.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/fieldlinesstate.cpp b/modules/fieldlinessequence/util/fieldlinesstate.cpp index 7327514e37..48b9a2b23b 100644 --- a/modules/fieldlinessequence/util/fieldlinesstate.cpp +++ b/modules/fieldlinessequence/util/fieldlinesstate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/fieldlinesstate.h b/modules/fieldlinessequence/util/fieldlinesstate.h index 656403b33b..5277464014 100644 --- a/modules/fieldlinessequence/util/fieldlinesstate.h +++ b/modules/fieldlinessequence/util/fieldlinesstate.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp index 76daab2b7a..7b18d0579d 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.h b/modules/fieldlinessequence/util/kameleonfieldlinehelper.h index 39fa5d7212..1b287914cc 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.h +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fitsfilereader/CMakeLists.txt b/modules/fitsfilereader/CMakeLists.txt index 1532a9e1b6..f2c2f1bc46 100644 --- a/modules/fitsfilereader/CMakeLists.txt +++ b/modules/fitsfilereader/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/fitsfilereader/fitsfilereadermodule.cpp b/modules/fitsfilereader/fitsfilereadermodule.cpp index e0c66c7882..f88687aeb0 100644 --- a/modules/fitsfilereader/fitsfilereadermodule.cpp +++ b/modules/fitsfilereader/fitsfilereadermodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fitsfilereader/fitsfilereadermodule.h b/modules/fitsfilereader/fitsfilereadermodule.h index a16cfaba75..e441eeb5ac 100644 --- a/modules/fitsfilereader/fitsfilereadermodule.h +++ b/modules/fitsfilereader/fitsfilereadermodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fitsfilereader/include/fitsfilereader.h b/modules/fitsfilereader/include/fitsfilereader.h index 5c7bbd77be..9418fc42fb 100644 --- a/modules/fitsfilereader/include/fitsfilereader.h +++ b/modules/fitsfilereader/include/fitsfilereader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index 0ec6aa60f8..26e945fad3 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/CMakeLists.txt b/modules/gaia/CMakeLists.txt index f1cfcf3843..34e442f7d3 100644 --- a/modules/gaia/CMakeLists.txt +++ b/modules/gaia/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/gaia/gaiamodule.cpp b/modules/gaia/gaiamodule.cpp index 7174ca6705..d6293c6059 100644 --- a/modules/gaia/gaiamodule.cpp +++ b/modules/gaia/gaiamodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/gaiamodule.h b/modules/gaia/gaiamodule.h index 657ac52f04..c3db3b3a8c 100644 --- a/modules/gaia/gaiamodule.h +++ b/modules/gaia/gaiamodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/gaiaoptions.h b/modules/gaia/rendering/gaiaoptions.h index b1740b7cb5..265b3ef013 100644 --- a/modules/gaia/rendering/gaiaoptions.h +++ b/modules/gaia/rendering/gaiaoptions.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/octreeculler.cpp b/modules/gaia/rendering/octreeculler.cpp index 0ffef8d717..d08d994ee0 100644 --- a/modules/gaia/rendering/octreeculler.cpp +++ b/modules/gaia/rendering/octreeculler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/octreeculler.h b/modules/gaia/rendering/octreeculler.h index c8a2e2362f..06d7741390 100644 --- a/modules/gaia/rendering/octreeculler.h +++ b/modules/gaia/rendering/octreeculler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/octreemanager.cpp b/modules/gaia/rendering/octreemanager.cpp index 6c35ccc461..55aca88b83 100644 --- a/modules/gaia/rendering/octreemanager.cpp +++ b/modules/gaia/rendering/octreemanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/octreemanager.h b/modules/gaia/rendering/octreemanager.h index 031e9e3630..dda4b00148 100644 --- a/modules/gaia/rendering/octreemanager.h +++ b/modules/gaia/rendering/octreemanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp index c82f5d5b03..4c2bc9cdcc 100644 --- a/modules/gaia/rendering/renderablegaiastars.cpp +++ b/modules/gaia/rendering/renderablegaiastars.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/rendering/renderablegaiastars.h b/modules/gaia/rendering/renderablegaiastars.h index dfde5abc04..2f1e327c08 100644 --- a/modules/gaia/rendering/renderablegaiastars.h +++ b/modules/gaia/rendering/renderablegaiastars.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_billboard_fs.glsl b/modules/gaia/shaders/gaia_billboard_fs.glsl index d9b9ebbbd5..53179cf086 100644 --- a/modules/gaia/shaders/gaia_billboard_fs.glsl +++ b/modules/gaia/shaders/gaia_billboard_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_billboard_ge.glsl b/modules/gaia/shaders/gaia_billboard_ge.glsl index 3296ae1fa2..7fc381e09e 100644 --- a/modules/gaia/shaders/gaia_billboard_ge.glsl +++ b/modules/gaia/shaders/gaia_billboard_ge.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl b/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl index 2e67386300..3b439f1564 100644 --- a/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl +++ b/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_point_fs.glsl b/modules/gaia/shaders/gaia_point_fs.glsl index 22fa3fafb9..1277f9d589 100644 --- a/modules/gaia/shaders/gaia_point_fs.glsl +++ b/modules/gaia/shaders/gaia_point_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_point_ge.glsl b/modules/gaia/shaders/gaia_point_ge.glsl index b36e18f5bb..f6dc071fd2 100644 --- a/modules/gaia/shaders/gaia_point_ge.glsl +++ b/modules/gaia/shaders/gaia_point_ge.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_ssbo_vs.glsl b/modules/gaia/shaders/gaia_ssbo_vs.glsl index ecd6f1b064..00db0a2361 100644 --- a/modules/gaia/shaders/gaia_ssbo_vs.glsl +++ b/modules/gaia/shaders/gaia_ssbo_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl b/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl index 3cf794162f..f84450bccf 100644 --- a/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl +++ b/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl b/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl index f2da517b0b..2bff48de8d 100644 --- a/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl +++ b/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_tonemapping_vs.glsl b/modules/gaia/shaders/gaia_tonemapping_vs.glsl index 2f9122836d..b6cefb308e 100644 --- a/modules/gaia/shaders/gaia_tonemapping_vs.glsl +++ b/modules/gaia/shaders/gaia_tonemapping_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/shaders/gaia_vbo_vs.glsl b/modules/gaia/shaders/gaia_vbo_vs.glsl index f5a635c3d2..281eea7157 100644 --- a/modules/gaia/shaders/gaia_vbo_vs.glsl +++ b/modules/gaia/shaders/gaia_vbo_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/constructoctreetask.cpp b/modules/gaia/tasks/constructoctreetask.cpp index b10eda0bc2..7d1e5621e0 100644 --- a/modules/gaia/tasks/constructoctreetask.cpp +++ b/modules/gaia/tasks/constructoctreetask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/constructoctreetask.h b/modules/gaia/tasks/constructoctreetask.h index 824521e340..e4be13457d 100644 --- a/modules/gaia/tasks/constructoctreetask.h +++ b/modules/gaia/tasks/constructoctreetask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readfilejob.cpp b/modules/gaia/tasks/readfilejob.cpp index fe102d9629..12e0ea1b08 100644 --- a/modules/gaia/tasks/readfilejob.cpp +++ b/modules/gaia/tasks/readfilejob.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readfilejob.h b/modules/gaia/tasks/readfilejob.h index 13f3cfc38b..49089ad139 100644 --- a/modules/gaia/tasks/readfilejob.h +++ b/modules/gaia/tasks/readfilejob.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readfitstask.cpp b/modules/gaia/tasks/readfitstask.cpp index 3fea257007..461d352f34 100644 --- a/modules/gaia/tasks/readfitstask.cpp +++ b/modules/gaia/tasks/readfitstask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readfitstask.h b/modules/gaia/tasks/readfitstask.h index ba3981fa0b..ee965cc71c 100644 --- a/modules/gaia/tasks/readfitstask.h +++ b/modules/gaia/tasks/readfitstask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readspecktask.cpp b/modules/gaia/tasks/readspecktask.cpp index d30d39d058..89f2970fba 100644 --- a/modules/gaia/tasks/readspecktask.cpp +++ b/modules/gaia/tasks/readspecktask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/gaia/tasks/readspecktask.h b/modules/gaia/tasks/readspecktask.h index e9c6517dfb..f42b07a81f 100644 --- a/modules/gaia/tasks/readspecktask.h +++ b/modules/gaia/tasks/readspecktask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/CMakeLists.txt b/modules/galaxy/CMakeLists.txt index 6115cc655b..434b320ca2 100644 --- a/modules/galaxy/CMakeLists.txt +++ b/modules/galaxy/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/galaxy/galaxymodule.cpp b/modules/galaxy/galaxymodule.cpp index 504c807102..45dd335106 100644 --- a/modules/galaxy/galaxymodule.cpp +++ b/modules/galaxy/galaxymodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/galaxymodule.h b/modules/galaxy/galaxymodule.h index bc72bcf948..f5433281ce 100644 --- a/modules/galaxy/galaxymodule.h +++ b/modules/galaxy/galaxymodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/rendering/galaxyraycaster.cpp b/modules/galaxy/rendering/galaxyraycaster.cpp index 65f5b8c86e..0f11505f9d 100644 --- a/modules/galaxy/rendering/galaxyraycaster.cpp +++ b/modules/galaxy/rendering/galaxyraycaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/rendering/galaxyraycaster.h b/modules/galaxy/rendering/galaxyraycaster.h index cb8cf6de12..42ff62d82f 100644 --- a/modules/galaxy/rendering/galaxyraycaster.h +++ b/modules/galaxy/rendering/galaxyraycaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 50b9de41af..100f72fafb 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/rendering/renderablegalaxy.h b/modules/galaxy/rendering/renderablegalaxy.h index f89090c5d0..889f2953a2 100644 --- a/modules/galaxy/rendering/renderablegalaxy.h +++ b/modules/galaxy/rendering/renderablegalaxy.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/billboard_fs.glsl b/modules/galaxy/shaders/billboard_fs.glsl index 8d6bb8086d..69931514a8 100644 --- a/modules/galaxy/shaders/billboard_fs.glsl +++ b/modules/galaxy/shaders/billboard_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/billboard_ge.glsl b/modules/galaxy/shaders/billboard_ge.glsl index f6d1514312..0cd652d36f 100644 --- a/modules/galaxy/shaders/billboard_ge.glsl +++ b/modules/galaxy/shaders/billboard_ge.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/billboard_vs.glsl b/modules/galaxy/shaders/billboard_vs.glsl index ee5fff53fb..813bd111c7 100644 --- a/modules/galaxy/shaders/billboard_vs.glsl +++ b/modules/galaxy/shaders/billboard_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/points_fs.glsl b/modules/galaxy/shaders/points_fs.glsl index 702046e45a..025834723f 100644 --- a/modules/galaxy/shaders/points_fs.glsl +++ b/modules/galaxy/shaders/points_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/points_vs.glsl b/modules/galaxy/shaders/points_vs.glsl index c8be748996..bd5f43daca 100644 --- a/modules/galaxy/shaders/points_vs.glsl +++ b/modules/galaxy/shaders/points_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/raycasterbounds_fs.glsl b/modules/galaxy/shaders/raycasterbounds_fs.glsl index 2ff99f2c5a..50013a0642 100644 --- a/modules/galaxy/shaders/raycasterbounds_fs.glsl +++ b/modules/galaxy/shaders/raycasterbounds_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/shaders/raycasterbounds_vs.glsl b/modules/galaxy/shaders/raycasterbounds_vs.glsl index 5e1ddaed80..acd3fb47b2 100644 --- a/modules/galaxy/shaders/raycasterbounds_vs.glsl +++ b/modules/galaxy/shaders/raycasterbounds_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/tasks/milkywayconversiontask.cpp b/modules/galaxy/tasks/milkywayconversiontask.cpp index 992a6328db..49a6de9aef 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.cpp +++ b/modules/galaxy/tasks/milkywayconversiontask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/tasks/milkywayconversiontask.h b/modules/galaxy/tasks/milkywayconversiontask.h index 47ff0707aa..f00d2e0b62 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.h +++ b/modules/galaxy/tasks/milkywayconversiontask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp index a79de9153e..756bb369df 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.h b/modules/galaxy/tasks/milkywaypointsconversiontask.h index e2a1be4a4f..0f9f774b31 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.h +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index f42a83bf5b..ccf3df87ce 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 217839b9f1..9e02310d84 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/globebrowsingmodule.h b/modules/globebrowsing/globebrowsingmodule.h index cf3612ca66..e40c06bdc5 100644 --- a/modules/globebrowsing/globebrowsingmodule.h +++ b/modules/globebrowsing/globebrowsingmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 8bd0fb47a3..4ed196188c 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/blending.hglsl b/modules/globebrowsing/shaders/blending.hglsl index 166ec948d1..aff6b667d9 100644 --- a/modules/globebrowsing/shaders/blending.hglsl +++ b/modules/globebrowsing/shaders/blending.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/globalrenderer_vs.glsl b/modules/globebrowsing/shaders/globalrenderer_vs.glsl index a72d20dc96..7f1755f19d 100644 --- a/modules/globebrowsing/shaders/globalrenderer_vs.glsl +++ b/modules/globebrowsing/shaders/globalrenderer_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/localrenderer_vs.glsl b/modules/globebrowsing/shaders/localrenderer_vs.glsl index 22a8930f8d..5c1439139d 100644 --- a/modules/globebrowsing/shaders/localrenderer_vs.glsl +++ b/modules/globebrowsing/shaders/localrenderer_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/renderer_fs.glsl b/modules/globebrowsing/shaders/renderer_fs.glsl index 00a4da23ac..fe525ed874 100644 --- a/modules/globebrowsing/shaders/renderer_fs.glsl +++ b/modules/globebrowsing/shaders/renderer_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/rings_fs.glsl b/modules/globebrowsing/shaders/rings_fs.glsl index 04cf03d2cc..24e5a8b649 100644 --- a/modules/globebrowsing/shaders/rings_fs.glsl +++ b/modules/globebrowsing/shaders/rings_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/rings_geom_fs.glsl b/modules/globebrowsing/shaders/rings_geom_fs.glsl index 48b1174baa..6d2126b842 100644 --- a/modules/globebrowsing/shaders/rings_geom_fs.glsl +++ b/modules/globebrowsing/shaders/rings_geom_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/rings_geom_vs.glsl b/modules/globebrowsing/shaders/rings_geom_vs.glsl index 63f7eda7a8..7698109c5b 100644 --- a/modules/globebrowsing/shaders/rings_geom_vs.glsl +++ b/modules/globebrowsing/shaders/rings_geom_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/rings_vs.glsl b/modules/globebrowsing/shaders/rings_vs.glsl index 64b7b474dd..8b43a60571 100644 --- a/modules/globebrowsing/shaders/rings_vs.glsl +++ b/modules/globebrowsing/shaders/rings_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/smviewer_fs.glsl b/modules/globebrowsing/shaders/smviewer_fs.glsl index 62719a89a5..56d518a85e 100644 --- a/modules/globebrowsing/shaders/smviewer_fs.glsl +++ b/modules/globebrowsing/shaders/smviewer_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/smviewer_vs.glsl b/modules/globebrowsing/shaders/smviewer_vs.glsl index c5bb033b36..208ce361c4 100644 --- a/modules/globebrowsing/shaders/smviewer_vs.glsl +++ b/modules/globebrowsing/shaders/smviewer_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/texturetilemapping.hglsl b/modules/globebrowsing/shaders/texturetilemapping.hglsl index b6bcf749fd..5cf2214291 100644 --- a/modules/globebrowsing/shaders/texturetilemapping.hglsl +++ b/modules/globebrowsing/shaders/texturetilemapping.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/tile.hglsl b/modules/globebrowsing/shaders/tile.hglsl index 25db3772e8..d074581c8c 100644 --- a/modules/globebrowsing/shaders/tile.hglsl +++ b/modules/globebrowsing/shaders/tile.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/tileheight.hglsl b/modules/globebrowsing/shaders/tileheight.hglsl index ef08825538..47865f9bb5 100644 --- a/modules/globebrowsing/shaders/tileheight.hglsl +++ b/modules/globebrowsing/shaders/tileheight.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/shaders/tilevertexskirt.hglsl b/modules/globebrowsing/shaders/tilevertexskirt.hglsl index 3545797091..37bcce883c 100644 --- a/modules/globebrowsing/shaders/tilevertexskirt.hglsl +++ b/modules/globebrowsing/shaders/tilevertexskirt.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/asynctiledataprovider.cpp b/modules/globebrowsing/src/asynctiledataprovider.cpp index 654f6de1ce..dd6f54a39f 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.cpp +++ b/modules/globebrowsing/src/asynctiledataprovider.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/asynctiledataprovider.h b/modules/globebrowsing/src/asynctiledataprovider.h index c29b12874d..79ff1da66b 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.h +++ b/modules/globebrowsing/src/asynctiledataprovider.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/basictypes.h b/modules/globebrowsing/src/basictypes.h index fa6499db1c..b509837fc2 100644 --- a/modules/globebrowsing/src/basictypes.h +++ b/modules/globebrowsing/src/basictypes.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.cpp b/modules/globebrowsing/src/dashboarditemglobelocation.cpp index 1d2b460dee..18d02e3a76 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.cpp +++ b/modules/globebrowsing/src/dashboarditemglobelocation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.h b/modules/globebrowsing/src/dashboarditemglobelocation.h index 47f8cafce3..13400ead72 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.h +++ b/modules/globebrowsing/src/dashboarditemglobelocation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/ellipsoid.cpp b/modules/globebrowsing/src/ellipsoid.cpp index 8045bfb63a..a7ff2508a5 100644 --- a/modules/globebrowsing/src/ellipsoid.cpp +++ b/modules/globebrowsing/src/ellipsoid.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/ellipsoid.h b/modules/globebrowsing/src/ellipsoid.h index 44376ceda0..06ef119547 100644 --- a/modules/globebrowsing/src/ellipsoid.h +++ b/modules/globebrowsing/src/ellipsoid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/gdalwrapper.cpp b/modules/globebrowsing/src/gdalwrapper.cpp index 4f9399c81b..0e845581da 100644 --- a/modules/globebrowsing/src/gdalwrapper.cpp +++ b/modules/globebrowsing/src/gdalwrapper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/gdalwrapper.h b/modules/globebrowsing/src/gdalwrapper.h index 3da23381c5..db589bba7c 100644 --- a/modules/globebrowsing/src/gdalwrapper.h +++ b/modules/globebrowsing/src/gdalwrapper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/geodeticpatch.cpp b/modules/globebrowsing/src/geodeticpatch.cpp index 5dc5725426..41d5372bca 100644 --- a/modules/globebrowsing/src/geodeticpatch.cpp +++ b/modules/globebrowsing/src/geodeticpatch.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/geodeticpatch.h b/modules/globebrowsing/src/geodeticpatch.h index 7ade7987ac..b8614f936f 100644 --- a/modules/globebrowsing/src/geodeticpatch.h +++ b/modules/globebrowsing/src/geodeticpatch.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 411b7c7035..549f4d5a4d 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/globelabelscomponent.h b/modules/globebrowsing/src/globelabelscomponent.h index 1bded12791..9c7bc4eb6f 100644 --- a/modules/globebrowsing/src/globelabelscomponent.h +++ b/modules/globebrowsing/src/globelabelscomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/globetranslation.cpp b/modules/globebrowsing/src/globetranslation.cpp index 8317d7c65a..2ae998fa73 100644 --- a/modules/globebrowsing/src/globetranslation.cpp +++ b/modules/globebrowsing/src/globetranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/globetranslation.h b/modules/globebrowsing/src/globetranslation.h index 9d5c130537..8ad737c994 100644 --- a/modules/globebrowsing/src/globetranslation.h +++ b/modules/globebrowsing/src/globetranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/gpulayergroup.cpp b/modules/globebrowsing/src/gpulayergroup.cpp index 512727089d..7511d5ef90 100644 --- a/modules/globebrowsing/src/gpulayergroup.cpp +++ b/modules/globebrowsing/src/gpulayergroup.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/gpulayergroup.h b/modules/globebrowsing/src/gpulayergroup.h index 796cbb46fb..6b5c8676c8 100644 --- a/modules/globebrowsing/src/gpulayergroup.h +++ b/modules/globebrowsing/src/gpulayergroup.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index cce9ee5797..e28d8e68d7 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layer.h b/modules/globebrowsing/src/layer.h index ec78efb292..d0f6402270 100644 --- a/modules/globebrowsing/src/layer.h +++ b/modules/globebrowsing/src/layer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layeradjustment.cpp b/modules/globebrowsing/src/layeradjustment.cpp index 3e6a1e25c9..b459122329 100644 --- a/modules/globebrowsing/src/layeradjustment.cpp +++ b/modules/globebrowsing/src/layeradjustment.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layeradjustment.h b/modules/globebrowsing/src/layeradjustment.h index 5993366d77..791a23d070 100644 --- a/modules/globebrowsing/src/layeradjustment.h +++ b/modules/globebrowsing/src/layeradjustment.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index 5f7f791c1d..dc67b2e62b 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layergroup.h b/modules/globebrowsing/src/layergroup.h index 3f69e4705e..8aa83d4b9a 100644 --- a/modules/globebrowsing/src/layergroup.h +++ b/modules/globebrowsing/src/layergroup.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layergroupid.h b/modules/globebrowsing/src/layergroupid.h index d86ffb9247..1679803143 100644 --- a/modules/globebrowsing/src/layergroupid.h +++ b/modules/globebrowsing/src/layergroupid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layermanager.cpp b/modules/globebrowsing/src/layermanager.cpp index 6c1a5cb696..7aa19c6e60 100644 --- a/modules/globebrowsing/src/layermanager.cpp +++ b/modules/globebrowsing/src/layermanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layermanager.h b/modules/globebrowsing/src/layermanager.h index 1d9889069e..25fbde482f 100644 --- a/modules/globebrowsing/src/layermanager.h +++ b/modules/globebrowsing/src/layermanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layerrendersettings.cpp b/modules/globebrowsing/src/layerrendersettings.cpp index 79c27dcbd4..b03314a8dd 100644 --- a/modules/globebrowsing/src/layerrendersettings.cpp +++ b/modules/globebrowsing/src/layerrendersettings.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/layerrendersettings.h b/modules/globebrowsing/src/layerrendersettings.h index 5577fa965f..d76b82290b 100644 --- a/modules/globebrowsing/src/layerrendersettings.h +++ b/modules/globebrowsing/src/layerrendersettings.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/lrucache.h b/modules/globebrowsing/src/lrucache.h index 7753737248..54bce548fc 100644 --- a/modules/globebrowsing/src/lrucache.h +++ b/modules/globebrowsing/src/lrucache.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/lrucache.inl b/modules/globebrowsing/src/lrucache.inl index 5144250b6d..56213de22a 100644 --- a/modules/globebrowsing/src/lrucache.inl +++ b/modules/globebrowsing/src/lrucache.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/lruthreadpool.h b/modules/globebrowsing/src/lruthreadpool.h index 943781bdea..ce5a3973bd 100644 --- a/modules/globebrowsing/src/lruthreadpool.h +++ b/modules/globebrowsing/src/lruthreadpool.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/lruthreadpool.inl b/modules/globebrowsing/src/lruthreadpool.inl index 8522ce9cb2..0597640189 100644 --- a/modules/globebrowsing/src/lruthreadpool.inl +++ b/modules/globebrowsing/src/lruthreadpool.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/memoryawaretilecache.cpp b/modules/globebrowsing/src/memoryawaretilecache.cpp index 79af26375d..1f42d9d69a 100644 --- a/modules/globebrowsing/src/memoryawaretilecache.cpp +++ b/modules/globebrowsing/src/memoryawaretilecache.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/memoryawaretilecache.h b/modules/globebrowsing/src/memoryawaretilecache.h index 83771c3996..76c00504e0 100644 --- a/modules/globebrowsing/src/memoryawaretilecache.h +++ b/modules/globebrowsing/src/memoryawaretilecache.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h index ec90b4139c..c4a6e07a70 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl index 3c7668823b..771321fa42 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/rawtile.h b/modules/globebrowsing/src/rawtile.h index 8360a582b6..a8dcdbe9b6 100644 --- a/modules/globebrowsing/src/rawtile.h +++ b/modules/globebrowsing/src/rawtile.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index 26e926a963..4da0f4732a 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/rawtiledatareader.h b/modules/globebrowsing/src/rawtiledatareader.h index 94f437199c..0aaf494053 100644 --- a/modules/globebrowsing/src/rawtiledatareader.h +++ b/modules/globebrowsing/src/rawtiledatareader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index c04da1c695..50e310bd99 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index 27e4a84970..c1ce8d7a98 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp index 76b21efaf6..7db25fe528 100644 --- a/modules/globebrowsing/src/ringscomponent.cpp +++ b/modules/globebrowsing/src/ringscomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/ringscomponent.h b/modules/globebrowsing/src/ringscomponent.h index d6c7351a90..7bc348b8ba 100644 --- a/modules/globebrowsing/src/ringscomponent.h +++ b/modules/globebrowsing/src/ringscomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index dda7625b5a..891a2603c6 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/shadowcomponent.h b/modules/globebrowsing/src/shadowcomponent.h index 5e0a388f10..38a40cdee4 100644 --- a/modules/globebrowsing/src/shadowcomponent.h +++ b/modules/globebrowsing/src/shadowcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/skirtedgrid.cpp b/modules/globebrowsing/src/skirtedgrid.cpp index 4d897c9920..df6f36b5c2 100644 --- a/modules/globebrowsing/src/skirtedgrid.cpp +++ b/modules/globebrowsing/src/skirtedgrid.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/skirtedgrid.h b/modules/globebrowsing/src/skirtedgrid.h index 5bcbf4e710..f8b9da1b38 100644 --- a/modules/globebrowsing/src/skirtedgrid.h +++ b/modules/globebrowsing/src/skirtedgrid.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileindex.cpp b/modules/globebrowsing/src/tileindex.cpp index 56a2738b8a..b6616fa88a 100644 --- a/modules/globebrowsing/src/tileindex.cpp +++ b/modules/globebrowsing/src/tileindex.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileindex.h b/modules/globebrowsing/src/tileindex.h index 65d35150a9..af76b085e9 100644 --- a/modules/globebrowsing/src/tileindex.h +++ b/modules/globebrowsing/src/tileindex.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileloadjob.cpp b/modules/globebrowsing/src/tileloadjob.cpp index a9bdb36700..ef3abc95e9 100644 --- a/modules/globebrowsing/src/tileloadjob.cpp +++ b/modules/globebrowsing/src/tileloadjob.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileloadjob.h b/modules/globebrowsing/src/tileloadjob.h index df0486aad1..c7ad657916 100644 --- a/modules/globebrowsing/src/tileloadjob.h +++ b/modules/globebrowsing/src/tileloadjob.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileprovider.cpp b/modules/globebrowsing/src/tileprovider.cpp index 322b2f69e3..c53928cd81 100644 --- a/modules/globebrowsing/src/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tileprovider.h b/modules/globebrowsing/src/tileprovider.h index 909380f0a0..2d70e8dd0c 100644 --- a/modules/globebrowsing/src/tileprovider.h +++ b/modules/globebrowsing/src/tileprovider.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tiletextureinitdata.cpp b/modules/globebrowsing/src/tiletextureinitdata.cpp index f85d7e0814..b47d838548 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.cpp +++ b/modules/globebrowsing/src/tiletextureinitdata.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/tiletextureinitdata.h b/modules/globebrowsing/src/tiletextureinitdata.h index 6a0984f4cf..2a311a81f5 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.h +++ b/modules/globebrowsing/src/tiletextureinitdata.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index 6ef62ea8c8..a931db8a23 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/globebrowsing/src/timequantizer.h b/modules/globebrowsing/src/timequantizer.h index c89daa027e..0c0ec5d94a 100644 --- a/modules/globebrowsing/src/timequantizer.h +++ b/modules/globebrowsing/src/timequantizer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/CMakeLists.txt b/modules/imgui/CMakeLists.txt index 68ca881284..9f5ca89163 100644 --- a/modules/imgui/CMakeLists.txt +++ b/modules/imgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/imgui/ext/imgui/CMakeLists.txt b/modules/imgui/ext/imgui/CMakeLists.txt index a800bb0548..b955a01c21 100644 --- a/modules/imgui/ext/imgui/CMakeLists.txt +++ b/modules/imgui/ext/imgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/imgui/imguimodule.cpp b/modules/imgui/imguimodule.cpp index 02ce4f908e..cc9f132ccb 100644 --- a/modules/imgui/imguimodule.cpp +++ b/modules/imgui/imguimodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/imguimodule.h b/modules/imgui/imguimodule.h index e08556ffa8..9a1502bdae 100644 --- a/modules/imgui/imguimodule.h +++ b/modules/imgui/imguimodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/gui.h b/modules/imgui/include/gui.h index 0ec6ef76cd..2714eb52df 100644 --- a/modules/imgui/include/gui.h +++ b/modules/imgui/include/gui.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guiassetcomponent.h b/modules/imgui/include/guiassetcomponent.h index ff22b7b7f2..cd8b2bf6cc 100644 --- a/modules/imgui/include/guiassetcomponent.h +++ b/modules/imgui/include/guiassetcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guicomponent.h b/modules/imgui/include/guicomponent.h index cde49685cd..bb071aed95 100644 --- a/modules/imgui/include/guicomponent.h +++ b/modules/imgui/include/guicomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guifilepathcomponent.h b/modules/imgui/include/guifilepathcomponent.h index 05d678edc7..d6ad3478a1 100644 --- a/modules/imgui/include/guifilepathcomponent.h +++ b/modules/imgui/include/guifilepathcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guigibscomponent.h b/modules/imgui/include/guigibscomponent.h index 4f5b13569b..8d5449ded0 100644 --- a/modules/imgui/include/guigibscomponent.h +++ b/modules/imgui/include/guigibscomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guiglobebrowsingcomponent.h b/modules/imgui/include/guiglobebrowsingcomponent.h index 3e0a5f1b6c..3bae875308 100644 --- a/modules/imgui/include/guiglobebrowsingcomponent.h +++ b/modules/imgui/include/guiglobebrowsingcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guihelpcomponent.h b/modules/imgui/include/guihelpcomponent.h index ba3ed2af5e..23fa1f6cdb 100644 --- a/modules/imgui/include/guihelpcomponent.h +++ b/modules/imgui/include/guihelpcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guiiswacomponent.h b/modules/imgui/include/guiiswacomponent.h index 468d1b0cc7..379a0e7af6 100644 --- a/modules/imgui/include/guiiswacomponent.h +++ b/modules/imgui/include/guiiswacomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guijoystickcomponent.h b/modules/imgui/include/guijoystickcomponent.h index 3ed79a2523..16b23ef622 100644 --- a/modules/imgui/include/guijoystickcomponent.h +++ b/modules/imgui/include/guijoystickcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guimemorycomponent.h b/modules/imgui/include/guimemorycomponent.h index 8f08bec8db..e3f6c065e3 100644 --- a/modules/imgui/include/guimemorycomponent.h +++ b/modules/imgui/include/guimemorycomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guimissioncomponent.h b/modules/imgui/include/guimissioncomponent.h index 3b10530dcc..2c5fe1135e 100644 --- a/modules/imgui/include/guimissioncomponent.h +++ b/modules/imgui/include/guimissioncomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guiparallelcomponent.h b/modules/imgui/include/guiparallelcomponent.h index 982c18bf18..0dec61fd2f 100644 --- a/modules/imgui/include/guiparallelcomponent.h +++ b/modules/imgui/include/guiparallelcomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guipropertycomponent.h b/modules/imgui/include/guipropertycomponent.h index b226cbbf30..fc5fcf6a56 100644 --- a/modules/imgui/include/guipropertycomponent.h +++ b/modules/imgui/include/guipropertycomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guishortcutscomponent.h b/modules/imgui/include/guishortcutscomponent.h index c6e95205a1..f6d02da055 100644 --- a/modules/imgui/include/guishortcutscomponent.h +++ b/modules/imgui/include/guishortcutscomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/guispacetimecomponent.h b/modules/imgui/include/guispacetimecomponent.h index 34f576d0d3..888fffd820 100644 --- a/modules/imgui/include/guispacetimecomponent.h +++ b/modules/imgui/include/guispacetimecomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/imgui_include.h b/modules/imgui/include/imgui_include.h index 6a29f0501a..a41e22c3f6 100644 --- a/modules/imgui/include/imgui_include.h +++ b/modules/imgui/include/imgui_include.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/include/renderproperties.h b/modules/imgui/include/renderproperties.h index 566931b87d..16e0059a68 100644 --- a/modules/imgui/include/renderproperties.h +++ b/modules/imgui/include/renderproperties.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/shaders/gui_fs.glsl b/modules/imgui/shaders/gui_fs.glsl index f75b2cee35..55266b7681 100644 --- a/modules/imgui/shaders/gui_fs.glsl +++ b/modules/imgui/shaders/gui_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/shaders/gui_vs.glsl b/modules/imgui/shaders/gui_vs.glsl index f6d606f9bb..aed40bd172 100644 --- a/modules/imgui/shaders/gui_vs.glsl +++ b/modules/imgui/shaders/gui_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/gui.cpp b/modules/imgui/src/gui.cpp index 5de1a683b0..2b58331303 100644 --- a/modules/imgui/src/gui.cpp +++ b/modules/imgui/src/gui.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guiassetcomponent.cpp b/modules/imgui/src/guiassetcomponent.cpp index 7ab2c37365..92b6eedaa5 100644 --- a/modules/imgui/src/guiassetcomponent.cpp +++ b/modules/imgui/src/guiassetcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guicomponent.cpp b/modules/imgui/src/guicomponent.cpp index dfebb0b162..da394b7940 100644 --- a/modules/imgui/src/guicomponent.cpp +++ b/modules/imgui/src/guicomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guifilepathcomponent.cpp b/modules/imgui/src/guifilepathcomponent.cpp index fe4c7cdb0e..bfee3703ad 100644 --- a/modules/imgui/src/guifilepathcomponent.cpp +++ b/modules/imgui/src/guifilepathcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guigibscomponent.cpp b/modules/imgui/src/guigibscomponent.cpp index 124dca04d1..69c9acfac9 100644 --- a/modules/imgui/src/guigibscomponent.cpp +++ b/modules/imgui/src/guigibscomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guiglobebrowsingcomponent.cpp b/modules/imgui/src/guiglobebrowsingcomponent.cpp index 8eb6ef4019..963e290d8e 100644 --- a/modules/imgui/src/guiglobebrowsingcomponent.cpp +++ b/modules/imgui/src/guiglobebrowsingcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guihelpcomponent.cpp b/modules/imgui/src/guihelpcomponent.cpp index 6da9e9b35b..58d19ceae1 100644 --- a/modules/imgui/src/guihelpcomponent.cpp +++ b/modules/imgui/src/guihelpcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guiiswacomponent.cpp b/modules/imgui/src/guiiswacomponent.cpp index 4f30752e49..3c117b3fcc 100644 --- a/modules/imgui/src/guiiswacomponent.cpp +++ b/modules/imgui/src/guiiswacomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guijoystickcomponent.cpp b/modules/imgui/src/guijoystickcomponent.cpp index 3b4609d406..090594065a 100644 --- a/modules/imgui/src/guijoystickcomponent.cpp +++ b/modules/imgui/src/guijoystickcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guimemorycomponent.cpp b/modules/imgui/src/guimemorycomponent.cpp index 8aac5b0d9a..87809b53fd 100644 --- a/modules/imgui/src/guimemorycomponent.cpp +++ b/modules/imgui/src/guimemorycomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guimissioncomponent.cpp b/modules/imgui/src/guimissioncomponent.cpp index a91eb86dbc..8b82896e95 100644 --- a/modules/imgui/src/guimissioncomponent.cpp +++ b/modules/imgui/src/guimissioncomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guiparallelcomponent.cpp b/modules/imgui/src/guiparallelcomponent.cpp index b854f05697..68641b74c5 100644 --- a/modules/imgui/src/guiparallelcomponent.cpp +++ b/modules/imgui/src/guiparallelcomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index a8186b7d89..f59d77a9c3 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guishortcutscomponent.cpp b/modules/imgui/src/guishortcutscomponent.cpp index 17e0aaca94..4b066bf0aa 100644 --- a/modules/imgui/src/guishortcutscomponent.cpp +++ b/modules/imgui/src/guishortcutscomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/guispacetimecomponent.cpp b/modules/imgui/src/guispacetimecomponent.cpp index b02c32cbb4..9e296d4280 100644 --- a/modules/imgui/src/guispacetimecomponent.cpp +++ b/modules/imgui/src/guispacetimecomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp index 673de3341a..a74be8c3d7 100644 --- a/modules/imgui/src/renderproperties.cpp +++ b/modules/imgui/src/renderproperties.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/CMakeLists.txt b/modules/iswa/CMakeLists.txt index 843884ab1a..ef7da79de0 100644 --- a/modules/iswa/CMakeLists.txt +++ b/modules/iswa/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/iswa/iswamodule.cpp b/modules/iswa/iswamodule.cpp index 59b222fb71..bc473674c7 100644 --- a/modules/iswa/iswamodule.cpp +++ b/modules/iswa/iswamodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/iswamodule.h b/modules/iswa/iswamodule.h index 365d24a0b4..da7641640b 100644 --- a/modules/iswa/iswamodule.h +++ b/modules/iswa/iswamodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 3bb482b0cf..8db4963ef7 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/datacygnet.h b/modules/iswa/rendering/datacygnet.h index f568d47e35..abc1c9c58f 100644 --- a/modules/iswa/rendering/datacygnet.h +++ b/modules/iswa/rendering/datacygnet.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/dataplane.cpp b/modules/iswa/rendering/dataplane.cpp index 5128c9606b..72f976647c 100644 --- a/modules/iswa/rendering/dataplane.cpp +++ b/modules/iswa/rendering/dataplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/dataplane.h b/modules/iswa/rendering/dataplane.h index 38c808957f..4f004174c0 100644 --- a/modules/iswa/rendering/dataplane.h +++ b/modules/iswa/rendering/dataplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/datasphere.cpp b/modules/iswa/rendering/datasphere.cpp index 0a118ae761..3dde3381c9 100644 --- a/modules/iswa/rendering/datasphere.cpp +++ b/modules/iswa/rendering/datasphere.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/datasphere.h b/modules/iswa/rendering/datasphere.h index 33a40bb562..1b986f0b81 100644 --- a/modules/iswa/rendering/datasphere.h +++ b/modules/iswa/rendering/datasphere.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index bfadd6b66a..3accaedab0 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswabasegroup.h b/modules/iswa/rendering/iswabasegroup.h index f78dbca28e..0409360be6 100644 --- a/modules/iswa/rendering/iswabasegroup.h +++ b/modules/iswa/rendering/iswabasegroup.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index b43e0fc0ac..dd4421e71f 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswacygnet.h b/modules/iswa/rendering/iswacygnet.h index c8b93701c4..811a64e733 100644 --- a/modules/iswa/rendering/iswacygnet.h +++ b/modules/iswa/rendering/iswacygnet.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index bed12f1534..86b8c44510 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswadatagroup.h b/modules/iswa/rendering/iswadatagroup.h index b9c437c9c5..af34271e1a 100644 --- a/modules/iswa/rendering/iswadatagroup.h +++ b/modules/iswa/rendering/iswadatagroup.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index f5416c97cf..1f35bb5d06 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/iswakameleongroup.h b/modules/iswa/rendering/iswakameleongroup.h index 9194b528f9..c692ba4d5d 100644 --- a/modules/iswa/rendering/iswakameleongroup.h +++ b/modules/iswa/rendering/iswakameleongroup.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index 5edb425e9c..cdbaa9eb1f 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/kameleonplane.h b/modules/iswa/rendering/kameleonplane.h index 3bc453fe76..e6699fc952 100644 --- a/modules/iswa/rendering/kameleonplane.h +++ b/modules/iswa/rendering/kameleonplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/screenspacecygnet.cpp b/modules/iswa/rendering/screenspacecygnet.cpp index fc378db93b..e82672b91b 100644 --- a/modules/iswa/rendering/screenspacecygnet.cpp +++ b/modules/iswa/rendering/screenspacecygnet.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/screenspacecygnet.h b/modules/iswa/rendering/screenspacecygnet.h index 8f29c0098b..d1d18b180b 100644 --- a/modules/iswa/rendering/screenspacecygnet.h +++ b/modules/iswa/rendering/screenspacecygnet.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/texturecygnet.cpp b/modules/iswa/rendering/texturecygnet.cpp index 7f21ffb29d..a9c08e9323 100644 --- a/modules/iswa/rendering/texturecygnet.cpp +++ b/modules/iswa/rendering/texturecygnet.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/texturecygnet.h b/modules/iswa/rendering/texturecygnet.h index 56237965c6..b008259243 100644 --- a/modules/iswa/rendering/texturecygnet.h +++ b/modules/iswa/rendering/texturecygnet.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/textureplane.cpp b/modules/iswa/rendering/textureplane.cpp index 57d1ef7cf9..1e6883e68c 100644 --- a/modules/iswa/rendering/textureplane.cpp +++ b/modules/iswa/rendering/textureplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/rendering/textureplane.h b/modules/iswa/rendering/textureplane.h index 9495f18c52..48eef12d63 100644 --- a/modules/iswa/rendering/textureplane.h +++ b/modules/iswa/rendering/textureplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/dataplane_fs.glsl b/modules/iswa/shaders/dataplane_fs.glsl index 9e53abf9cb..b7ffbc360f 100644 --- a/modules/iswa/shaders/dataplane_fs.glsl +++ b/modules/iswa/shaders/dataplane_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/dataplane_vs.glsl b/modules/iswa/shaders/dataplane_vs.glsl index 24404321c0..6329933b4e 100644 --- a/modules/iswa/shaders/dataplane_vs.glsl +++ b/modules/iswa/shaders/dataplane_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/datasphere_fs.glsl b/modules/iswa/shaders/datasphere_fs.glsl index a374bd57c2..18aa934c73 100644 --- a/modules/iswa/shaders/datasphere_fs.glsl +++ b/modules/iswa/shaders/datasphere_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/datasphere_vs.glsl b/modules/iswa/shaders/datasphere_vs.glsl index af4b217a9b..0c7246dd76 100644 --- a/modules/iswa/shaders/datasphere_vs.glsl +++ b/modules/iswa/shaders/datasphere_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/textureplane_fs.glsl b/modules/iswa/shaders/textureplane_fs.glsl index 5835f23da9..c911dcaff6 100644 --- a/modules/iswa/shaders/textureplane_fs.glsl +++ b/modules/iswa/shaders/textureplane_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/shaders/textureplane_vs.glsl b/modules/iswa/shaders/textureplane_vs.glsl index cfab2d9c0d..2c8dc25627 100644 --- a/modules/iswa/shaders/textureplane_vs.glsl +++ b/modules/iswa/shaders/textureplane_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessor.cpp b/modules/iswa/util/dataprocessor.cpp index 673cd6f26b..ae00d224d7 100644 --- a/modules/iswa/util/dataprocessor.cpp +++ b/modules/iswa/util/dataprocessor.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessor.h b/modules/iswa/util/dataprocessor.h index b3f083dde8..d6c934e8fc 100644 --- a/modules/iswa/util/dataprocessor.h +++ b/modules/iswa/util/dataprocessor.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessorjson.cpp b/modules/iswa/util/dataprocessorjson.cpp index 70cc3af559..5c02653433 100644 --- a/modules/iswa/util/dataprocessorjson.cpp +++ b/modules/iswa/util/dataprocessorjson.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessorjson.h b/modules/iswa/util/dataprocessorjson.h index 5c6ca80db7..1faaa810b9 100644 --- a/modules/iswa/util/dataprocessorjson.h +++ b/modules/iswa/util/dataprocessorjson.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessorkameleon.cpp b/modules/iswa/util/dataprocessorkameleon.cpp index 6028d535cc..95b3f6c217 100644 --- a/modules/iswa/util/dataprocessorkameleon.cpp +++ b/modules/iswa/util/dataprocessorkameleon.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessorkameleon.h b/modules/iswa/util/dataprocessorkameleon.h index f0f03a4a65..24c0f366e7 100644 --- a/modules/iswa/util/dataprocessorkameleon.h +++ b/modules/iswa/util/dataprocessorkameleon.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessortext.cpp b/modules/iswa/util/dataprocessortext.cpp index 2d5b0942c5..bcd02f0125 100644 --- a/modules/iswa/util/dataprocessortext.cpp +++ b/modules/iswa/util/dataprocessortext.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/dataprocessortext.h b/modules/iswa/util/dataprocessortext.h index c08167461f..cdb08053b7 100644 --- a/modules/iswa/util/dataprocessortext.h +++ b/modules/iswa/util/dataprocessortext.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index 9e74e0694e..ff0655fdbc 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/iswamanager.h b/modules/iswa/util/iswamanager.h index 66da61f1c3..3c675dddab 100644 --- a/modules/iswa/util/iswamanager.h +++ b/modules/iswa/util/iswamanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/iswa/util/iswamanager_lua.inl b/modules/iswa/util/iswamanager_lua.inl index 21f5acc491..8e8e618e40 100644 --- a/modules/iswa/util/iswamanager_lua.inl +++ b/modules/iswa/util/iswamanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/CMakeLists.txt b/modules/kameleon/CMakeLists.txt index d34b17ae0f..c59773d216 100644 --- a/modules/kameleon/CMakeLists.txt +++ b/modules/kameleon/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/kameleon/include/kameleonhelper.h b/modules/kameleon/include/kameleonhelper.h index 4f4a75e726..2b1d5dc03b 100644 --- a/modules/kameleon/include/kameleonhelper.h +++ b/modules/kameleon/include/kameleonhelper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/include/kameleonwrapper.h b/modules/kameleon/include/kameleonwrapper.h index 8d00cf000a..b966f7bc1a 100644 --- a/modules/kameleon/include/kameleonwrapper.h +++ b/modules/kameleon/include/kameleonwrapper.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/kameleonmodule.cpp b/modules/kameleon/kameleonmodule.cpp index 267885a71b..156112bb77 100644 --- a/modules/kameleon/kameleonmodule.cpp +++ b/modules/kameleon/kameleonmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/kameleonmodule.h b/modules/kameleon/kameleonmodule.h index 616c4aba2b..539267c5c6 100644 --- a/modules/kameleon/kameleonmodule.h +++ b/modules/kameleon/kameleonmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index b84fff0474..d3f6056505 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index a0837bd1b7..5528881746 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/CMakeLists.txt b/modules/kameleonvolume/CMakeLists.txt index cb36ab4563..4d3a2f981f 100644 --- a/modules/kameleonvolume/CMakeLists.txt +++ b/modules/kameleonvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/kameleonvolume/kameleonvolumemodule.cpp b/modules/kameleonvolume/kameleonvolumemodule.cpp index 2cdbb125c3..d474f73dc2 100644 --- a/modules/kameleonvolume/kameleonvolumemodule.cpp +++ b/modules/kameleonvolume/kameleonvolumemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/kameleonvolumemodule.h b/modules/kameleonvolume/kameleonvolumemodule.h index 0c3ffa75fd..79a957671a 100644 --- a/modules/kameleonvolume/kameleonvolumemodule.h +++ b/modules/kameleonvolume/kameleonvolumemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 8c7fabbc64..63301ba596 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/kameleonvolumereader.h b/modules/kameleonvolume/kameleonvolumereader.h index 6f5c3e7605..b03c02bdca 100644 --- a/modules/kameleonvolume/kameleonvolumereader.h +++ b/modules/kameleonvolume/kameleonvolumereader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 9aac55d4cd..b12c28ac9f 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.h b/modules/kameleonvolume/rendering/renderablekameleonvolume.h index bc03090cc6..e4eacd4647 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.h +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index 7a63f10c34..54678d14cd 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.h b/modules/kameleonvolume/tasks/kameleondocumentationtask.h index a6cd323800..566f28b8a5 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.h +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp index c732813161..dc94504423 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h index 1daadcb3f9..2e392116ce 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp index 9b59b0a723..4eb568c56e 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h index c8524db19e..b187bfcc59 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/CMakeLists.txt b/modules/multiresvolume/CMakeLists.txt index 1f05c51900..8bef6a60c7 100644 --- a/modules/multiresvolume/CMakeLists.txt +++ b/modules/multiresvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/multiresvolume/multiresvolumemodule.cpp b/modules/multiresvolume/multiresvolumemodule.cpp index 1836ad2eda..039c7e409b 100644 --- a/modules/multiresvolume/multiresvolumemodule.cpp +++ b/modules/multiresvolume/multiresvolumemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/multiresvolumemodule.h b/modules/multiresvolume/multiresvolumemodule.h index 71f8aceff0..d97ba8a358 100644 --- a/modules/multiresvolume/multiresvolumemodule.h +++ b/modules/multiresvolume/multiresvolumemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/atlasmanager.cpp b/modules/multiresvolume/rendering/atlasmanager.cpp index fd688043de..d35740429e 100644 --- a/modules/multiresvolume/rendering/atlasmanager.cpp +++ b/modules/multiresvolume/rendering/atlasmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/atlasmanager.h b/modules/multiresvolume/rendering/atlasmanager.h index 190205fd97..514a417443 100644 --- a/modules/multiresvolume/rendering/atlasmanager.h +++ b/modules/multiresvolume/rendering/atlasmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickcover.cpp b/modules/multiresvolume/rendering/brickcover.cpp index 045057eb65..438857cfd9 100644 --- a/modules/multiresvolume/rendering/brickcover.cpp +++ b/modules/multiresvolume/rendering/brickcover.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickcover.h b/modules/multiresvolume/rendering/brickcover.h index 47912052e8..89a9e63e85 100644 --- a/modules/multiresvolume/rendering/brickcover.h +++ b/modules/multiresvolume/rendering/brickcover.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickmanager.cpp b/modules/multiresvolume/rendering/brickmanager.cpp index 998ec1e599..0e72a9977c 100644 --- a/modules/multiresvolume/rendering/brickmanager.cpp +++ b/modules/multiresvolume/rendering/brickmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickmanager.h b/modules/multiresvolume/rendering/brickmanager.h index 521861886f..5587d295c3 100644 --- a/modules/multiresvolume/rendering/brickmanager.h +++ b/modules/multiresvolume/rendering/brickmanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickselection.cpp b/modules/multiresvolume/rendering/brickselection.cpp index fa37a64ec7..457a3e6084 100644 --- a/modules/multiresvolume/rendering/brickselection.cpp +++ b/modules/multiresvolume/rendering/brickselection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickselection.h b/modules/multiresvolume/rendering/brickselection.h index c74b3de86d..274afdb12a 100644 --- a/modules/multiresvolume/rendering/brickselection.h +++ b/modules/multiresvolume/rendering/brickselection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/brickselector.h b/modules/multiresvolume/rendering/brickselector.h index 498d0d8177..e60a52a1c8 100644 --- a/modules/multiresvolume/rendering/brickselector.h +++ b/modules/multiresvolume/rendering/brickselector.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 652b9fa39c..3f4824ba65 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.h b/modules/multiresvolume/rendering/errorhistogrammanager.h index 8a116351df..31dc829bf5 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.h +++ b/modules/multiresvolume/rendering/errorhistogrammanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/histogrammanager.cpp b/modules/multiresvolume/rendering/histogrammanager.cpp index d0ad4a8ed7..cc3293e253 100644 --- a/modules/multiresvolume/rendering/histogrammanager.cpp +++ b/modules/multiresvolume/rendering/histogrammanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/histogrammanager.h b/modules/multiresvolume/rendering/histogrammanager.h index 5215a2a0e2..2cda97e5e7 100644 --- a/modules/multiresvolume/rendering/histogrammanager.h +++ b/modules/multiresvolume/rendering/histogrammanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp index dc7e000cfc..c13500c7fd 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.h b/modules/multiresvolume/rendering/localerrorhistogrammanager.h index cac8bbbc68..b6f54177c4 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.h +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/localtfbrickselector.cpp b/modules/multiresvolume/rendering/localtfbrickselector.cpp index aa2be187c4..6bb8e80dab 100644 --- a/modules/multiresvolume/rendering/localtfbrickselector.cpp +++ b/modules/multiresvolume/rendering/localtfbrickselector.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/localtfbrickselector.h b/modules/multiresvolume/rendering/localtfbrickselector.h index 7ed6695797..740b8abbe3 100644 --- a/modules/multiresvolume/rendering/localtfbrickselector.h +++ b/modules/multiresvolume/rendering/localtfbrickselector.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp index cc2c4a7985..ef77138d1d 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.h b/modules/multiresvolume/rendering/multiresvolumeraycaster.h index e6ca7a8a43..c36811d1b0 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.h +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 583e5a3833..6e75384f79 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.h b/modules/multiresvolume/rendering/renderablemultiresvolume.h index 933c776aa0..28a9d56994 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.h +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/shenbrickselector.cpp b/modules/multiresvolume/rendering/shenbrickselector.cpp index c05553a661..de0c7b46f3 100644 --- a/modules/multiresvolume/rendering/shenbrickselector.cpp +++ b/modules/multiresvolume/rendering/shenbrickselector.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/shenbrickselector.h b/modules/multiresvolume/rendering/shenbrickselector.h index 8abcc760ad..0b34d79c8f 100644 --- a/modules/multiresvolume/rendering/shenbrickselector.h +++ b/modules/multiresvolume/rendering/shenbrickselector.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/simpletfbrickselector.cpp b/modules/multiresvolume/rendering/simpletfbrickselector.cpp index 90acc37e7b..24605786bc 100644 --- a/modules/multiresvolume/rendering/simpletfbrickselector.cpp +++ b/modules/multiresvolume/rendering/simpletfbrickselector.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/simpletfbrickselector.h b/modules/multiresvolume/rendering/simpletfbrickselector.h index 89a25509c2..fabb9aafbd 100644 --- a/modules/multiresvolume/rendering/simpletfbrickselector.h +++ b/modules/multiresvolume/rendering/simpletfbrickselector.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/tfbrickselector.cpp b/modules/multiresvolume/rendering/tfbrickselector.cpp index 8e5a46020c..76a325e773 100644 --- a/modules/multiresvolume/rendering/tfbrickselector.cpp +++ b/modules/multiresvolume/rendering/tfbrickselector.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/tfbrickselector.h b/modules/multiresvolume/rendering/tfbrickselector.h index d63dc1e3d9..96ace3865b 100644 --- a/modules/multiresvolume/rendering/tfbrickselector.h +++ b/modules/multiresvolume/rendering/tfbrickselector.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/tsp.cpp b/modules/multiresvolume/rendering/tsp.cpp index 528c18ce2d..e056dbaeb4 100644 --- a/modules/multiresvolume/rendering/tsp.cpp +++ b/modules/multiresvolume/rendering/tsp.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/rendering/tsp.h b/modules/multiresvolume/rendering/tsp.h index 7ff93f23ff..715025bb41 100644 --- a/modules/multiresvolume/rendering/tsp.h +++ b/modules/multiresvolume/rendering/tsp.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/boundsFs.glsl b/modules/multiresvolume/shaders/boundsFs.glsl index 2c1dbf6d40..71bce69244 100644 --- a/modules/multiresvolume/shaders/boundsFs.glsl +++ b/modules/multiresvolume/shaders/boundsFs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/boundsVs.glsl b/modules/multiresvolume/shaders/boundsVs.glsl index bdf91b8623..b021df848e 100644 --- a/modules/multiresvolume/shaders/boundsVs.glsl +++ b/modules/multiresvolume/shaders/boundsVs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/helper.glsl b/modules/multiresvolume/shaders/helper.glsl index 89b0c21866..f904f884ff 100644 --- a/modules/multiresvolume/shaders/helper.glsl +++ b/modules/multiresvolume/shaders/helper.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/multiresvolume/shaders/raycast.glsl b/modules/multiresvolume/shaders/raycast.glsl index 5ce6378080..ce7f76f3fe 100644 --- a/modules/multiresvolume/shaders/raycast.glsl +++ b/modules/multiresvolume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/CMakeLists.txt b/modules/server/CMakeLists.txt index c39537163d..aa6bdb2580 100644 --- a/modules/server/CMakeLists.txt +++ b/modules/server/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/server/include/connection.h b/modules/server/include/connection.h index ddbed4f249..0d4eddc0a2 100644 --- a/modules/server/include/connection.h +++ b/modules/server/include/connection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/connectionpool.h b/modules/server/include/connectionpool.h index 020f6f1369..018b5dfd63 100644 --- a/modules/server/include/connectionpool.h +++ b/modules/server/include/connectionpool.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/jsonconverters.h b/modules/server/include/jsonconverters.h index 06558404f4..f7edcc26d5 100644 --- a/modules/server/include/jsonconverters.h +++ b/modules/server/include/jsonconverters.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/serverinterface.h b/modules/server/include/serverinterface.h index 1b0e47364b..52a7d86a5b 100644 --- a/modules/server/include/serverinterface.h +++ b/modules/server/include/serverinterface.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/authorizationtopic.h b/modules/server/include/topics/authorizationtopic.h index 8b64680d73..93ec86e046 100644 --- a/modules/server/include/topics/authorizationtopic.h +++ b/modules/server/include/topics/authorizationtopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/bouncetopic.h b/modules/server/include/topics/bouncetopic.h index f8a7c37949..5198ea9758 100644 --- a/modules/server/include/topics/bouncetopic.h +++ b/modules/server/include/topics/bouncetopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/documentationtopic.h b/modules/server/include/topics/documentationtopic.h index 63d2b77603..bd3d70b97f 100644 --- a/modules/server/include/topics/documentationtopic.h +++ b/modules/server/include/topics/documentationtopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/flightcontrollertopic.h b/modules/server/include/topics/flightcontrollertopic.h index ff111da0dc..a6aa91bca4 100644 --- a/modules/server/include/topics/flightcontrollertopic.h +++ b/modules/server/include/topics/flightcontrollertopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/getpropertytopic.h b/modules/server/include/topics/getpropertytopic.h index b6ec3c4d2f..9060f47f67 100644 --- a/modules/server/include/topics/getpropertytopic.h +++ b/modules/server/include/topics/getpropertytopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/luascripttopic.h b/modules/server/include/topics/luascripttopic.h index e3bce3be55..7ed757e3dd 100644 --- a/modules/server/include/topics/luascripttopic.h +++ b/modules/server/include/topics/luascripttopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/sessionrecordingtopic.h b/modules/server/include/topics/sessionrecordingtopic.h index 242e4a5374..ef68254aaa 100644 --- a/modules/server/include/topics/sessionrecordingtopic.h +++ b/modules/server/include/topics/sessionrecordingtopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/setpropertytopic.h b/modules/server/include/topics/setpropertytopic.h index 8ad9aacf3a..ed67ebd541 100644 --- a/modules/server/include/topics/setpropertytopic.h +++ b/modules/server/include/topics/setpropertytopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/shortcuttopic.h b/modules/server/include/topics/shortcuttopic.h index 1a2c9d3364..6643b23fd9 100644 --- a/modules/server/include/topics/shortcuttopic.h +++ b/modules/server/include/topics/shortcuttopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/subscriptiontopic.h b/modules/server/include/topics/subscriptiontopic.h index 7dbceb5dce..6f785162cb 100644 --- a/modules/server/include/topics/subscriptiontopic.h +++ b/modules/server/include/topics/subscriptiontopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/timetopic.h b/modules/server/include/topics/timetopic.h index 99493055cd..43b418bea6 100644 --- a/modules/server/include/topics/timetopic.h +++ b/modules/server/include/topics/timetopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/topic.h b/modules/server/include/topics/topic.h index 64f3387a89..de00c28452 100644 --- a/modules/server/include/topics/topic.h +++ b/modules/server/include/topics/topic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/triggerpropertytopic.h b/modules/server/include/topics/triggerpropertytopic.h index 67228746f5..fce888cb08 100644 --- a/modules/server/include/topics/triggerpropertytopic.h +++ b/modules/server/include/topics/triggerpropertytopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/include/topics/versiontopic.h b/modules/server/include/topics/versiontopic.h index 4eed163361..974f487369 100644 --- a/modules/server/include/topics/versiontopic.h +++ b/modules/server/include/topics/versiontopic.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/servermodule.cpp b/modules/server/servermodule.cpp index 17f8950aa9..ec1931c657 100644 --- a/modules/server/servermodule.cpp +++ b/modules/server/servermodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/servermodule.h b/modules/server/servermodule.h index 3fbdb48d72..e85026ef4c 100644 --- a/modules/server/servermodule.h +++ b/modules/server/servermodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/connection.cpp b/modules/server/src/connection.cpp index e2ee05a0c8..9c403f439b 100644 --- a/modules/server/src/connection.cpp +++ b/modules/server/src/connection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/connectionpool.cpp b/modules/server/src/connectionpool.cpp index 30944cdade..4fb22c37d4 100644 --- a/modules/server/src/connectionpool.cpp +++ b/modules/server/src/connectionpool.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/jsonconverters.cpp b/modules/server/src/jsonconverters.cpp index b258832c2f..81e816e947 100644 --- a/modules/server/src/jsonconverters.cpp +++ b/modules/server/src/jsonconverters.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/serverinterface.cpp b/modules/server/src/serverinterface.cpp index 4b8136474e..2609b2a71e 100644 --- a/modules/server/src/serverinterface.cpp +++ b/modules/server/src/serverinterface.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/authorizationtopic.cpp b/modules/server/src/topics/authorizationtopic.cpp index b761fa7da5..f4df2f922f 100644 --- a/modules/server/src/topics/authorizationtopic.cpp +++ b/modules/server/src/topics/authorizationtopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/bouncetopic.cpp b/modules/server/src/topics/bouncetopic.cpp index d43718e266..142060b3e6 100644 --- a/modules/server/src/topics/bouncetopic.cpp +++ b/modules/server/src/topics/bouncetopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/documentationtopic.cpp b/modules/server/src/topics/documentationtopic.cpp index d7dfb7c7c9..37119c8203 100644 --- a/modules/server/src/topics/documentationtopic.cpp +++ b/modules/server/src/topics/documentationtopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/flightcontrollertopic.cpp b/modules/server/src/topics/flightcontrollertopic.cpp index 29e7504b80..b6f3a14820 100644 --- a/modules/server/src/topics/flightcontrollertopic.cpp +++ b/modules/server/src/topics/flightcontrollertopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/getpropertytopic.cpp b/modules/server/src/topics/getpropertytopic.cpp index 4c5cab7aec..f7ce36f341 100644 --- a/modules/server/src/topics/getpropertytopic.cpp +++ b/modules/server/src/topics/getpropertytopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/luascripttopic.cpp b/modules/server/src/topics/luascripttopic.cpp index b059f15a51..b85b2d6f67 100644 --- a/modules/server/src/topics/luascripttopic.cpp +++ b/modules/server/src/topics/luascripttopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/sessionrecordingtopic.cpp b/modules/server/src/topics/sessionrecordingtopic.cpp index e16cda6d3f..9b39e739c5 100644 --- a/modules/server/src/topics/sessionrecordingtopic.cpp +++ b/modules/server/src/topics/sessionrecordingtopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/setpropertytopic.cpp b/modules/server/src/topics/setpropertytopic.cpp index a3cb994ab4..69eeb93093 100644 --- a/modules/server/src/topics/setpropertytopic.cpp +++ b/modules/server/src/topics/setpropertytopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/shortcuttopic.cpp b/modules/server/src/topics/shortcuttopic.cpp index b215054583..eecfdc36ac 100644 --- a/modules/server/src/topics/shortcuttopic.cpp +++ b/modules/server/src/topics/shortcuttopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/subscriptiontopic.cpp b/modules/server/src/topics/subscriptiontopic.cpp index bbdd6dea93..ae0e54334d 100644 --- a/modules/server/src/topics/subscriptiontopic.cpp +++ b/modules/server/src/topics/subscriptiontopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/timetopic.cpp b/modules/server/src/topics/timetopic.cpp index a4b8ba0f75..ca3a00d1c7 100644 --- a/modules/server/src/topics/timetopic.cpp +++ b/modules/server/src/topics/timetopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/topic.cpp b/modules/server/src/topics/topic.cpp index 3453c2d739..0415ad1d63 100644 --- a/modules/server/src/topics/topic.cpp +++ b/modules/server/src/topics/topic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/triggerpropertytopic.cpp b/modules/server/src/topics/triggerpropertytopic.cpp index c489abbf5a..178d2e67c1 100644 --- a/modules/server/src/topics/triggerpropertytopic.cpp +++ b/modules/server/src/topics/triggerpropertytopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/server/src/topics/versiontopic.cpp b/modules/server/src/topics/versiontopic.cpp index 6dea1c8d5b..980ace477b 100644 --- a/modules/server/src/topics/versiontopic.cpp +++ b/modules/server/src/topics/versiontopic.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/CMakeLists.txt b/modules/space/CMakeLists.txt index e33d971844..2c1a4e5e48 100644 --- a/modules/space/CMakeLists.txt +++ b/modules/space/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/space/rendering/planetgeometry.cpp b/modules/space/rendering/planetgeometry.cpp index 12410506bd..a021da2cbb 100644 --- a/modules/space/rendering/planetgeometry.cpp +++ b/modules/space/rendering/planetgeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/planetgeometry.h b/modules/space/rendering/planetgeometry.h index 6be4505134..664d9a8efa 100644 --- a/modules/space/rendering/planetgeometry.h +++ b/modules/space/rendering/planetgeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 4e2ca10e91..14e8dc60b4 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderableconstellationbounds.h b/modules/space/rendering/renderableconstellationbounds.h index be5bb8707a..d14769d72f 100644 --- a/modules/space/rendering/renderableconstellationbounds.h +++ b/modules/space/rendering/renderableconstellationbounds.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderableorbitalkepler.cpp b/modules/space/rendering/renderableorbitalkepler.cpp index 8c4a12b238..5e898fb39d 100644 --- a/modules/space/rendering/renderableorbitalkepler.cpp +++ b/modules/space/rendering/renderableorbitalkepler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderableorbitalkepler.h b/modules/space/rendering/renderableorbitalkepler.h index 5390af1a44..9e269d7d7b 100644 --- a/modules/space/rendering/renderableorbitalkepler.h +++ b/modules/space/rendering/renderableorbitalkepler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index bbd4550381..a8684960ea 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablerings.h b/modules/space/rendering/renderablerings.h index 35152b1629..ddf6b89a8f 100644 --- a/modules/space/rendering/renderablerings.h +++ b/modules/space/rendering/renderablerings.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablesatellites.cpp b/modules/space/rendering/renderablesatellites.cpp index fc1d6ec66a..19430ce7ca 100644 --- a/modules/space/rendering/renderablesatellites.cpp +++ b/modules/space/rendering/renderablesatellites.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablesatellites.h b/modules/space/rendering/renderablesatellites.h index 669b335f3d..e90c18cc65 100644 --- a/modules/space/rendering/renderablesatellites.h +++ b/modules/space/rendering/renderablesatellites.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablesmallbody.cpp b/modules/space/rendering/renderablesmallbody.cpp index 2037e83b93..49fc5633a3 100644 --- a/modules/space/rendering/renderablesmallbody.cpp +++ b/modules/space/rendering/renderablesmallbody.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablesmallbody.h b/modules/space/rendering/renderablesmallbody.h index 21d961d7e1..b1fc1d7dc3 100644 --- a/modules/space/rendering/renderablesmallbody.h +++ b/modules/space/rendering/renderablesmallbody.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 0812c5f1bc..55bccde601 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/renderablestars.h b/modules/space/rendering/renderablestars.h index 0ab79f66cc..7f1e83eb02 100644 --- a/modules/space/rendering/renderablestars.h +++ b/modules/space/rendering/renderablestars.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index bcc496971d..0f39776640 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rendering/simplespheregeometry.h b/modules/space/rendering/simplespheregeometry.h index 3cd796b6da..2e1ef9827e 100644 --- a/modules/space/rendering/simplespheregeometry.h +++ b/modules/space/rendering/simplespheregeometry.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index aa18aeff12..3e1f0d51cc 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/rotation/spicerotation.h b/modules/space/rotation/spicerotation.h index c10c31e38c..1cc4043774 100644 --- a/modules/space/rotation/spicerotation.h +++ b/modules/space/rotation/spicerotation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/constellationbounds_fs.glsl b/modules/space/shaders/constellationbounds_fs.glsl index b193abdd68..32ea62a82e 100644 --- a/modules/space/shaders/constellationbounds_fs.glsl +++ b/modules/space/shaders/constellationbounds_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/constellationbounds_vs.glsl b/modules/space/shaders/constellationbounds_vs.glsl index fbc3537f7a..1f3bc5245e 100644 --- a/modules/space/shaders/constellationbounds_vs.glsl +++ b/modules/space/shaders/constellationbounds_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/convolution_fs.glsl b/modules/space/shaders/convolution_fs.glsl index 9cde38881e..bef1ba74ee 100644 --- a/modules/space/shaders/convolution_fs.glsl +++ b/modules/space/shaders/convolution_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/convolution_vs.glsl b/modules/space/shaders/convolution_vs.glsl index c87dcf9fe6..a92bf82d5d 100644 --- a/modules/space/shaders/convolution_vs.glsl +++ b/modules/space/shaders/convolution_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/debrisViz_fs.glsl b/modules/space/shaders/debrisViz_fs.glsl index 2fd1b77264..b7a8476e81 100644 --- a/modules/space/shaders/debrisViz_fs.glsl +++ b/modules/space/shaders/debrisViz_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/debrisViz_vs.glsl b/modules/space/shaders/debrisViz_vs.glsl index 57b89a2510..03eb925bcb 100644 --- a/modules/space/shaders/debrisViz_vs.glsl +++ b/modules/space/shaders/debrisViz_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/psfToTexture_fs.glsl b/modules/space/shaders/psfToTexture_fs.glsl index 060b33e557..39ff47ccc1 100644 --- a/modules/space/shaders/psfToTexture_fs.glsl +++ b/modules/space/shaders/psfToTexture_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/psfToTexture_vs.glsl b/modules/space/shaders/psfToTexture_vs.glsl index 791adc6c4e..03ae1f2ef5 100644 --- a/modules/space/shaders/psfToTexture_vs.glsl +++ b/modules/space/shaders/psfToTexture_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/rings_fs.glsl b/modules/space/shaders/rings_fs.glsl index ffa20731da..76c92cb733 100644 --- a/modules/space/shaders/rings_fs.glsl +++ b/modules/space/shaders/rings_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/rings_vs.glsl b/modules/space/shaders/rings_vs.glsl index c6f5d007ee..c81afe6f9d 100644 --- a/modules/space/shaders/rings_vs.glsl +++ b/modules/space/shaders/rings_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/star_fs.glsl b/modules/space/shaders/star_fs.glsl index 6b98775e7a..a38dd238b1 100644 --- a/modules/space/shaders/star_fs.glsl +++ b/modules/space/shaders/star_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/star_ge.glsl b/modules/space/shaders/star_ge.glsl index 744b89006f..5e81e33ab0 100644 --- a/modules/space/shaders/star_ge.glsl +++ b/modules/space/shaders/star_ge.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/shaders/star_vs.glsl b/modules/space/shaders/star_vs.glsl index 094b5657ba..754deb5ea5 100644 --- a/modules/space/shaders/star_vs.glsl +++ b/modules/space/shaders/star_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/spacemodule.cpp b/modules/space/spacemodule.cpp index 154e409721..cdc90d3768 100644 --- a/modules/space/spacemodule.cpp +++ b/modules/space/spacemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/spacemodule.h b/modules/space/spacemodule.h index 527bce6a71..b2630b6277 100644 --- a/modules/space/spacemodule.h +++ b/modules/space/spacemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/tasks/generatedebrisvolumetask.cpp b/modules/space/tasks/generatedebrisvolumetask.cpp index aea20f3c61..c8d8e417ca 100644 --- a/modules/space/tasks/generatedebrisvolumetask.cpp +++ b/modules/space/tasks/generatedebrisvolumetask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/tasks/generatedebrisvolumetask.h b/modules/space/tasks/generatedebrisvolumetask.h index 1a0225b4f2..7eb22f1188 100644 --- a/modules/space/tasks/generatedebrisvolumetask.h +++ b/modules/space/tasks/generatedebrisvolumetask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index 6a89bf3768..5750505dab 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/horizonstranslation.h b/modules/space/translation/horizonstranslation.h index f996373083..e002c3f8ed 100644 --- a/modules/space/translation/horizonstranslation.h +++ b/modules/space/translation/horizonstranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index f31ece809d..33ea61adeb 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/keplertranslation.h b/modules/space/translation/keplertranslation.h index 0370822e9e..a6a431da23 100644 --- a/modules/space/translation/keplertranslation.h +++ b/modules/space/translation/keplertranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 8eadaca8d1..f286a1d904 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/spicetranslation.h b/modules/space/translation/spicetranslation.h index 3c09a87340..6b3f78808a 100644 --- a/modules/space/translation/spicetranslation.h +++ b/modules/space/translation/spicetranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/tletranslation.cpp b/modules/space/translation/tletranslation.cpp index 26d8b3b5fa..4d6698b7a5 100644 --- a/modules/space/translation/tletranslation.cpp +++ b/modules/space/translation/tletranslation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/space/translation/tletranslation.h b/modules/space/translation/tletranslation.h index aff26bc12a..3d9831fc86 100644 --- a/modules/space/translation/tletranslation.h +++ b/modules/space/translation/tletranslation.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/CMakeLists.txt b/modules/spacecraftinstruments/CMakeLists.txt index d56f71adb9..5b2406298c 100644 --- a/modules/spacecraftinstruments/CMakeLists.txt +++ b/modules/spacecraftinstruments/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp index c389cd4ddb..30496b6822 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h index 1d787cf0f4..06be3f5dd9 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp index 4a2da16dd6..b1cf2a0ecb 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h index e80107a5b6..4f9c0a41cb 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index 37afa313b8..b3c4cf58d8 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablefov.h b/modules/spacecraftinstruments/rendering/renderablefov.h index 082e6cb1fd..25bda493d7 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.h +++ b/modules/spacecraftinstruments/rendering/renderablefov.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 7cdfd267bd..6f960ce5c6 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h index 45d5ccf252..5862b09390 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp index 52113eacec..b93893b9e2 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h index d86b00d030..d4d72f0ab8 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp index ac0620fba6..cfcf3c0270 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h index 8be5b83b66..7b36109f3a 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp index e04067c67d..32a766f256 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h index 236f519470..c6caaf4f8d 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/crawlingline_fs.glsl b/modules/spacecraftinstruments/shaders/crawlingline_fs.glsl index fb5f9c6a62..08c86633b5 100644 --- a/modules/spacecraftinstruments/shaders/crawlingline_fs.glsl +++ b/modules/spacecraftinstruments/shaders/crawlingline_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/crawlingline_vs.glsl b/modules/spacecraftinstruments/shaders/crawlingline_vs.glsl index 9d75648529..551a19ee5a 100644 --- a/modules/spacecraftinstruments/shaders/crawlingline_vs.glsl +++ b/modules/spacecraftinstruments/shaders/crawlingline_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/dilation_fs.glsl b/modules/spacecraftinstruments/shaders/dilation_fs.glsl index 0b4b01e684..b91f8b9fe2 100644 --- a/modules/spacecraftinstruments/shaders/dilation_fs.glsl +++ b/modules/spacecraftinstruments/shaders/dilation_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/dilation_vs.glsl b/modules/spacecraftinstruments/shaders/dilation_vs.glsl index 9d2a0c22d9..f0e692aab0 100644 --- a/modules/spacecraftinstruments/shaders/dilation_vs.glsl +++ b/modules/spacecraftinstruments/shaders/dilation_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/fov_fs.glsl b/modules/spacecraftinstruments/shaders/fov_fs.glsl index 089ba1e8b3..f05491be6f 100644 --- a/modules/spacecraftinstruments/shaders/fov_fs.glsl +++ b/modules/spacecraftinstruments/shaders/fov_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/fov_vs.glsl b/modules/spacecraftinstruments/shaders/fov_vs.glsl index 2bf1ff5fde..8d067e7645 100644 --- a/modules/spacecraftinstruments/shaders/fov_vs.glsl +++ b/modules/spacecraftinstruments/shaders/fov_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl b/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl index c4a2b2c5c3..9d01c9a7c3 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelDepth_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl b/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl index eec94130a1..731c82ef9a 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelDepth_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelProjection_fs.glsl b/modules/spacecraftinstruments/shaders/renderableModelProjection_fs.glsl index 886a05c843..4d8563d5a2 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelProjection_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelProjection_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModelProjection_vs.glsl b/modules/spacecraftinstruments/shaders/renderableModelProjection_vs.glsl index 63448d4d22..80a73c107e 100644 --- a/modules/spacecraftinstruments/shaders/renderableModelProjection_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModelProjection_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModel_fs.glsl b/modules/spacecraftinstruments/shaders/renderableModel_fs.glsl index b1ee517e61..23b3035869 100644 --- a/modules/spacecraftinstruments/shaders/renderableModel_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModel_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderableModel_vs.glsl b/modules/spacecraftinstruments/shaders/renderableModel_vs.glsl index bfc2456bf7..4a7fff09a5 100644 --- a/modules/spacecraftinstruments/shaders/renderableModel_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderableModel_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl index 3760905ab4..76971686d7 100644 --- a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_vs.glsl b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_vs.glsl index 9007efff34..7d138ee0ed 100644 --- a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderablePlanet_fs.glsl b/modules/spacecraftinstruments/shaders/renderablePlanet_fs.glsl index 01373460e8..6b65b27563 100644 --- a/modules/spacecraftinstruments/shaders/renderablePlanet_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderablePlanet_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/renderablePlanet_vs.glsl b/modules/spacecraftinstruments/shaders/renderablePlanet_vs.glsl index fa1568f5fe..123d70eb92 100644 --- a/modules/spacecraftinstruments/shaders/renderablePlanet_vs.glsl +++ b/modules/spacecraftinstruments/shaders/renderablePlanet_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/terminatorshadow_fs.glsl b/modules/spacecraftinstruments/shaders/terminatorshadow_fs.glsl index bf7c29b1fb..eaef27c5c9 100644 --- a/modules/spacecraftinstruments/shaders/terminatorshadow_fs.glsl +++ b/modules/spacecraftinstruments/shaders/terminatorshadow_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl b/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl index 55fd791490..008a50fe2a 100644 --- a/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl +++ b/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp index 1ea6a2d698..c0bfebbfa1 100644 --- a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp +++ b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h index 53f55a4a02..c94fb8c96f 100644 --- a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h +++ b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/decoder.cpp b/modules/spacecraftinstruments/util/decoder.cpp index 64a6344a04..9f9acb38f5 100644 --- a/modules/spacecraftinstruments/util/decoder.cpp +++ b/modules/spacecraftinstruments/util/decoder.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/decoder.h b/modules/spacecraftinstruments/util/decoder.h index 878f1cd742..f7cb53ee86 100644 --- a/modules/spacecraftinstruments/util/decoder.h +++ b/modules/spacecraftinstruments/util/decoder.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index efec287d3b..4c413a72df 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/hongkangparser.h b/modules/spacecraftinstruments/util/hongkangparser.h index 7232afeb15..afee6984ef 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.h +++ b/modules/spacecraftinstruments/util/hongkangparser.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/image.h b/modules/spacecraftinstruments/util/image.h index 642765d142..e86ac405fb 100644 --- a/modules/spacecraftinstruments/util/image.h +++ b/modules/spacecraftinstruments/util/image.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/imagesequencer.cpp b/modules/spacecraftinstruments/util/imagesequencer.cpp index 5e51a43aff..af4ffd77d3 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.cpp +++ b/modules/spacecraftinstruments/util/imagesequencer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/imagesequencer.h b/modules/spacecraftinstruments/util/imagesequencer.h index 3f01f2712a..6f5361a38d 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.h +++ b/modules/spacecraftinstruments/util/imagesequencer.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/instrumentdecoder.cpp b/modules/spacecraftinstruments/util/instrumentdecoder.cpp index 9d2a73d3cf..9527dd3f9e 100644 --- a/modules/spacecraftinstruments/util/instrumentdecoder.cpp +++ b/modules/spacecraftinstruments/util/instrumentdecoder.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/instrumentdecoder.h b/modules/spacecraftinstruments/util/instrumentdecoder.h index 2537b45870..8df00052fb 100644 --- a/modules/spacecraftinstruments/util/instrumentdecoder.h +++ b/modules/spacecraftinstruments/util/instrumentdecoder.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp index 29bbf20d43..350a5b73fb 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.h b/modules/spacecraftinstruments/util/instrumenttimesparser.h index 6e8947d12f..225d2d7cec 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.h +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/labelparser.cpp b/modules/spacecraftinstruments/util/labelparser.cpp index a242b69427..f8c2360224 100644 --- a/modules/spacecraftinstruments/util/labelparser.cpp +++ b/modules/spacecraftinstruments/util/labelparser.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/labelparser.h b/modules/spacecraftinstruments/util/labelparser.h index d7f5496c13..4e9667f2e8 100644 --- a/modules/spacecraftinstruments/util/labelparser.h +++ b/modules/spacecraftinstruments/util/labelparser.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index bee2586dfc..472351fd74 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/projectioncomponent.h b/modules/spacecraftinstruments/util/projectioncomponent.h index 931b47d07b..322b9eaf5b 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.h +++ b/modules/spacecraftinstruments/util/projectioncomponent.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/scannerdecoder.cpp b/modules/spacecraftinstruments/util/scannerdecoder.cpp index cfeb7d993a..c7ccf2bc50 100644 --- a/modules/spacecraftinstruments/util/scannerdecoder.cpp +++ b/modules/spacecraftinstruments/util/scannerdecoder.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/scannerdecoder.h b/modules/spacecraftinstruments/util/scannerdecoder.h index 4efba03bd3..75b0f2e663 100644 --- a/modules/spacecraftinstruments/util/scannerdecoder.h +++ b/modules/spacecraftinstruments/util/scannerdecoder.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/sequenceparser.cpp b/modules/spacecraftinstruments/util/sequenceparser.cpp index ad41246ff5..59ebc56128 100644 --- a/modules/spacecraftinstruments/util/sequenceparser.cpp +++ b/modules/spacecraftinstruments/util/sequenceparser.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/sequenceparser.h b/modules/spacecraftinstruments/util/sequenceparser.h index ffda80131b..d90005da5a 100644 --- a/modules/spacecraftinstruments/util/sequenceparser.h +++ b/modules/spacecraftinstruments/util/sequenceparser.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/targetdecoder.cpp b/modules/spacecraftinstruments/util/targetdecoder.cpp index 3786e50273..4f69884f77 100644 --- a/modules/spacecraftinstruments/util/targetdecoder.cpp +++ b/modules/spacecraftinstruments/util/targetdecoder.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spacecraftinstruments/util/targetdecoder.h b/modules/spacecraftinstruments/util/targetdecoder.h index 477cd8bcce..e26f9ebb7c 100644 --- a/modules/spacecraftinstruments/util/targetdecoder.h +++ b/modules/spacecraftinstruments/util/targetdecoder.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/CMakeLists.txt b/modules/spout/CMakeLists.txt index 2b3fd31444..bddbfaabc1 100644 --- a/modules/spout/CMakeLists.txt +++ b/modules/spout/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/spout/renderableplanespout.cpp b/modules/spout/renderableplanespout.cpp index 68a3a81a1c..12e539409f 100644 --- a/modules/spout/renderableplanespout.cpp +++ b/modules/spout/renderableplanespout.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/renderableplanespout.h b/modules/spout/renderableplanespout.h index 99e0bd639c..d91887fe81 100644 --- a/modules/spout/renderableplanespout.h +++ b/modules/spout/renderableplanespout.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/screenspacespout.cpp b/modules/spout/screenspacespout.cpp index 27c1b7be10..b47d28dff3 100644 --- a/modules/spout/screenspacespout.cpp +++ b/modules/spout/screenspacespout.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/screenspacespout.h b/modules/spout/screenspacespout.h index 0cfa61ec3c..91d4593a08 100644 --- a/modules/spout/screenspacespout.h +++ b/modules/spout/screenspacespout.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/spoutlibrary.h b/modules/spout/spoutlibrary.h index bb3bbaac84..fedb0d5e68 100644 --- a/modules/spout/spoutlibrary.h +++ b/modules/spout/spoutlibrary.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/spoutmodule.cpp b/modules/spout/spoutmodule.cpp index 01cb0800be..8d9d417548 100644 --- a/modules/spout/spoutmodule.cpp +++ b/modules/spout/spoutmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/spout/spoutmodule.h b/modules/spout/spoutmodule.h index 08fae170a0..3a5ba8ea80 100644 --- a/modules/spout/spoutmodule.h +++ b/modules/spout/spoutmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/CMakeLists.txt b/modules/sync/CMakeLists.txt index ecf74f7c1d..2870e014cb 100644 --- a/modules/sync/CMakeLists.txt +++ b/modules/sync/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/sync/syncmodule.cpp b/modules/sync/syncmodule.cpp index 2eff3324c4..d3339de8c7 100644 --- a/modules/sync/syncmodule.cpp +++ b/modules/sync/syncmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/syncmodule.h b/modules/sync/syncmodule.h index 5e24d4cdfc..03c7956eaf 100644 --- a/modules/sync/syncmodule.h +++ b/modules/sync/syncmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 030c168c04..9a01580bd2 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/syncs/httpsynchronization.h b/modules/sync/syncs/httpsynchronization.h index db768761a0..7f686818e1 100644 --- a/modules/sync/syncs/httpsynchronization.h +++ b/modules/sync/syncs/httpsynchronization.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index 4057b33b5e..a8b7ee98fb 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/syncs/urlsynchronization.h b/modules/sync/syncs/urlsynchronization.h index d0e6047737..1f658b3362 100644 --- a/modules/sync/syncs/urlsynchronization.h +++ b/modules/sync/syncs/urlsynchronization.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/tasks/syncassettask.cpp b/modules/sync/tasks/syncassettask.cpp index 87031d5462..777a7bf9ad 100644 --- a/modules/sync/tasks/syncassettask.cpp +++ b/modules/sync/tasks/syncassettask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/sync/tasks/syncassettask.h b/modules/sync/tasks/syncassettask.h index 168bb7006d..5f0cf8f830 100644 --- a/modules/sync/tasks/syncassettask.h +++ b/modules/sync/tasks/syncassettask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/CMakeLists.txt b/modules/touch/CMakeLists.txt index babeffa6c9..cd3df135d8 100644 --- a/modules/touch/CMakeLists.txt +++ b/modules/touch/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/touch/ext/CMakeLists.txt b/modules/touch/ext/CMakeLists.txt index f1a5d5f26c..d4c0c4ebf3 100644 --- a/modules/touch/ext/CMakeLists.txt +++ b/modules/touch/ext/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/touch/include/directinputsolver.h b/modules/touch/include/directinputsolver.h index c65ca76782..ca02a2e733 100644 --- a/modules/touch/include/directinputsolver.h +++ b/modules/touch/include/directinputsolver.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/include/touchinteraction.h b/modules/touch/include/touchinteraction.h index eed814c492..87ebce7e9e 100644 --- a/modules/touch/include/touchinteraction.h +++ b/modules/touch/include/touchinteraction.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/include/touchmarker.h b/modules/touch/include/touchmarker.h index 26ed9e18bf..a56db73507 100644 --- a/modules/touch/include/touchmarker.h +++ b/modules/touch/include/touchmarker.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/include/tuioear.h b/modules/touch/include/tuioear.h index cbbd8bb8dc..4f2d917b10 100644 --- a/modules/touch/include/tuioear.h +++ b/modules/touch/include/tuioear.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/include/win32_touch.h b/modules/touch/include/win32_touch.h index 1741febd7d..b66c67ef9b 100644 --- a/modules/touch/include/win32_touch.h +++ b/modules/touch/include/win32_touch.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/shaders/marker_fs.glsl b/modules/touch/shaders/marker_fs.glsl index 2425e5323a..6b09a05a8e 100644 --- a/modules/touch/shaders/marker_fs.glsl +++ b/modules/touch/shaders/marker_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/shaders/marker_vs.glsl b/modules/touch/shaders/marker_vs.glsl index 5b40a6b65b..b57089428c 100644 --- a/modules/touch/shaders/marker_vs.glsl +++ b/modules/touch/shaders/marker_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/src/directinputsolver.cpp b/modules/touch/src/directinputsolver.cpp index 419d08e149..5f19cb5d9f 100644 --- a/modules/touch/src/directinputsolver.cpp +++ b/modules/touch/src/directinputsolver.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index f619cd1f32..9eededbcbf 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/src/touchmarker.cpp b/modules/touch/src/touchmarker.cpp index 6ff732fb40..3d03816e73 100644 --- a/modules/touch/src/touchmarker.cpp +++ b/modules/touch/src/touchmarker.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/src/tuioear.cpp b/modules/touch/src/tuioear.cpp index ac9c91fffe..3fd5ee9413 100644 --- a/modules/touch/src/tuioear.cpp +++ b/modules/touch/src/tuioear.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/src/win32_touch.cpp b/modules/touch/src/win32_touch.cpp index f0de96acad..9586eee088 100644 --- a/modules/touch/src/win32_touch.cpp +++ b/modules/touch/src/win32_touch.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/touchmodule.cpp b/modules/touch/touchmodule.cpp index a5ace0268b..a140127f7d 100644 --- a/modules/touch/touchmodule.cpp +++ b/modules/touch/touchmodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/touch/touchmodule.h b/modules/touch/touchmodule.h index 919f888f7a..3a7b5b9b81 100644 --- a/modules/touch/touchmodule.h +++ b/modules/touch/touchmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/CMakeLists.txt b/modules/toyvolume/CMakeLists.txt index 0436ed5291..60604c8623 100644 --- a/modules/toyvolume/CMakeLists.txt +++ b/modules/toyvolume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 3ad1bfde2b..33c4a446ee 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/rendering/renderabletoyvolume.h b/modules/toyvolume/rendering/renderabletoyvolume.h index d42988639d..1430013c80 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.h +++ b/modules/toyvolume/rendering/renderabletoyvolume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.cpp b/modules/toyvolume/rendering/toyvolumeraycaster.cpp index 87a6b2c173..6d992e848e 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.cpp +++ b/modules/toyvolume/rendering/toyvolumeraycaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.h b/modules/toyvolume/rendering/toyvolumeraycaster.h index b5672c5e60..344ed1e41b 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.h +++ b/modules/toyvolume/rendering/toyvolumeraycaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/boundsfs.glsl b/modules/toyvolume/shaders/boundsfs.glsl index 4c6fa0ed17..0b875972f9 100644 --- a/modules/toyvolume/shaders/boundsfs.glsl +++ b/modules/toyvolume/shaders/boundsfs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/boundsvs.glsl b/modules/toyvolume/shaders/boundsvs.glsl index 67c3aa488e..7b926aa6ea 100644 --- a/modules/toyvolume/shaders/boundsvs.glsl +++ b/modules/toyvolume/shaders/boundsvs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/shaders/raycast.glsl b/modules/toyvolume/shaders/raycast.glsl index b604dd050d..a3e1ca480f 100644 --- a/modules/toyvolume/shaders/raycast.glsl +++ b/modules/toyvolume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/toyvolumemodule.cpp b/modules/toyvolume/toyvolumemodule.cpp index 2626a877fe..fdd4922668 100644 --- a/modules/toyvolume/toyvolumemodule.cpp +++ b/modules/toyvolume/toyvolumemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/toyvolume/toyvolumemodule.h b/modules/toyvolume/toyvolumemodule.h index cfecede06f..53a3ce85ce 100644 --- a/modules/toyvolume/toyvolumemodule.h +++ b/modules/toyvolume/toyvolumemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/vislab/CMakeLists.txt b/modules/vislab/CMakeLists.txt index 3c5fd4b9ce..6ff1f45991 100644 --- a/modules/vislab/CMakeLists.txt +++ b/modules/vislab/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/vislab/rendering/renderabledistancelabel.cpp b/modules/vislab/rendering/renderabledistancelabel.cpp index 4936e7dcc8..397798d431 100644 --- a/modules/vislab/rendering/renderabledistancelabel.cpp +++ b/modules/vislab/rendering/renderabledistancelabel.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/vislab/rendering/renderabledistancelabel.h b/modules/vislab/rendering/renderabledistancelabel.h index effb4efe71..6c745c0f62 100644 --- a/modules/vislab/rendering/renderabledistancelabel.h +++ b/modules/vislab/rendering/renderabledistancelabel.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/vislab/vislabmodule.h b/modules/vislab/vislabmodule.h index 797fcde9f5..bb393d9691 100644 --- a/modules/vislab/vislabmodule.h +++ b/modules/vislab/vislabmodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/CMakeLists.txt b/modules/volume/CMakeLists.txt index 14aa11f617..a10d450445 100644 --- a/modules/volume/CMakeLists.txt +++ b/modules/volume/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/volume/envelope.cpp b/modules/volume/envelope.cpp index d4e2d4050b..6df652f9c4 100644 --- a/modules/volume/envelope.cpp +++ b/modules/volume/envelope.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/envelope.h b/modules/volume/envelope.h index b7f3d07698..5a7864e033 100644 --- a/modules/volume/envelope.h +++ b/modules/volume/envelope.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/linearlrucache.h b/modules/volume/linearlrucache.h index 1bf5ec0f69..5bf086bb89 100644 --- a/modules/volume/linearlrucache.h +++ b/modules/volume/linearlrucache.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/linearlrucache.inl b/modules/volume/linearlrucache.inl index 0353fb2044..e65e41f79a 100644 --- a/modules/volume/linearlrucache.inl +++ b/modules/volume/linearlrucache.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/lrucache.h b/modules/volume/lrucache.h index fd84de9532..16c5bacbb1 100644 --- a/modules/volume/lrucache.h +++ b/modules/volume/lrucache.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/lrucache.inl b/modules/volume/lrucache.inl index 004acc100e..35be7b61d6 100644 --- a/modules/volume/lrucache.inl +++ b/modules/volume/lrucache.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolume.h b/modules/volume/rawvolume.h index 1c30a0db88..c110399722 100644 --- a/modules/volume/rawvolume.h +++ b/modules/volume/rawvolume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolume.inl b/modules/volume/rawvolume.inl index 4973d4a2da..d91388da07 100644 --- a/modules/volume/rawvolume.inl +++ b/modules/volume/rawvolume.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumemetadata.cpp b/modules/volume/rawvolumemetadata.cpp index fc287fefbc..9ad143a764 100644 --- a/modules/volume/rawvolumemetadata.cpp +++ b/modules/volume/rawvolumemetadata.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumemetadata.h b/modules/volume/rawvolumemetadata.h index 87cb5b035d..8a4339d09d 100644 --- a/modules/volume/rawvolumemetadata.h +++ b/modules/volume/rawvolumemetadata.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumereader.h b/modules/volume/rawvolumereader.h index d90a50c235..1d2833cf32 100644 --- a/modules/volume/rawvolumereader.h +++ b/modules/volume/rawvolumereader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumereader.inl b/modules/volume/rawvolumereader.inl index 59b67b6122..b54f643c0b 100644 --- a/modules/volume/rawvolumereader.inl +++ b/modules/volume/rawvolumereader.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumewriter.h b/modules/volume/rawvolumewriter.h index a8a9278a5d..bfae4a9bc4 100644 --- a/modules/volume/rawvolumewriter.h +++ b/modules/volume/rawvolumewriter.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rawvolumewriter.inl b/modules/volume/rawvolumewriter.inl index 22e86056f8..d9318f9b15 100644 --- a/modules/volume/rawvolumewriter.inl +++ b/modules/volume/rawvolumewriter.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/basicvolumeraycaster.cpp b/modules/volume/rendering/basicvolumeraycaster.cpp index 2b0746992e..d4f8516134 100644 --- a/modules/volume/rendering/basicvolumeraycaster.cpp +++ b/modules/volume/rendering/basicvolumeraycaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/basicvolumeraycaster.h b/modules/volume/rendering/basicvolumeraycaster.h index ad04676459..fd4daf5285 100644 --- a/modules/volume/rendering/basicvolumeraycaster.h +++ b/modules/volume/rendering/basicvolumeraycaster.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index f21734682f..fc32f26bc9 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/renderabletimevaryingvolume.h b/modules/volume/rendering/renderabletimevaryingvolume.h index e1d71275df..89637230d0 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.h +++ b/modules/volume/rendering/renderabletimevaryingvolume.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 910955c2b6..220d1c27ab 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/volumeclipplane.h b/modules/volume/rendering/volumeclipplane.h index b8bb1f5b0b..5a19c5f1bd 100644 --- a/modules/volume/rendering/volumeclipplane.h +++ b/modules/volume/rendering/volumeclipplane.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/volumeclipplanes.cpp b/modules/volume/rendering/volumeclipplanes.cpp index 4e1f448ded..24d91de15c 100644 --- a/modules/volume/rendering/volumeclipplanes.cpp +++ b/modules/volume/rendering/volumeclipplanes.cpp @@ -3,7 +3,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/rendering/volumeclipplanes.h b/modules/volume/rendering/volumeclipplanes.h index 2deb6fd254..b8d33e83b9 100644 --- a/modules/volume/rendering/volumeclipplanes.h +++ b/modules/volume/rendering/volumeclipplanes.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/boundsfs.glsl b/modules/volume/shaders/boundsfs.glsl index 5e589ac90b..4259a6f7ab 100644 --- a/modules/volume/shaders/boundsfs.glsl +++ b/modules/volume/shaders/boundsfs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/boundsvs.glsl b/modules/volume/shaders/boundsvs.glsl index 32c2d80aeb..2933defd60 100644 --- a/modules/volume/shaders/boundsvs.glsl +++ b/modules/volume/shaders/boundsvs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/helper.glsl b/modules/volume/shaders/helper.glsl index 9c51d02d41..effc70f6d3 100644 --- a/modules/volume/shaders/helper.glsl +++ b/modules/volume/shaders/helper.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/shaders/raycast.glsl b/modules/volume/shaders/raycast.glsl index 0ecee6cf0d..c7803279d0 100644 --- a/modules/volume/shaders/raycast.glsl +++ b/modules/volume/shaders/raycast.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/tasks/generaterawvolumetask.cpp b/modules/volume/tasks/generaterawvolumetask.cpp index d47b4514b5..0eed96877b 100644 --- a/modules/volume/tasks/generaterawvolumetask.cpp +++ b/modules/volume/tasks/generaterawvolumetask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/tasks/generaterawvolumetask.h b/modules/volume/tasks/generaterawvolumetask.h index 1fe1611ad6..367a590ce3 100644 --- a/modules/volume/tasks/generaterawvolumetask.h +++ b/modules/volume/tasks/generaterawvolumetask.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/textureslicevolumereader.h b/modules/volume/textureslicevolumereader.h index 834c7447d1..476e0763cf 100644 --- a/modules/volume/textureslicevolumereader.h +++ b/modules/volume/textureslicevolumereader.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/textureslicevolumereader.inl b/modules/volume/textureslicevolumereader.inl index d63d1de6a8..cf46cbceae 100644 --- a/modules/volume/textureslicevolumereader.inl +++ b/modules/volume/textureslicevolumereader.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunction.cpp b/modules/volume/transferfunction.cpp index 7776d09634..0539ec516c 100644 --- a/modules/volume/transferfunction.cpp +++ b/modules/volume/transferfunction.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunction.h b/modules/volume/transferfunction.h index e613be6779..0d574d9e4d 100644 --- a/modules/volume/transferfunction.h +++ b/modules/volume/transferfunction.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunctionhandler.cpp b/modules/volume/transferfunctionhandler.cpp index 991fddf851..f99fc7d055 100644 --- a/modules/volume/transferfunctionhandler.cpp +++ b/modules/volume/transferfunctionhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunctionhandler.h b/modules/volume/transferfunctionhandler.h index 35e112123a..b62f16c06c 100644 --- a/modules/volume/transferfunctionhandler.h +++ b/modules/volume/transferfunctionhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunctionproperty.cpp b/modules/volume/transferfunctionproperty.cpp index 18be5eee77..7bba685907 100644 --- a/modules/volume/transferfunctionproperty.cpp +++ b/modules/volume/transferfunctionproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/transferfunctionproperty.h b/modules/volume/transferfunctionproperty.h index 14fb8aac46..85eaab4a89 100644 --- a/modules/volume/transferfunctionproperty.h +++ b/modules/volume/transferfunctionproperty.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumegridtype.cpp b/modules/volume/volumegridtype.cpp index a261fd2463..d582b3a79e 100644 --- a/modules/volume/volumegridtype.cpp +++ b/modules/volume/volumegridtype.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumegridtype.h b/modules/volume/volumegridtype.h index ca3064d387..b648f227f8 100644 --- a/modules/volume/volumegridtype.h +++ b/modules/volume/volumegridtype.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumemodule.cpp b/modules/volume/volumemodule.cpp index f2eb2b10f9..f337103f14 100644 --- a/modules/volume/volumemodule.cpp +++ b/modules/volume/volumemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumemodule.h b/modules/volume/volumemodule.h index f12747978e..74ddcfbeea 100644 --- a/modules/volume/volumemodule.h +++ b/modules/volume/volumemodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumesampler.h b/modules/volume/volumesampler.h index 836c1e0712..8b7f0800c2 100644 --- a/modules/volume/volumesampler.h +++ b/modules/volume/volumesampler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumesampler.inl b/modules/volume/volumesampler.inl index 4c6f344607..68a83bdd27 100644 --- a/modules/volume/volumesampler.inl +++ b/modules/volume/volumesampler.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumeutils.cpp b/modules/volume/volumeutils.cpp index 864715494e..e83c4fd1b5 100644 --- a/modules/volume/volumeutils.cpp +++ b/modules/volume/volumeutils.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/volume/volumeutils.h b/modules/volume/volumeutils.h index 91088ffc23..a4e18155e4 100644 --- a/modules/volume/volumeutils.h +++ b/modules/volume/volumeutils.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 76b8b972cf..3721c37c3b 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/webbrowser/cmake/cef_support.cmake b/modules/webbrowser/cmake/cef_support.cmake index 8c15677a76..760e4b9995 100644 --- a/modules/webbrowser/cmake/cef_support.cmake +++ b/modules/webbrowser/cmake/cef_support.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/webbrowser/cmake/webbrowser_helpers.cmake b/modules/webbrowser/cmake/webbrowser_helpers.cmake index e35c088166..ccb74d7da3 100644 --- a/modules/webbrowser/cmake/webbrowser_helpers.cmake +++ b/modules/webbrowser/cmake/webbrowser_helpers.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/webbrowser/include/browserclient.h b/modules/webbrowser/include/browserclient.h index 26a61cc9b2..7cc98ef6c5 100644 --- a/modules/webbrowser/include/browserclient.h +++ b/modules/webbrowser/include/browserclient.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/browserinstance.h b/modules/webbrowser/include/browserinstance.h index 5e74c6806c..8ff3349fcf 100644 --- a/modules/webbrowser/include/browserinstance.h +++ b/modules/webbrowser/include/browserinstance.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/cefhost.h b/modules/webbrowser/include/cefhost.h index 3c739e4560..a2796db686 100644 --- a/modules/webbrowser/include/cefhost.h +++ b/modules/webbrowser/include/cefhost.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/defaultbrowserlauncher.h b/modules/webbrowser/include/defaultbrowserlauncher.h index 5de76a4aab..f669e007f8 100644 --- a/modules/webbrowser/include/defaultbrowserlauncher.h +++ b/modules/webbrowser/include/defaultbrowserlauncher.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/eventhandler.h b/modules/webbrowser/include/eventhandler.h index 870eb49a47..36758e0627 100644 --- a/modules/webbrowser/include/eventhandler.h +++ b/modules/webbrowser/include/eventhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/screenspacebrowser.h b/modules/webbrowser/include/screenspacebrowser.h index f7ccd60a6a..9dd81e0d63 100644 --- a/modules/webbrowser/include/screenspacebrowser.h +++ b/modules/webbrowser/include/screenspacebrowser.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/webbrowserapp.h b/modules/webbrowser/include/webbrowserapp.h index bd8de22e13..858d8532fc 100644 --- a/modules/webbrowser/include/webbrowserapp.h +++ b/modules/webbrowser/include/webbrowserapp.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/webkeyboardhandler.h b/modules/webbrowser/include/webkeyboardhandler.h index 38bbe841e3..e099286573 100644 --- a/modules/webbrowser/include/webkeyboardhandler.h +++ b/modules/webbrowser/include/webkeyboardhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index f5f32ffa61..63bf21fe18 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/shaders/screenspace_fs.glsl b/modules/webbrowser/shaders/screenspace_fs.glsl index 7b0491b004..22783c756a 100644 --- a/modules/webbrowser/shaders/screenspace_fs.glsl +++ b/modules/webbrowser/shaders/screenspace_fs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/shaders/screenspace_vs.glsl b/modules/webbrowser/shaders/screenspace_vs.glsl index b7a3b4af15..f3369a8536 100644 --- a/modules/webbrowser/shaders/screenspace_vs.glsl +++ b/modules/webbrowser/shaders/screenspace_vs.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/browserclient.cpp b/modules/webbrowser/src/browserclient.cpp index b69cb406cd..b8c550128c 100644 --- a/modules/webbrowser/src/browserclient.cpp +++ b/modules/webbrowser/src/browserclient.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index 6899eb8e3f..2a4b6d6492 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index f53463b290..49bbf51c99 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/defaultbrowserlauncher.cpp b/modules/webbrowser/src/defaultbrowserlauncher.cpp index e5ad4223ed..39e6b591df 100644 --- a/modules/webbrowser/src/defaultbrowserlauncher.cpp +++ b/modules/webbrowser/src/defaultbrowserlauncher.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/eventhandler.cpp b/modules/webbrowser/src/eventhandler.cpp index aa65c1f64d..33a5fe9166 100644 --- a/modules/webbrowser/src/eventhandler.cpp +++ b/modules/webbrowser/src/eventhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/processhelpermac.cpp b/modules/webbrowser/src/processhelpermac.cpp index f39f312b8f..3432078556 100644 --- a/modules/webbrowser/src/processhelpermac.cpp +++ b/modules/webbrowser/src/processhelpermac.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/processhelperwindows.cpp b/modules/webbrowser/src/processhelperwindows.cpp index f907fa6e32..518bac56f1 100644 --- a/modules/webbrowser/src/processhelperwindows.cpp +++ b/modules/webbrowser/src/processhelperwindows.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index e64ce4d65f..a2c4df95fe 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/webbrowserapp.cpp b/modules/webbrowser/src/webbrowserapp.cpp index 6412b4fd66..6ba297f9cc 100644 --- a/modules/webbrowser/src/webbrowserapp.cpp +++ b/modules/webbrowser/src/webbrowserapp.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/webkeyboardhandler.cpp b/modules/webbrowser/src/webkeyboardhandler.cpp index aab923c07d..2c8c4b63fa 100644 --- a/modules/webbrowser/src/webkeyboardhandler.cpp +++ b/modules/webbrowser/src/webkeyboardhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/src/webrenderhandler.cpp b/modules/webbrowser/src/webrenderhandler.cpp index d0d081c7c1..67c42ab792 100644 --- a/modules/webbrowser/src/webrenderhandler.cpp +++ b/modules/webbrowser/src/webrenderhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index f1cd8e0256..5f20bffa7a 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webbrowser/webbrowsermodule.h b/modules/webbrowser/webbrowsermodule.h index ff5e266ed2..adc3379bb3 100644 --- a/modules/webbrowser/webbrowsermodule.h +++ b/modules/webbrowser/webbrowsermodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webgui/CMakeLists.txt b/modules/webgui/CMakeLists.txt index 1382cbf61b..3089f47696 100644 --- a/modules/webgui/CMakeLists.txt +++ b/modules/webgui/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/webgui/cmake/nodejs_support.cmake b/modules/webgui/cmake/nodejs_support.cmake index 71aeccd89c..0b90111fd6 100644 --- a/modules/webgui/cmake/nodejs_support.cmake +++ b/modules/webgui/cmake/nodejs_support.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/modules/webgui/webguimodule.cpp b/modules/webgui/webguimodule.cpp index 650c80abea..774e8b675d 100644 --- a/modules/webgui/webguimodule.cpp +++ b/modules/webgui/webguimodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/modules/webgui/webguimodule.h b/modules/webgui/webguimodule.h index 3286b6d927..7a97a136bb 100644 --- a/modules/webgui/webguimodule.h +++ b/modules/webgui/webguimodule.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScalingMath.hglsl b/shaders/PowerScaling/powerScalingMath.hglsl index c07c248f4b..3e3f898221 100644 --- a/shaders/PowerScaling/powerScalingMath.hglsl +++ b/shaders/PowerScaling/powerScalingMath.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScaling_fs.hglsl b/shaders/PowerScaling/powerScaling_fs.hglsl index d30d5370fa..dff9584f9d 100644 --- a/shaders/PowerScaling/powerScaling_fs.hglsl +++ b/shaders/PowerScaling/powerScaling_fs.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/PowerScaling/powerScaling_vs.hglsl b/shaders/PowerScaling/powerScaling_vs.hglsl index 85b94bd939..bd3572ac1f 100644 --- a/shaders/PowerScaling/powerScaling_vs.hglsl +++ b/shaders/PowerScaling/powerScaling_vs.hglsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/abufferfragment.glsl b/shaders/abuffer/abufferfragment.glsl index 519c76136f..a08b2b44bb 100644 --- a/shaders/abuffer/abufferfragment.glsl +++ b/shaders/abuffer/abufferfragment.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/abufferresources.glsl b/shaders/abuffer/abufferresources.glsl index 2083160765..0fe6c64655 100644 --- a/shaders/abuffer/abufferresources.glsl +++ b/shaders/abuffer/abufferresources.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/boundsabuffer.frag b/shaders/abuffer/boundsabuffer.frag index 39b3c9de74..41820282ab 100644 --- a/shaders/abuffer/boundsabuffer.frag +++ b/shaders/abuffer/boundsabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/raycasterdata.glsl b/shaders/abuffer/raycasterdata.glsl index 6adc2b505d..d4803b9894 100644 --- a/shaders/abuffer/raycasterdata.glsl +++ b/shaders/abuffer/raycasterdata.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/renderabuffer.frag b/shaders/abuffer/renderabuffer.frag index 316238681b..c413335aec 100644 --- a/shaders/abuffer/renderabuffer.frag +++ b/shaders/abuffer/renderabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/renderabuffer.vert b/shaders/abuffer/renderabuffer.vert index 95ffd3ac7a..bc69947439 100644 --- a/shaders/abuffer/renderabuffer.vert +++ b/shaders/abuffer/renderabuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolveabuffer.frag b/shaders/abuffer/resolveabuffer.frag index d3681578da..c9c03c3ed7 100644 --- a/shaders/abuffer/resolveabuffer.frag +++ b/shaders/abuffer/resolveabuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolveabuffer.vert b/shaders/abuffer/resolveabuffer.vert index c33c92d84d..ce038d9da6 100644 --- a/shaders/abuffer/resolveabuffer.vert +++ b/shaders/abuffer/resolveabuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/abuffer/resolvehelpers.glsl b/shaders/abuffer/resolvehelpers.glsl index 2a474879c9..c7bbefc8a0 100644 --- a/shaders/abuffer/resolvehelpers.glsl +++ b/shaders/abuffer/resolvehelpers.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/blending.glsl b/shaders/blending.glsl index c5dce91519..53dc78b6bc 100644 --- a/shaders/blending.glsl +++ b/shaders/blending.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/floatoperations.glsl b/shaders/floatoperations.glsl index dad993dc47..7fb62d77f3 100644 --- a/shaders/floatoperations.glsl +++ b/shaders/floatoperations.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/fragment.glsl b/shaders/fragment.glsl index 7607996e74..d7d815ee65 100644 --- a/shaders/fragment.glsl +++ b/shaders/fragment.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/exitframebuffer.frag b/shaders/framebuffer/exitframebuffer.frag index 0280f0a36c..273ca7d3f5 100644 --- a/shaders/framebuffer/exitframebuffer.frag +++ b/shaders/framebuffer/exitframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/fxaa.frag b/shaders/framebuffer/fxaa.frag index c558b4cd04..17d51c2eb6 100644 --- a/shaders/framebuffer/fxaa.frag +++ b/shaders/framebuffer/fxaa.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/fxaa.vert b/shaders/framebuffer/fxaa.vert index b0a412be03..8429abf101 100644 --- a/shaders/framebuffer/fxaa.vert +++ b/shaders/framebuffer/fxaa.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/hdrAndFiltering.frag b/shaders/framebuffer/hdrAndFiltering.frag index d4e43cbdf8..5c501b4eaa 100644 --- a/shaders/framebuffer/hdrAndFiltering.frag +++ b/shaders/framebuffer/hdrAndFiltering.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/hdrAndFiltering.vert b/shaders/framebuffer/hdrAndFiltering.vert index b0a412be03..8429abf101 100644 --- a/shaders/framebuffer/hdrAndFiltering.vert +++ b/shaders/framebuffer/hdrAndFiltering.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/inside.glsl b/shaders/framebuffer/inside.glsl index 012a221fd9..9e80f65abf 100644 --- a/shaders/framebuffer/inside.glsl +++ b/shaders/framebuffer/inside.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/mergeDownscaledVolume.frag b/shaders/framebuffer/mergeDownscaledVolume.frag index b255d2a590..034ea8c5b9 100644 --- a/shaders/framebuffer/mergeDownscaledVolume.frag +++ b/shaders/framebuffer/mergeDownscaledVolume.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/mergeDownscaledVolume.vert b/shaders/framebuffer/mergeDownscaledVolume.vert index b0a412be03..8429abf101 100644 --- a/shaders/framebuffer/mergeDownscaledVolume.vert +++ b/shaders/framebuffer/mergeDownscaledVolume.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/nOneStripMSAA.frag b/shaders/framebuffer/nOneStripMSAA.frag index 4386ad4af5..cdceb55337 100644 --- a/shaders/framebuffer/nOneStripMSAA.frag +++ b/shaders/framebuffer/nOneStripMSAA.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/nOneStripMSAA.vert b/shaders/framebuffer/nOneStripMSAA.vert index ccce241d15..f757ce0eb4 100644 --- a/shaders/framebuffer/nOneStripMSAA.vert +++ b/shaders/framebuffer/nOneStripMSAA.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/outside.glsl b/shaders/framebuffer/outside.glsl index 847304b039..0d902214ee 100644 --- a/shaders/framebuffer/outside.glsl +++ b/shaders/framebuffer/outside.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/raycastframebuffer.frag b/shaders/framebuffer/raycastframebuffer.frag index 1a9efc53c2..ecf0bd0c20 100644 --- a/shaders/framebuffer/raycastframebuffer.frag +++ b/shaders/framebuffer/raycastframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/renderframebuffer.frag b/shaders/framebuffer/renderframebuffer.frag index deb68cb122..4139267ef0 100644 --- a/shaders/framebuffer/renderframebuffer.frag +++ b/shaders/framebuffer/renderframebuffer.frag @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/framebuffer/resolveframebuffer.vert b/shaders/framebuffer/resolveframebuffer.vert index 320f8b7f15..b5b2bfc730 100644 --- a/shaders/framebuffer/resolveframebuffer.vert +++ b/shaders/framebuffer/resolveframebuffer.vert @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/hdr.glsl b/shaders/hdr.glsl index 63dc9b5d2d..01904eae76 100644 --- a/shaders/hdr.glsl +++ b/shaders/hdr.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/shaders/rand.glsl b/shaders/rand.glsl index f2ac746245..e8f16f3253 100644 --- a/shaders/rand.glsl +++ b/shaders/rand.glsl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b218ba7e4b..bdd8c0b8b2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/src/documentation/core_registration.cpp b/src/documentation/core_registration.cpp index fe894136f8..3dd2756fb2 100644 --- a/src/documentation/core_registration.cpp +++ b/src/documentation/core_registration.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index 9ec5ce4201..04ba4bf594 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 53e7d973f1..35edf1a73e 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/documentation/documentationgenerator.cpp b/src/documentation/documentationgenerator.cpp index b81cd02bd1..8f7880a576 100644 --- a/src/documentation/documentationgenerator.cpp +++ b/src/documentation/documentationgenerator.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index 255acab5ff..6cd31004f5 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index 1b21d963a4..9b948e911c 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/configuration_doc.inl b/src/engine/configuration_doc.inl index 8790848033..16430a7c0c 100644 --- a/src/engine/configuration_doc.inl +++ b/src/engine/configuration_doc.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index 6f75683ccb..4efe92c9e6 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index 4ed9888ad7..3552eda0e2 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/globalscallbacks.cpp b/src/engine/globalscallbacks.cpp index 78ff2accb5..4579ea8718 100644 --- a/src/engine/globalscallbacks.cpp +++ b/src/engine/globalscallbacks.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/logfactory.cpp b/src/engine/logfactory.cpp index 3ff1178f30..a1f65f8898 100644 --- a/src/engine/logfactory.cpp +++ b/src/engine/logfactory.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp index 61b8979085..1880c0393c 100644 --- a/src/engine/moduleengine.cpp +++ b/src/engine/moduleengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/moduleengine_lua.inl b/src/engine/moduleengine_lua.inl index 6a70dea095..f999ea1d92 100644 --- a/src/engine/moduleengine_lua.inl +++ b/src/engine/moduleengine_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index ed3a510fff..55304bd2b5 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 4b81fa6887..692d6052b6 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/syncengine.cpp b/src/engine/syncengine.cpp index c2dca81352..9b22308ce8 100644 --- a/src/engine/syncengine.cpp +++ b/src/engine/syncengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/engine/virtualpropertymanager.cpp b/src/engine/virtualpropertymanager.cpp index 4236d24bcc..5b46ea2468 100644 --- a/src/engine/virtualpropertymanager.cpp +++ b/src/engine/virtualpropertymanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/camerainteractionstates.cpp b/src/interaction/camerainteractionstates.cpp index dee066c314..9164319e7a 100644 --- a/src/interaction/camerainteractionstates.cpp +++ b/src/interaction/camerainteractionstates.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/externinteraction.cpp b/src/interaction/externinteraction.cpp index 8bef0341aa..3f71f3403c 100644 --- a/src/interaction/externinteraction.cpp +++ b/src/interaction/externinteraction.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/inputstate.cpp b/src/interaction/inputstate.cpp index c603937722..fb0c792cf8 100644 --- a/src/interaction/inputstate.cpp +++ b/src/interaction/inputstate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/interactionmonitor.cpp b/src/interaction/interactionmonitor.cpp index fa5b01bb83..f848e4a9a4 100644 --- a/src/interaction/interactionmonitor.cpp +++ b/src/interaction/interactionmonitor.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index 6f38580fdd..75c0e40306 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/joystickinputstate.cpp b/src/interaction/joystickinputstate.cpp index 70815d0581..4a5537a353 100644 --- a/src/interaction/joystickinputstate.cpp +++ b/src/interaction/joystickinputstate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/keybindingmanager.cpp b/src/interaction/keybindingmanager.cpp index aabe3c3c0c..b05c8641e7 100644 --- a/src/interaction/keybindingmanager.cpp +++ b/src/interaction/keybindingmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/keybindingmanager_lua.inl b/src/interaction/keybindingmanager_lua.inl index 9b4db7fd33..5627bd26aa 100644 --- a/src/interaction/keybindingmanager_lua.inl +++ b/src/interaction/keybindingmanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/keyframenavigator.cpp b/src/interaction/keyframenavigator.cpp index 7a175778e7..d4441b912d 100644 --- a/src/interaction/keyframenavigator.cpp +++ b/src/interaction/keyframenavigator.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/mousecamerastates.cpp b/src/interaction/mousecamerastates.cpp index 36cc688170..c2014d8a34 100644 --- a/src/interaction/mousecamerastates.cpp +++ b/src/interaction/mousecamerastates.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index ba2151a27f..fa3aefb28f 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/navigationhandler_lua.inl b/src/interaction/navigationhandler_lua.inl index c7e6adc28e..34f6531f51 100644 --- a/src/interaction/navigationhandler_lua.inl +++ b/src/interaction/navigationhandler_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 6e7e9f7baa..9c6d13a15d 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/scriptcamerastates.cpp b/src/interaction/scriptcamerastates.cpp index b76bcf64c9..863e630de3 100644 --- a/src/interaction/scriptcamerastates.cpp +++ b/src/interaction/scriptcamerastates.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 336a294693..fe8343c6ef 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/sessionrecording_lua.inl b/src/interaction/sessionrecording_lua.inl index 4c8585e9aa..fe457ce3df 100644 --- a/src/interaction/sessionrecording_lua.inl +++ b/src/interaction/sessionrecording_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/shortcutmanager.cpp b/src/interaction/shortcutmanager.cpp index 6ce77e835b..1170ce8f3e 100644 --- a/src/interaction/shortcutmanager.cpp +++ b/src/interaction/shortcutmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/shortcutmanager_lua.inl b/src/interaction/shortcutmanager_lua.inl index fcce0b314a..90021969bd 100644 --- a/src/interaction/shortcutmanager_lua.inl +++ b/src/interaction/shortcutmanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/tasks/convertrecfileversiontask.cpp b/src/interaction/tasks/convertrecfileversiontask.cpp index c8d8bb5e87..8bfaac639f 100644 --- a/src/interaction/tasks/convertrecfileversiontask.cpp +++ b/src/interaction/tasks/convertrecfileversiontask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index da61a4bdbe..cc759a2a99 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/touchbar.mm b/src/interaction/touchbar.mm index 077c553561..514f17d46e 100644 --- a/src/interaction/touchbar.mm +++ b/src/interaction/touchbar.mm @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/websocketcamerastates.cpp b/src/interaction/websocketcamerastates.cpp index 0881607a9a..1d933bd06d 100644 --- a/src/interaction/websocketcamerastates.cpp +++ b/src/interaction/websocketcamerastates.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/interaction/websocketinputstate.cpp b/src/interaction/websocketinputstate.cpp index 2c918d84e8..5f0f5d0172 100644 --- a/src/interaction/websocketinputstate.cpp +++ b/src/interaction/websocketinputstate.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/mission/mission.cpp b/src/mission/mission.cpp index a37f7972ac..95c63cadf3 100644 --- a/src/mission/mission.cpp +++ b/src/mission/mission.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/mission/missionmanager.cpp b/src/mission/missionmanager.cpp index 892ceae501..c84cbd8399 100644 --- a/src/mission/missionmanager.cpp +++ b/src/mission/missionmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/mission/missionmanager_lua.inl b/src/mission/missionmanager_lua.inl index 283e5c46cc..5d9f3ea890 100644 --- a/src/mission/missionmanager_lua.inl +++ b/src/mission/missionmanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 27fcacb977..de1fc5300b 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index b8fa677f61..08bee3b496 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/network/parallelpeer_lua.inl b/src/network/parallelpeer_lua.inl index b48c81337f..8aad523b26 100644 --- a/src/network/parallelpeer_lua.inl +++ b/src/network/parallelpeer_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/network/parallelserver.cpp b/src/network/parallelserver.cpp index 3994cfea35..35846ef76d 100644 --- a/src/network/parallelserver.cpp +++ b/src/network/parallelserver.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/openspace.cpp b/src/openspace.cpp index eda8a807f2..8d10c8c497 100644 --- a/src/openspace.cpp +++ b/src/openspace.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * 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 * @@ -29,7 +29,7 @@ namespace openspace { std::string licenseText() { return "OpenSpace\n\ \n\ -Copyright (c) 2014-2020\n\ +Copyright (c) 2014-2021\n\ \n\ Permission is hereby granted, free of charge, to any person obtaining a copy of this\n\ software and associated documentation files (the \"Software\"), to deal in the Software\n\ diff --git a/src/properties/matrix/dmat2property.cpp b/src/properties/matrix/dmat2property.cpp index a6372c3926..e99d0d3cf0 100644 --- a/src/properties/matrix/dmat2property.cpp +++ b/src/properties/matrix/dmat2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat2x3property.cpp b/src/properties/matrix/dmat2x3property.cpp index 3ad6111e41..55bafb7c6c 100644 --- a/src/properties/matrix/dmat2x3property.cpp +++ b/src/properties/matrix/dmat2x3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat2x4property.cpp b/src/properties/matrix/dmat2x4property.cpp index 5c4fabf4f9..5ccc63ebbc 100644 --- a/src/properties/matrix/dmat2x4property.cpp +++ b/src/properties/matrix/dmat2x4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat3property.cpp b/src/properties/matrix/dmat3property.cpp index de1d758fa0..f7ff215a2a 100644 --- a/src/properties/matrix/dmat3property.cpp +++ b/src/properties/matrix/dmat3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat3x2property.cpp b/src/properties/matrix/dmat3x2property.cpp index 7a47ba70bd..29edd6bec7 100644 --- a/src/properties/matrix/dmat3x2property.cpp +++ b/src/properties/matrix/dmat3x2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat3x4property.cpp b/src/properties/matrix/dmat3x4property.cpp index 0edadd3f63..7ce468853a 100644 --- a/src/properties/matrix/dmat3x4property.cpp +++ b/src/properties/matrix/dmat3x4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat4property.cpp b/src/properties/matrix/dmat4property.cpp index baa232b191..a2da14e804 100644 --- a/src/properties/matrix/dmat4property.cpp +++ b/src/properties/matrix/dmat4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat4x2property.cpp b/src/properties/matrix/dmat4x2property.cpp index 49707fc77e..50bd58a054 100644 --- a/src/properties/matrix/dmat4x2property.cpp +++ b/src/properties/matrix/dmat4x2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/dmat4x3property.cpp b/src/properties/matrix/dmat4x3property.cpp index 95fa2beaaf..399b3f62fe 100644 --- a/src/properties/matrix/dmat4x3property.cpp +++ b/src/properties/matrix/dmat4x3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat2property.cpp b/src/properties/matrix/mat2property.cpp index aaa69c6cbc..8a156ef584 100644 --- a/src/properties/matrix/mat2property.cpp +++ b/src/properties/matrix/mat2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat2x3property.cpp b/src/properties/matrix/mat2x3property.cpp index bc0512ae73..a31fb30601 100644 --- a/src/properties/matrix/mat2x3property.cpp +++ b/src/properties/matrix/mat2x3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat2x4property.cpp b/src/properties/matrix/mat2x4property.cpp index 25424f2ed6..b3f4a888eb 100644 --- a/src/properties/matrix/mat2x4property.cpp +++ b/src/properties/matrix/mat2x4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat3property.cpp b/src/properties/matrix/mat3property.cpp index 8cb87a6418..f7896baf83 100644 --- a/src/properties/matrix/mat3property.cpp +++ b/src/properties/matrix/mat3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat3x2property.cpp b/src/properties/matrix/mat3x2property.cpp index 8e9b1b2ea9..3088c3c794 100644 --- a/src/properties/matrix/mat3x2property.cpp +++ b/src/properties/matrix/mat3x2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat3x4property.cpp b/src/properties/matrix/mat3x4property.cpp index be54c8239e..6571839d93 100644 --- a/src/properties/matrix/mat3x4property.cpp +++ b/src/properties/matrix/mat3x4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat4property.cpp b/src/properties/matrix/mat4property.cpp index b224668489..1c9ca7a1b9 100644 --- a/src/properties/matrix/mat4property.cpp +++ b/src/properties/matrix/mat4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat4x2property.cpp b/src/properties/matrix/mat4x2property.cpp index c528dd49cc..d2b0b97ed2 100644 --- a/src/properties/matrix/mat4x2property.cpp +++ b/src/properties/matrix/mat4x2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/matrix/mat4x3property.cpp b/src/properties/matrix/mat4x3property.cpp index 74bd66237e..f86d9e0c7d 100644 --- a/src/properties/matrix/mat4x3property.cpp +++ b/src/properties/matrix/mat4x3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/optionproperty.cpp b/src/properties/optionproperty.cpp index d0cd5cba40..710e4ef93b 100644 --- a/src/properties/optionproperty.cpp +++ b/src/properties/optionproperty.cpp @@ -3,7 +3,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/property.cpp b/src/properties/property.cpp index 3b576bf2ed..5e4189811d 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 4d307297bf..6864b7c0b5 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/boolproperty.cpp b/src/properties/scalar/boolproperty.cpp index 234f707e2b..736dfba051 100644 --- a/src/properties/scalar/boolproperty.cpp +++ b/src/properties/scalar/boolproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/charproperty.cpp b/src/properties/scalar/charproperty.cpp index 4fc29b0f77..1b2182da60 100644 --- a/src/properties/scalar/charproperty.cpp +++ b/src/properties/scalar/charproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/doubleproperty.cpp b/src/properties/scalar/doubleproperty.cpp index 7fbde3a65f..41cc901b2e 100644 --- a/src/properties/scalar/doubleproperty.cpp +++ b/src/properties/scalar/doubleproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/floatproperty.cpp b/src/properties/scalar/floatproperty.cpp index ed67553f63..5b9b916a5f 100644 --- a/src/properties/scalar/floatproperty.cpp +++ b/src/properties/scalar/floatproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/intproperty.cpp b/src/properties/scalar/intproperty.cpp index b1ac4a1e5c..ddbae1be74 100644 --- a/src/properties/scalar/intproperty.cpp +++ b/src/properties/scalar/intproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/longdoubleproperty.cpp b/src/properties/scalar/longdoubleproperty.cpp index 440e38a5fd..cd2711a202 100644 --- a/src/properties/scalar/longdoubleproperty.cpp +++ b/src/properties/scalar/longdoubleproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/longlongproperty.cpp b/src/properties/scalar/longlongproperty.cpp index 57b9b2091b..be6be24175 100644 --- a/src/properties/scalar/longlongproperty.cpp +++ b/src/properties/scalar/longlongproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/longproperty.cpp b/src/properties/scalar/longproperty.cpp index c1363c8c73..959e742e8b 100644 --- a/src/properties/scalar/longproperty.cpp +++ b/src/properties/scalar/longproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/shortproperty.cpp b/src/properties/scalar/shortproperty.cpp index b212d7a55a..88d2a861d3 100644 --- a/src/properties/scalar/shortproperty.cpp +++ b/src/properties/scalar/shortproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/signedcharproperty.cpp b/src/properties/scalar/signedcharproperty.cpp index f98916396c..dcf54be963 100644 --- a/src/properties/scalar/signedcharproperty.cpp +++ b/src/properties/scalar/signedcharproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/ucharproperty.cpp b/src/properties/scalar/ucharproperty.cpp index 8b1f920a57..dc77716b7b 100644 --- a/src/properties/scalar/ucharproperty.cpp +++ b/src/properties/scalar/ucharproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/uintproperty.cpp b/src/properties/scalar/uintproperty.cpp index 919f55206f..7f4409d89c 100644 --- a/src/properties/scalar/uintproperty.cpp +++ b/src/properties/scalar/uintproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/ulonglongproperty.cpp b/src/properties/scalar/ulonglongproperty.cpp index 5cba1a18fb..98c689e80b 100644 --- a/src/properties/scalar/ulonglongproperty.cpp +++ b/src/properties/scalar/ulonglongproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/ulongproperty.cpp b/src/properties/scalar/ulongproperty.cpp index fa80ac91f1..d6dbf92f8b 100644 --- a/src/properties/scalar/ulongproperty.cpp +++ b/src/properties/scalar/ulongproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/ushortproperty.cpp b/src/properties/scalar/ushortproperty.cpp index de5f7990b1..8331a932de 100644 --- a/src/properties/scalar/ushortproperty.cpp +++ b/src/properties/scalar/ushortproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/scalar/wcharproperty.cpp b/src/properties/scalar/wcharproperty.cpp index 98eb6beb90..73964f3896 100644 --- a/src/properties/scalar/wcharproperty.cpp +++ b/src/properties/scalar/wcharproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/selectionproperty.cpp b/src/properties/selectionproperty.cpp index 3cd8214122..63773ed410 100644 --- a/src/properties/selectionproperty.cpp +++ b/src/properties/selectionproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/stringlistproperty.cpp b/src/properties/stringlistproperty.cpp index ac547e4bac..8aaa7692f6 100644 --- a/src/properties/stringlistproperty.cpp +++ b/src/properties/stringlistproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/stringproperty.cpp b/src/properties/stringproperty.cpp index 682731a549..31cf5415ce 100644 --- a/src/properties/stringproperty.cpp +++ b/src/properties/stringproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/triggerproperty.cpp b/src/properties/triggerproperty.cpp index 2f101820f5..f94373f1c0 100644 --- a/src/properties/triggerproperty.cpp +++ b/src/properties/triggerproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/bvec2property.cpp b/src/properties/vector/bvec2property.cpp index 65d55b37c7..57579a741e 100644 --- a/src/properties/vector/bvec2property.cpp +++ b/src/properties/vector/bvec2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/bvec3property.cpp b/src/properties/vector/bvec3property.cpp index 7323a9e6f9..e8f1bd90f7 100644 --- a/src/properties/vector/bvec3property.cpp +++ b/src/properties/vector/bvec3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/bvec4property.cpp b/src/properties/vector/bvec4property.cpp index 64388fa7a6..65404bb1ce 100644 --- a/src/properties/vector/bvec4property.cpp +++ b/src/properties/vector/bvec4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/dvec2property.cpp b/src/properties/vector/dvec2property.cpp index c23a4ec493..9e9bfd43ae 100644 --- a/src/properties/vector/dvec2property.cpp +++ b/src/properties/vector/dvec2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/dvec3property.cpp b/src/properties/vector/dvec3property.cpp index de124eb25b..b148d894b4 100644 --- a/src/properties/vector/dvec3property.cpp +++ b/src/properties/vector/dvec3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/dvec4property.cpp b/src/properties/vector/dvec4property.cpp index 726048ed90..154072bfdb 100644 --- a/src/properties/vector/dvec4property.cpp +++ b/src/properties/vector/dvec4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/ivec2property.cpp b/src/properties/vector/ivec2property.cpp index fd5dd2a3a9..35e3d51c5d 100644 --- a/src/properties/vector/ivec2property.cpp +++ b/src/properties/vector/ivec2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/ivec3property.cpp b/src/properties/vector/ivec3property.cpp index 6ef0c002a4..09cccc79be 100644 --- a/src/properties/vector/ivec3property.cpp +++ b/src/properties/vector/ivec3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/ivec4property.cpp b/src/properties/vector/ivec4property.cpp index 9d468e96ea..8d08f30b9e 100644 --- a/src/properties/vector/ivec4property.cpp +++ b/src/properties/vector/ivec4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/uvec2property.cpp b/src/properties/vector/uvec2property.cpp index d337c4144e..b2e496bdfd 100644 --- a/src/properties/vector/uvec2property.cpp +++ b/src/properties/vector/uvec2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/uvec3property.cpp b/src/properties/vector/uvec3property.cpp index c838b1cd7c..535eae4b5b 100644 --- a/src/properties/vector/uvec3property.cpp +++ b/src/properties/vector/uvec3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/uvec4property.cpp b/src/properties/vector/uvec4property.cpp index c1abcc5f3e..8414d437bc 100644 --- a/src/properties/vector/uvec4property.cpp +++ b/src/properties/vector/uvec4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/vec2property.cpp b/src/properties/vector/vec2property.cpp index 5074d33525..64d6c2e67c 100644 --- a/src/properties/vector/vec2property.cpp +++ b/src/properties/vector/vec2property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/vec3property.cpp b/src/properties/vector/vec3property.cpp index f663b4d1fa..a6c00330b7 100644 --- a/src/properties/vector/vec3property.cpp +++ b/src/properties/vector/vec3property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/properties/vector/vec4property.cpp b/src/properties/vector/vec4property.cpp index 38580017b0..bb785b723b 100644 --- a/src/properties/vector/vec4property.cpp +++ b/src/properties/vector/vec4property.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/query/query.cpp b/src/query/query.cpp index 76da802137..5f84919aab 100644 --- a/src/query/query.cpp +++ b/src/query/query.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/abufferrenderer.cpp b/src/rendering/abufferrenderer.cpp index db86645354..4b4f4d4654 100644 --- a/src/rendering/abufferrenderer.cpp +++ b/src/rendering/abufferrenderer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index eafbd18e46..1a9ef79422 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/dashboard_lua.inl b/src/rendering/dashboard_lua.inl index 09c752dc20..081e2ecbe1 100644 --- a/src/rendering/dashboard_lua.inl +++ b/src/rendering/dashboard_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/dashboarditem.cpp b/src/rendering/dashboarditem.cpp index 0fd432a4e9..9dbc2e3604 100644 --- a/src/rendering/dashboarditem.cpp +++ b/src/rendering/dashboarditem.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/deferredcastermanager.cpp b/src/rendering/deferredcastermanager.cpp index 6978824675..f38b3b06c9 100644 --- a/src/rendering/deferredcastermanager.cpp +++ b/src/rendering/deferredcastermanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index 5bf6a22c55..39d2d9a9cf 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/helper.cpp b/src/rendering/helper.cpp index fd9afbf9c2..99787c973c 100644 --- a/src/rendering/helper.cpp +++ b/src/rendering/helper.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index c0f78ee138..5e585d2d7b 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index f7b992552b..dfbfc483d5 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/raycastermanager.cpp b/src/rendering/raycastermanager.cpp index 9d7fecd95c..38dd357451 100644 --- a/src/rendering/raycastermanager.cpp +++ b/src/rendering/raycastermanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index fc42616d8f..d474297c04 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 37c25d05f8..b95f6c1c06 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/renderengine_lua.inl b/src/rendering/renderengine_lua.inl index f671ab7213..9bb26d0fcd 100644 --- a/src/rendering/renderengine_lua.inl +++ b/src/rendering/renderengine_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 25450bd22c..9f913096a2 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/transferfunction.cpp b/src/rendering/transferfunction.cpp index 6079ecefd8..db342727d0 100644 --- a/src/rendering/transferfunction.cpp +++ b/src/rendering/transferfunction.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/rendering/volumeraycaster.cpp b/src/rendering/volumeraycaster.cpp index 843a157ca2..f870810700 100644 --- a/src/rendering/volumeraycaster.cpp +++ b/src/rendering/volumeraycaster.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/asset.cpp b/src/scene/asset.cpp index 8c5909bada..39cae2b715 100644 --- a/src/scene/asset.cpp +++ b/src/scene/asset.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index 5816b81109..d00d7faa72 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/assetloader_lua.inl b/src/scene/assetloader_lua.inl index 74c281411e..0b8884f3e2 100644 --- a/src/scene/assetloader_lua.inl +++ b/src/scene/assetloader_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/assetmanager.cpp b/src/scene/assetmanager.cpp index de1809110f..c129207ed0 100644 --- a/src/scene/assetmanager.cpp +++ b/src/scene/assetmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/assetmanager_lua.inl b/src/scene/assetmanager_lua.inl index b6e2705da1..82bbbd62f9 100644 --- a/src/scene/assetmanager_lua.inl +++ b/src/scene/assetmanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/lightsource.cpp b/src/scene/lightsource.cpp index 221a3ac107..61bb9fffd1 100644 --- a/src/scene/lightsource.cpp +++ b/src/scene/lightsource.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index ed0065975d..69c6061a82 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/profile_lua.inl b/src/scene/profile_lua.inl index d1ec908e7d..6a46e50167 100644 --- a/src/scene/profile_lua.inl +++ b/src/scene/profile_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/rotation.cpp b/src/scene/rotation.cpp index 05266dc4ab..59daaf823d 100644 --- a/src/scene/rotation.cpp +++ b/src/scene/rotation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index 1cec27f683..b22af536a8 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 559e4496f0..0e0ff31093 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index b44e1ad2ca..be155ed426 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 887d335d05..9eafbe0650 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scenegraphnode_doc.inl b/src/scene/scenegraphnode_doc.inl index 7a8298b573..29f89546e6 100644 --- a/src/scene/scenegraphnode_doc.inl +++ b/src/scene/scenegraphnode_doc.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/sceneinitializer.cpp b/src/scene/sceneinitializer.cpp index b03039c5ac..1e92860d26 100644 --- a/src/scene/sceneinitializer.cpp +++ b/src/scene/sceneinitializer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/scenelicensewriter.cpp b/src/scene/scenelicensewriter.cpp index 628e86d487..e93946ae41 100644 --- a/src/scene/scenelicensewriter.cpp +++ b/src/scene/scenelicensewriter.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/timeframe.cpp b/src/scene/timeframe.cpp index ce01f44227..5ecebb4f62 100644 --- a/src/scene/timeframe.cpp +++ b/src/scene/timeframe.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index a7491cfef2..55ff79b80d 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/lualibrary.cpp b/src/scripting/lualibrary.cpp index d11250322a..245c40b42c 100644 --- a/src/scripting/lualibrary.cpp +++ b/src/scripting/lualibrary.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index 05260f7de1..7ea69ac42d 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index 220531b537..d221232ca6 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index 0354e6e73d..d5c4366b84 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/scriptscheduler_lua.inl b/src/scripting/scriptscheduler_lua.inl index 3c889014f3..923a0c4a2a 100644 --- a/src/scripting/scriptscheduler_lua.inl +++ b/src/scripting/scriptscheduler_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/scripting/systemcapabilitiesbinding.cpp b/src/scripting/systemcapabilitiesbinding.cpp index c6d3914fe1..f48109ce6a 100644 --- a/src/scripting/systemcapabilitiesbinding.cpp +++ b/src/scripting/systemcapabilitiesbinding.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/blockplaneintersectiongeometry.cpp b/src/util/blockplaneintersectiongeometry.cpp index 31ff0e4b64..3bbca9d57b 100644 --- a/src/util/blockplaneintersectiongeometry.cpp +++ b/src/util/blockplaneintersectiongeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/boxgeometry.cpp b/src/util/boxgeometry.cpp index 34c9189d8d..4e5943319a 100644 --- a/src/util/boxgeometry.cpp +++ b/src/util/boxgeometry.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/camera.cpp b/src/util/camera.cpp index 02cd915e04..0cd86da56a 100644 --- a/src/util/camera.cpp +++ b/src/util/camera.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/coordinateconversion.cpp b/src/util/coordinateconversion.cpp index 0fedafb08f..65cba42a33 100644 --- a/src/util/coordinateconversion.cpp +++ b/src/util/coordinateconversion.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/distanceconversion.cpp b/src/util/distanceconversion.cpp index 905b07a400..2296156d6e 100644 --- a/src/util/distanceconversion.cpp +++ b/src/util/distanceconversion.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index 3796976382..d66edbf38e 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/histogram.cpp b/src/util/histogram.cpp index 148b3d2a19..8801756ffb 100644 --- a/src/util/histogram.cpp +++ b/src/util/histogram.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index 74e1749d1d..4692e19525 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/keys.cpp b/src/util/keys.cpp index bb7ea212ae..58afcc3632 100644 --- a/src/util/keys.cpp +++ b/src/util/keys.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/openspacemodule.cpp b/src/util/openspacemodule.cpp index f0ff0289b9..0bc39e71cd 100644 --- a/src/util/openspacemodule.cpp +++ b/src/util/openspacemodule.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/progressbar.cpp b/src/util/progressbar.cpp index 7ff4913801..eb42742c83 100644 --- a/src/util/progressbar.cpp +++ b/src/util/progressbar.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/resourcesynchronization.cpp b/src/util/resourcesynchronization.cpp index 0af28f3c18..0e9a61449b 100644 --- a/src/util/resourcesynchronization.cpp +++ b/src/util/resourcesynchronization.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/screenlog.cpp b/src/util/screenlog.cpp index 9425298cf9..40e42f679e 100644 --- a/src/util/screenlog.cpp +++ b/src/util/screenlog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/sphere.cpp b/src/util/sphere.cpp index 7c34be9a58..2fc07768ba 100644 --- a/src/util/sphere.cpp +++ b/src/util/sphere.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index f5e2d31f92..f3c68adc56 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/spicemanager_lua.inl b/src/util/spicemanager_lua.inl index e53613ab12..0633be6b09 100644 --- a/src/util/spicemanager_lua.inl +++ b/src/util/spicemanager_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/syncbuffer.cpp b/src/util/syncbuffer.cpp index 8f1fbc3211..136af42c82 100644 --- a/src/util/syncbuffer.cpp +++ b/src/util/syncbuffer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/synchronizationwatcher.cpp b/src/util/synchronizationwatcher.cpp index e176b7af8c..5c14833970 100644 --- a/src/util/synchronizationwatcher.cpp +++ b/src/util/synchronizationwatcher.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/task.cpp b/src/util/task.cpp index b6de0c29a7..23dac7fc42 100644 --- a/src/util/task.cpp +++ b/src/util/task.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/taskloader.cpp b/src/util/taskloader.cpp index 47bdad9ce9..32e388b0d5 100644 --- a/src/util/taskloader.cpp +++ b/src/util/taskloader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/threadpool.cpp b/src/util/threadpool.cpp index 0092daa7e5..d61485f6f9 100644 --- a/src/util/threadpool.cpp +++ b/src/util/threadpool.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/time.cpp b/src/util/time.cpp index 117e487f84..bd886aa9aa 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index 72d32baacb..0b2f33e7e5 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/timeconversion.cpp b/src/util/timeconversion.cpp index 79dc4dd218..76873cf8b4 100644 --- a/src/util/timeconversion.cpp +++ b/src/util/timeconversion.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/timeline.cpp b/src/util/timeline.cpp index b15bd2b10f..1ba5b61649 100644 --- a/src/util/timeline.cpp +++ b/src/util/timeline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index 66c251c61c..f2415a78c9 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/timerange.cpp b/src/util/timerange.cpp index e60867a28a..443cc2eca9 100644 --- a/src/util/timerange.cpp +++ b/src/util/timerange.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/touch.cpp b/src/util/touch.cpp index 0484c5e1dc..a49d7dee51 100644 --- a/src/util/touch.cpp +++ b/src/util/touch.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/transformationmanager.cpp b/src/util/transformationmanager.cpp index 08e14675ae..76adebbc87 100644 --- a/src/util/transformationmanager.cpp +++ b/src/util/transformationmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/src/util/versionchecker.cpp b/src/util/versionchecker.cpp index aabec2be59..6eddfd9644 100644 --- a/src/util/versionchecker.cpp +++ b/src/util/versionchecker.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/support/cmake/application_definition.cmake b/support/cmake/application_definition.cmake index c539ed00ba..83f79f69a1 100644 --- a/support/cmake/application_definition.cmake +++ b/support/cmake/application_definition.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/cmake/global_variables.cmake b/support/cmake/global_variables.cmake index a5bb7fc463..01ddf71f47 100644 --- a/support/cmake/global_variables.cmake +++ b/support/cmake/global_variables.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/cmake/module_common.cmake b/support/cmake/module_common.cmake index dffd4218d4..c1f06427c2 100644 --- a/support/cmake/module_common.cmake +++ b/support/cmake/module_common.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/cmake/module_definition.cmake b/support/cmake/module_definition.cmake index b09ea6c2c2..ff50195087 100644 --- a/support/cmake/module_definition.cmake +++ b/support/cmake/module_definition.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/cmake/openspace_header.template b/support/cmake/openspace_header.template index f5a5ac7ce2..0f5b82a27f 100644 --- a/support/cmake/openspace_header.template +++ b/support/cmake/openspace_header.template @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/support/cmake/packaging.cmake b/support/cmake/packaging.cmake index 52cec8a3eb..c901f71f48 100644 --- a/support/cmake/packaging.cmake +++ b/support/cmake/packaging.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/cmake/set_openspace_compile_settings.cmake b/support/cmake/set_openspace_compile_settings.cmake index 831f025f81..3154376b7f 100644 --- a/support/cmake/set_openspace_compile_settings.cmake +++ b/support/cmake/set_openspace_compile_settings.cmake @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/support/coding/new_files.py b/support/coding/new_files.py index 60ee3c29e2..d6c88f630f 100644 --- a/support/coding/new_files.py +++ b/support/coding/new_files.py @@ -33,7 +33,7 @@ Project = { } License = { - 'OpenSpace': '/*****************************************************************************************\n * *\n * OpenSpace *\n * *\n * Copyright (c) 2014-2020 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/', + 'OpenSpace': '/*****************************************************************************************\n * *\n * OpenSpace *\n * *\n * Copyright (c) 2014-2021 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/', 'Ghoul': '/*****************************************************************************************\n * *\n * GHOUL *\n * General Helpful Open Utility Library *\n * *\n * Copyright (c) 2012-2020 *\n * *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this *\n * software and associated documentation files (the "Software"), to deal in the Software *\n * without restriction, including without limitation the rights to use, copy, modify, *\n * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *\n * permit persons to whom the Software is furnished to do so, subject to the following *\n * conditions: *\n * *\n * The above copyright notice and this permission notice shall be included in all copies *\n * or substantial portions of the Software. *\n * *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *\n * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *\n * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\n ****************************************************************************************/' } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f701277149..f68b8d0b3b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/tests/main.cpp b/tests/main.cpp index c8ab41328a..8e1f681a88 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/regression/517.cpp b/tests/regression/517.cpp index d1b8e6c079..82b49592c4 100644 --- a/tests/regression/517.cpp +++ b/tests/regression/517.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_assetloader.cpp b/tests/test_assetloader.cpp index 097d7694cd..084e52dd44 100644 --- a/tests/test_assetloader.cpp +++ b/tests/test_assetloader.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_concurrentjobmanager.cpp b/tests/test_concurrentjobmanager.cpp index 1eb9521b1f..552c212366 100644 --- a/tests/test_concurrentjobmanager.cpp +++ b/tests/test_concurrentjobmanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_concurrentqueue.cpp b/tests/test_concurrentqueue.cpp index b9d66981e0..86ff15b0bf 100644 --- a/tests/test_concurrentqueue.cpp +++ b/tests/test_concurrentqueue.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_documentation.cpp b/tests/test_documentation.cpp index 2507e044c4..3a1526e747 100644 --- a/tests/test_documentation.cpp +++ b/tests/test_documentation.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_iswamanager.cpp b/tests/test_iswamanager.cpp index 7997fb45fa..f557a05a5a 100644 --- a/tests/test_iswamanager.cpp +++ b/tests/test_iswamanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_latlonpatch.cpp b/tests/test_latlonpatch.cpp index 2554045cd2..488e8d32fb 100644 --- a/tests/test_latlonpatch.cpp +++ b/tests/test_latlonpatch.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_lrucache.cpp b/tests/test_lrucache.cpp index 27e95f02c3..8e3dae567f 100644 --- a/tests/test_lrucache.cpp +++ b/tests/test_lrucache.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_luaconversions.cpp b/tests/test_luaconversions.cpp index ea138ace75..f003c4d45f 100644 --- a/tests/test_luaconversions.cpp +++ b/tests/test_luaconversions.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_optionproperty.cpp b/tests/test_optionproperty.cpp index 74161629bc..175ca4e8e4 100644 --- a/tests/test_optionproperty.cpp +++ b/tests/test_optionproperty.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_profile.cpp b/tests/test_profile.cpp index 834105d882..813b39e9c0 100644 --- a/tests/test_profile.cpp +++ b/tests/test_profile.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_rawvolumeio.cpp b/tests/test_rawvolumeio.cpp index 02bf9d7cab..bdf11abc51 100644 --- a/tests/test_rawvolumeio.cpp +++ b/tests/test_rawvolumeio.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_scriptscheduler.cpp b/tests/test_scriptscheduler.cpp index cf60e88dc2..42dceae466 100644 --- a/tests/test_scriptscheduler.cpp +++ b/tests/test_scriptscheduler.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_spicemanager.cpp b/tests/test_spicemanager.cpp index 3f54a37a1f..0881135772 100644 --- a/tests/test_spicemanager.cpp +++ b/tests/test_spicemanager.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_temporaltileprovider.cpp b/tests/test_temporaltileprovider.cpp index 0141fcc619..e01dfe1fad 100644 --- a/tests/test_temporaltileprovider.cpp +++ b/tests/test_temporaltileprovider.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_timeline.cpp b/tests/test_timeline.cpp index 3547677bfb..7590e37b89 100644 --- a/tests/test_timeline.cpp +++ b/tests/test_timeline.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/tests/test_timequantizer.cpp b/tests/test_timequantizer.cpp index 0eee8201ed..cb7506a4f4 100644 --- a/tests/test_timequantizer.cpp +++ b/tests/test_timequantizer.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * 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 * From 1b46f2d42933e71024443e652c7cec2fb0a2365f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 21:10:54 +0100 Subject: [PATCH 075/147] Update Ghoul repository - Fixes issue with Dictionary - Remove accidentally pushed screenshot folder --- ext/ghoul | 2 +- screenshots | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 120000 screenshots diff --git a/ext/ghoul b/ext/ghoul index 5fd49e6caf..37757a2e83 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 5fd49e6caff87b4da310a349d81d672933ad2914 +Subproject commit 37757a2e83ac423d391c663a32e4efb95b0b2084 diff --git a/screenshots b/screenshots deleted file mode 120000 index 5086d070a4..0000000000 --- a/screenshots +++ /dev/null @@ -1 +0,0 @@ -E:/screenshots \ No newline at end of file From 29a76c7d33438c142bb8858ed77a661fc382e435 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 21:11:13 +0100 Subject: [PATCH 076/147] Coding style pass on shader code --- .../atmosphere/shaders/atmosphere_common.glsl | 24 +- .../shaders/atmosphere_deferred_fs.glsl | 30 +- .../shaders/atmosphere_deferred_vs.glsl | 3 +- .../atmosphere/shaders/deltaE_calc_fs.glsl | 3 +- .../atmosphere/shaders/deltaJ_calc_fs.glsl | 6 +- .../atmosphere/shaders/deltaJ_calc_gs.glsl | 8 +- .../atmosphere/shaders/deltaS_calc_fs.glsl | 2 +- .../atmosphere/shaders/deltaS_calc_gs.glsl | 8 +- .../atmosphere/shaders/deltaS_calc_vs.glsl | 2 +- .../shaders/deltaS_sup_calc_fs.glsl | 2 +- .../shaders/deltaS_sup_calc_gs.glsl | 8 +- .../shaders/deltaS_sup_calc_vs.glsl | 2 +- .../shaders/inScattering_calc_fs.glsl | 9 +- .../shaders/inScattering_calc_gs.glsl | 8 +- .../shaders/inScattering_calc_vs.glsl | 2 +- .../shaders/inScattering_sup_calc_fs.glsl | 4 +- .../shaders/inScattering_sup_calc_gs.glsl | 8 +- .../shaders/inScattering_sup_calc_vs.glsl | 2 +- .../shaders/irradiance_calc_fs.glsl | 2 +- .../shaders/irradiance_calc_vs.glsl | 2 +- .../shaders/irradiance_final_fs.glsl | 2 +- .../shaders/irradiance_sup_calc_fs.glsl | 3 +- .../shaders/irradiance_sup_calc_vs.glsl | 2 +- .../shaders/transmittance_calc_fs.glsl | 7 +- modules/base/shaders/axes_fs.glsl | 1 - modules/base/shaders/grid_fs.glsl | 1 - modules/base/shaders/grid_vs.glsl | 2 - .../digitaluniverse/shaders/billboard_gs.glsl | 2 +- .../shaders/billboardpolygon_fs.glsl | 4 +- .../shaders/billboardpolygon_gs.glsl | 5 +- .../digitaluniverse/shaders/points_gs.glsl | 5 +- .../shaders/points_sprite_fs.glsl | 1 - modules/exoplanets/shaders/orbitdisc_fs.glsl | 2 +- .../shaders/fieldlinessequence_fs.glsl | 3 +- .../shaders/fieldlinessequence_vs.glsl | 13 +- modules/gaia/shaders/gaia_billboard_fs.glsl | 1 - modules/gaia/shaders/gaia_billboard_ge.glsl | 3 +- .../gaia/shaders/gaia_billboard_nofbo_fs.glsl | 6 +- modules/gaia/shaders/gaia_point_fs.glsl | 5 +- modules/gaia/shaders/gaia_point_ge.glsl | 1 - modules/gaia/shaders/gaia_ssbo_vs.glsl | 26 +- .../gaia_tonemapping_billboard_fs.glsl | 1 - .../shaders/gaia_tonemapping_point_fs.glsl | 1 - modules/gaia/shaders/gaia_vbo_vs.glsl | 14 +- modules/galaxy/shaders/billboard_vs.glsl | 5 +- modules/galaxy/shaders/points_vs.glsl | 22 +- .../globebrowsing/shaders/renderer_fs.glsl | 552 +++++++++--------- modules/globebrowsing/shaders/rings_fs.glsl | 2 +- modules/iswa/shaders/datasphere_fs.glsl | 3 +- modules/multiresvolume/shaders/raycast.glsl | 6 +- modules/space/shaders/convolution_fs.glsl | 2 +- modules/space/shaders/debrisViz_vs.glsl | 7 - modules/space/shaders/psfToTexture_fs.glsl | 5 +- modules/space/shaders/star_ge.glsl | 1 - .../shaders/dilation_fs.glsl | 1 - .../renderablePlanetProjection_fs.glsl | 2 +- .../shaders/terminatorshadow_vs.glsl | 2 +- modules/toyvolume/shaders/boundsfs.glsl | 1 + modules/volume/shaders/boundsfs.glsl | 1 + .../webbrowser/shaders/screenspace_vs.glsl | 4 +- shaders/PowerScaling/powerScaling_fs.hglsl | 22 - shaders/PowerScaling/powerScaling_vs.hglsl | 17 +- shaders/abuffer/resolvehelpers.glsl | 10 +- shaders/floatoperations.glsl | 29 +- shaders/framebuffer/fxaa.frag | 2 +- 65 files changed, 435 insertions(+), 507 deletions(-) diff --git a/modules/atmosphere/shaders/atmosphere_common.glsl b/modules/atmosphere/shaders/atmosphere_common.glsl index c22b545337..fd0ca1eb2f 100644 --- a/modules/atmosphere/shaders/atmosphere_common.glsl +++ b/modules/atmosphere/shaders/atmosphere_common.glsl @@ -109,7 +109,7 @@ float invSamplesNu = 1.0f / float(SAMPLES_NU); float RtMinusRg = float(Rt - Rg); float invRtMinusRg = 1.0f / RtMinusRg; -float opticalDepth(const float localH, const float r, const float mu, const float d) { +float opticalDepth(float localH, float r, float mu, float d) { float invH = 1.0/localH; float a = sqrt((0.5 * invH)*r); vec2 a01 = a*vec2(mu, mu + d / r); @@ -120,7 +120,7 @@ float opticalDepth(const float localH, const float r, const float mu, const floa return sqrt((6.2831*H)*r) * exp((Rg-r)*invH) * (x + dot(y, vec2(1.0, -1.0))); } -vec3 analyticTransmittance(const float r, const float mu, const float d) { +vec3 analyticTransmittance(float r, float mu, float d) { if (ozoneLayerEnabled) { return exp(-betaRayleigh * opticalDepth(HR, r, mu, d) - betaOzoneExtinction * (0.0000006) * opticalDepth(HO, r, mu, d) - @@ -132,7 +132,7 @@ vec3 analyticTransmittance(const float r, const float mu, const float d) { } } -vec3 irradiance(sampler2D sampler, const float r, const float muSun) { +vec3 irradiance(sampler2D sampler, float r, float muSun) { float u_r = (r - Rg) * invRtMinusRg; float u_muSun = (muSun + 0.2) / (1.0 + 0.2); return texture(sampler, vec2(u_muSun, u_r)).rgb; @@ -152,7 +152,7 @@ vec3 irradiance(sampler2D sampler, const float r, const float muSun) { // until the planet's ground or top of atmosphere. --- // r := || vec(x) || e [0, Rt] // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r -float rayDistance(const float r, const float mu) { +float rayDistance(float r, float mu) { // The light ray starting at the observer in/on the atmosphere can // have to possible end points: the top of the atmosphere or the // planet ground. So the shortest path is the one we are looking for, @@ -225,7 +225,7 @@ void unmappingRAndMuSunIrradiance(out float r, out float muSun) { // nu := cosone of the angle between vec(s) and vec(v) // dhdH := it is a vec4. dhdH.x stores the dminT := Rt - r, dhdH.y stores the dH value (see paper), // dhdH.z stores dminG := r - Rg and dhdH.w stores dh (see paper). -void unmappingMuMuSunNu(const float r, vec4 dhdH, out float mu, out float muSun, out float nu) { +void unmappingMuMuSunNu(float r, vec4 dhdH, out float mu, out float muSun, out float nu) { // Window coordinates of pixel (uncentering also) float fragmentX = gl_FragCoord.x - 0.5f; float fragmentY = gl_FragCoord.y - 0.5f; @@ -277,7 +277,7 @@ void unmappingMuMuSunNu(const float r, vec4 dhdH, out float mu, out float muSun, // the ground or the top of atmosphere. -- // r := height of starting point vect(x) // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r -vec3 transmittanceLUT(const float r, const float mu) { +vec3 transmittanceLUT(float r, float mu) { // Given the position x (here the altitude r) and the view // angle v (here the cosine(v)= mu), we map this float u_r = sqrt((r - Rg) * invRtMinusRg); @@ -293,7 +293,7 @@ vec3 transmittanceLUT(const float r, const float mu) { // of Transmittance: T(a,b) = TableT(a,v)/TableT(b, v) -- // r := height of starting point vect(x) // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r -vec3 transmittance(const float r, const float mu, const float d) { +vec3 transmittance(float r, float mu, float d) { // Here we use the transmittance property: T(x,v) = T(x,d)*T(d,v) // to, given a distance d, calculates that transmittance along // that distance starting in x (hight r): T(x,d) = T(x,v)/T(d,v). @@ -326,7 +326,7 @@ vec3 transmittance(const float r, const float mu, const float d) { // -- Calculates Rayleigh phase function given the // scattering cosine angle mu -- // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r -float rayleighPhaseFunction(const float mu) { +float rayleighPhaseFunction(float mu) { //return (3.0f / (16.0f * M_PI)) * (1.0f + mu * mu); return 0.0596831036 * (1.0f + mu * mu); } @@ -334,7 +334,7 @@ float rayleighPhaseFunction(const float mu) { // -- Calculates Mie phase function given the // scattering cosine angle mu -- // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r -float miePhaseFunction(const float mu) { +float miePhaseFunction(float mu) { //return (3.0f / (8.0f * M_PI)) * // ( ( (1.0f - (mieG * mieG) ) * (1.0f + mu * mu) ) / // ( (2.0f + mieG * mieG) * @@ -356,9 +356,7 @@ float miePhaseFunction(const float mu) { // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r // muSun := cosine of the zeith angle of vec(s). Or muSun = (vec(s) * vec(v)) // nu := cosine of the angle between vec(s) and vec(v) -vec4 texture4D(sampler3D table, const float r, const float mu, - const float muSun, const float nu) -{ +vec4 texture4D(sampler3D table, float r, float mu, float muSun, float nu) { //float Rg2 = Rg * Rg; //float Rt2 = Rt * Rt; float r2 = r * r; @@ -403,7 +401,7 @@ vec4 texture4D(sampler3D table, const float r, const float mu, // lut := OpenGL texture2D sampler (the irradiance texture deltaE) // muSun := cosine of the zeith angle of vec(s). Or muSun = (vec(s) * vec(v)) // r := height of starting point vect(x) -vec3 irradianceLUT(sampler2D lut, const float muSun, const float r) { +vec3 irradianceLUT(sampler2D lut, float muSun, float r) { // See Bruneton paper and Coliene to understand the mapping float u_muSun = (muSun + 0.2f) / (1.0f + 0.2f); float u_r = (r - Rg) * invRtMinusRg; diff --git a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl index caaef43969..6e7872b129 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl @@ -106,12 +106,13 @@ uniform ShadowRenderingStruct shadowDataArray[numberOfShadows]; uniform int shadows; uniform bool hardShadows; -vec4 butterworthFunc(const float d, const float r, const float n) { +vec4 butterworthFunc(float d, float r, float n) { return vec4(vec3(sqrt(r/(r + pow(d, 2*n)))), 1.0); } -vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[numberOfShadows], const dvec3 position, - const bool ground) { +vec4 calcShadow(ShadowRenderingStruct shadowInfoArray[numberOfShadows], dvec3 position, + bool ground) +{ if (shadowInfoArray[0].isShadowing) { dvec3 pc = shadowInfoArray[0].casterPositionVec - position; dvec3 sc_norm = shadowInfoArray[0].sourceCasterVec; @@ -181,7 +182,7 @@ struct dRay { * intersection of the ray with atmosphere when the eye position * is inside atmosphere. */ -bool dAtmosphereIntersection(const dvec3 planetPosition, const dRay ray, const double atmRadius, +bool dAtmosphereIntersection(dvec3 planetPosition, dRay ray, double atmRadius, out bool inside, out double offset, out double maxLength ) { dvec3 l = planetPosition - ray.origin.xyz; double s = dot(l, ray.direction.xyz); @@ -281,10 +282,10 @@ void dCalculateRayRenderableGlobe(out dRay ray, * calculating the reflectance R[L]. */ vec3 inscatterRadiance(inout vec3 x, inout float t, inout float irradianceFactor, - const vec3 v, const vec3 s, out float r, out float mu, - out vec3 attenuation, const vec3 fragPosObj, out bool groundHit, - const double maxLength, const double pixelDepth, - const vec4 spaceColor, const float sunIntensity) { + vec3 v, vec3 s, out float r, out float mu, + out vec3 attenuation, vec3 fragPosObj, out bool groundHit, + double maxLength, double pixelDepth, + vec4 spaceColor, float sunIntensity) { const float INTERPOLATION_EPS = 0.004f; // precision const from Brunetton @@ -446,10 +447,10 @@ vec3 inscatterRadiance(inout vec3 x, inout float t, inout float irradianceFactor * mu := cosine of the zenith view angle * attenuationXtoX0 := transmittance T(x,x0) */ -vec3 groundColor(const vec3 x, const float t, const vec3 v, const vec3 s, const float r, - const float mu, const vec3 attenuationXtoX0, const vec4 groundColor, - const vec3 normal, const float irradianceFactor, - const float waterReflectance, const float sunIntensity) +vec3 groundColor(vec3 x, float t, vec3 v, vec3 s, float r, + float mu, vec3 attenuationXtoX0, vec4 groundColor, + vec3 normal, float irradianceFactor, + float waterReflectance, float sunIntensity) { vec3 reflectedRadiance = vec3(0.0f); @@ -524,8 +525,8 @@ vec3 groundColor(const vec3 x, const float t, const vec3 v, const vec3 s, const * mu := cosine of the zenith view angle * attenuation := transmittance T(x,x0) */ -vec3 sunColor(const vec3 x, const float t, const vec3 v, const vec3 s, const float r, - const float mu, const float irradianceFactor) { +vec3 sunColor(vec3 x, float t, vec3 v, vec3 s, float r, float mu, float irradianceFactor) +{ vec3 transmittance = (r <= Rt) ? ( mu < -sqrt(1.0f - Rg2/(r*r)) ? vec3(0.0f) : transmittanceLUT(r, mu)) : vec3(1.0f); // JCC: Change this function to a impostor texture with gaussian decay color weighted @@ -694,4 +695,3 @@ void main() { renderTarget = bColor; } } - diff --git a/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl index 5d609ded43..cbe4d8663f 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_vs.glsl @@ -29,8 +29,7 @@ layout(location = 0) in vec4 in_position; out vec3 interpolatedNDCPos; out vec2 texCoord; -void main() -{ +void main() { texCoord = 0.5 + in_position.xy * 0.5; interpolatedNDCPos = in_position.xyz; gl_Position = in_position; diff --git a/modules/atmosphere/shaders/deltaE_calc_fs.glsl b/modules/atmosphere/shaders/deltaE_calc_fs.glsl index cb93a3284b..fe0163b6b2 100644 --- a/modules/atmosphere/shaders/deltaE_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaE_calc_fs.glsl @@ -21,12 +21,13 @@ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ + #version __CONTEXT__ #include "atmosphere_common.glsl" out vec4 renderTableColor; -void main(void) { +void main() { renderTableColor = vec4(0.0, 0.0, 0.0, 1.0); } diff --git a/modules/atmosphere/shaders/deltaJ_calc_fs.glsl b/modules/atmosphere/shaders/deltaJ_calc_fs.glsl index 4feb9ff872..badfa8934d 100644 --- a/modules/atmosphere/shaders/deltaJ_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaJ_calc_fs.glsl @@ -97,7 +97,7 @@ void inscatter(float r, float mu, float muSun, float nu, inout vec3 radianceJ) { // In order to integrate over 4PI, we scan the sphere using the spherical coordinates // previously defined - for ( int theta_i = 0; theta_i < INSCATTER_SPHERICAL_INTEGRAL_SAMPLES; ++theta_i ) { + for (int theta_i = 0; theta_i < INSCATTER_SPHERICAL_INTEGRAL_SAMPLES; ++theta_i) { float theta = (float(theta_i) + 0.5f) * stepTheta; float cosineTheta = cos(theta); float cosineTheta2 = cosineTheta * cosineTheta; @@ -133,7 +133,7 @@ void inscatter(float r, float mu, float muSun, float nu, inout vec3 radianceJ) { groundTransmittance = transmittance(Rg, muGround, distanceToGround); } //for ( int phi_i = 0; phi_i < 2*INSCATTER_SPHERICAL_INTEGRAL_SAMPLES; ++phi_i ) { - for ( int phi_i = 0; phi_i < INSCATTER_SPHERICAL_INTEGRAL_SAMPLES; ++phi_i ) { + for (int phi_i = 0; phi_i < INSCATTER_SPHERICAL_INTEGRAL_SAMPLES; ++phi_i) { float phi = (float(phi_i) + 0.5) * stepPhi; // spherical coordinates: dw = dtheta*dphi*sin(theta)*rho^2 // rho = 1, we are integrating over a unit sphere @@ -190,7 +190,7 @@ void inscatter(float r, float mu, float muSun, float nu, inout vec3 radianceJ) { } } -void main(void) { +void main() { // cosine variables to access deltaS textures float mu, muSun, nu; // InScattering Radiance to be calculated at diff --git a/modules/atmosphere/shaders/deltaJ_calc_gs.glsl b/modules/atmosphere/shaders/deltaJ_calc_gs.glsl index c68c70a4b3..aea1c7db4d 100644 --- a/modules/atmosphere/shaders/deltaJ_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaJ_calc_gs.glsl @@ -29,13 +29,11 @@ uniform int layer; layout (triangles) in; layout (triangle_strip, max_vertices = 3) out; -void main() -{ - int n; - for (n = 0; n < gl_in.length(); ++n) { +void main() { + for (int n = 0; n < gl_in.length(); ++n) { gl_Position = gl_in[n].gl_Position; gl_Layer = layer; EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/deltaS_calc_fs.glsl b/modules/atmosphere/shaders/deltaS_calc_fs.glsl index b57dde9e8c..d337cb18bf 100644 --- a/modules/atmosphere/shaders/deltaS_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_fs.glsl @@ -33,7 +33,7 @@ uniform int layer; uniform sampler3D deltaSRTexture; uniform sampler3D deltaSMTexture; -void main(void) { +void main() { // First we convert the window's fragment coordinate to // texel coordinates vec3 rst = vec3(gl_FragCoord.xy, float(layer) + 0.5f) / diff --git a/modules/atmosphere/shaders/deltaS_calc_gs.glsl b/modules/atmosphere/shaders/deltaS_calc_gs.glsl index c68c70a4b3..aea1c7db4d 100644 --- a/modules/atmosphere/shaders/deltaS_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_gs.glsl @@ -29,13 +29,11 @@ uniform int layer; layout (triangles) in; layout (triangle_strip, max_vertices = 3) out; -void main() -{ - int n; - for (n = 0; n < gl_in.length(); ++n) { +void main() { + for (int n = 0; n < gl_in.length(); ++n) { gl_Position = gl_in[n].gl_Position; gl_Layer = layer; EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/deltaS_calc_vs.glsl b/modules/atmosphere/shaders/deltaS_calc_vs.glsl index d5a1e43e38..1ca953fe3c 100644 --- a/modules/atmosphere/shaders/deltaS_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaS_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl index ab60653deb..31e6b6670f 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_fs.glsl @@ -32,7 +32,7 @@ uniform int layer; uniform sampler3D deltaSTexture; -void main(void) { +void main() { float x = gl_FragCoord.x - 0.5f; float y = gl_FragCoord.y - 0.5f; diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl index 41e9bed127..7cccacb76a 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_gs.glsl @@ -29,13 +29,11 @@ uniform int layer; layout (triangles) in; layout (triangle_strip, max_vertices = 3) out; -void main() -{ - int n; - for (n = 0; n < gl_in.length(); ++n) { +void main() { + for (int n = 0; n < gl_in.length(); ++n) { gl_Position = gl_in[n].gl_Position; gl_Layer = layer; EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl b/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl index 255f2b1610..deb9073c8f 100644 --- a/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/deltaS_sup_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/inScattering_calc_fs.glsl b/modules/atmosphere/shaders/inScattering_calc_fs.glsl index 544b2374a3..be7281bda3 100644 --- a/modules/atmosphere/shaders/inScattering_calc_fs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_fs.glsl @@ -33,8 +33,8 @@ uniform vec4 dhdH; //uniform sampler2D transmittanceTexture; -void integrand(const float r, const float mu, const float muSun, const float nu, - const float y, out vec3 S_R, out vec3 S_M) { +void integrand(float r, float mu, float muSun, float nu, + float y, out vec3 S_R, out vec3 S_M) { // The integral's integrand is the single inscattering radiance: // S[L0] = P_M*S_M[L0] + P_R*S_R[L0] // where S_M[L0] = T*(betaMScattering * exp(-h/H_M))*L0 and @@ -77,8 +77,7 @@ void integrand(const float r, const float mu, const float muSun, const float nu, } } -void inscatter(const float r, const float mu, const float muSun, const float nu, - out vec3 S_R, out vec3 S_M) { +void inscatter(float r, float mu, float muSun, float nu, out vec3 S_R, out vec3 S_M) { // Let's calculate S_M and S_R by integration along the eye ray path inside // the atmosphere, given a position r, a view angle (cosine) mu, a sun // position angle (cosine) muSun, and the angle (cosine) between the sun position @@ -108,7 +107,7 @@ void inscatter(const float r, const float mu, const float muSun, const float nu, S_M *= betaMieScattering * (rayDist / (2.0f * float(INSCATTER_INTEGRAL_SAMPLES))); } -void main(void) { +void main() { vec3 S_R; // First Order Rayleigh InScattering vec3 S_M; // First Order Mie InScattering float mu, muSun, nu; // parametrization angles diff --git a/modules/atmosphere/shaders/inScattering_calc_gs.glsl b/modules/atmosphere/shaders/inScattering_calc_gs.glsl index 1cb4db902e..823cd6a71e 100644 --- a/modules/atmosphere/shaders/inScattering_calc_gs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_gs.glsl @@ -29,13 +29,11 @@ uniform int layer; layout (triangles) in; layout (triangle_strip, max_vertices=3) out; -void main() -{ - int n; - for (n = 0; n < gl_in.length(); ++n) { +void main() { + for (int n = 0; n < gl_in.length(); ++n) { gl_Position = gl_in[n].gl_Position; gl_Layer = layer; EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/inScattering_calc_vs.glsl b/modules/atmosphere/shaders/inScattering_calc_vs.glsl index d5a1e43e38..1ca953fe3c 100644 --- a/modules/atmosphere/shaders/inScattering_calc_vs.glsl +++ b/modules/atmosphere/shaders/inScattering_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl index ab7c793384..81377100bc 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_fs.glsl @@ -35,7 +35,7 @@ uniform vec4 dhdH; uniform sampler3D deltaJTexture; // The integrand here is the f(y) of the trapezoidal rule: -vec3 integrand(const float r, const float mu, const float muSun, const float nu, const float dist) { +vec3 integrand(float r, float mu, float muSun, float nu, float dist) { // We can calculate r_i by the cosine law: r_i^2=dist^2 + r^2 - 2*r*dist*cos(PI-theta) float r_i = sqrt(r * r + dist * dist + 2.0f * r * dist * mu); // r_i can be found using the dot product: @@ -68,7 +68,7 @@ vec3 inscatter(float r, float mu, float muSun, float nu) { return inScatteringRadiance; } -void main(void) { +void main() { float mu = 0.0f, muSunun = 0.0f, nu = 0.0f; // Unmapping the variables from texture texels coordinates // to mapped coordinates diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl index 41e9bed127..7cccacb76a 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_gs.glsl @@ -29,13 +29,11 @@ uniform int layer; layout (triangles) in; layout (triangle_strip, max_vertices = 3) out; -void main() -{ - int n; - for (n = 0; n < gl_in.length(); ++n) { +void main() { + for (int n = 0; n < gl_in.length(); ++n) { gl_Position = gl_in[n].gl_Position; gl_Layer = layer; EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl b/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl index 255f2b1610..deb9073c8f 100644 --- a/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/inScattering_sup_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/irradiance_calc_fs.glsl b/modules/atmosphere/shaders/irradiance_calc_fs.glsl index 67a862b8b7..94ea44c834 100644 --- a/modules/atmosphere/shaders/irradiance_calc_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_calc_fs.glsl @@ -29,7 +29,7 @@ out vec4 renderTableColor; //uniform sampler2D transmittanceTexture; -void main(void) { +void main() { float muSun, r; unmappingRAndMuSun(r, muSun); // We are calculating the Irradiance for L0, i.e., diff --git a/modules/atmosphere/shaders/irradiance_calc_vs.glsl b/modules/atmosphere/shaders/irradiance_calc_vs.glsl index d5a1e43e38..1ca953fe3c 100644 --- a/modules/atmosphere/shaders/irradiance_calc_vs.glsl +++ b/modules/atmosphere/shaders/irradiance_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/irradiance_final_fs.glsl b/modules/atmosphere/shaders/irradiance_final_fs.glsl index 94dc168ab0..f21d74bdba 100644 --- a/modules/atmosphere/shaders/irradiance_final_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_final_fs.glsl @@ -30,7 +30,7 @@ out vec4 renderTableColor; uniform sampler2D deltaETexture; -void main(void) { +void main() { vec2 uv = gl_FragCoord.xy / vec2(OTHER_TEXTURES_W, OTHER_TEXTURES_H); // Update texture E with E plus deltaE textures. diff --git a/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl b/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl index fcb27b7a9a..5ac81a7406 100644 --- a/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl +++ b/modules/atmosphere/shaders/irradiance_sup_calc_fs.glsl @@ -39,8 +39,7 @@ const float stepTheta = M_PI / (2.0f * float(IRRADIANCE_INTEGRAL_SAMPLES)); uniform sampler3D deltaSRTexture; uniform sampler3D deltaSMTexture; -void main(void) { - +void main() { float r = 0.0f; float muSun = 0.0f; // Unmapping the variables from texture texels coordinates diff --git a/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl b/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl index d5a1e43e38..1ca953fe3c 100644 --- a/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl +++ b/modules/atmosphere/shaders/irradiance_sup_calc_vs.glsl @@ -28,4 +28,4 @@ layout(location = 0) in vec3 in_position; void main() { gl_Position = vec4(in_position, 1.0); -} \ No newline at end of file +} diff --git a/modules/atmosphere/shaders/transmittance_calc_fs.glsl b/modules/atmosphere/shaders/transmittance_calc_fs.glsl index 6e887667bc..0c1dddd0ff 100644 --- a/modules/atmosphere/shaders/transmittance_calc_fs.glsl +++ b/modules/atmosphere/shaders/transmittance_calc_fs.glsl @@ -35,7 +35,7 @@ out vec4 renderTableColor; // mu := cosine of the zeith angle of vec(v). Or mu = (vec(x) * vec(v))/r // H := Thickness of atmosphere if its density were uniform (can be used // for Rayleigh and Mie. -float opticalDepth(const float r, const float mu, const float H) { +float opticalDepth(float r, float mu, float H) { float r2 = r*r; // Is ray below horizon? The transmittance table will have only // the values for transmittance starting at r (x) until the @@ -71,9 +71,8 @@ float opticalDepth(const float r, const float mu, const float H) { } -void main(void) { +void main() { float r, muSun; - unmappingRAndMu(r, muSun); vec3 opDepth = vec3(0.0); @@ -88,5 +87,5 @@ void main(void) { betaRayleigh * opticalDepth(r, muSun, HR); } - renderTableColor = vec4( exp( -opDepth ), 0.0f ); + renderTableColor = vec4(exp(-opDepth), 0.0f); } diff --git a/modules/base/shaders/axes_fs.glsl b/modules/base/shaders/axes_fs.glsl index 037b07aac5..6bbcd9b84b 100644 --- a/modules/base/shaders/axes_fs.glsl +++ b/modules/base/shaders/axes_fs.glsl @@ -23,7 +23,6 @@ ****************************************************************************************/ #include "fragment.glsl" -#include "PowerScaling/powerScaling_fs.hglsl" in float vs_screenSpaceDepth; in vec4 vs_positionViewSpace; diff --git a/modules/base/shaders/grid_fs.glsl b/modules/base/shaders/grid_fs.glsl index 6e0e2cdcab..06d83fa764 100644 --- a/modules/base/shaders/grid_fs.glsl +++ b/modules/base/shaders/grid_fs.glsl @@ -23,7 +23,6 @@ ****************************************************************************************/ #include "fragment.glsl" -#include "PowerScaling/powerScaling_fs.hglsl" in float vs_depthClipSpace; in vec4 vs_positionViewSpace; diff --git a/modules/base/shaders/grid_vs.glsl b/modules/base/shaders/grid_vs.glsl index beb95e9059..30351ea566 100644 --- a/modules/base/shaders/grid_vs.glsl +++ b/modules/base/shaders/grid_vs.glsl @@ -24,8 +24,6 @@ #version __CONTEXT__ -#include "PowerScaling/powerScaling_vs.hglsl" - layout(location = 0) in vec3 in_position; out float vs_depthClipSpace; diff --git a/modules/digitaluniverse/shaders/billboard_gs.glsl b/modules/digitaluniverse/shaders/billboard_gs.glsl index 347a936ad8..e2f7fb4fc7 100644 --- a/modules/digitaluniverse/shaders/billboard_gs.glsl +++ b/modules/digitaluniverse/shaders/billboard_gs.glsl @@ -194,4 +194,4 @@ void main() { EmitVertex(); EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl b/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl index eb3a64fb8c..bcea223fd0 100644 --- a/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl +++ b/modules/digitaluniverse/shaders/billboardpolygon_fs.glsl @@ -21,13 +21,13 @@ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ + #version __CONTEXT__ out vec4 finalColor; uniform vec3 polygonColor; -void main(void) { - +void main() { finalColor = vec4(polygonColor, 1.0 ); } diff --git a/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl b/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl index 37cdbbd65a..2bd88f5b90 100644 --- a/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl +++ b/modules/digitaluniverse/shaders/billboardpolygon_gs.glsl @@ -32,8 +32,7 @@ uniform int sides; const float PI = 3.1415926; -void main() -{ +void main() { // for (int i = 0; i <= sides; i++) { // // Angle between each side in radians // float ang = PI * 2.0 / float(sides) * i; @@ -71,4 +70,4 @@ void main() EndPrimitive(); } -} \ No newline at end of file +} diff --git a/modules/digitaluniverse/shaders/points_gs.glsl b/modules/digitaluniverse/shaders/points_gs.glsl index 1a3899336f..dc074d0484 100644 --- a/modules/digitaluniverse/shaders/points_gs.glsl +++ b/modules/digitaluniverse/shaders/points_gs.glsl @@ -38,8 +38,7 @@ out float gs_screenSpaceDepth; const float PI = 3.1415926; -void main() -{ +void main() { gs_screenSpaceDepth = vs_screenSpaceDepth[0]; for (int i = 0; i <= sides; i++) { @@ -61,4 +60,4 @@ void main() //EmitVertex(); EndPrimitive(); -} \ No newline at end of file +} diff --git a/modules/digitaluniverse/shaders/points_sprite_fs.glsl b/modules/digitaluniverse/shaders/points_sprite_fs.glsl index 9aea46b03c..03fdcfd916 100644 --- a/modules/digitaluniverse/shaders/points_sprite_fs.glsl +++ b/modules/digitaluniverse/shaders/points_sprite_fs.glsl @@ -30,7 +30,6 @@ in float vs_screenSpaceDepth; uniform vec3 color; uniform float alphaValue; -// Sprite uniform sampler2D spriteTexture; Fragment getFragment() { diff --git a/modules/exoplanets/shaders/orbitdisc_fs.glsl b/modules/exoplanets/shaders/orbitdisc_fs.glsl index 7e62e31206..416536b69e 100644 --- a/modules/exoplanets/shaders/orbitdisc_fs.glsl +++ b/modules/exoplanets/shaders/orbitdisc_fs.glsl @@ -111,7 +111,7 @@ Fragment getFragment() { // Scale texture coordinate to handle asymmetric offset intervals float textureMid = offsetUpper / offsetIntervalSize; - if(textureCoord > textureMid) { + if (textureCoord > textureMid) { textureCoord = 0.5 + 0.5 * (textureCoord - textureMid) / (1.0 - textureMid); } else { diff --git a/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl b/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl index 518dd214f4..4afde1c7c2 100644 --- a/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl +++ b/modules/fieldlinessequence/shaders/fieldlinessequence_fs.glsl @@ -29,6 +29,7 @@ in float vs_depth; uniform bool usingAdditiveBlending; + Fragment getFragment() { if (vs_color.a == 0) { discard; @@ -46,8 +47,6 @@ Fragment getFragment() { // TODO: Add the correct normal if necessary (JCC) frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0); - - if (usingAdditiveBlending) { frag.blend = BLEND_MODE_ADDITIVE; } diff --git a/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl b/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl index c6686ace94..75157cd9c9 100644 --- a/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl +++ b/modules/fieldlinessequence/shaders/fieldlinessequence_vs.glsl @@ -72,18 +72,19 @@ vec4 getTransferFunctionColor() { return texture(colorTable, lookUpVal); } -bool isPartOfParticle(const double time, const int vertexId, const int particleSize, - const int particleSpeed, const int particleSpacing) { +bool isPartOfParticle(double time, int vertexId, int particleSize, + int particleSpeed, int particleSpacing) +{ int modulusResult = int(double(particleSpeed) * time + vertexId) % particleSpacing; return modulusResult > 0 && modulusResult <= particleSize; } void main() { - bool hasColor = true; if (usingMasking && (in_masking_scalar < maskingRange.x || - in_masking_scalar > maskingRange.y )) { + in_masking_scalar > maskingRange.y )) + { hasColor = false; } @@ -93,8 +94,8 @@ void main() { if (in_position.x < domainLimX.x || in_position.x > domainLimX.y || in_position.y < domainLimY.x || in_position.y > domainLimY.y || in_position.z < domainLimZ.x || in_position.z > domainLimZ.y || - radius < domainLimR.x || radius > domainLimR.y) { - + radius < domainLimR.x || radius > domainLimR.y) + { hasColor = false; } } diff --git a/modules/gaia/shaders/gaia_billboard_fs.glsl b/modules/gaia/shaders/gaia_billboard_fs.glsl index 53179cf086..fd11914e7e 100644 --- a/modules/gaia/shaders/gaia_billboard_fs.glsl +++ b/modules/gaia/shaders/gaia_billboard_fs.glsl @@ -60,7 +60,6 @@ vec3 color2rgb(float color) { } void main() { - // Assume all stars has equal luminosity as the Sun when no magnitude is loaded. float luminosity = 0.05; vec3 color = vec3(luminosity); diff --git a/modules/gaia/shaders/gaia_billboard_ge.glsl b/modules/gaia/shaders/gaia_billboard_ge.glsl index 7fc381e09e..fb894c44cc 100644 --- a/modules/gaia/shaders/gaia_billboard_ge.glsl +++ b/modules/gaia/shaders/gaia_billboard_ge.glsl @@ -67,7 +67,6 @@ const vec2 corners[4] = vec2[4]( void main() { - ge_brightness = vs_brightness[0]; ge_starDistFromSun = vs_starDistFromSun[0]; ge_cameraDistFromSun = vs_cameraDistFromSun[0]; @@ -80,7 +79,7 @@ void main() { float initStarSize = billboardSize; // Use magnitude for size boost as well. - if ( renderOption != RENDEROPTION_STATIC ) { + if (renderOption != RENDEROPTION_STATIC) { // DR1 magnitudes are [4, 20], but could be [-15, 20] according to this chart: // https://qph.fs.quoracdn.net/main-qimg-317a18e3b228efc7d7f67a1632a55961 // Negative magnitude => Giants diff --git a/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl b/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl index 3b439f1564..a350a561ae 100644 --- a/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl +++ b/modules/gaia/shaders/gaia_billboard_nofbo_fs.glsl @@ -57,7 +57,6 @@ vec3 color2rgb(float color) { } Fragment getFragment() { - // Assume all stars has equal luminosity as the Sun when no magnitude is loaded. float luminosity = 1.0; vec3 color = vec3(luminosity); @@ -70,7 +69,7 @@ Fragment getFragment() { } // Calculate the color and luminosity if we have the magnitude and B-V color. - if ( renderOption != RENDEROPTION_STATIC ) { + if (renderOption != RENDEROPTION_STATIC) { color = color2rgb(ge_brightness.y); ratioMultiplier = 0.5; @@ -95,7 +94,7 @@ Fragment getFragment() { color *= luminosity * pow(luminosityMultiplier, 3.0); // Decrease contributing brightness for stars in central cluster. - if ( ge_cameraDistFromSun > ge_starDistFromSun ) { + if (ge_cameraDistFromSun > ge_starDistFromSun) { float ratio = ge_starDistFromSun / ge_cameraDistFromSun; //color *= ratio * ratioMultiplier; } @@ -120,4 +119,3 @@ Fragment getFragment() { return frag; } - diff --git a/modules/gaia/shaders/gaia_point_fs.glsl b/modules/gaia/shaders/gaia_point_fs.glsl index 1277f9d589..a8402a6d02 100644 --- a/modules/gaia/shaders/gaia_point_fs.glsl +++ b/modules/gaia/shaders/gaia_point_fs.glsl @@ -57,14 +57,13 @@ vec3 color2rgb(float color) { } void main() { - // Assume all stars has equal luminosity as the Sun when no magnitude is loaded. float luminosity = 0.05; vec3 color = vec3(luminosity); float ratioMultiplier = 1.0; // Calculate the color and luminosity if we have the magnitude and B-V color. - if ( renderOption != RENDEROPTION_STATIC ) { + if (renderOption != RENDEROPTION_STATIC) { color = color2rgb(ge_brightness.y); ratioMultiplier = 0.01; @@ -89,7 +88,7 @@ void main() { color *= luminosity * pow(luminosityMultiplier, 3.0); // Decrease contributing brightness for stars in central cluster. - if ( ge_cameraDistFromSun > ge_starDistFromSun ) { + if (ge_cameraDistFromSun > ge_starDistFromSun) { float ratio = ge_starDistFromSun / ge_cameraDistFromSun; //color *= ratio * ratioMultiplier; } diff --git a/modules/gaia/shaders/gaia_point_ge.glsl b/modules/gaia/shaders/gaia_point_ge.glsl index f6dc071fd2..553917ec86 100644 --- a/modules/gaia/shaders/gaia_point_ge.glsl +++ b/modules/gaia/shaders/gaia_point_ge.glsl @@ -46,7 +46,6 @@ uniform float viewScaling; uniform float cutOffThreshold; void main() { - ge_brightness = vs_brightness[0]; ge_starDistFromSun = vs_starDistFromSun[0]; ge_cameraDistFromSun = vs_cameraDistFromSun[0]; diff --git a/modules/gaia/shaders/gaia_ssbo_vs.glsl b/modules/gaia/shaders/gaia_ssbo_vs.glsl index 00db0a2361..67b09bdbdd 100644 --- a/modules/gaia/shaders/gaia_ssbo_vs.glsl +++ b/modules/gaia/shaders/gaia_ssbo_vs.glsl @@ -67,8 +67,7 @@ uniform vec2 distThreshold; // Use binary search to find the chunk containing our star ID. int findChunkId(int left, int right, int id) { - - while ( left <= right ) { + while (left <= right) { int middle = (left + right) / 2; int firstStarInChunk = starsPerChunk[middle]; if (left == right || (firstStarInChunk <= id && id < starsPerChunk[middle+1])) { @@ -111,14 +110,15 @@ void main() { vec3 in_velocity = vec3(0.0); // Check if we should filter this star by position. - if ( (abs(posXThreshold.x) > EPS && in_position.x < posXThreshold.x) || + if ((abs(posXThreshold.x) > EPS && in_position.x < posXThreshold.x) || (abs(posXThreshold.y) > EPS && in_position.x > posXThreshold.y) || (abs(posYThreshold.x) > EPS && in_position.y < posYThreshold.x) || (abs(posYThreshold.y) > EPS && in_position.y > posYThreshold.y) || (abs(posZThreshold.x) > EPS && in_position.z < posZThreshold.x) || (abs(posZThreshold.y) > EPS && in_position.z > posZThreshold.y) || (abs(distThreshold.x - distThreshold.y) < EPS - && abs(length(in_position) - distThreshold.y) < EPS) ) { + && abs(length(in_position) - distThreshold.y) < EPS)) + { // Discard star in geometry shader. vs_gPosition = vec4(0.0); gl_Position = vec4(0.0); @@ -126,24 +126,25 @@ void main() { } - if ( renderOption != RENDEROPTION_STATIC ) { + if (renderOption != RENDEROPTION_STATIC) { int startOfCol = firstStarInChunk + nStarsInChunk * 3 + placeInChunk * 2; in_brightness = vec2(allData[startOfCol], allData[startOfCol + 1]); // Check if we should filter this star by magnitude or color. - if ( (abs(gMagThreshold.x - gMagThreshold.y) < EPS && abs(gMagThreshold.x - in_brightness.x) < EPS) || + if ((abs(gMagThreshold.x - gMagThreshold.y) < EPS && abs(gMagThreshold.x - in_brightness.x) < EPS) || (abs(gMagThreshold.x - 20.0f) > EPS && in_brightness.x < gMagThreshold.x) || (abs(gMagThreshold.y - 20.0f) > EPS && in_brightness.x > gMagThreshold.y) || (abs(bpRpThreshold.x - bpRpThreshold.y) < EPS && abs(bpRpThreshold.x - in_brightness.y) < EPS) || (abs(bpRpThreshold.x) > EPS && in_brightness.y < bpRpThreshold.x) || - (abs(bpRpThreshold.y) > EPS && in_brightness.y > bpRpThreshold.y) ) { + (abs(bpRpThreshold.y) > EPS && in_brightness.y > bpRpThreshold.y)) + { // Discard star in geometry shader. vs_gPosition = vec4(0.0); gl_Position = vec4(0.0); return; } - if ( renderOption == RENDEROPTION_MOTION ) { + if (renderOption == RENDEROPTION_MOTION) { int startOfVel = firstStarInChunk + nStarsInChunk * 5 + placeInChunk * 3; in_velocity = vec3(allData[startOfVel], allData[startOfVel + 1], allData[startOfVel + 2]); } @@ -157,10 +158,11 @@ void main() { objectPosition.xyz += time * in_velocity; // Thres moving stars by their new position. - float distPosition = length(objectPosition.xyz / (1000.0 * Parsec) ); - if ( (abs(distThreshold.x - distThreshold.y) > EPS && + float distPosition = length(objectPosition.xyz / (1000.0 * Parsec)); + if ((abs(distThreshold.x - distThreshold.y) > EPS && ((abs(distThreshold.x) > EPS && distPosition < distThreshold.x) || - (abs(distThreshold.y) > EPS && distPosition > distThreshold.y))) ) { + (abs(distThreshold.y) > EPS && distPosition > distThreshold.y)))) + { // Discard star in geometry shader. vs_gPosition = vec4(0.0); gl_Position = vec4(0.0); @@ -176,7 +178,7 @@ void main() { // Remove stars without position, happens when VBO chunk is stuffed with zeros. // Has to be done in Geometry shader because Vertices cannot be discarded here. - if ( length(in_position) > EPS ){ + if (length(in_position) > EPS){ vs_gPosition = vec4(model * objectPosition); gl_Position = vec4(projection * viewPosition); } diff --git a/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl b/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl index f84450bccf..f69f3e3b00 100644 --- a/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl +++ b/modules/gaia/shaders/gaia_tonemapping_billboard_fs.glsl @@ -32,7 +32,6 @@ const float DEFAULT_DEPTH = 3.08567758e19; // 1000 Pc Fragment getFragment() { - vec4 color = vec4(0.0); // BILLBOARDS diff --git a/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl b/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl index 2bff48de8d..c6c0f45539 100644 --- a/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl +++ b/modules/gaia/shaders/gaia_tonemapping_point_fs.glsl @@ -37,7 +37,6 @@ const float M_PI = 3.141592653589793238462; const float DEFAULT_DEPTH = 3.08567758e19; // 1000 Pc Fragment getFragment() { - vec4 color = vec4(0.0); // GL_POINTS diff --git a/modules/gaia/shaders/gaia_vbo_vs.glsl b/modules/gaia/shaders/gaia_vbo_vs.glsl index 281eea7157..e2e5cf1b29 100644 --- a/modules/gaia/shaders/gaia_vbo_vs.glsl +++ b/modules/gaia/shaders/gaia_vbo_vs.glsl @@ -59,7 +59,7 @@ void main() { vs_brightness = in_brightness; // Check if we should filter this star by position. Thres depending on original values. - if ( (abs(posXThreshold.x) > EPS && in_position.x < posXThreshold.x) || + if ((abs(posXThreshold.x) > EPS && in_position.x < posXThreshold.x) || (abs(posXThreshold.y) > EPS && in_position.x > posXThreshold.y) || (abs(posYThreshold.x) > EPS && in_position.y < posYThreshold.x) || (abs(posYThreshold.y) > EPS && in_position.y > posYThreshold.y) || @@ -73,7 +73,8 @@ void main() { (abs(gMagThreshold.y - 20.0f) > EPS && in_brightness.x > gMagThreshold.y) || (abs(bpRpThreshold.x - bpRpThreshold.y) < EPS && abs(bpRpThreshold.x - in_brightness.y) < EPS) || (abs(bpRpThreshold.x) > EPS && in_brightness.y < bpRpThreshold.x) || - (abs(bpRpThreshold.y) > EPS && in_brightness.y > bpRpThreshold.y))) ) { + (abs(bpRpThreshold.y) > EPS && in_brightness.y > bpRpThreshold.y)))) + { // Discard star in geometry shader. vs_gPosition = vec4(0.0); gl_Position = vec4(0.0); @@ -84,16 +85,17 @@ void main() { vec4 objectPosition = vec4(in_position * 1000 * Parsec, 1.0); // Add velocity if we've read any. - if ( renderOption == RENDEROPTION_MOTION ) { + if (renderOption == RENDEROPTION_MOTION) { // Velocity is already in [m/s]. objectPosition.xyz += time * in_velocity; } // Thres moving stars by their new position. float distPosition = length(objectPosition.xyz / (1000.0 * Parsec) ); - if ( (abs(distThreshold.x - distThreshold.y) > EPS && + if ((abs(distThreshold.x - distThreshold.y) > EPS && ((abs(distThreshold.x) > EPS && distPosition< distThreshold.x) || - (abs(distThreshold.y) > EPS && distPosition > distThreshold.y))) ) { + (abs(distThreshold.y) > EPS && distPosition > distThreshold.y)))) + { // Discard star in geometry shader. vs_gPosition = vec4(0.0); gl_Position = vec4(0.0); @@ -109,7 +111,7 @@ void main() { // Remove stars without position, happens when VBO chunk is stuffed with zeros. // Has to be done in Geometry shader because Vertices cannot be discarded here. - if ( length(in_position) > EPS ){ + if (length(in_position) > EPS) { vs_gPosition = vec4(model * objectPosition); gl_Position = vec4(projection * viewPosition); } diff --git a/modules/galaxy/shaders/billboard_vs.glsl b/modules/galaxy/shaders/billboard_vs.glsl index 813bd111c7..36e1cb8f56 100644 --- a/modules/galaxy/shaders/billboard_vs.glsl +++ b/modules/galaxy/shaders/billboard_vs.glsl @@ -30,7 +30,6 @@ layout(location = 1) in vec3 in_color; out vec3 vs_color; void main() { - vs_color = in_color; - - gl_Position = vec4(in_position, 1.0); + vs_color = in_color; + gl_Position = vec4(in_position, 1.0); } diff --git a/modules/galaxy/shaders/points_vs.glsl b/modules/galaxy/shaders/points_vs.glsl index bd5f43daca..9b7612e4c5 100644 --- a/modules/galaxy/shaders/points_vs.glsl +++ b/modules/galaxy/shaders/points_vs.glsl @@ -41,18 +41,18 @@ uniform dvec3 eyePosition; const double PARSEC = 3.08567756E16; void main() { - vs_position = vec4(in_position, 1.0); - dvec4 dpos = dvec4(vs_position); + vs_position = vec4(in_position, 1.0); + dvec4 dpos = dvec4(vs_position); - double distanceToStar = length((dpos.xyz - eyePosition)); - vs_starBrightness = clamp(float(8000*PARSEC/distanceToStar), 0.0, 1.0); + double distanceToStar = length((dpos.xyz - eyePosition)); + vs_starBrightness = clamp(float(8000*PARSEC/distanceToStar), 0.0, 1.0); - dpos.xyz *= 8.0; - dpos = modelMatrix * dpos; - dpos /= PARSEC; + dpos.xyz *= 8.0; + dpos = modelMatrix * dpos; + dpos /= PARSEC; - vec4 positionScreenSpace = z_normalization(vec4(cameraViewProjectionMatrix * dpos)); - vs_color = in_color; - vs_screenSpaceDepth = positionScreenSpace.w; - gl_Position = positionScreenSpace; + vec4 positionScreenSpace = z_normalization(vec4(cameraViewProjectionMatrix * dpos)); + vs_color = in_color; + vs_screenSpaceDepth = positionScreenSpace.w; + gl_Position = positionScreenSpace; } diff --git a/modules/globebrowsing/shaders/renderer_fs.glsl b/modules/globebrowsing/shaders/renderer_fs.glsl index fe525ed874..09d291cc93 100644 --- a/modules/globebrowsing/shaders/renderer_fs.glsl +++ b/modules/globebrowsing/shaders/renderer_fs.glsl @@ -1,300 +1,300 @@ - /***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2021 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2021 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ - #include "fragment.glsl" +#include "fragment.glsl" - #include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl> - #include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl> - #include <${MODULE_GLOBEBROWSING}/shaders/tileheight.hglsl> - #include "PowerScaling/powerScaling_fs.hglsl" +#include <${MODULE_GLOBEBROWSING}/shaders/tile.hglsl> +#include <${MODULE_GLOBEBROWSING}/shaders/texturetilemapping.hglsl> +#include <${MODULE_GLOBEBROWSING}/shaders/tileheight.hglsl> +#include "PowerScaling/powerScaling_fs.hglsl" - // Below are all the tiles that are used for contributing the actual fragment color +// Below are all the tiles that are used for contributing the actual fragment color - #if USE_COLORTEXTURE - uniform Layer ColorLayers[NUMLAYERS_COLORTEXTURE]; - #endif // USE_COLORTEXTURE +#if USE_COLORTEXTURE +uniform Layer ColorLayers[NUMLAYERS_COLORTEXTURE]; +#endif // USE_COLORTEXTURE - #if USE_NIGHTTEXTURE - uniform Layer NightLayers[NUMLAYERS_NIGHTTEXTURE]; - #endif // USE_NIGHTTEXTURE +#if USE_NIGHTTEXTURE +uniform Layer NightLayers[NUMLAYERS_NIGHTTEXTURE]; +#endif // USE_NIGHTTEXTURE - #if USE_OVERLAY - uniform Layer Overlays[NUMLAYERS_OVERLAY]; - #endif // USE_OVERLAY +#if USE_OVERLAY +uniform Layer Overlays[NUMLAYERS_OVERLAY]; +#endif // USE_OVERLAY - #if USE_WATERMASK - uniform Layer WaterMasks[NUMLAYERS_WATERMASK]; - #endif // USE_WATERMASK +#if USE_WATERMASK +uniform Layer WaterMasks[NUMLAYERS_WATERMASK]; +#endif // USE_WATERMASK - #if SHOW_HEIGHT_RESOLUTION - uniform vec2 vertexResolution; +#if SHOW_HEIGHT_RESOLUTION +uniform vec2 vertexResolution; +#endif + +//#if USE_NIGHTTEXTURE || USE_WATERMASK || PERFORM_SHADING +uniform vec3 lightDirectionCameraSpace; +//#endif + +#if PERFORM_SHADING +uniform float orenNayarRoughness; +#endif + +#if SHADOW_MAPPING_ENABLED + +#define NSSamplesMinusOne #{nShadowSamples} +#define NSSamples (NSSamplesMinusOne + 1) + +in vec4 shadowCoords; +uniform sampler2DShadow shadowMapTexture; +uniform float zFightingPercentage; +#endif + +#if USE_ECLIPSE_SHADOWS + + +#define NSEclipseShadowsMinusOne #{nEclipseShadows} +#define NSEclipseShadows (NSEclipseShadowsMinusOne + 1) + +/******************************************************************************* + ***** ALL CALCULATIONS FOR ECLIPSE ARE IN METERS AND IN WORLD SPACE SYSTEM **** + *******************************************************************************/ +struct ShadowRenderingStruct { + double xu, xp; + double rs, rc; + dvec3 sourceCasterVec; + dvec3 casterPositionVec; + bool isShadowing; +}; + +// Eclipse shadow data +// JCC: Remove and use dictionary to +// decides the number of shadows +uniform ShadowRenderingStruct shadowDataArray[NSEclipseShadows]; +uniform int shadows; +uniform bool hardShadows; + +vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[NSEclipseShadows], + const dvec3 position, const bool ground) +{ + #for i in 0..#{nEclipseShadows} + if (shadowInfoArray[#{i}].isShadowing) { + dvec3 pc = shadowInfoArray[#{i}].casterPositionVec - position; + dvec3 sc_norm = shadowInfoArray[#{i}].sourceCasterVec; + dvec3 pc_proj = dot(pc, sc_norm) * sc_norm; + dvec3 d = pc - pc_proj; + + + float length_d = float(length(d)); + double length_pc_proj = length(pc_proj); + + float r_p_pi = float(shadowInfoArray[#{i}].rc * (length_pc_proj + shadowInfoArray[#{i}].xp) / shadowInfoArray[#{i}].xp); + float r_u_pi = float(shadowInfoArray[#{i}].rc * (shadowInfoArray[#{i}].xu - length_pc_proj) / shadowInfoArray[#{i}].xu); + + if (length_d < r_u_pi) { // umbra + if (ground) { + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.2, 0.2, 0.2, 1.0); + #else + // butterworthFunc + return vec4(vec3(sqrt(r_u_pi / (r_u_pi + pow(length_d, 2.0)))), 1.0); #endif - - //#if USE_NIGHTTEXTURE || USE_WATERMASK || PERFORM_SHADING - uniform vec3 lightDirectionCameraSpace; - //#endif - - #if PERFORM_SHADING - uniform float orenNayarRoughness; - #endif - - #if SHADOW_MAPPING_ENABLED - - #define NSSamplesMinusOne #{nShadowSamples} - #define NSSamples (NSSamplesMinusOne + 1) - - in vec4 shadowCoords; - uniform sampler2DShadow shadowMapTexture; - uniform float zFightingPercentage; - #endif - - #if USE_ECLIPSE_SHADOWS - - - #define NSEclipseShadowsMinusOne #{nEclipseShadows} - #define NSEclipseShadows (NSEclipseShadowsMinusOne + 1) - - /******************************************************************************* - ***** ALL CALCULATIONS FOR ECLIPSE ARE IN METERS AND IN WORLD SPACE SYSTEM **** - *******************************************************************************/ - struct ShadowRenderingStruct { - double xu, xp; - double rs, rc; - dvec3 sourceCasterVec; - dvec3 casterPositionVec; - bool isShadowing; - }; - - // Eclipse shadow data - // JCC: Remove and use dictionary to - // decides the number of shadows - uniform ShadowRenderingStruct shadowDataArray[NSEclipseShadows]; - uniform int shadows; - uniform bool hardShadows; - - vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[NSEclipseShadows], - const dvec3 position, const bool ground) - { - #for i in 0..#{nEclipseShadows} - if (shadowInfoArray[#{i}].isShadowing) { - dvec3 pc = shadowInfoArray[#{i}].casterPositionVec - position; - dvec3 sc_norm = shadowInfoArray[#{i}].sourceCasterVec; - dvec3 pc_proj = dot(pc, sc_norm) * sc_norm; - dvec3 d = pc - pc_proj; - - - float length_d = float(length(d)); - double length_pc_proj = length(pc_proj); - - float r_p_pi = float(shadowInfoArray[#{i}].rc * (length_pc_proj + shadowInfoArray[#{i}].xp) / shadowInfoArray[#{i}].xp); - float r_u_pi = float(shadowInfoArray[#{i}].rc * (shadowInfoArray[#{i}].xu - length_pc_proj) / shadowInfoArray[#{i}].xu); - - if (length_d < r_u_pi) { // umbra - if (ground) { - #if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.2, 0.2, 0.2, 1.0); - #else - // butterworthFunc - return vec4(vec3(sqrt(r_u_pi / (r_u_pi + pow(length_d, 2.0)))), 1.0); - #endif - } - else { - #if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.5, 0.5, 0.5, 1.0); - #else - return vec4(vec3(length_d / r_p_pi), 1.0); - #endif - } } - else if (length_d < r_p_pi) {// penumbra - #if USE_ECLIPSE_HARD_SHADOWS - return vec4(0.5, 0.5, 0.5, 1.0); - #else + else { + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.5, 0.5, 0.5, 1.0); + #else return vec4(vec3(length_d / r_p_pi), 1.0); - #endif + #endif } } - - #endfor - return vec4(1.0); - } - #endif - - in vec4 fs_position; - in vec2 fs_uv; - in vec3 ellipsoidNormalCameraSpace; - in vec3 levelWeights; - in vec3 positionCameraSpace; - - #if USE_ACCURATE_NORMALS - in vec3 ellipsoidTangentThetaCameraSpace; - in vec3 ellipsoidTangentPhiCameraSpace; - #endif // USE_ACCURATE_NORMALS - - #if USE_ECLIPSE_SHADOWS - in vec3 positionWorldSpace; - #endif // USE_ECLIPSE_SHADOWS - - - - Fragment getFragment() { - Fragment frag; - frag.color = vec4(0.3, 0.3, 0.3, 1.0); - - vec3 normal = normalize(ellipsoidNormalCameraSpace); - - #if USE_ACCURATE_NORMALS - normal = getTileNormal( - fs_uv, - levelWeights, - normalize(ellipsoidNormalCameraSpace), - normalize(ellipsoidTangentThetaCameraSpace), - normalize(ellipsoidTangentPhiCameraSpace) - ); - #endif /// USE_ACCURATE_NORMALS - - #if USE_COLORTEXTURE - frag.color = calculateColor(frag.color, fs_uv, levelWeights, ColorLayers); - #endif // USE_COLORTEXTURE - - #if USE_WATERMASK - float waterReflectance = 0.0; - frag.color = calculateWater( - frag.color, - fs_uv, - levelWeights, - WaterMasks, - normal, - lightDirectionCameraSpace, // Should already be normalized - positionCameraSpace, - waterReflectance - ); - - #endif // USE_WATERMASK - - #if USE_NIGHTTEXTURE - frag.color = calculateNight( - frag.color, - fs_uv, - levelWeights, - NightLayers, - normalize(ellipsoidNormalCameraSpace), - lightDirectionCameraSpace // Should already be normalized - ); - - #endif // USE_NIGHTTEXTURE - - #if PERFORM_SHADING - frag.color = calculateShadedColor( - frag.color, - normal, - lightDirectionCameraSpace, - normalize(positionCameraSpace), - orenNayarRoughness - ); - #endif // PERFORM_SHADING - - #if USE_ECLIPSE_SHADOWS - frag.color *= calcShadow(shadowDataArray, dvec3(positionWorldSpace), true); - #endif - - #if USE_OVERLAY - frag.color = calculateOverlay(frag.color, fs_uv, levelWeights, Overlays); - #endif // USE_OVERLAY - - #if SHOW_HEIGHT_INTENSITIES - frag.color.rgb *= vec3(0.1); - - float untransformedHeight = getUntransformedTileVertexHeight(fs_uv, levelWeights); - float contourLine = fract(10.0 * untransformedHeight) > 0.98 ? 1.0 : 0.0; - frag.color.r += untransformedHeight; - frag.color.b = contourLine; - #endif - - #if SHOW_HEIGHT_RESOLUTION - frag.color += 0.0001 * calculateDebugColor(fs_uv, fs_position, vertexResolution); - #if USE_HEIGHTMAP - frag.color.r = min(frag.color.r, 0.8); - frag.color.r += tileResolution(fs_uv, HeightLayers[0].pile.chunkTile0) > 0.9 ? 1 : 0; - #endif - #endif - - // Other data - #if USE_WATERMASK - // Water reflectance is added to the G-Buffer. - frag.gNormal.w = waterReflectance; + else if (length_d < r_p_pi) {// penumbra + #if USE_ECLIPSE_HARD_SHADOWS + return vec4(0.5, 0.5, 0.5, 1.0); #else - frag.gNormal.w = 0.0; + return vec4(vec3(length_d / r_p_pi), 1.0); #endif - // Normal is written View Space (Including SGCT View Matrix). - frag.gNormal.xyz = normal; - - if (dot(positionCameraSpace, vec3(1.0)) != 0.0) { - frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space - } - else { - frag.gPosition = vec4(1.0); // in Camera Rig Space + } } - frag.depth = fs_position.w; + #endfor + return vec4(1.0); +} +#endif - #if SHOW_CHUNK_EDGES - const float BorderSize = 0.005; - const vec3 BorderColor = vec3(1.0, 0.0, 0.0); +in vec4 fs_position; +in vec2 fs_uv; +in vec3 ellipsoidNormalCameraSpace; +in vec3 levelWeights; +in vec3 positionCameraSpace; - vec2 uvOffset = fs_uv - vec2(0.5); - float thres = 0.5 - BorderSize * 0.5; - bool isBorder = abs(uvOffset.x) > thres || abs(uvOffset.y) > thres; - if (isBorder) { - frag.color.rgb += BorderColor; - } - #endif // SHOW_CHUNK_EDGES +#if USE_ACCURATE_NORMALS + in vec3 ellipsoidTangentThetaCameraSpace; + in vec3 ellipsoidTangentPhiCameraSpace; +#endif // USE_ACCURATE_NORMALS - #if SHADOW_MAPPING_ENABLED - float shadow = 1.0; - if (shadowCoords.w > 1) { - vec4 normalizedShadowCoords = shadowCoords; - normalizedShadowCoords.z = normalizeFloat(zFightingPercentage * normalizedShadowCoords.w); - normalizedShadowCoords.xy = normalizedShadowCoords.xy / normalizedShadowCoords.w; - normalizedShadowCoords.w = 1.0; +#if USE_ECLIPSE_SHADOWS +in vec3 positionWorldSpace; +#endif // USE_ECLIPSE_SHADOWS - float sum = 0; - #for i in 0..#{nShadowSamples} - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, 0)); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, NSSamples - #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , NSSamples - #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, -NSSamples + #{i})); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, 0)); - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, NSSamples - #{i})); - #endfor - sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(0, 0)); - shadow = sum / (8.0 * NSSamples + 1.f); - } - frag.color.xyz *= shadow < 0.99 ? clamp(shadow + 0.3, 0.0, 1.0) : shadow; + + +Fragment getFragment() { + Fragment frag; + frag.color = vec4(0.3, 0.3, 0.3, 1.0); + + vec3 normal = normalize(ellipsoidNormalCameraSpace); + +#if USE_ACCURATE_NORMALS + normal = getTileNormal( + fs_uv, + levelWeights, + normalize(ellipsoidNormalCameraSpace), + normalize(ellipsoidTangentThetaCameraSpace), + normalize(ellipsoidTangentPhiCameraSpace) + ); +#endif /// USE_ACCURATE_NORMALS + +#if USE_COLORTEXTURE + frag.color = calculateColor(frag.color, fs_uv, levelWeights, ColorLayers); +#endif // USE_COLORTEXTURE + +#if USE_WATERMASK + float waterReflectance = 0.0; + frag.color = calculateWater( + frag.color, + fs_uv, + levelWeights, + WaterMasks, + normal, + lightDirectionCameraSpace, // Should already be normalized + positionCameraSpace, + waterReflectance + ); + +#endif // USE_WATERMASK + +#if USE_NIGHTTEXTURE + frag.color = calculateNight( + frag.color, + fs_uv, + levelWeights, + NightLayers, + normalize(ellipsoidNormalCameraSpace), + lightDirectionCameraSpace // Should already be normalized + ); + +#endif // USE_NIGHTTEXTURE + +#if PERFORM_SHADING + frag.color = calculateShadedColor( + frag.color, + normal, + lightDirectionCameraSpace, + normalize(positionCameraSpace), + orenNayarRoughness + ); +#endif // PERFORM_SHADING + +#if USE_ECLIPSE_SHADOWS + frag.color *= calcShadow(shadowDataArray, dvec3(positionWorldSpace), true); +#endif + +#if USE_OVERLAY + frag.color = calculateOverlay(frag.color, fs_uv, levelWeights, Overlays); +#endif // USE_OVERLAY + +#if SHOW_HEIGHT_INTENSITIES + frag.color.rgb *= vec3(0.1); + + float untransformedHeight = getUntransformedTileVertexHeight(fs_uv, levelWeights); + float contourLine = fract(10.0 * untransformedHeight) > 0.98 ? 1.0 : 0.0; + frag.color.r += untransformedHeight; + frag.color.b = contourLine; +#endif + +#if SHOW_HEIGHT_RESOLUTION + frag.color += 0.0001 * calculateDebugColor(fs_uv, fs_position, vertexResolution); + #if USE_HEIGHTMAP + frag.color.r = min(frag.color.r, 0.8); + frag.color.r += tileResolution(fs_uv, HeightLayers[0].pile.chunkTile0) > 0.9 ? 1 : 0; #endif +#endif - return frag; + // Other data +#if USE_WATERMASK + // Water reflectance is added to the G-Buffer. + frag.gNormal.w = waterReflectance; +#else + frag.gNormal.w = 0.0; +#endif + // Normal is written View Space (Including SGCT View Matrix). + frag.gNormal.xyz = normal; + + if (dot(positionCameraSpace, vec3(1.0)) != 0.0) { + frag.gPosition = vec4(positionCameraSpace, 1.0); // in Camera Rig Space } + else { + frag.gPosition = vec4(1.0); // in Camera Rig Space + } + + frag.depth = fs_position.w; + +#if SHOW_CHUNK_EDGES + const float BorderSize = 0.005; + const vec3 BorderColor = vec3(1.0, 0.0, 0.0); + + vec2 uvOffset = fs_uv - vec2(0.5); + float thres = 0.5 - BorderSize * 0.5; + bool isBorder = abs(uvOffset.x) > thres || abs(uvOffset.y) > thres; + if (isBorder) { + frag.color.rgb += BorderColor; + } +#endif // SHOW_CHUNK_EDGES + +#if SHADOW_MAPPING_ENABLED + float shadow = 1.0; + if (shadowCoords.w > 1) { + vec4 normalizedShadowCoords = shadowCoords; + normalizedShadowCoords.z = normalizeFloat(zFightingPercentage * normalizedShadowCoords.w); + normalizedShadowCoords.xy = normalizedShadowCoords.xy / normalizedShadowCoords.w; + normalizedShadowCoords.w = 1.0; + + float sum = 0; + #for i in 0..#{nShadowSamples} + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, 0)); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(-NSSamples + #{i}, NSSamples - #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( 0 , NSSamples - #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, -NSSamples + #{i})); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, 0)); + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2( NSSamples - #{i}, NSSamples - #{i})); + #endfor + sum += textureProjOffset(shadowMapTexture, normalizedShadowCoords, ivec2(0, 0)); + shadow = sum / (8.0 * NSSamples + 1.f); + } + frag.color.xyz *= shadow < 0.99 ? clamp(shadow + 0.3, 0.0, 1.0) : shadow; +#endif + + return frag; +} diff --git a/modules/globebrowsing/shaders/rings_fs.glsl b/modules/globebrowsing/shaders/rings_fs.glsl index 24e5a8b649..d3fb2bc9e4 100644 --- a/modules/globebrowsing/shaders/rings_fs.glsl +++ b/modules/globebrowsing/shaders/rings_fs.glsl @@ -78,7 +78,7 @@ Fragment getFragment() { // shadow == 1.0 means it is not in shadow float shadow = 1.0; - if ( shadowCoords.z >= 0 ) { + if (shadowCoords.z >= 0) { vec4 normalizedShadowCoords = shadowCoords; normalizedShadowCoords.z = normalizeFloat(zFightingPercentage * normalizedShadowCoords.w); normalizedShadowCoords.xy = normalizedShadowCoords.xy / normalizedShadowCoords.w; diff --git a/modules/iswa/shaders/datasphere_fs.glsl b/modules/iswa/shaders/datasphere_fs.glsl index 18aa934c73..7c6d57670f 100644 --- a/modules/iswa/shaders/datasphere_fs.glsl +++ b/modules/iswa/shaders/datasphere_fs.glsl @@ -62,7 +62,8 @@ Fragment getFragment() { } diffuse = color; - } else { + } + else { for (int i = 0; i < numTextures; i++) { float v = texture(textures[i], vec2(vs_st.t, vs_st.s)).r; vec4 color = texture(transferFunctions[i], vec2(v, 0.0)); diff --git a/modules/multiresvolume/shaders/raycast.glsl b/modules/multiresvolume/shaders/raycast.glsl index ce7f76f3fe..cfed83b0c7 100644 --- a/modules/multiresvolume/shaders/raycast.glsl +++ b/modules/multiresvolume/shaders/raycast.glsl @@ -72,7 +72,8 @@ float stepSize#{id}(vec3 samplePos, vec3 dir) { return 0.01; if (true /*opacity_#{id} >= MULTIRES_OPACITY_THRESHOLD*/) { return stepSizeCoefficient_#{id}/float(maxNumBricksPerAxis_#{id})/float(paddedBrickDim_#{id}); - } else { + } + else { // return a number that is garantueed to be bigger than the whole volume return 2.0; } @@ -110,7 +111,8 @@ void sample#{id}(vec3 samplePos, vec3 dir, inout vec3 accumulatedColor, vec3 oneMinusFrontAlpha = vec3(1.0) - accumulatedAlpha; accumulatedColor += oneMinusFrontAlpha * contribution.rgb * contribution.a; accumulatedAlpha += oneMinusFrontAlpha * vec3(contribution.a); - } else { + } + else { maxStepSize = 2.0; } } diff --git a/modules/space/shaders/convolution_fs.glsl b/modules/space/shaders/convolution_fs.glsl index bef1ba74ee..c884ce1846 100644 --- a/modules/space/shaders/convolution_fs.glsl +++ b/modules/space/shaders/convolution_fs.glsl @@ -34,7 +34,7 @@ uniform int convolvedfTextureSize; uniform sampler2D psfTexture; uniform sampler2D shapeTexture; -void main(void) { +void main() { float fullColor = 0.0; // Kernel Center diff --git a/modules/space/shaders/debrisViz_vs.glsl b/modules/space/shaders/debrisViz_vs.glsl index 03eb925bcb..7ec4e86faf 100644 --- a/modules/space/shaders/debrisViz_vs.glsl +++ b/modules/space/shaders/debrisViz_vs.glsl @@ -49,7 +49,6 @@ out float vertexID_f; // out double tajm; void main() { - // tajm = inGameTime; /** The way the position and line fade is calculated is: * By using inGameTime, epoch and period of this orbit, @@ -91,10 +90,4 @@ void main() { vec4 vs_position = z_normalization( projectionTransform * viewSpacePosition); gl_Position = vs_position; vs_position_w = vs_position.w; - } - - - - - diff --git a/modules/space/shaders/psfToTexture_fs.glsl b/modules/space/shaders/psfToTexture_fs.glsl index 39ff47ccc1..288149d9b2 100644 --- a/modules/space/shaders/psfToTexture_fs.glsl +++ b/modules/space/shaders/psfToTexture_fs.glsl @@ -39,7 +39,7 @@ uniform float betaConstant; in vec2 psfCoords; -void main(void) { +void main() { vec4 fullColor = vec4(0.0, 0.0, 0.0, 1.0); if (psfMethod == 0) { // PSF Functions from paper: Physically-Based Galre Effects for Digital @@ -50,7 +50,8 @@ void main(void) { float f2 = 72.37/pow(theta + alphaConst, 2.0); float psf_p = p0Param * f0 + p1Param * f1 + p2Param * f2; fullColor = vec4(psf_p); - } else if (psfMethod == 1) { + } + else if (psfMethod == 1) { // Moffat float r = sqrt((psfCoords.y*psfCoords.y + psfCoords.x*psfCoords.x)) * 90.0; float alpha = FWHM / (2.f * sqrt(pow(2.f, 1.f/betaConstant) - 1)); diff --git a/modules/space/shaders/star_ge.glsl b/modules/space/shaders/star_ge.glsl index 5e81e33ab0..759927b7f1 100644 --- a/modules/space/shaders/star_ge.glsl +++ b/modules/space/shaders/star_ge.glsl @@ -186,5 +186,4 @@ void main() { EmitVertex(); EndPrimitive(); - } diff --git a/modules/spacecraftinstruments/shaders/dilation_fs.glsl b/modules/spacecraftinstruments/shaders/dilation_fs.glsl index b91f8b9fe2..18df1d1f08 100644 --- a/modules/spacecraftinstruments/shaders/dilation_fs.glsl +++ b/modules/spacecraftinstruments/shaders/dilation_fs.glsl @@ -77,7 +77,6 @@ vec3 gatherNeighboringColors() { else { return vec3(0.0); } - } void main() { diff --git a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl index 76971686d7..dcba10ec68 100644 --- a/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl +++ b/modules/spacecraftinstruments/shaders/renderablePlanetProjection_fs.glsl @@ -44,7 +44,7 @@ uniform vec3 boresight; #define M_PI 3.14159265358979323846 -vec4 uvToModel(vec2 uv, vec3 radius, float segments){ +vec4 uvToModel(vec2 uv, vec3 radius, float segments) { float fj = uv.x * segments; float fi = (1.0 - uv.y) * segments; diff --git a/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl b/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl index 008a50fe2a..ac79d14c86 100644 --- a/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl +++ b/modules/spacecraftinstruments/shaders/terminatorshadow_vs.glsl @@ -36,7 +36,7 @@ uniform mat4 modelViewProjectionTransform; uniform vec3 shadowColor; void main() { - if (mod(gl_VertexID,2) == 0.0) { + if (mod(gl_VertexID, 2) == 0.0) { vs_color = shadowColor; } else { diff --git a/modules/toyvolume/shaders/boundsfs.glsl b/modules/toyvolume/shaders/boundsfs.glsl index 0b875972f9..6905e234e4 100644 --- a/modules/toyvolume/shaders/boundsfs.glsl +++ b/modules/toyvolume/shaders/boundsfs.glsl @@ -28,6 +28,7 @@ in vec3 modelPosition; in vec4 viewPosition; + Fragment getFragment() { Fragment frag; frag.color = vec4(modelPosition + 0.5, 1.0); diff --git a/modules/volume/shaders/boundsfs.glsl b/modules/volume/shaders/boundsfs.glsl index 4259a6f7ab..32d585b4de 100644 --- a/modules/volume/shaders/boundsfs.glsl +++ b/modules/volume/shaders/boundsfs.glsl @@ -28,6 +28,7 @@ in vec4 positionLocalSpace; in vec4 positionCameraSpace; + Fragment getFragment() { vec4 position = positionCameraSpace; diff --git a/modules/webbrowser/shaders/screenspace_vs.glsl b/modules/webbrowser/shaders/screenspace_vs.glsl index f3369a8536..cb76445436 100644 --- a/modules/webbrowser/shaders/screenspace_vs.glsl +++ b/modules/webbrowser/shaders/screenspace_vs.glsl @@ -35,6 +35,6 @@ out vec4 vs_position; void main(){ vs_st = in_st; - vs_position = ViewProjectionMatrix * ModelTransform * in_position * vec4(1.0, -1.0, 1.0, 1.0); - gl_Position = vec4(vs_position); + vs_position = ViewProjectionMatrix * ModelTransform * in_position * vec4(1.0, -1.0, 1.0, 1.0); + gl_Position = vec4(vs_position); } diff --git a/shaders/PowerScaling/powerScaling_fs.hglsl b/shaders/PowerScaling/powerScaling_fs.hglsl index dff9584f9d..c09e68c724 100644 --- a/shaders/PowerScaling/powerScaling_fs.hglsl +++ b/shaders/PowerScaling/powerScaling_fs.hglsl @@ -31,26 +31,6 @@ #include "powerScalingMath.hglsl" -const float s_far = 27.0f; //= gl_DepthRange.far; // 40 -const float s_farcutoff = 12.0f; -const float s_nearcutoff = 7.00f; -const float s_near = 1.00f;// gl_DepthRange.near; // 0.1 - -vec4 psc_normlization(vec4 invec) { - - float xymax = max(invec.x,invec.y); - - if(invec.z > 0.0f || invec.z < 0.0f) { - return invec / abs(invec.z); - } else if (xymax != 0.0f) { - return invec / xymax; - } else { - return invec / -.0; - } -} - - - float pscDepth(vec4 position) { // For now: simply convert power scaled coordinates to a linear scale. // TODO: get rid of power scaled coordinates and use scale graph instead. @@ -58,6 +38,4 @@ float pscDepth(vec4 position) { return safeLength(pscToLinear(position)); } - - #endif diff --git a/shaders/PowerScaling/powerScaling_vs.hglsl b/shaders/PowerScaling/powerScaling_vs.hglsl index bd3572ac1f..d422a897bb 100644 --- a/shaders/PowerScaling/powerScaling_vs.hglsl +++ b/shaders/PowerScaling/powerScaling_vs.hglsl @@ -37,15 +37,6 @@ vec4 psc_to_meter(vec4 v1, vec2 v2) { return vec4(v1.xyz * factor, 1.0); } -vec4 psc_scaling(vec4 v1, vec2 v2) { - float ds = v2.y - v1.w; - if(ds >= 0) { - return vec4(v1.xyz * v2.x * pow(k,v1.w), v2.y); - } else { - return vec4(v1.xyz * v2.x * pow(k,v2.y), v1.w); - } -} - // vertexPosition is returned as the transformed vertex in OS Camera Rig Space in PSC vec4 pscTransform(inout vec4 vertexPosition, mat4 modelTransform) { vec3 local_vertex_pos = mat3(modelTransform) * vertexPosition.xyz; @@ -59,7 +50,13 @@ vec4 pscTransform(inout vec4 vertexPosition, mat4 modelTransform) { // rotate the camera vertexPosition.xyz = mat3(camrot) * vertexPosition.xyz; vec4 tmp = vertexPosition; - vertexPosition = psc_scaling(vertexPosition, scaling); + + float ds = scaling.y - vertexPosition.w; + if (ds >= 0) { + vertexPosition = vec4(vertexPosition.xyz * scaling.x * pow(k, vertexPosition.w), scaling.y); + } else { + vertexPosition = vec4(vertexPosition.xyz * scaling.x * pow(k, scaling.y), vertexPosition.w); + } // project using the rescaled coordinates, tmp = psc_to_meter(tmp, scaling); diff --git a/shaders/abuffer/resolvehelpers.glsl b/shaders/abuffer/resolvehelpers.glsl index c7bbefc8a0..f2b03b77be 100644 --- a/shaders/abuffer/resolvehelpers.glsl +++ b/shaders/abuffer/resolvehelpers.glsl @@ -53,7 +53,15 @@ uniform vec3 cameraPosInRaycaster#{index} #endif - +/** + * Normalize a vector + * Supporting huge vectors, where the square of any of the components is too large to be + * represent as a float. + */ +vec3 safeNormalize(vec3 v) { + float m = max(max(abs(v.x), abs(v.y)), abs(v.z)); + return normalize(v / m); +} uniform int nAaSamples; diff --git a/shaders/floatoperations.glsl b/shaders/floatoperations.glsl index 7fb62d77f3..b583c386c8 100644 --- a/shaders/floatoperations.glsl +++ b/shaders/floatoperations.glsl @@ -62,32 +62,7 @@ float safeLength(vec4 v) { } } -float safeLength(vec3 v) { - float m = max(max(abs(v.x), abs(v.y)), abs(v.z)); - if (m > 0.f) { - return length(v / m) * m; - } else { - return 0.f; - } -} - -float safeLength(vec2 v) { - float m = max(abs(v.x), abs(v.y)); - if (m > 0.f) { - return length(v / m) * m; - } else { - return 0.f; - } -} - -/** - * Normalize a vector - * Supporting huge vectors, where the square of any of the components is too large to be - * represent as a float. - */ -vec3 safeNormalize(vec3 v) { - float m = max(max(abs(v.x), abs(v.y)), abs(v.z)); - return normalize(v / m); -} +float safeLength(vec3 v) { return safeLength(vec4(v, 0.0)); } +float safeLength(vec2 v) { return safeLength(vec4(v, 0.0, 0.0)); } #endif // _FLOATOPERATIONS_GLSL_ diff --git a/shaders/framebuffer/fxaa.frag b/shaders/framebuffer/fxaa.frag index 17d51c2eb6..2a86d8b9ea 100644 --- a/shaders/framebuffer/fxaa.frag +++ b/shaders/framebuffer/fxaa.frag @@ -230,4 +230,4 @@ void main() { } aaFinalColor = texture(renderedTexture, finalUV); -} \ No newline at end of file +} From 439808e259518b7b05955f8ba08f47aedb1dc76e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 22:04:31 +0100 Subject: [PATCH 077/147] Remove glm_cols and glm_rows function calls in favor of built-in GLM functions --- ext/ghoul | 2 +- src/properties/matrix/dmat2property.cpp | 20 +++++++++----------- src/properties/matrix/dmat2x3property.cpp | 20 +++++++++----------- src/properties/matrix/dmat2x4property.cpp | 20 +++++++++----------- src/properties/matrix/dmat3property.cpp | 20 +++++++++----------- src/properties/matrix/dmat3x2property.cpp | 20 +++++++++----------- src/properties/matrix/dmat3x4property.cpp | 20 +++++++++----------- src/properties/matrix/dmat4property.cpp | 20 +++++++++----------- src/properties/matrix/dmat4x2property.cpp | 20 +++++++++----------- src/properties/matrix/dmat4x3property.cpp | 20 +++++++++----------- src/properties/matrix/mat2property.cpp | 20 +++++++++----------- src/properties/matrix/mat2x3property.cpp | 20 +++++++++----------- src/properties/matrix/mat2x4property.cpp | 20 +++++++++----------- src/properties/matrix/mat3property.cpp | 20 +++++++++----------- src/properties/matrix/mat3x2property.cpp | 20 +++++++++----------- src/properties/matrix/mat3x4property.cpp | 20 +++++++++----------- src/properties/matrix/mat4property.cpp | 20 +++++++++----------- src/properties/matrix/mat4x2property.cpp | 20 +++++++++----------- src/properties/matrix/mat4x3property.cpp | 20 +++++++++----------- 19 files changed, 163 insertions(+), 199 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index 37757a2e83..1f97e924b3 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 37757a2e83ac423d391c663a32e4efb95b0b2084 +Subproject commit 1f97e924b36bedcf95a7e4e562e23319338ee238 diff --git a/src/properties/matrix/dmat2property.cpp b/src/properties/matrix/dmat2property.cpp index e99d0d3cf0..49c2945347 100644 --- a/src/properties/matrix/dmat2property.cpp +++ b/src/properties/matrix/dmat2property.cpp @@ -36,8 +36,8 @@ glm::dmat2x2 fromLuaConversion(lua_State* state, bool& success) { glm::dmat2x2 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat2x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat2x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x2::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat2x2 value) { glm::dmat2x2 fromStringConversion(const std::string& val, bool& success) { glm::dmat2x2 result = glm::dmat2x2(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat2x2::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat2x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat2x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat2x3property.cpp b/src/properties/matrix/dmat2x3property.cpp index 55bafb7c6c..bc2c45bdcc 100644 --- a/src/properties/matrix/dmat2x3property.cpp +++ b/src/properties/matrix/dmat2x3property.cpp @@ -36,8 +36,8 @@ glm::dmat2x3 fromLuaConversion(lua_State* state, bool& success) { glm::dmat2x3 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat2x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat2x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat2x3 value) { glm::dmat2x3 fromStringConversion(const std::string& val, bool& success) { glm::dmat2x3 result = glm::dmat2x3(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat2x3::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat2x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat2x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat2x4property.cpp b/src/properties/matrix/dmat2x4property.cpp index 5ccc63ebbc..0134c624e8 100644 --- a/src/properties/matrix/dmat2x4property.cpp +++ b/src/properties/matrix/dmat2x4property.cpp @@ -36,8 +36,8 @@ glm::dmat2x4 fromLuaConversion(lua_State* state, bool& success) { glm::dmat2x4 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat2x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat2x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x4::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat2x4 value) { glm::dmat2x4 fromStringConversion(const std::string& val, bool& success) { glm::dmat2x4 result = glm::dmat2x4(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat2x4::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat2x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat2x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat3property.cpp b/src/properties/matrix/dmat3property.cpp index f7ff215a2a..c3f94f472e 100644 --- a/src/properties/matrix/dmat3property.cpp +++ b/src/properties/matrix/dmat3property.cpp @@ -36,8 +36,8 @@ glm::dmat3x3 fromLuaConversion(lua_State* state, bool& success) { glm::dmat3x3 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat3x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat3x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat3x3 value) { glm::dmat3x3 fromStringConversion(const std::string& val, bool& success) { glm::dmat3x3 result = glm::dmat3x3(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat3x3::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat3x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat3x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat2x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat3x2property.cpp b/src/properties/matrix/dmat3x2property.cpp index 29edd6bec7..fd58a78776 100644 --- a/src/properties/matrix/dmat3x2property.cpp +++ b/src/properties/matrix/dmat3x2property.cpp @@ -36,8 +36,8 @@ glm::dmat3x2 fromLuaConversion(lua_State* state, bool& success) { glm::dmat3x2 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat3x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat3x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x2::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat3x2 value) { glm::dmat3x2 fromStringConversion(const std::string& val, bool& success) { glm::dmat3x2 result = glm::dmat3x2(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat3x2::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat3x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat3x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat3x4property.cpp b/src/properties/matrix/dmat3x4property.cpp index 7ce468853a..531a839970 100644 --- a/src/properties/matrix/dmat3x4property.cpp +++ b/src/properties/matrix/dmat3x4property.cpp @@ -36,8 +36,8 @@ glm::dmat3x4 fromLuaConversion(lua_State* state, bool& success) { glm::dmat3x4 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat3x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat3x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x4::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::dmat3x4 value) { glm::dmat3x4 fromStringConversion(const std::string& val, bool& success) { glm::dmat3x4 result = glm::dmat3x4(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat3x4::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::dmat3x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat3x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat3x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat4property.cpp b/src/properties/matrix/dmat4property.cpp index a2da14e804..6cff54b244 100644 --- a/src/properties/matrix/dmat4property.cpp +++ b/src/properties/matrix/dmat4property.cpp @@ -36,8 +36,8 @@ glm::dmat4x4 fromLuaConversion(lua_State* state, bool& success) { glm::dmat4x4 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat4x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat4x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x4::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat4x4 value) { glm::dmat4x4 fromStringConversion(const std::string& val, bool& success) { glm::dmat4x4 result = glm::dmat4x4(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat4x4::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat4x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat4x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat4x2property.cpp b/src/properties/matrix/dmat4x2property.cpp index 50bd58a054..ee1c31e26d 100644 --- a/src/properties/matrix/dmat4x2property.cpp +++ b/src/properties/matrix/dmat4x2property.cpp @@ -36,8 +36,8 @@ glm::dmat4x2 fromLuaConversion(lua_State* state, bool& success) { glm::dmat4x2 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat4x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat4x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x2::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat4x2 value) { glm::dmat4x2 fromStringConversion(const std::string& val, bool& success) { glm::dmat4x2 result = glm::dmat4x2(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat4x2::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat4x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat4x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/dmat4x3property.cpp b/src/properties/matrix/dmat4x3property.cpp index 399b3f62fe..fe11fd7118 100644 --- a/src/properties/matrix/dmat4x3property.cpp +++ b/src/properties/matrix/dmat4x3property.cpp @@ -36,8 +36,8 @@ glm::dmat4x3 fromLuaConversion(lua_State* state, bool& success) { glm::dmat4x3 result; lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -63,8 +63,8 @@ glm::dmat4x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::dmat4x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x3::col_type::length(); ++j) { lua_pushnumber(state, value[i][j]); lua_rawseti(state, -2, number); ++number; @@ -76,15 +76,13 @@ bool toLuaConversion(lua_State* state, glm::dmat4x3 value) { glm::dmat4x3 fromStringConversion(const std::string& val, bool& success) { glm::dmat4x3 result = glm::dmat4x3(1.0); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::dmat4x3::value_type v; s >> v; @@ -104,8 +102,8 @@ glm::dmat4x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::dmat4x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::dmat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::dmat4x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat2property.cpp b/src/properties/matrix/mat2property.cpp index 8a156ef584..be91afeb1e 100644 --- a/src/properties/matrix/mat2property.cpp +++ b/src/properties/matrix/mat2property.cpp @@ -36,8 +36,8 @@ glm::mat2x2 fromLuaConversion(lua_State* state, bool& success) { glm::mat2x2 result = glm::mat2x2(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -65,8 +65,8 @@ glm::mat2x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat2x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x2::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -78,15 +78,13 @@ bool toLuaConversion(lua_State* state, glm::mat2x2 value) { glm::mat2x2 fromStringConversion(const std::string& val, bool& success) { glm::mat2x2 result = glm::mat2x2(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat2x2::value_type v; s >> v; @@ -106,8 +104,8 @@ glm::mat2x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat2x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat2x3property.cpp b/src/properties/matrix/mat2x3property.cpp index a31fb30601..0cc150c78c 100644 --- a/src/properties/matrix/mat2x3property.cpp +++ b/src/properties/matrix/mat2x3property.cpp @@ -38,8 +38,8 @@ glm::mat2x3 fromLuaConversion(lua_State* state, bool& success) { glm::mat2x3 result = glm::mat2x3(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -66,8 +66,8 @@ glm::mat2x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat2x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x3::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -79,15 +79,13 @@ bool toLuaConversion(lua_State* state, glm::mat2x3 value) { glm::mat2x3 fromStringConversion(const std::string& val, bool& success) { glm::mat2x3 result = glm::mat2x3(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat2x3::value_type v; s >> v; @@ -107,8 +105,8 @@ glm::mat2x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat2x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat2x4property.cpp b/src/properties/matrix/mat2x4property.cpp index b3f4a888eb..1867ed5dd0 100644 --- a/src/properties/matrix/mat2x4property.cpp +++ b/src/properties/matrix/mat2x4property.cpp @@ -36,8 +36,8 @@ glm::mat2x4 fromLuaConversion(lua_State* state, bool& success) { glm::mat2x4 result = glm::mat2x4(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat2x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat2x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x4::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat2x4 value) { glm::mat2x4 fromStringConversion(const std::string& val, bool& success) { glm::mat2x4 result = glm::mat2x4(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat2x4::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat2x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat2x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat2x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat2x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat3property.cpp b/src/properties/matrix/mat3property.cpp index f7896baf83..79748ebeea 100644 --- a/src/properties/matrix/mat3property.cpp +++ b/src/properties/matrix/mat3property.cpp @@ -36,8 +36,8 @@ glm::mat3x3 fromLuaConversion(lua_State* state, bool& success) { glm::mat3x3 result = glm::mat3x3(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat3x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat3x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x3::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat3x3 value) { glm::mat3x3 fromStringConversion(const std::string& val, bool& success) { glm::mat3x3 result = glm::mat3x3(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat3x3::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat3x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat3x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat3x2property.cpp b/src/properties/matrix/mat3x2property.cpp index 3088c3c794..ce32e1cb97 100644 --- a/src/properties/matrix/mat3x2property.cpp +++ b/src/properties/matrix/mat3x2property.cpp @@ -36,8 +36,8 @@ glm::mat3x2 fromLuaConversion(lua_State* state, bool& success) { glm::mat3x2 result = glm::mat3x2(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat3x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat3x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x2::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat3x2 value) { glm::mat3x2 fromStringConversion(const std::string& val, bool& success) { glm::mat3x2 result = glm::mat3x2(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat3x2::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat3x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat3x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat3x4property.cpp b/src/properties/matrix/mat3x4property.cpp index 6571839d93..9f37aa8f51 100644 --- a/src/properties/matrix/mat3x4property.cpp +++ b/src/properties/matrix/mat3x4property.cpp @@ -36,8 +36,8 @@ glm::mat3x4 fromLuaConversion(lua_State* state, bool& success) { glm::mat3x4 result = glm::mat3x4(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat3x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat3x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x4::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat3x4 value) { glm::mat3x4 fromStringConversion(const std::string& val, bool& success) { glm::mat3x4 result = glm::mat3x4(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat3x4::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat3x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat3x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat3x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat3x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat4property.cpp b/src/properties/matrix/mat4property.cpp index 1c9ca7a1b9..8be8cc6ef7 100644 --- a/src/properties/matrix/mat4property.cpp +++ b/src/properties/matrix/mat4property.cpp @@ -38,8 +38,8 @@ glm::mat4x4 fromLuaConversion(lua_State* state, bool& success) { glm::mat4x4 result = glm::mat4x4(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x4::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -66,8 +66,8 @@ glm::mat4x4 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat4x4 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x4::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -79,15 +79,13 @@ bool toLuaConversion(lua_State* state, glm::mat4x4 value) { glm::mat4x4 fromStringConversion(const std::string& val, bool& success) { glm::mat4x4 result = glm::mat4x4(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x4::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat4x4::value_type v; s >> v; @@ -107,8 +105,8 @@ glm::mat4x4 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat4x4 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x4::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x4::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat4x2property.cpp b/src/properties/matrix/mat4x2property.cpp index d2b0b97ed2..1b10566d22 100644 --- a/src/properties/matrix/mat4x2property.cpp +++ b/src/properties/matrix/mat4x2property.cpp @@ -36,8 +36,8 @@ glm::mat4x2 fromLuaConversion(lua_State* state, bool& success) { glm::mat4x2 result = glm::mat4x2(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x2::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat4x2 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat4x2 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x2::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat4x2 value) { glm::mat4x2 fromStringConversion(const std::string& val, bool& success) { glm::mat4x2 result = glm::mat4x2(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x2::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat4x2::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat4x2 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat4x2 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x2::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x2::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } diff --git a/src/properties/matrix/mat4x3property.cpp b/src/properties/matrix/mat4x3property.cpp index f86d9e0c7d..667d63011f 100644 --- a/src/properties/matrix/mat4x3property.cpp +++ b/src/properties/matrix/mat4x3property.cpp @@ -36,8 +36,8 @@ glm::mat4x3 fromLuaConversion(lua_State* state, bool& success) { glm::mat4x3 result = glm::mat4x3(1.f); lua_pushnil(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x3::col_type::length(); ++j) { int hasNext = lua_next(state, -2); if (hasNext != 1) { success = false; @@ -64,8 +64,8 @@ glm::mat4x3 fromLuaConversion(lua_State* state, bool& success) { bool toLuaConversion(lua_State* state, glm::mat4x3 value) { lua_newtable(state); int number = 1; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x3::col_type::length(); ++j) { lua_pushnumber(state, static_cast(value[i][j])); lua_rawseti(state, -2, number); ++number; @@ -77,15 +77,13 @@ bool toLuaConversion(lua_State* state, glm::mat4x3 value) { glm::mat4x3 fromStringConversion(const std::string& val, bool& success) { glm::mat4x3 result = glm::mat4x3(1.f); std::vector tokens = ghoul::tokenizeString(val, ','); - if (tokens.size() != - (ghoul::glm_rows::value * ghoul::glm_cols::value)) - { + if (tokens.size() != ghoul::glm_components::value) { success = false; return result; } int number = 0; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x3::col_type::length(); ++j) { std::stringstream s(tokens[number]); glm::mat4x3::value_type v; s >> v; @@ -105,8 +103,8 @@ glm::mat4x3 fromStringConversion(const std::string& val, bool& success) { bool toStringConversion(std::string& outValue, glm::mat4x3 inValue) { outValue = "["; - for (glm::length_t i = 0; i < ghoul::glm_cols::value; ++i) { - for (glm::length_t j = 0; j < ghoul::glm_rows::value; ++j) { + for (glm::length_t i = 0; i < glm::mat4x3::row_type::length(); ++i) { + for (glm::length_t j = 0; j < glm::mat4x3::col_type::length(); ++j) { outValue += std::to_string(inValue[i][j]) + ","; } } From 3d74d6051efa53520ed6d81e8bb422d6d63b474d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 2 Jan 2021 23:04:59 +0100 Subject: [PATCH 078/147] Remove Dictionary use in script scheduling with struct --- include/openspace/scripting/scriptscheduler.h | 12 +- src/scripting/scriptscheduler.cpp | 65 +-- src/scripting/scriptscheduler_lua.inl | 60 ++- tests/test_scriptscheduler.cpp | 473 ++++++++---------- 4 files changed, 267 insertions(+), 343 deletions(-) diff --git a/include/openspace/scripting/scriptscheduler.h b/include/openspace/scripting/scriptscheduler.h index 7612186de5..0375a38f11 100644 --- a/include/openspace/scripting/scriptscheduler.h +++ b/include/openspace/scripting/scriptscheduler.h @@ -33,13 +33,6 @@ #include #include -namespace { - constexpr const char* KeyTime = "Time"; - constexpr const char* KeyForwardScript = "ForwardScript"; - constexpr const char* KeyBackwardScript = "BackwardScript"; - constexpr const char* KeyUniversalScript = "Script"; -} // namespace - namespace ghoul { class Dictionary; } namespace openspace::documentation { struct Documentation; } @@ -54,12 +47,11 @@ struct LuaLibrary; class ScriptScheduler { public: struct ScheduledScript { - ScheduledScript() = default; - ScheduledScript(const ghoul::Dictionary& dictionary); double time = -std::numeric_limits::max(); std::string forwardScript; std::string backwardScript; + std::string universalScript; }; /** @@ -69,7 +61,7 @@ public: * \throw SpecificationError If the dictionary does not adhere to the Documentation as * specified in the openspace::Documentation function */ - void loadScripts(const ghoul::Dictionary& dictionary); + void loadScripts(std::vector scheduledScripts); /** diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index d5c4366b84..7523f91e69 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -32,6 +32,13 @@ #include "scriptscheduler_lua.inl" +namespace { + constexpr const char* KeyTime = "Time"; + constexpr const char* KeyForwardScript = "ForwardScript"; + constexpr const char* KeyBackwardScript = "BackwardScript"; + constexpr const char* KeyUniversalScript = "Script"; +} // namespace + namespace openspace::scripting { documentation::Documentation ScriptScheduler::Documentation() { @@ -40,7 +47,7 @@ documentation::Documentation ScriptScheduler::Documentation() { using TimeVerifier = StringVerifier; using LuaScriptVerifier = StringVerifier; - return{ + return { "Scheduled Scripts", "core_scheduledscript", { @@ -88,46 +95,7 @@ documentation::Documentation ScriptScheduler::Documentation() { using namespace openspace::interaction; -ScriptScheduler::ScheduledScript::ScheduledScript(const ghoul::Dictionary& dictionary) { - const std::string& timeStr = dictionary.value(KeyTime); - time = Time::convertTime(timeStr); - - // If a universal script is specified, retrieve it and add a ; as a separator so that - // it can be added to the other scripts - std::string universal; - if (dictionary.hasValue(KeyUniversalScript)) { - universal = dictionary.value(KeyUniversalScript); - if (!universal.empty()) { - universal += ";"; - } - } - - if (dictionary.hasValue(KeyForwardScript)) { - forwardScript = universal + dictionary.value(KeyForwardScript); - } - - if (dictionary.hasValue(KeyBackwardScript)) { - backwardScript = universal + dictionary.value(KeyBackwardScript); - } -} - -void ScriptScheduler::loadScripts(const ghoul::Dictionary& dictionary) { - // Check if all of the scheduled scripts are formed correctly - documentation::testSpecificationAndThrow( - Documentation(), - dictionary, - "ScriptScheduler" - ); - - // Create all the scheduled script first - std::vector scheduledScripts; - for (size_t i = 1; i <= dictionary.size(); ++i) { - const ghoul::Dictionary& timedScriptDict = dictionary.value( - std::to_string(i) - ); - scheduledScripts.emplace_back(timedScriptDict); - } - +void ScriptScheduler::loadScripts(std::vector scheduledScripts) { // Sort scripts by time; use a stable_sort as the user might have had an intention // specifying multiple scripts for the same time in a specific order std::stable_sort( @@ -145,12 +113,17 @@ void ScriptScheduler::loadScripts(const ghoul::Dictionary& dictionary) { for (ScheduledScript& script : scheduledScripts) { _timings.push_back(script.time); - _forwardScripts.push_back(std::move(script.forwardScript)); + std::string forward = + script.universalScript.empty() ? + std::move(script.forwardScript) : + std::move(script.universalScript) + ';' + std::move(script.forwardScript); + _forwardScripts.push_back(forward); - _backwardScripts.insert( - _backwardScripts.begin(), - std::move(script.backwardScript) - ); + std::string backward = + script.universalScript.empty() ? + std::move(script.backwardScript) : + std::move(script.universalScript) + ';' + std::move(script.backwardScript); + _backwardScripts.insert(_backwardScripts.begin(), backward); } // Ensure _currentIndex and _currentTime is accurate after new scripts was added diff --git a/src/scripting/scriptscheduler_lua.inl b/src/scripting/scriptscheduler_lua.inl index 923a0c4a2a..7c63502e9f 100644 --- a/src/scripting/scriptscheduler_lua.inl +++ b/src/scripting/scriptscheduler_lua.inl @@ -29,19 +29,49 @@ namespace openspace::luascriptfunctions { int loadFile(lua_State* L) { ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::loadFile"); - const std::string& missionFileName = ghoul::lua::value( + const std::string& fileName = ghoul::lua::value( L, 1, ghoul::lua::PopValue::Yes ); - if (missionFileName.empty()) { + if (fileName.empty()) { return ghoul::lua::luaError(L, "filepath string is empty"); } - global::scriptScheduler->loadScripts( - ghoul::lua::loadDictionaryFromFile(missionFileName, L) + ghoul::Dictionary scriptsDict = ghoul::lua::loadDictionaryFromFile(fileName, L); + documentation::testSpecificationAndThrow( + scripting::ScriptScheduler::Documentation(), + scriptsDict, + "ScriptScheduler" ); + + std::vector scripts; + for (int i = 1; i <= scriptsDict.size(); ++i) { + ghoul::Dictionary d = scriptsDict.value(std::to_string(i)); + + scripting::ScriptScheduler::ScheduledScript script; + constexpr const char* KeyTime = "Time"; + if (d.hasValue(KeyTime)) { + script.time = Time::convertTime(d.value(KeyTime)); + } + constexpr const char* KeyForwardScript = "ForwardScript"; + if (d.hasValue(KeyForwardScript)) { + script.forwardScript = d.value(KeyForwardScript); + } + constexpr const char* KeyBackwardScript = "BackwardScript"; + if (d.hasValue(KeyBackwardScript)) { + script.backwardScript = d.value(KeyBackwardScript); + } + constexpr const char* KeyUniversalScript = "Script"; + if (d.hasValue(KeyUniversalScript)) { + script.universalScript = d.value(KeyUniversalScript); + } + scripts.push_back(script); + } + + global::scriptScheduler->loadScripts(scripts); + ghoul_assert(lua_gettop(L) == 0, "Incorrect number of items left on stack"); return 0; } @@ -53,26 +83,26 @@ int loadScheduledScript(lua_State* L) { "lua::loadScheduledScript" ); - std::string time = ghoul::lua::value(L, 1); - std::string forwardScript = ghoul::lua::value(L, 2); + scripting::ScriptScheduler::ScheduledScript script; - ghoul::Dictionary script; - script.setValue(KeyTime, std::move(time)); - script.setValue(KeyForwardScript, std::move(forwardScript)); + std::string time = ghoul::lua::value(L, 1); + script.time = Time::convertTime(time); + std::string forwardScript = ghoul::lua::value(L, 2); + script.forwardScript = std::move(forwardScript); if (nArguments == 3) { std::string backwardScript = ghoul::lua::value(L, 3); - script.setValue(KeyBackwardScript, std::move(backwardScript)); + script.backwardScript = std::move(backwardScript); } else if (nArguments == 4) { std::string backwardScript = ghoul::lua::value(L, 3); - script.setValue(KeyBackwardScript, std::move(backwardScript)); + script.backwardScript = std::move(backwardScript); std::string universalScript = ghoul::lua::value(L, 4); - script.setValue(KeyUniversalScript, std::move(universalScript)); + script.universalScript = std::move(universalScript); } - ghoul::Dictionary list; - list.setValue("1", std::move(script)); - global::scriptScheduler->loadScripts(list); + std::vector scripts; + scripts.push_back(std::move(script)); + global::scriptScheduler->loadScripts(scripts); lua_settop(L, 0); diff --git a/tests/test_scriptscheduler.cpp b/tests/test_scriptscheduler.cpp index 42dceae466..baa7618d6d 100644 --- a/tests/test_scriptscheduler.cpp +++ b/tests/test_scriptscheduler.cpp @@ -38,17 +38,16 @@ TEST_CASE("ScriptScheduler: Simple Forward", "[scriptscheduler]") { ); using namespace openspace::scripting; - using namespace std::string_literals; ScriptScheduler scheduler; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary; - testDictionary.setValue("Time", "2000 JAN 03"s); - testDictionary.setValue("ForwardScript", "ForwardScript1"s); - testDictionary.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary); + ScriptScheduler::ScheduledScript script; + script.time = openspace::Time::convertTime("2000 JAN 03"); + script.forwardScript = "ForwardScript1"; + script.backwardScript = "BackwardScript1"; + scripts.push_back(script); } scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); @@ -71,21 +70,20 @@ TEST_CASE("ScriptScheduler: Multiple Forward Single Jump", "[scriptscheduler]") ); using namespace openspace::scripting; - using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -115,19 +113,19 @@ TEST_CASE("ScriptScheduler: Multiple Forward Ordering", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -154,13 +152,13 @@ TEST_CASE("ScriptScheduler: Simple Backward", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary; - testDictionary.setValue("Time", "2000 JAN 03"s); - testDictionary.setValue("ForwardScript", "ForwardScript1"s); - testDictionary.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); } ScriptScheduler scheduler; @@ -186,19 +184,19 @@ TEST_CASE("ScriptScheduler: Multiple Backward Single Jump", "[scriptscheduler]") using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -228,19 +226,19 @@ TEST_CASE("ScriptScheduler: Multiple Backward Ordering", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -297,19 +295,19 @@ TEST_CASE("ScriptScheduler: Forward Backwards", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -343,19 +341,19 @@ TEST_CASE("ScriptScheduler: Rewind", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); } ScriptScheduler scheduler; @@ -405,25 +403,25 @@ TEST_CASE("ScriptScheduler: All Scripts", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts.setValue("2", testDictionary2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; + scripts.push_back(script2); - ghoul::Dictionary testDictionary3; - testDictionary3.setValue("Time", "2000 JAN 10"s); - testDictionary3.setValue("ForwardScript", "ForwardScript3"s); - testDictionary3.setValue("BackwardScript", "BackwardScript3"s); - scripts.setValue("3", testDictionary3); + ScriptScheduler::ScheduledScript script3; + script3.time = openspace::Time::convertTime("2000 JAN 10"); + script3.forwardScript = "ForwardScript3"; + script3.backwardScript = "BackwardScript3"; + scripts.push_back(script3); } ScriptScheduler scheduler; @@ -447,13 +445,13 @@ TEST_CASE("ScriptScheduler: Jump Equal", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03 12:00:00"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); } ScriptScheduler scheduler; @@ -485,13 +483,13 @@ TEST_CASE("ScriptScheduler: Same Time", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", scripts); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03 12:00:00"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); } ScriptScheduler scheduler; @@ -516,13 +514,13 @@ TEST_CASE("ScriptScheduler: Multi Inner Jump", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts; + std::vector scripts; { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03 12:00:00"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts.setValue("1", testDictionary1); + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03 12:00:00"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; + scripts.push_back(script1); } ScriptScheduler scheduler; @@ -556,29 +554,21 @@ TEST_CASE( using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -604,28 +594,20 @@ TEST_CASE("ScriptScheduler: Multiple Forward Ordering Multiple Load" "[scriptsch using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 02")); REQUIRE(res.first == res.second); @@ -650,28 +632,20 @@ TEST_CASE( using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); REQUIRE(res.first == res.second); @@ -701,27 +675,19 @@ TEST_CASE( ScriptScheduler scheduler; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); std::pair res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 06")); @@ -744,28 +710,20 @@ TEST_CASE("ScriptScheduler: Forward Backwards Multiple Load", "[scriptscheduler] using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 04")); REQUIRE(std::distance(res.first, res.second) == 1); @@ -794,28 +752,20 @@ TEST_CASE("ScriptScheduler: Rewind Multiple Load", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", scripts1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", testDictionary2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; ScriptScheduler scheduler; scheduler.progressTo(openspace::Time::convertTime("2000 JAN 01")); - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); auto res = scheduler.progressTo(openspace::Time::convertTime("2000 JAN 07")); REQUIRE(std::distance(res.first, res.second) == 2); @@ -838,37 +788,25 @@ TEST_CASE("ScriptScheduler: All Scripts Multiple Load", "[scriptscheduler]") { using namespace openspace::scripting; using namespace std::string_literals; - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", testDictionary1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", scripts2); - } + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; - ghoul::Dictionary scripts3; - { - ghoul::Dictionary testDictionary3; - testDictionary3.setValue("Time", "2000 JAN 10"s); - testDictionary3.setValue("ForwardScript", "ForwardScript3"s); - testDictionary3.setValue("BackwardScript", "BackwardScript3"s); - scripts3.setValue("1", testDictionary3); - } + ScriptScheduler::ScheduledScript script3; + script3.time = openspace::Time::convertTime("2000 JAN 10"); + script3.forwardScript = "ForwardScript3"; + script3.backwardScript = "BackwardScript3"; ScriptScheduler scheduler; - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); - scheduler.loadScripts(scripts3); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2 }); + scheduler.loadScripts({ script3 }); auto allScripts = scheduler.allScripts(); REQUIRE(allScripts.size() == 3); @@ -890,33 +828,24 @@ TEST_CASE("ScriptScheduler: All Scripts Mixed Load", "[scriptscheduler]") { - ghoul::Dictionary scripts1; - { - ghoul::Dictionary testDictionary1; - testDictionary1.setValue("Time", "2000 JAN 03"s); - testDictionary1.setValue("ForwardScript", "ForwardScript1"s); - testDictionary1.setValue("BackwardScript", "BackwardScript1"s); - scripts1.setValue("1", testDictionary1); - } + ScriptScheduler::ScheduledScript script1; + script1.time = openspace::Time::convertTime("2000 JAN 03"); + script1.forwardScript = "ForwardScript1"; + script1.backwardScript = "BackwardScript1"; - ghoul::Dictionary scripts2; - { - ghoul::Dictionary testDictionary2; - testDictionary2.setValue("Time", "2000 JAN 05"s); - testDictionary2.setValue("ForwardScript", "ForwardScript2"s); - testDictionary2.setValue("BackwardScript", "BackwardScript2"s); - scripts2.setValue("1", scripts2); + ScriptScheduler::ScheduledScript script2; + script2.time = openspace::Time::convertTime("2000 JAN 05"); + script2.forwardScript = "ForwardScript2"; + script2.backwardScript = "BackwardScript2"; - ghoul::Dictionary testDictionary3; - testDictionary3.setValue("Time", "2000 JAN 10"s); - testDictionary3.setValue("ForwardScript", "ForwardScript3"s); - testDictionary3.setValue("BackwardScript", "BackwardScript3"s); - scripts2.setValue("2", testDictionary3); - } + ScriptScheduler::ScheduledScript script3; + script3.time = openspace::Time::convertTime("2000 JAN 10"); + script3.forwardScript = "ForwardScript3"; + script3.backwardScript = "BackwardScript3"; ScriptScheduler scheduler; - scheduler.loadScripts(scripts1); - scheduler.loadScripts(scripts2); + scheduler.loadScripts({ script1 }); + scheduler.loadScripts({ script2, script3 }); auto allScripts = scheduler.allScripts(); REQUIRE(allScripts.size() == 3); From 198160000df1b905c1aa1b993d11dcaf0c2cc612 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 3 Jan 2021 11:57:00 +0100 Subject: [PATCH 079/147] Simplify the dictionary value extraction in the RenderableAtmosphere --- .../planets/earth/atmosphere.asset | 122 ++- .../solarsystem/planets/mars/atmosphere.asset | 88 +- .../planets/venus/atmosphere.asset | 84 +- .../rendering/renderableatmosphere.cpp | 967 ++++++++---------- .../rendering/renderableatmosphere.h | 3 +- 5 files changed, 595 insertions(+), 669 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 9bb7b5cadd..3e47178bf4 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -10,74 +10,66 @@ local Atmosphere = { Parent = transforms.Earth.Identifier, Renderable = { Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 6447.0, - PlanetRadius = 6377.0, - PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.6, - SunIntensity = 6.9, - Rayleigh = { + -- Atmosphere radius in Km + AtmosphereRadius = 6447.0, + PlanetRadius = 6377.0, + PlanetAverageGroundReflectance = 0.1, + GroundRadianceEmittion = 0.6, + SunIntensity = 6.9, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, + -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. + }, + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 8.0 + }, + --[[ + Ozone = { + Coefficients = { + -- Extinction coefficients + Extinction = {3.426, 8.298, 0.356} + }, + H_O = 8.0, + }, + ]] + -- Default + Mie = { Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, -- Reflection coefficients are given in km^-1 - Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, - -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. + Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, + -- Extinction coefficients are a fraction of the Mie coefficients + Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 8.0 - }, - --[[ - Ozone = { - Coefficients = { - -- Extinction coefficients - Extinction = {3.426, 8.298, 0.356} - }, - H_O = 8.0, - }, - ]] - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, - -- Extinction coefficients are a fraction of the Mie coefficients - Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } - }, - -- Height scale (atmosphere thickness for constant density) in Km - H_M = 1.2, - -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 - }, - -- Clear Sky - -- Mie = { - -- Coefficients = { - -- Scattering = {20e-3, 20e-3, 20e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 1.2, - -- G = 0.76, - -- }, - -- Cloudy - -- Mie = { - -- Coefficients = { - -- Scattering = {3e-3, 3e-3, 3e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 3.0, - -- G = 0.65, - -- }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + -- Height scale (atmosphere thickness for constant density) in Km + H_M = 1.2, + -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + -- Clear Sky + -- Mie = { + -- Coefficients = { + -- Scattering = {20e-3, 20e-3, 20e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 1.2, + -- G = 0.76, + -- }, + -- Cloudy + -- Mie = { + -- Coefficients = { + -- Scattering = {3e-3, 3e-3, 3e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 3.0, + -- G = 0.65, + -- }, + Debug = { + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false }, ShadowGroup = { Source1 = { diff --git a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset index 9f45e9804b..40b774b767 100644 --- a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset @@ -8,53 +8,51 @@ local Atmosphere = { Parent = transforms.Mars.Identifier, Renderable = { Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 3463.17495, - --PlanetRadius = 3396.19, - --PlanetRadius = 3393.0, - PlanetRadius = 3386.190, - PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.37, - SunIntensity = 13.1, - MieScatteringExtinctionPropCoefficient = 0.23862, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 19.918E-3, 13.57E-3, 5.75E-3 } - -- In Rayleigh scattering, the coefficients of - -- absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 10.43979 + -- Atmosphere radius in Km + AtmosphereRadius = 3463.17495, + --PlanetRadius = 3396.19, + --PlanetRadius = 3393.0, + PlanetRadius = 3386.190, + PlanetAverageGroundReflectance = 0.1, + GroundRadianceEmittion = 0.37, + SunIntensity = 13.1, + MieScatteringExtinctionPropCoefficient = 0.23862, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 19.918E-3, 13.57E-3, 5.75E-3 } + -- In Rayleigh scattering, the coefficients of + -- absorption and scattering are the same. }, - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, - -- Extinction coefficients are a fraction of the Scattering coefficients - Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } - }, - -- Mie Height scale (atmosphere thickness for constant density) in Km - H_M = 3.09526, - -- Mie Phase Function Value (G e [-1.0, 1.0]. - -- If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 10.43979 + }, + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, + -- Extinction coefficients are a fraction of the Scattering coefficients + Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + -- Mie Height scale (atmosphere thickness for constant density) in Km + H_M = 3.09526, + -- Mie Phase Function Value (G e [-1.0, 1.0]. + -- If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + Image = { + ToneMapping = jToneMapping, + Exposure = 0.4, + Background = 1.8, + Gamma = 1.85 + }, + Debug = { + -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false } }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset index 5742ade4a8..fa80be8438 100644 --- a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset @@ -8,51 +8,49 @@ local Atmosphere = { Parent = transforms.Venus.Identifier, Renderable = { Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 6121.9, - PlanetRadius = 6051.9, - PlanetAverageGroundReflectance = 0.018, - GroundRadianceEmittion = 0.8, - SunIntensity = 11.47, - --MieScatteringExtinctionPropCoefficient = 0.23862, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 19.518E-3, 13.83E-3, 3.65E-3 } - -- In Rayleigh scattering, the coefficients of - -- absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 3.53 + -- Atmosphere radius in Km + AtmosphereRadius = 6121.9, + PlanetRadius = 6051.9, + PlanetAverageGroundReflectance = 0.018, + GroundRadianceEmittion = 0.8, + SunIntensity = 11.47, + --MieScatteringExtinctionPropCoefficient = 0.23862, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 19.518E-3, 13.83E-3, 3.65E-3 } + -- In Rayleigh scattering, the coefficients of + -- absorption and scattering are the same. }, - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, - -- Extinction coefficients are a fraction of the Scattering coefficients - Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } - }, - -- Mie Height scale (atmosphere thickness for constant density) in Km - H_M = 5.42, - -- Mie Phase Function Value (G e [-1.0, 1.0]. - -- If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 3.53 + }, + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, + -- Extinction coefficients are a fraction of the Scattering coefficients + Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + -- Mie Height scale (atmosphere thickness for constant density) in Km + H_M = 5.42, + -- Mie Phase Function Value (G e [-1.0, 1.0]. + -- If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + Image = { + ToneMapping = jToneMapping, + Exposure = 0.4, + Background = 1.8, + Gamma = 1.85 + }, + Debug = { + -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false } }, GUI = { diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 923dc6631e..5e09d56578 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -60,22 +60,21 @@ namespace { constexpr const char* KeyShadowSource = "Source"; constexpr const char* KeyShadowCaster = "Caster"; - constexpr const char* keyAtmosphere = "Atmosphere"; - constexpr const char* keyAtmosphereRadius = "AtmosphereRadius"; - constexpr const char* keyPlanetRadius = "PlanetRadius"; + constexpr const char* keyAtmosphereRadius = "AtmosphereRadius"; + constexpr const char* keyPlanetRadius = "PlanetRadius"; constexpr const char* keyAverageGroundReflectance = "PlanetAverageGroundReflectance"; - constexpr const char* keyRayleigh = "Rayleigh"; - constexpr const char* keyRayleighHeightScale = "H_R"; - constexpr const char* keyOzone = "Ozone"; - constexpr const char* keyOzoneHeightScale = "H_O"; - constexpr const char* keyMie = "Mie"; - constexpr const char* keyMieHeightScale = "H_M"; - constexpr const char* keyMiePhaseConstant = "G"; - constexpr const char* keyImage = "Image"; - constexpr const char* keyToneMappingOp = "ToneMapping"; - constexpr const char* keyATMDebug = "Debug"; - constexpr const char* keyTextureScale = "PreCalculatedTextureScale"; - constexpr const char* keySaveTextures = "SaveCalculatedTextures"; + constexpr const char* keyRayleigh = "Rayleigh"; + constexpr const char* keyRayleighHeightScale = "H_R"; + constexpr const char* keyOzone = "Ozone"; + constexpr const char* keyOzoneHeightScale = "H_O"; + constexpr const char* keyMie = "Mie"; + constexpr const char* keyMieHeightScale = "H_M"; + constexpr const char* keyMiePhaseConstant = "G"; + constexpr const char* keyImage = "Image"; + constexpr const char* keyToneMappingOp = "ToneMapping"; + constexpr const char* keyATMDebug = "Debug"; + constexpr const char* keyTextureScale = "PreCalculatedTextureScale"; + constexpr const char* keySaveTextures = "SaveCalculatedTextures"; constexpr openspace::properties::Property::PropertyInfo AtmosphereHeightInfo = { "atmosphereHeight", @@ -220,10 +219,200 @@ namespace openspace { documentation::Documentation RenderableAtmosphere::Documentation() { using namespace documentation; + + TableVerifier* shadowGroupTable = new TableVerifier({ + { + "*", + new TableVerifier({ + { + "Name", + new StringVerifier, + Optional::No, + "The scene graph node name of the caster/source" + }, + { + "Radius", + new DoubleVerifier, + Optional::No, + "The radius of the object in meters" + } + }), + Optional::No, + "A list of casters and sources. The sources must be named " + "SourceX and the casters be named CasterX where X is a whole " + "number starting at 1" + } + }); + + TableVerifier* rayleighTable = new TableVerifier({ + { + "Coefficients", + new TableVerifier({ + { + "Wavelengths", + new DoubleVector3Verifier, + Optional::Yes, + "" + }, + { + "Scattering", + new DoubleVector3Verifier, + Optional::No, + "" + } + }), + Optional::No, + "" + }, + { + keyRayleighHeightScale, + new DoubleVerifier, + Optional::No, + "" + }, + }); + + TableVerifier* ozoneTable = new TableVerifier({ + { + keyOzoneHeightScale, + new DoubleVerifier, + Optional::Yes, + "" + }, + { + "Coefficients", + new TableVerifier({ + { + "Extinction", + new DoubleVector4Verifier, + Optional::Yes, + "" + } + }), + Optional::Yes, + "" + } + }); + + TableVerifier* mieTable = new TableVerifier({ + { + keyMieHeightScale, + new DoubleVerifier, + Optional::No, + "" + }, + { + "Coefficients", + new TableVerifier({ + { + "Scattering", + new DoubleVector3Verifier, + Optional::No, + "" + }, + { + "Extinction", + new DoubleVector3Verifier, + Optional::No, + "" + } + }), + Optional::No, + "" + }, + { + keyMiePhaseConstant, + new DoubleVerifier, + Optional::No, + "" + } + }); + return { "RenderableAtmosphere", "atmosphere_renderable_atmosphere", - {} + { + { + KeyShadowGroup, + shadowGroupTable, + Optional::Yes, + "Declares shadow groups, meaning which nodes are considered in shadow " + "calculations" + }, + { + keyAtmosphereRadius, + new DoubleVerifier, + Optional::No, + "The radius of the atmosphere in meters" + }, + { + keyPlanetRadius, + new DoubleVerifier, + Optional::No, + "The radius of the planet in meters" + }, + { + keyAverageGroundReflectance, + new DoubleVerifier, + Optional::No, + "" + }, + { + SunIntensityInfo.identifier, + new DoubleVerifier, + Optional::Yes, + SunIntensityInfo.description + }, + { + MieScatteringExtinctionPropCoeffInfo.identifier, + new DoubleVerifier, + Optional::Yes, + MieScatteringExtinctionPropCoeffInfo.description + }, + { + GroundRadianceEmittioninfo.identifier, + new DoubleVerifier, + Optional::No, + GroundRadianceEmittioninfo.description + }, + { + keyRayleigh, + rayleighTable, + Optional::No, + "" + }, + { + keyOzone, + ozoneTable, + Optional::Yes, + "" + }, + { + keyMie, + mieTable, + Optional::No, + "" + }, + { + keyATMDebug, + new TableVerifier({ + { + keyTextureScale, + new DoubleInRangeVerifier(0.0, 1.0), + Optional::Yes, + "" + }, + { + keySaveTextures, + new BoolVerifier, + Optional::Yes, + "" + } + }), + Optional::Yes, + "" + } + } }; } @@ -256,490 +445,247 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) , _sunFollowingCameraEnabledP(EnableSunOnCameraPositionInfo, false) , _hardShadowsEnabledP(EclipseHardShadowsInfo, false) { - ghoul_precondition( - dictionary.hasValue(SceneGraphNode::KeyIdentifier), - "RenderableAtmosphere needs the identifier to be specified" - ); - documentation::testSpecificationAndThrow( Documentation(), dictionary, "RenderableAtmosphere" ); - const std::string identifier = dictionary.value( - SceneGraphNode::KeyIdentifier - ); //================================================================ - //======== Reads Shadow (Eclipses) Entries in mod file =========== + //======== Reads Shadow (Eclipses) Entries in asset file ========= //================================================================ - if (dictionary.hasValue(KeyShadowGroup)) { + if (dictionary.hasKey(KeyShadowGroup)) { ghoul::Dictionary shadowDictionary = dictionary.value(KeyShadowGroup); - bool disableShadows = false; bool success = true; std::vector> sourceArray; unsigned int sourceCounter = 1; while (success) { - std::string keyName = - KeyShadowSource + std::to_string(sourceCounter) + ".Name"; - std::string keyRadius = - KeyShadowSource + std::to_string(sourceCounter) + ".Radius"; + std::string baseKey = KeyShadowSource + std::to_string(sourceCounter); + success = shadowDictionary.hasKey(baseKey); - success = shadowDictionary.hasValue(keyName); if (success) { - std::string sourceName = shadowDictionary.value(keyName); - success = shadowDictionary.hasValue(keyRadius); - if (success) { - double sourceRadius = shadowDictionary.value(keyRadius); - sourceArray.emplace_back(sourceName, sourceRadius); - } - else { - LWARNING(fmt::format( - "No Radius value expecified for Shadow Source Name '{}' from " - "'{}' planet. Disabling shadows for this planet.", - sourceName, - identifier - )); - disableShadows = true; - break; - } + ghoul::Dictionary s = shadowDictionary.value(baseKey); + + std::string sourceName = s.value("Name"); + double sourceRadius = s.value("Radius"); + sourceArray.emplace_back(sourceName, sourceRadius); } sourceCounter++; } - if (!disableShadows && !sourceArray.empty()) { - success = true; - std::vector> casterArray; - unsigned int casterCounter = 1; - while (success) { - std::string keyName = - KeyShadowCaster + std::to_string(casterCounter) + ".Name"; - std::string keyRadius = - KeyShadowCaster + std::to_string(casterCounter) + ".Radius"; + success = true; + std::vector> casterArray; + unsigned int casterCounter = 1; + while (success) { + std::string baseKey = KeyShadowCaster + std::to_string(casterCounter); + success = shadowDictionary.hasKey(baseKey); - success = shadowDictionary.hasValue(keyName); - if (success) { - std::string casterName = shadowDictionary.value(keyName); - - success = shadowDictionary.hasValue(keyRadius); - if (success) { - double casterRadius = - shadowDictionary.value(keyRadius); - casterArray.emplace_back(casterName, casterRadius); - } - else { - LWARNING(fmt::format( - "No Radius value expecified for Shadow Caster Name '{}' from " - "'{}' planet. Disabling shadows for this planet.", - casterName, - identifier - )); - disableShadows = true; - break; - } - } - - casterCounter++; + if (success) { + ghoul::Dictionary s = shadowDictionary.value(baseKey); + std::string casterName = s.value("Name"); + double casterRadius = s.value("Radius"); + casterArray.emplace_back(casterName, casterRadius); } - if (!disableShadows && (!sourceArray.empty() && !casterArray.empty())) { - for (const auto & source : sourceArray) { - for (const auto & caster : casterArray) { - ShadowConfiguration sc; - sc.source = source; - sc.caster = caster; - _shadowConfArray.push_back(sc); - } + casterCounter++; + } + + if (!sourceArray.empty() && !casterArray.empty()) { + for (const std::pair& source : sourceArray) { + for (const std::pair& caster : casterArray) { + ShadowConfiguration sc; + sc.source = source; + sc.caster = caster; + _shadowConfArray.push_back(sc); } - _shadowEnabled = true; } + _shadowEnabled = true; } } //================================================================ //========== Reads Atmosphere Entries from mod file ============== //================================================================ - bool success = dictionary.hasValue(keyAtmosphere); - if (success) { - ghoul::Dictionary atmosphereDictionary = - dictionary.value(keyAtmosphere); - bool errorReadingAtmosphereData = false; - if (atmosphereDictionary.hasKey(keyAtmosphereRadius)) { - _atmosphereRadius = static_cast( - atmosphereDictionary.value(keyAtmosphereRadius) + _atmosphereRadius = static_cast(dictionary.value(keyAtmosphereRadius)); + _atmospherePlanetRadius = static_cast( + dictionary.value(keyPlanetRadius) + ); + _planetAverageGroundReflectance = static_cast( + dictionary.value(keyAverageGroundReflectance) + ); + _planetGroundRadianceEmittion = static_cast( + dictionary.value(GroundRadianceEmittioninfo.identifier) + ); + + if (dictionary.hasKey(SunIntensityInfo.identifier)) { + _sunRadianceIntensity = static_cast( + dictionary.value(SunIntensityInfo.identifier) + ); + } + + if (dictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) { + _mieScattExtPropCoefProp = static_cast( + dictionary.value(MieScatteringExtinctionPropCoeffInfo.identifier) + ); + } + + { + ghoul::Dictionary rayleighDict = dictionary.value(keyRayleigh); + + ghoul::Dictionary coeffs = rayleighDict.value("Coefficients"); + _rayleighScatteringCoeff = coeffs.value("Scattering"); + + _rayleighHeightScale = static_cast( + rayleighDict.value(keyRayleighHeightScale) + ); + } + + + _ozoneLayerEnabled = false; + if (dictionary.hasValue(keyOzone)) { + ghoul::Dictionary ozoneDict = dictionary.value(keyOzone); + + if (ozoneDict.hasValue(keyOzoneHeightScale)) { + _ozoneHeightScale = static_cast( + ozoneDict.value(keyOzoneHeightScale) ); + _ozoneLayerEnabled = true; } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Atmosphere Radius value specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." + + if (ozoneDict.hasValue("Coefficients")) { + ghoul::Dictionary coeff = ozoneDict.value("Coefficients"); + if (coeff.hasValue("Extinction")) { + _ozoneExtinctionCoeff = coeff.value("Extinction"); + } + } + } + + { + ghoul::Dictionary mieDict = dictionary.value(keyMie); + _mieHeightScale = static_cast(mieDict.value(keyMieHeightScale)); + + ghoul::Dictionary coeffs = mieDict.value("Coefficients"); + + _mieScatteringCoeff = coeffs.value("Scattering"); + _mieExtinctionCoeff = coeffs.value("Extinction"); + + _miePhaseConstant = static_cast( + mieDict.value(keyMiePhaseConstant) + ); + } + + if (dictionary.hasValue(keyATMDebug)) { + ghoul::Dictionary debugDict = dictionary.value(keyATMDebug); + if (debugDict.hasKey(keyTextureScale)) { + _preCalculatedTexturesScale = static_cast( + debugDict.value(keyTextureScale) ); + LDEBUG(fmt::format( + "Atmosphere Texture Scaled to {}", _preCalculatedTexturesScale + )); } - if (atmosphereDictionary.hasKey(keyPlanetRadius)) { - _atmospherePlanetRadius = static_cast( - atmosphereDictionary.value(keyPlanetRadius) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Planet Radius value expecified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); + if (debugDict.hasKey(keySaveTextures)) { + _saveCalculationsToTexture = debugDict.value(keySaveTextures); + LDEBUG("Saving Precalculated Atmosphere Textures"); } + } - if (atmosphereDictionary.hasKey(keyAverageGroundReflectance)) { - _planetAverageGroundReflectance = static_cast( - atmosphereDictionary.value(keyAverageGroundReflectance) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Average Atmosphere Ground Reflectance value specified for " - "Atmosphere Effects. Disabling atmosphere effects for this planet." - ); - } + //======================================================== + //============== Atmosphere Properties =================== + //======================================================== + auto updateAtmosphere = [this]() { updateAtmosphereParameters(); }; - if (atmosphereDictionary.hasKey(SunIntensityInfo.identifier)) { - _sunRadianceIntensity = static_cast( - atmosphereDictionary.value(SunIntensityInfo.identifier) - ); - } + _atmosphereHeightP =_atmosphereRadius - _atmospherePlanetRadius; + _atmosphereHeightP.onChange(updateAtmosphere); + addProperty(_atmosphereHeightP); - if (atmosphereDictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) - { - _mieScattExtPropCoefProp = static_cast( - atmosphereDictionary.value( - MieScatteringExtinctionPropCoeffInfo.identifier - ) - ); - } + _groundAverageReflectanceP = _planetAverageGroundReflectance; + _groundAverageReflectanceP.onChange(updateAtmosphere); + addProperty(_groundAverageReflectanceP); - if (atmosphereDictionary.hasKey(GroundRadianceEmittioninfo.identifier)) { - _planetGroundRadianceEmittion = static_cast( - atmosphereDictionary.value(GroundRadianceEmittioninfo.identifier) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Ground Radiance Emitted percentage value specified for Atmosphere " - "Effects. Disabling atmosphere effects for this planet." - ); - } + _groundRadianceEmittionP = _planetGroundRadianceEmittion; + _groundRadianceEmittionP.onChange(updateAtmosphere); + addProperty(_groundRadianceEmittionP); - success = atmosphereDictionary.hasValue(keyRayleigh); - if (success) { - ghoul::Dictionary rayleighDictionary = - atmosphereDictionary.value(keyRayleigh); - // Not using right now. - glm::dvec3 rayleighWavelengths = glm::dvec3(0.f); - if (rayleighDictionary.hasValue("Coefficients")) { - ghoul::Dictionary coefficientsDictionary = - rayleighDictionary.value("Coefficients"); - if (coefficientsDictionary.hasKey("Wavelengths")) { - rayleighWavelengths = - coefficientsDictionary.value("Wavelengths"); - } + _rayleighHeightScaleP = _rayleighHeightScale; + _rayleighHeightScaleP.onChange(updateAtmosphere); + addProperty(_rayleighHeightScaleP); - if (coefficientsDictionary.hasKey("Scattering")) { - _rayleighScatteringCoeff = coefficientsDictionary.value( - "Scattering" - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Rayleigh Scattering parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Rayleigh Scattering parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } + _rayleighScatteringCoeffXP = _rayleighScatteringCoeff.x * 1000.0f; + _rayleighScatteringCoeffXP.onChange(updateAtmosphere); + addProperty(_rayleighScatteringCoeffXP); - if (rayleighDictionary.hasKey(keyRayleighHeightScale)) { - _rayleighHeightScale = static_cast( - rayleighDictionary.value(keyRayleighHeightScale) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Rayleigh Height Scale value specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Rayleigh parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } + _rayleighScatteringCoeffYP = _rayleighScatteringCoeff.y * 1000.0f; + _rayleighScatteringCoeffYP.onChange(updateAtmosphere); + addProperty(_rayleighScatteringCoeffYP); - success = atmosphereDictionary.hasValue(keyOzone); - if (success) { - ghoul::Dictionary ozoneDictionary = - atmosphereDictionary.value(keyOzone); - _ozoneLayerEnabled = ozoneDictionary.hasValue(keyOzoneHeightScale); - if (_ozoneLayerEnabled) { - _ozoneHeightScale = static_cast( - ozoneDictionary.value(keyOzoneHeightScale) - ); - } + _rayleighScatteringCoeffZP = _rayleighScatteringCoeff.z * 1000.0f; + _rayleighScatteringCoeffZP.onChange(updateAtmosphere); + addProperty(_rayleighScatteringCoeffZP); - if (ozoneDictionary.hasValue("Coefficients")) { - ghoul::Dictionary coeff = - ozoneDictionary.value("Coefficients"); - if (coeff.hasValue("Extinction")) { - _ozoneExtinctionCoeff = coeff.value("Extinction"); - } - else { - _ozoneLayerEnabled = false; - } - } - else { - _ozoneLayerEnabled = false; - } - } - else { - _ozoneLayerEnabled = false; - } + _ozoneEnabledP = _ozoneLayerEnabled; + _ozoneEnabledP.onChange(updateAtmosphere); + addProperty(_ozoneEnabledP); - success = atmosphereDictionary.hasValue(keyMie); - if (success) { - ghoul::Dictionary mieDictionary = - atmosphereDictionary.value(keyMie); - if (mieDictionary.hasKey(keyMieHeightScale)) { - _mieHeightScale = static_cast( - mieDictionary.value(keyMieHeightScale) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Height Scale value specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } + _ozoneHeightScaleP = _ozoneHeightScale; + _ozoneHeightScaleP.onChange(updateAtmosphere); + addProperty(_ozoneHeightScaleP); - if (mieDictionary.hasValue("Coefficients")) { - ghoul::Dictionary coeffs = - mieDictionary.value("Coefficients"); + _ozoneCoeffXP = _ozoneExtinctionCoeff.x * 100000.0f; + _ozoneCoeffXP.onChange(updateAtmosphere); + addProperty(_ozoneCoeffXP); - if (coeffs.hasValue("Scattering")) { - _mieScatteringCoeff = coeffs.value("Scattering"); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Scattering parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - - if (coeffs.hasValue("Extinction")) { - _mieExtinctionCoeff = coeffs.value("Extinction"); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Scattering parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Scattering parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - - if (mieDictionary.hasValue(keyMiePhaseConstant)) { - _miePhaseConstant = static_cast( - mieDictionary.value(keyMiePhaseConstant) - ); - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie Phase Constant value specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - } - else { - errorReadingAtmosphereData = true; - LWARNINGC( - identifier, - "No Mie parameters specified for Atmosphere Effects. " - "Disabling atmosphere effects for this planet." - ); - } - - success = atmosphereDictionary.hasValue(keyImage); - if (success) { - ghoul::Dictionary ImageDictionary = - atmosphereDictionary.value(keyImage); - if (ImageDictionary.hasKey(keyToneMappingOp)) { - _preCalculatedTexturesScale = static_cast( - ImageDictionary.value(keyToneMappingOp) - ); - LDEBUG(fmt::format( - "Atmosphere Texture Scaled to {}", - _preCalculatedTexturesScale - )); - } - } - - success = atmosphereDictionary.hasValue(keyATMDebug); - if (success) { - ghoul::Dictionary debugDictionary = - atmosphereDictionary.value(keyATMDebug); - if (debugDictionary.hasKey(keyTextureScale)) { - _preCalculatedTexturesScale = static_cast( - debugDictionary.value(keyTextureScale) - ); - LDEBUG(fmt::format( - "Atmosphere Texture Scaled to {}", - _preCalculatedTexturesScale - )); - } - - if (debugDictionary.hasKey(keySaveTextures)) { - _saveCalculationsToTexture = debugDictionary.value(keySaveTextures); - LDEBUG("Saving Precalculated Atmosphere Textures"); - } - - } - - if (!errorReadingAtmosphereData) { - _atmosphereEnabled = true; - - //======================================================== - //============== Atmosphere Properties =================== - //======================================================== - - auto updateAtmosphere = [this]() { updateAtmosphereParameters(); }; - - _atmosphereHeightP =_atmosphereRadius - _atmospherePlanetRadius; - _atmosphereHeightP.onChange(updateAtmosphere); - addProperty(_atmosphereHeightP); - - _groundAverageReflectanceP = _planetAverageGroundReflectance; - _groundAverageReflectanceP.onChange(updateAtmosphere); - addProperty(_groundAverageReflectanceP); - - _groundRadianceEmittionP = _planetGroundRadianceEmittion; - _groundRadianceEmittionP.onChange(updateAtmosphere); - addProperty(_groundRadianceEmittionP); - - _rayleighHeightScaleP = _rayleighHeightScale; - _rayleighHeightScaleP.onChange(updateAtmosphere); - addProperty(_rayleighHeightScaleP); - - _rayleighScatteringCoeffXP = _rayleighScatteringCoeff.x * 1000.0f; - _rayleighScatteringCoeffXP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffXP); - - _rayleighScatteringCoeffYP = _rayleighScatteringCoeff.y * 1000.0f; - _rayleighScatteringCoeffYP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffYP); - - _rayleighScatteringCoeffZP = _rayleighScatteringCoeff.z * 1000.0f; - _rayleighScatteringCoeffZP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffZP); - - _ozoneEnabledP = _ozoneLayerEnabled; - _ozoneEnabledP.onChange(updateAtmosphere); - addProperty(_ozoneEnabledP); - - _ozoneHeightScaleP = _ozoneHeightScale; - _ozoneHeightScaleP.onChange(updateAtmosphere); - addProperty(_ozoneHeightScaleP); - - _ozoneCoeffXP = _ozoneExtinctionCoeff.x * 100000.0f; - _ozoneCoeffXP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffXP); - - _ozoneCoeffYP = _ozoneExtinctionCoeff.y * 100000.0f; - _ozoneCoeffYP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffYP); + _ozoneCoeffYP = _ozoneExtinctionCoeff.y * 100000.0f; + _ozoneCoeffYP.onChange(updateAtmosphere); + addProperty(_ozoneCoeffYP); - _ozoneCoeffZP = _ozoneExtinctionCoeff.z * 100000.0f; - _ozoneCoeffZP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffZP); + _ozoneCoeffZP = _ozoneExtinctionCoeff.z * 100000.0f; + _ozoneCoeffZP.onChange(updateAtmosphere); + addProperty(_ozoneCoeffZP); - _mieHeightScaleP = _mieHeightScale; - _mieHeightScaleP.onChange(updateAtmosphere); - addProperty(_mieHeightScaleP); + _mieHeightScaleP = _mieHeightScale; + _mieHeightScaleP.onChange(updateAtmosphere); + addProperty(_mieHeightScaleP); - _mieScatteringCoeffXP = _mieScatteringCoeff.x * 1000.0f; - _mieScatteringCoeffXP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffXP); + _mieScatteringCoeffXP = _mieScatteringCoeff.x * 1000.0f; + _mieScatteringCoeffXP.onChange(updateAtmosphere); + addProperty(_mieScatteringCoeffXP); - _mieScatteringCoeffYP = _mieScatteringCoeff.y * 1000.0f; - _mieScatteringCoeffYP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffYP); + _mieScatteringCoeffYP = _mieScatteringCoeff.y * 1000.0f; + _mieScatteringCoeffYP.onChange(updateAtmosphere); + addProperty(_mieScatteringCoeffYP); - _mieScatteringCoeffZP = _mieScatteringCoeff.z * 1000.0f; - _mieScatteringCoeffZP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffZP); + _mieScatteringCoeffZP = _mieScatteringCoeff.z * 1000.0f; + _mieScatteringCoeffZP.onChange(updateAtmosphere); + addProperty(_mieScatteringCoeffZP); - _mieScatteringExtinctionPropCoefficientP = - _mieScattExtPropCoefProp != 1.f ? _mieScattExtPropCoefProp : - _mieScatteringCoeff.x / _mieExtinctionCoeff.x; + _mieScatteringExtinctionPropCoefficientP = + _mieScattExtPropCoefProp != 1.f ? _mieScattExtPropCoefProp : + _mieScatteringCoeff.x / _mieExtinctionCoeff.x; - _mieScatteringExtinctionPropCoefficientP.onChange(updateAtmosphere); - addProperty(_mieScatteringExtinctionPropCoefficientP); + _mieScatteringExtinctionPropCoefficientP.onChange(updateAtmosphere); + addProperty(_mieScatteringExtinctionPropCoefficientP); - _mieAsymmetricFactorGP = _miePhaseConstant; - _mieAsymmetricFactorGP.onChange(updateAtmosphere); - addProperty(_mieAsymmetricFactorGP); + _mieAsymmetricFactorGP = _miePhaseConstant; + _mieAsymmetricFactorGP.onChange(updateAtmosphere); + addProperty(_mieAsymmetricFactorGP); - _sunIntensityP = _sunRadianceIntensity; - _sunIntensityP.onChange(updateAtmosphere); - addProperty(_sunIntensityP); + _sunIntensityP = _sunRadianceIntensity; + _sunIntensityP.onChange(updateAtmosphere); + addProperty(_sunIntensityP); - _sunFollowingCameraEnabledP = _sunFollowingCameraEnabled; - _sunFollowingCameraEnabledP.onChange(updateAtmosphere); - addProperty(_sunFollowingCameraEnabledP); + _sunFollowingCameraEnabledP = _sunFollowingCameraEnabled; + _sunFollowingCameraEnabledP.onChange(updateAtmosphere); + addProperty(_sunFollowingCameraEnabledP); - _hardShadowsEnabledP = _hardShadows; - _hardShadowsEnabledP.onChange(updateAtmosphere); - if (_shadowEnabled) { - addProperty(_hardShadowsEnabledP); - } - } + _hardShadowsEnabledP = _hardShadows; + _hardShadowsEnabledP.onChange(updateAtmosphere); + if (_shadowEnabled) { + addProperty(_hardShadowsEnabledP); } } @@ -751,46 +697,44 @@ void RenderableAtmosphere::deinitializeGL() { } void RenderableAtmosphere::initializeGL() { - if (_atmosphereEnabled) { - _deferredcaster = std::make_unique(); - if (_deferredcaster) { - _deferredcaster->setAtmosphereRadius(_atmosphereRadius); - _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); - _deferredcaster->setPlanetAverageGroundReflectance( - _planetAverageGroundReflectance - ); - _deferredcaster->setPlanetGroundRadianceEmittion( - _planetGroundRadianceEmittion - ); - _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); - _deferredcaster->enableOzone(_ozoneLayerEnabled); - _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); - _deferredcaster->setMieHeightScale(_mieHeightScale); - _deferredcaster->setMiePhaseConstant(_miePhaseConstant); - _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); - _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); - _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); - _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); - _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); - // TODO: Fix the ellipsoid nature of the renderable globe (JCC) - //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); - _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); + _deferredcaster = std::make_unique(); + if (_deferredcaster) { + _deferredcaster->setAtmosphereRadius(_atmosphereRadius); + _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); + _deferredcaster->setPlanetAverageGroundReflectance( + _planetAverageGroundReflectance + ); + _deferredcaster->setPlanetGroundRadianceEmittion( + _planetGroundRadianceEmittion + ); + _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); + _deferredcaster->enableOzone(_ozoneLayerEnabled); + _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); + _deferredcaster->setMieHeightScale(_mieHeightScale); + _deferredcaster->setMiePhaseConstant(_miePhaseConstant); + _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); + _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); + _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); + _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); + _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); + // TODO: Fix the ellipsoid nature of the renderable globe (JCC) + //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); + _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); - _deferredcaster->setPrecalculationTextureScale(_preCalculatedTexturesScale); - if (_saveCalculationsToTexture) - _deferredcaster->enablePrecalculationTexturesSaving(); + _deferredcaster->setPrecalculationTextureScale(_preCalculatedTexturesScale); + if (_saveCalculationsToTexture) + _deferredcaster->enablePrecalculationTexturesSaving(); - if (_shadowEnabled) { - _deferredcaster->setShadowConfigArray(_shadowConfArray); - _deferredcaster->setHardShadows(_hardShadows); - } - - _deferredcaster->initialize(); + if (_shadowEnabled) { + _deferredcaster->setShadowConfigArray(_shadowConfArray); + _deferredcaster->setHardShadows(_hardShadows); } - global::deferredcasterManager->attachDeferredcaster(*_deferredcaster); + _deferredcaster->initialize(); } + global::deferredcasterManager->attachDeferredcaster(*_deferredcaster); + return; } @@ -812,21 +756,17 @@ glm::dmat4 RenderableAtmosphere::computeModelTransformMatrix( void RenderableAtmosphere::render(const RenderData& data, RendererTasks& renderTask) { ZoneScoped - if (_atmosphereEnabled) { - DeferredcasterTask task{ _deferredcaster.get(), data }; - renderTask.deferredcasterTasks.push_back(task); - } + DeferredcasterTask task{ _deferredcaster.get(), data }; + renderTask.deferredcasterTasks.push_back(task); } void RenderableAtmosphere::update(const UpdateData& data) { _stateMatrix = data.modelTransform.rotation; - if (_deferredcaster) { - _deferredcaster->setTime(data.time.j2000Seconds()); - glm::dmat4 modelTransform = computeModelTransformMatrix(data.modelTransform); - _deferredcaster->setModelTransform(modelTransform); - _deferredcaster->update(data); - } + _deferredcaster->setTime(data.time.j2000Seconds()); + glm::dmat4 modelTransform = computeModelTransformMatrix(data.modelTransform); + _deferredcaster->setModelTransform(modelTransform); + _deferredcaster->update(data); } void RenderableAtmosphere::updateAtmosphereParameters() { @@ -835,7 +775,8 @@ void RenderableAtmosphere::updateAtmosphereParameters() { if (_sunRadianceIntensity != _sunIntensityP || _planetGroundRadianceEmittion != _groundRadianceEmittionP || _sunFollowingCameraEnabled != _sunFollowingCameraEnabledP || - _hardShadows != _hardShadowsEnabledP) { + _hardShadows != _hardShadowsEnabledP) + { executeComputation = false; } @@ -859,41 +800,39 @@ void RenderableAtmosphere::updateAtmosphereParameters() { _mieScatteringCoeffYP * 0.001f, _mieScatteringCoeffZP * 0.001f ); - _mieExtinctionCoeff = _mieScatteringCoeff * (1.0f / - static_cast(_mieScatteringExtinctionPropCoefficientP)); - _miePhaseConstant = _mieAsymmetricFactorGP; - _sunRadianceIntensity = _sunIntensityP; - _sunFollowingCameraEnabled = _sunFollowingCameraEnabledP; - _hardShadows = _hardShadowsEnabledP; + _mieExtinctionCoeff = + _mieScatteringCoeff * (1.f / _mieScatteringExtinctionPropCoefficientP); + _miePhaseConstant = _mieAsymmetricFactorGP; + _sunRadianceIntensity = _sunIntensityP; + _sunFollowingCameraEnabled = _sunFollowingCameraEnabledP; + _hardShadows = _hardShadowsEnabledP; - if (_deferredcaster) { - _deferredcaster->setAtmosphereRadius(_atmosphereRadius); - _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); - _deferredcaster->setPlanetAverageGroundReflectance( - _planetAverageGroundReflectance - ); - _deferredcaster->setPlanetGroundRadianceEmittion(_planetGroundRadianceEmittion); - _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); - _deferredcaster->enableOzone(_ozoneLayerEnabled); - _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); - _deferredcaster->setMieHeightScale(_mieHeightScale); - _deferredcaster->setMiePhaseConstant(_miePhaseConstant); - _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); - _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); - _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); - _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); - _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); - _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); - //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); + _deferredcaster->setAtmosphereRadius(_atmosphereRadius); + _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); + _deferredcaster->setPlanetAverageGroundReflectance( + _planetAverageGroundReflectance + ); + _deferredcaster->setPlanetGroundRadianceEmittion(_planetGroundRadianceEmittion); + _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); + _deferredcaster->enableOzone(_ozoneLayerEnabled); + _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); + _deferredcaster->setMieHeightScale(_mieHeightScale); + _deferredcaster->setMiePhaseConstant(_miePhaseConstant); + _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); + _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); + _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); + _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); + _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); + _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); + //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); - if (_shadowEnabled) { - _deferredcaster->setHardShadows(_hardShadows); - } + if (_shadowEnabled) { + _deferredcaster->setHardShadows(_hardShadows); + } - if (executeComputation) { - _deferredcaster->preCalculateAtmosphereParam(); - } + if (executeComputation) { + _deferredcaster->preCalculateAtmosphereParam(); } } diff --git a/modules/atmosphere/rendering/renderableatmosphere.h b/modules/atmosphere/rendering/renderableatmosphere.h index f39f4ed27e..648b705bd2 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.h +++ b/modules/atmosphere/rendering/renderableatmosphere.h @@ -42,7 +42,7 @@ namespace ghoul::opengl { class ProgramObject; class Texture; -} +} // namespace ghoul::opengl namespace openspace { @@ -108,7 +108,6 @@ private: properties::BoolProperty _sunFollowingCameraEnabledP; properties::BoolProperty _hardShadowsEnabledP; - bool _atmosphereEnabled = false; bool _ozoneLayerEnabled = false; bool _sunFollowingCameraEnabled = false; float _atmosphereRadius = 0.f; From 0bc3bb40654daafce422e456a20391ed3f13c743 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 3 Jan 2021 16:22:43 +0100 Subject: [PATCH 080/147] Simplification of RenderableAtmosphere - Removing duplicate member variables and indirection - Asset: Replacing AtmosphereRadius with AtmosphereHeight - Asset: Rename GroundRadianceEmittion to GroundRadianceEmission - Add Documentation checking to Dictionary value retrieval - Remove unused Image group --- .../planets/earth/atmosphere.asset | 4 +- .../solarsystem/planets/mars/atmosphere.asset | 12 +- .../planets/venus/atmosphere.asset | 11 +- .../rendering/renderableatmosphere.cpp | 394 ++++++------------ .../rendering/renderableatmosphere.h | 57 +-- 5 files changed, 163 insertions(+), 315 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 3e47178bf4..574c67cbf2 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -11,10 +11,10 @@ local Atmosphere = { Renderable = { Type = "RenderableAtmosphere", -- Atmosphere radius in Km - AtmosphereRadius = 6447.0, + AtmosphereHeight = 6447.0 - 6377.0, PlanetRadius = 6377.0, PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.6, + GroundRadianceEmission = 0.6, SunIntensity = 6.9, Rayleigh = { Coefficients = { diff --git a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset index 40b774b767..ff627cb98a 100644 --- a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset @@ -9,12 +9,10 @@ local Atmosphere = { Renderable = { Type = "RenderableAtmosphere", -- Atmosphere radius in Km - AtmosphereRadius = 3463.17495, - --PlanetRadius = 3396.19, - --PlanetRadius = 3393.0, + AtmosphereHeight = 3463.17495 - 3386.190, PlanetRadius = 3386.190, PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.37, + GroundRadianceEmission = 0.37, SunIntensity = 13.1, MieScatteringExtinctionPropCoefficient = 0.23862, Rayleigh = { @@ -43,12 +41,6 @@ local Atmosphere = { -- If G = 1.0, Mie phase function = Rayleigh Phase Function) G = 0.85 }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, Debug = { -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) PreCalculatedTextureScale = 1.0, diff --git a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset index fa80be8438..71a439877b 100644 --- a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset @@ -9,12 +9,11 @@ local Atmosphere = { Renderable = { Type = "RenderableAtmosphere", -- Atmosphere radius in Km - AtmosphereRadius = 6121.9, + AtmosphereHeight = 6121.9 - 6051.9, PlanetRadius = 6051.9, PlanetAverageGroundReflectance = 0.018, - GroundRadianceEmittion = 0.8, + GroundRadianceEmission = 0.8, SunIntensity = 11.47, - --MieScatteringExtinctionPropCoefficient = 0.23862, Rayleigh = { Coefficients = { -- Wavelengths are given in 10^-9m @@ -41,12 +40,6 @@ local Atmosphere = { -- If G = 1.0, Mie phase function = Rayleigh Phase Function) G = 0.85 }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, Debug = { -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) PreCalculatedTextureScale = 1.0, diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 5e09d56578..4d81cff2d2 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -60,7 +60,6 @@ namespace { constexpr const char* KeyShadowSource = "Source"; constexpr const char* KeyShadowCaster = "Caster"; - constexpr const char* keyAtmosphereRadius = "AtmosphereRadius"; constexpr const char* keyPlanetRadius = "PlanetRadius"; constexpr const char* keyAverageGroundReflectance = "PlanetAverageGroundReflectance"; constexpr const char* keyRayleigh = "Rayleigh"; @@ -77,9 +76,9 @@ namespace { constexpr const char* keySaveTextures = "SaveCalculatedTextures"; constexpr openspace::properties::Property::PropertyInfo AtmosphereHeightInfo = { - "atmosphereHeight", + "AtmosphereHeight", "Atmosphere Height (KM)", - "The thickness of the atmosphere in Km" + "The thickness of the atmosphere in km" }; constexpr openspace::properties::Property::PropertyInfo AverageGroundReflectanceInfo = @@ -91,7 +90,7 @@ namespace { }; constexpr openspace::properties::Property::PropertyInfo GroundRadianceEmittioninfo = { - "GroundRadianceEmittion", + "GroundRadianceEmission", "Percentage of initial radiance emitted from ground", "Multiplier of the ground radiance color during the rendering phase" }; @@ -103,24 +102,10 @@ namespace { "constant factor" }; - constexpr openspace::properties::Property::PropertyInfo RayleighScatteringCoeffXInfo = + constexpr openspace::properties::Property::PropertyInfo RayleighScatteringCoeffInfo = { - "RayleighScatteringCoeffX", - "Rayleigh Scattering Coeff X (x10e-3)", - "Rayleigh sea-level scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo RayleighScatteringCoeffYInfo = - { - "RayleighScatteringCoeffY", - "Rayleigh Scattering Coeff Y (x10e-3)", - "Rayleigh sea-level scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo RayleighScatteringCoeffZInfo = - { - "RayleighScatteringCoeffZ", - "Rayleigh Scattering Coeff Z (x10e-3)", + "RayleighScatteringCoeff", + "Rayleigh Scattering Coeff", "Rayleigh sea-level scattering coefficients in meters" }; @@ -137,21 +122,9 @@ namespace { "constant factor" }; - constexpr openspace::properties::Property::PropertyInfo OzoneLayerCoeffXInfo = { - "OzoneLayerCoeffX", - "Ozone Layer Extinction Coeff X (x10e-5)", - "Ozone scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo OzoneLayerCoeffYInfo = { - "OzoneLayerCoeffY", - "Ozone Layer Extinction Coeff Y (x10e-5)", - "Ozone scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo OzoneLayerCoeffZInfo = { - "OzoneLayerCoeffZ", - "Ozone Layer Extinction Coeff Z (x10e-5)", + constexpr openspace::properties::Property::PropertyInfo OzoneLayerCoeffInfo = { + "OzoneLayerCoeff", + "Ozone Layer Extinction Coeff", "Ozone scattering coefficients in meters" }; @@ -162,21 +135,9 @@ namespace { "constant factor" }; - constexpr openspace::properties::Property::PropertyInfo MieScatteringCoeffXInfo = { - "MieScatteringCoeffX", - "Mie Scattering Coeff X (x10e-3)", - "Mie sea-level scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo MieScatteringCoeffYInfo = { - "MieScatteringCoeffY", - "Mie Scattering Coeff Y (x10e-3)", - "Mie sea-level scattering coefficients in meters" - }; - - constexpr openspace::properties::Property::PropertyInfo MieScatteringCoeffZInfo = { - "MieScatteringCoeffZ", - "Mie Scattering Coeff Z (x10e-3)", + constexpr openspace::properties::Property::PropertyInfo MieScatteringCoeffInfo = { + "MieScatteringCoeff", + "Mie Scattering Coeff (x10e-3)", "Mie sea-level scattering coefficients in meters" }; @@ -238,9 +199,8 @@ documentation::Documentation RenderableAtmosphere::Documentation() { } }), Optional::No, - "A list of casters and sources. The sources must be named " - "SourceX and the casters be named CasterX where X is a whole " - "number starting at 1" + "A list of casters and sources. The sources must be named SourceX and the " + "casters be named CasterX where X is a whole number starting at 1" } }); @@ -340,10 +300,10 @@ documentation::Documentation RenderableAtmosphere::Documentation() { "calculations" }, { - keyAtmosphereRadius, + AtmosphereHeightInfo.identifier, new DoubleVerifier, Optional::No, - "The radius of the atmosphere in meters" + AtmosphereHeightInfo.description }, { keyPlanetRadius, @@ -418,32 +378,33 @@ documentation::Documentation RenderableAtmosphere::Documentation() { RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _atmosphereHeightP(AtmosphereHeightInfo, 60.0f, 0.1f, 99.0f) - , _groundAverageReflectanceP(AverageGroundReflectanceInfo, 0.1f, 0.0f, 1.0f) - , _groundRadianceEmittionP(GroundRadianceEmittioninfo, 0.3f, 0.0f, 1.0f) - , _rayleighHeightScaleP(RayleighHeightScaleInfo, 8.0f, 0.1f, 20.0f) - , _rayleighScatteringCoeffXP(RayleighScatteringCoeffXInfo, 1.0f, 0.01f, 100.0f) - , _rayleighScatteringCoeffYP(RayleighScatteringCoeffYInfo, 1.0f, 0.01f, 100.0f) - , _rayleighScatteringCoeffZP(RayleighScatteringCoeffZInfo, 1.0f, 0.01f, 100.0f) - , _ozoneEnabledP(OzoneLayerInfo, true) - , _ozoneHeightScaleP(OzoneHeightScaleInfo, 8.0f, 0.1f, 20.0f) - , _ozoneCoeffXP(OzoneLayerCoeffXInfo, 3.426f, 0.01f, 100.0f) - , _ozoneCoeffYP(OzoneLayerCoeffYInfo, 8.298f, 0.01f, 100.0f) - , _ozoneCoeffZP(OzoneLayerCoeffZInfo, 0.356f, 0.01f, 100.0f) - , _mieHeightScaleP(MieHeightScaleInfo, 1.2f, 0.1f, 20.0f) - , _mieScatteringCoeffXP(MieScatteringCoeffXInfo, 4.0f, 0.01f, 1000.0f) - , _mieScatteringCoeffYP(MieScatteringCoeffYInfo, 4.0f, 0.01f, 1000.0f) - , _mieScatteringCoeffZP(MieScatteringCoeffZInfo, 4.0f, 0.01f, 1000.0f) - , _mieScatteringExtinctionPropCoefficientP( - MieScatteringExtinctionPropCoeffInfo, - 0.9f, - 0.01f, - 1.0f + , _atmosphereHeight(AtmosphereHeightInfo, 60.f, 0.1f, 99.0f) + , _groundAverageReflectance(AverageGroundReflectanceInfo, 0.f, 0.f, 1.f) + , _groundRadianceEmission(GroundRadianceEmittioninfo, 0.f, 0.f, 1.f) + , _rayleighHeightScale(RayleighHeightScaleInfo, 0.f, 0.1f, 20.f) + , _rayleighScatteringCoeff( + RayleighScatteringCoeffInfo, + glm::vec3(0.f), glm::vec3(0.00001f), glm::vec3(0.1f) ) - , _mieAsymmetricFactorGP(MieAsymmetricFactorGInfo, 0.85f, -1.0f, 1.0f) - , _sunIntensityP(SunIntensityInfo, 50.0f, 0.1f, 1000.0f) - , _sunFollowingCameraEnabledP(EnableSunOnCameraPositionInfo, false) - , _hardShadowsEnabledP(EclipseHardShadowsInfo, false) + , _ozoneEnabled(OzoneLayerInfo, false) + , _ozoneHeightScale(OzoneHeightScaleInfo, 0.f, 0.1f, 20.f) + , _ozoneCoeff( + OzoneLayerCoeffInfo, + glm::vec3(0.f), glm::vec3(0.00001f), glm::vec3(0.001f) + ) + , _mieHeightScale(MieHeightScaleInfo, 0.f, 0.1f, 20.f) + , _mieScatteringCoeff( + MieScatteringCoeffInfo, + glm::vec3(0.004f), glm::vec3(0.00001f), glm::vec3(1.f) + ) + , _mieScatteringExtinctionPropCoefficient( + MieScatteringExtinctionPropCoeffInfo, + 0.9f, 0.01f, 1.f + ) + , _miePhaseConstant(MieAsymmetricFactorGInfo, 0.f, -1.f, 1.f) + , _sunIntensity(SunIntensityInfo, 5.f, 0.1f, 1000.f) + , _sunFollowingCameraEnabled(EnableSunOnCameraPositionInfo, false) + , _hardShadowsEnabled(EclipseHardShadowsInfo, false) { documentation::testSpecificationAndThrow( Documentation(), @@ -506,21 +467,21 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) } //================================================================ - //========== Reads Atmosphere Entries from mod file ============== + //========== Reads Atmosphere Entries from asset file ============ //================================================================ - _atmosphereRadius = static_cast(dictionary.value(keyAtmosphereRadius)); - _atmospherePlanetRadius = static_cast( - dictionary.value(keyPlanetRadius) + _atmosphereHeight = static_cast( + dictionary.value(AtmosphereHeightInfo.identifier) ); - _planetAverageGroundReflectance = static_cast( + _planetRadius = static_cast(dictionary.value(keyPlanetRadius)); + _groundAverageReflectance = static_cast( dictionary.value(keyAverageGroundReflectance) ); - _planetGroundRadianceEmittion = static_cast( + _groundRadianceEmission = static_cast( dictionary.value(GroundRadianceEmittioninfo.identifier) ); if (dictionary.hasKey(SunIntensityInfo.identifier)) { - _sunRadianceIntensity = static_cast( + _sunIntensity = static_cast( dictionary.value(SunIntensityInfo.identifier) ); } @@ -542,8 +503,6 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ); } - - _ozoneLayerEnabled = false; if (dictionary.hasValue(keyOzone)) { ghoul::Dictionary ozoneDict = dictionary.value(keyOzone); @@ -551,13 +510,13 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) _ozoneHeightScale = static_cast( ozoneDict.value(keyOzoneHeightScale) ); - _ozoneLayerEnabled = true; + _ozoneEnabled = true; } if (ozoneDict.hasValue("Coefficients")) { ghoul::Dictionary coeff = ozoneDict.value("Coefficients"); if (coeff.hasValue("Extinction")) { - _ozoneExtinctionCoeff = coeff.value("Extinction"); + _ozoneCoeff = coeff.value("Extinction"); } } } @@ -596,156 +555,113 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) //======================================================== //============== Atmosphere Properties =================== //======================================================== - auto updateAtmosphere = [this]() { updateAtmosphereParameters(); }; + auto updateWithCalculation = [this]() { + _deferredCasterNeedsUpdate = true; + _deferredCasterNeedsCalculation = true; + }; + auto updateWithoutCalculation = [this]() { + _deferredCasterNeedsUpdate = true; + }; - _atmosphereHeightP =_atmosphereRadius - _atmospherePlanetRadius; - _atmosphereHeightP.onChange(updateAtmosphere); - addProperty(_atmosphereHeightP); + _atmosphereHeight.onChange(updateWithCalculation); + addProperty(_atmosphereHeight); - _groundAverageReflectanceP = _planetAverageGroundReflectance; - _groundAverageReflectanceP.onChange(updateAtmosphere); - addProperty(_groundAverageReflectanceP); + _groundAverageReflectance.onChange(updateWithCalculation); + addProperty(_groundAverageReflectance); - _groundRadianceEmittionP = _planetGroundRadianceEmittion; - _groundRadianceEmittionP.onChange(updateAtmosphere); - addProperty(_groundRadianceEmittionP); + _groundRadianceEmission.onChange(updateWithoutCalculation); + addProperty(_groundRadianceEmission); - _rayleighHeightScaleP = _rayleighHeightScale; - _rayleighHeightScaleP.onChange(updateAtmosphere); - addProperty(_rayleighHeightScaleP); + _rayleighHeightScale.onChange(updateWithCalculation); + addProperty(_rayleighHeightScale); - _rayleighScatteringCoeffXP = _rayleighScatteringCoeff.x * 1000.0f; - _rayleighScatteringCoeffXP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffXP); + _rayleighScatteringCoeff.onChange(updateWithCalculation); + addProperty(_rayleighScatteringCoeff); - _rayleighScatteringCoeffYP = _rayleighScatteringCoeff.y * 1000.0f; - _rayleighScatteringCoeffYP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffYP); + _ozoneEnabled.onChange(updateWithCalculation); + addProperty(_ozoneEnabled); - _rayleighScatteringCoeffZP = _rayleighScatteringCoeff.z * 1000.0f; - _rayleighScatteringCoeffZP.onChange(updateAtmosphere); - addProperty(_rayleighScatteringCoeffZP); + _ozoneHeightScale.onChange(updateWithCalculation); + addProperty(_ozoneHeightScale); - _ozoneEnabledP = _ozoneLayerEnabled; - _ozoneEnabledP.onChange(updateAtmosphere); - addProperty(_ozoneEnabledP); + _ozoneCoeff.onChange(updateWithCalculation); + addProperty(_ozoneCoeff); - _ozoneHeightScaleP = _ozoneHeightScale; - _ozoneHeightScaleP.onChange(updateAtmosphere); - addProperty(_ozoneHeightScaleP); + _mieHeightScale.onChange(updateWithCalculation); + addProperty(_mieHeightScale); - _ozoneCoeffXP = _ozoneExtinctionCoeff.x * 100000.0f; - _ozoneCoeffXP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffXP); + _mieScatteringCoeff.onChange(updateWithCalculation); + addProperty(_mieScatteringCoeff); - _ozoneCoeffYP = _ozoneExtinctionCoeff.y * 100000.0f; - _ozoneCoeffYP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffYP); - - - _ozoneCoeffZP = _ozoneExtinctionCoeff.z * 100000.0f; - _ozoneCoeffZP.onChange(updateAtmosphere); - addProperty(_ozoneCoeffZP); - - _mieHeightScaleP = _mieHeightScale; - _mieHeightScaleP.onChange(updateAtmosphere); - addProperty(_mieHeightScaleP); - - _mieScatteringCoeffXP = _mieScatteringCoeff.x * 1000.0f; - _mieScatteringCoeffXP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffXP); - - _mieScatteringCoeffYP = _mieScatteringCoeff.y * 1000.0f; - _mieScatteringCoeffYP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffYP); - - _mieScatteringCoeffZP = _mieScatteringCoeff.z * 1000.0f; - _mieScatteringCoeffZP.onChange(updateAtmosphere); - addProperty(_mieScatteringCoeffZP); - - _mieScatteringExtinctionPropCoefficientP = + _mieScatteringExtinctionPropCoefficient = _mieScattExtPropCoefProp != 1.f ? _mieScattExtPropCoefProp : - _mieScatteringCoeff.x / _mieExtinctionCoeff.x; + _mieScatteringCoeff.value().x / _mieExtinctionCoeff.x; - _mieScatteringExtinctionPropCoefficientP.onChange(updateAtmosphere); - addProperty(_mieScatteringExtinctionPropCoefficientP); + _mieScatteringExtinctionPropCoefficient.onChange(updateWithCalculation); + addProperty(_mieScatteringExtinctionPropCoefficient); - _mieAsymmetricFactorGP = _miePhaseConstant; - _mieAsymmetricFactorGP.onChange(updateAtmosphere); - addProperty(_mieAsymmetricFactorGP); + _miePhaseConstant.onChange(updateWithCalculation); + addProperty(_miePhaseConstant); - _sunIntensityP = _sunRadianceIntensity; - _sunIntensityP.onChange(updateAtmosphere); - addProperty(_sunIntensityP); + _sunIntensity.onChange(updateWithoutCalculation); + addProperty(_sunIntensity); - _sunFollowingCameraEnabledP = _sunFollowingCameraEnabled; - _sunFollowingCameraEnabledP.onChange(updateAtmosphere); - addProperty(_sunFollowingCameraEnabledP); + _sunFollowingCameraEnabled.onChange(updateWithoutCalculation); + addProperty(_sunFollowingCameraEnabled); - _hardShadowsEnabledP = _hardShadows; - _hardShadowsEnabledP.onChange(updateAtmosphere); if (_shadowEnabled) { - addProperty(_hardShadowsEnabledP); + _hardShadowsEnabled.onChange(updateWithoutCalculation); + addProperty(_hardShadowsEnabled); } } void RenderableAtmosphere::deinitializeGL() { - if (_deferredcaster) { - global::deferredcasterManager->detachDeferredcaster(*_deferredcaster); - _deferredcaster = nullptr; - } + global::deferredcasterManager->detachDeferredcaster(*_deferredcaster); + _deferredcaster = nullptr; } void RenderableAtmosphere::initializeGL() { _deferredcaster = std::make_unique(); - if (_deferredcaster) { - _deferredcaster->setAtmosphereRadius(_atmosphereRadius); - _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); - _deferredcaster->setPlanetAverageGroundReflectance( - _planetAverageGroundReflectance - ); - _deferredcaster->setPlanetGroundRadianceEmittion( - _planetGroundRadianceEmittion - ); - _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); - _deferredcaster->enableOzone(_ozoneLayerEnabled); - _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); - _deferredcaster->setMieHeightScale(_mieHeightScale); - _deferredcaster->setMiePhaseConstant(_miePhaseConstant); - _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); - _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); - _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); - _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); - _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); - // TODO: Fix the ellipsoid nature of the renderable globe (JCC) - //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); - _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); + _deferredcaster->setAtmosphereRadius(_planetRadius + _atmosphereHeight); + _deferredcaster->setPlanetRadius(_planetRadius); + _deferredcaster->setPlanetAverageGroundReflectance(_groundAverageReflectance); + _deferredcaster->setPlanetGroundRadianceEmittion(_groundRadianceEmission); + _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); + _deferredcaster->enableOzone(_ozoneEnabled); + _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); + _deferredcaster->setMieHeightScale(_mieHeightScale); + _deferredcaster->setMiePhaseConstant(_miePhaseConstant); + _deferredcaster->setSunRadianceIntensity(_sunIntensity); + _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); + _deferredcaster->setOzoneExtinctionCoefficients(_ozoneCoeff); + _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); + _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); + // TODO: Fix the ellipsoid nature of the renderable globe (JCC) + //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); + _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); - _deferredcaster->setPrecalculationTextureScale(_preCalculatedTexturesScale); - if (_saveCalculationsToTexture) - _deferredcaster->enablePrecalculationTexturesSaving(); + _deferredcaster->setPrecalculationTextureScale(_preCalculatedTexturesScale); + if (_saveCalculationsToTexture) + _deferredcaster->enablePrecalculationTexturesSaving(); - if (_shadowEnabled) { - _deferredcaster->setShadowConfigArray(_shadowConfArray); - _deferredcaster->setHardShadows(_hardShadows); - } - - _deferredcaster->initialize(); + if (_shadowEnabled) { + _deferredcaster->setShadowConfigArray(_shadowConfArray); + // We no longer need it + _shadowConfArray.clear(); + _deferredcaster->setHardShadows(_hardShadowsEnabled); } - global::deferredcasterManager->attachDeferredcaster(*_deferredcaster); + _deferredcaster->initialize(); - return; + global::deferredcasterManager->attachDeferredcaster(*_deferredcaster); } bool RenderableAtmosphere::isReady() const { - bool ready = true; - ready &= (_deferredcaster != nullptr); - return ready; + return true; } glm::dmat4 RenderableAtmosphere::computeModelTransformMatrix( - const openspace::TransformData& transformData) + const TransformData& transformData) { // scale the planet to appropriate size since the planet is a unit sphere return glm::translate(glm::dmat4(1.0), transformData.translation) * // Translation @@ -761,7 +677,14 @@ void RenderableAtmosphere::render(const RenderData& data, RendererTasks& renderT } void RenderableAtmosphere::update(const UpdateData& data) { - _stateMatrix = data.modelTransform.rotation; + if (_deferredCasterNeedsUpdate) { + updateAtmosphereParameters(); + _deferredCasterNeedsUpdate = false; + } + if (_deferredCasterNeedsCalculation) { + _deferredcaster->preCalculateAtmosphereParam(); + _deferredCasterNeedsCalculation = false; + } _deferredcaster->setTime(data.time.j2000Seconds()); glm::dmat4 modelTransform = computeModelTransformMatrix(data.modelTransform); @@ -770,69 +693,28 @@ void RenderableAtmosphere::update(const UpdateData& data) { } void RenderableAtmosphere::updateAtmosphereParameters() { - bool executeComputation = true; - - if (_sunRadianceIntensity != _sunIntensityP || - _planetGroundRadianceEmittion != _groundRadianceEmittionP || - _sunFollowingCameraEnabled != _sunFollowingCameraEnabledP || - _hardShadows != _hardShadowsEnabledP) - { - executeComputation = false; - } - - _atmosphereRadius = _atmospherePlanetRadius + _atmosphereHeightP; - _planetAverageGroundReflectance = _groundAverageReflectanceP; - _planetGroundRadianceEmittion = _groundRadianceEmittionP; - _rayleighHeightScale = _rayleighHeightScaleP; - _rayleighScatteringCoeff = glm::vec3( - _rayleighScatteringCoeffXP * 0.001f, - _rayleighScatteringCoeffYP * 0.001f, - _rayleighScatteringCoeffZP * 0.001f - ); - _ozoneLayerEnabled = _ozoneEnabledP; - _ozoneHeightScale = _ozoneHeightScaleP; - _ozoneExtinctionCoeff = glm::vec3(_ozoneCoeffXP.value() * 0.00001f, - _ozoneCoeffYP.value() * 0.00001f, - _ozoneCoeffZP.value() * 0.00001f); - _mieHeightScale = _mieHeightScaleP; - _mieScatteringCoeff = glm::vec3( - _mieScatteringCoeffXP * 0.001f, - _mieScatteringCoeffYP * 0.001f, - _mieScatteringCoeffZP * 0.001f - ); _mieExtinctionCoeff = - _mieScatteringCoeff * (1.f / _mieScatteringExtinctionPropCoefficientP); - _miePhaseConstant = _mieAsymmetricFactorGP; - _sunRadianceIntensity = _sunIntensityP; - _sunFollowingCameraEnabled = _sunFollowingCameraEnabledP; - _hardShadows = _hardShadowsEnabledP; + _mieScatteringCoeff.value() / _mieScatteringExtinctionPropCoefficient.value(); - - _deferredcaster->setAtmosphereRadius(_atmosphereRadius); - _deferredcaster->setPlanetRadius(_atmospherePlanetRadius); - _deferredcaster->setPlanetAverageGroundReflectance( - _planetAverageGroundReflectance - ); - _deferredcaster->setPlanetGroundRadianceEmittion(_planetGroundRadianceEmittion); + _deferredcaster->setAtmosphereRadius(_planetRadius + _atmosphereHeight); + _deferredcaster->setPlanetRadius(_planetRadius); + _deferredcaster->setPlanetAverageGroundReflectance(_groundAverageReflectance); + _deferredcaster->setPlanetGroundRadianceEmittion(_groundRadianceEmission); _deferredcaster->setRayleighHeightScale(_rayleighHeightScale); - _deferredcaster->enableOzone(_ozoneLayerEnabled); + _deferredcaster->enableOzone(_ozoneEnabled); _deferredcaster->setOzoneHeightScale(_ozoneHeightScale); _deferredcaster->setMieHeightScale(_mieHeightScale); _deferredcaster->setMiePhaseConstant(_miePhaseConstant); - _deferredcaster->setSunRadianceIntensity(_sunRadianceIntensity); + _deferredcaster->setSunRadianceIntensity(_sunIntensity); _deferredcaster->setRayleighScatteringCoefficients(_rayleighScatteringCoeff); - _deferredcaster->setOzoneExtinctionCoefficients(_ozoneExtinctionCoeff); + _deferredcaster->setOzoneExtinctionCoefficients(_ozoneCoeff); _deferredcaster->setMieScatteringCoefficients(_mieScatteringCoeff); _deferredcaster->setMieExtinctionCoefficients(_mieExtinctionCoeff); _deferredcaster->enableSunFollowing(_sunFollowingCameraEnabled); //_deferredcaster->setEllipsoidRadii(_ellipsoid.radii()); if (_shadowEnabled) { - _deferredcaster->setHardShadows(_hardShadows); - } - - if (executeComputation) { - _deferredcaster->preCalculateAtmosphereParam(); + _deferredcaster->setHardShadows(_hardShadowsEnabled); } } diff --git a/modules/atmosphere/rendering/renderableatmosphere.h b/modules/atmosphere/rendering/renderableatmosphere.h index 648b705bd2..7fe0cbb477 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.h +++ b/modules/atmosphere/rendering/renderableatmosphere.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -86,45 +87,26 @@ private: glm::dmat4 computeModelTransformMatrix(const openspace::TransformData& transformData); void updateAtmosphereParameters(); - properties::FloatProperty _atmosphereHeightP; - properties::FloatProperty _groundAverageReflectanceP; - properties::FloatProperty _groundRadianceEmittionP; - properties::FloatProperty _rayleighHeightScaleP; - properties::FloatProperty _rayleighScatteringCoeffXP; - properties::FloatProperty _rayleighScatteringCoeffYP; - properties::FloatProperty _rayleighScatteringCoeffZP; - properties::BoolProperty _ozoneEnabledP; - properties::FloatProperty _ozoneHeightScaleP; - properties::FloatProperty _ozoneCoeffXP; - properties::FloatProperty _ozoneCoeffYP; - properties::FloatProperty _ozoneCoeffZP; - properties::FloatProperty _mieHeightScaleP; - properties::FloatProperty _mieScatteringCoeffXP; - properties::FloatProperty _mieScatteringCoeffYP; - properties::FloatProperty _mieScatteringCoeffZP; - properties::FloatProperty _mieScatteringExtinctionPropCoefficientP; - properties::FloatProperty _mieAsymmetricFactorGP; - properties::FloatProperty _sunIntensityP; - properties::BoolProperty _sunFollowingCameraEnabledP; - properties::BoolProperty _hardShadowsEnabledP; + properties::FloatProperty _atmosphereHeight; + properties::FloatProperty _groundAverageReflectance; + properties::FloatProperty _groundRadianceEmission; + properties::FloatProperty _rayleighHeightScale; + properties::Vec3Property _rayleighScatteringCoeff; + properties::BoolProperty _ozoneEnabled; + properties::FloatProperty _ozoneHeightScale; + properties::Vec3Property _ozoneCoeff; + properties::FloatProperty _mieHeightScale; + properties::Vec3Property _mieScatteringCoeff; + properties::FloatProperty _mieScatteringExtinctionPropCoefficient; + properties::FloatProperty _miePhaseConstant; + properties::FloatProperty _sunIntensity; + properties::BoolProperty _sunFollowingCameraEnabled; + properties::BoolProperty _hardShadowsEnabled; - bool _ozoneLayerEnabled = false; - bool _sunFollowingCameraEnabled = false; - float _atmosphereRadius = 0.f; - float _atmospherePlanetRadius = 0.f; - float _planetAverageGroundReflectance = 0.f; - float _planetGroundRadianceEmittion = 0.f; - float _rayleighHeightScale = 0.f; - float _ozoneHeightScale = 0.f; - float _mieHeightScale = 0.f; - float _miePhaseConstant = 0.f; - float _sunRadianceIntensity = 5.f; + float _planetRadius = 0.f; float _mieScattExtPropCoefProp = 1.f; glm::vec3 _mieExtinctionCoeff = glm::vec3(0.f); - glm::vec3 _rayleighScatteringCoeff = glm::vec3(0.f); - glm::vec3 _ozoneExtinctionCoeff = glm::vec3(0.f); - glm::vec3 _mieScatteringCoeff = glm::dvec3(0.f); // Atmosphere Debug bool _saveCalculationsToTexture = false; @@ -133,9 +115,8 @@ private: std::unique_ptr _deferredcaster; bool _shadowEnabled = false; - bool _hardShadows = false; - - glm::dmat3 _stateMatrix = glm::dmat3(1.0); + bool _deferredCasterNeedsUpdate = false; + bool _deferredCasterNeedsCalculation = false; std::vector _shadowConfArray; }; From 44f2a500c5b383ac151319b79ab8cbb5afcd78dd Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 3 Jan 2021 18:27:49 +0100 Subject: [PATCH 081/147] Simplify specification of shadow casters and light sources in atmosphere --- .../planets/earth/atmosphere.asset | 21 ++-- .../rendering/renderableatmosphere.cpp | 117 ++++++++++-------- 2 files changed, 76 insertions(+), 62 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 574c67cbf2..6392fbc1d2 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -72,18 +72,15 @@ local Atmosphere = { SaveCalculatedTextures = false }, ShadowGroup = { - Source1 = { - Name = "Sun", - -- All radius in meters - Radius = 696.3E6 - }, - --Source2 = { Name = "Monolith", Radius = 0.01E6, }, - Caster1 = { - Name = "Moon", - -- All radius in meters - Radius = 1.737E6 - } - --Caster2 = { Name = "Independency Day Ship", Radius = 0.0, } + Sources = { + { Name = "Sun", Radius = 696.3E6 }, + -- { Name = "Monolith", Radius = 0.01E6 } + }, + Casters = { + { Name = "Moon", Radius = 1.737E6 }, + -- { Name = "Independence Day Ship", Radius = 0.0 } + + } } }, GUI = { diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 4d81cff2d2..5201d6a8d3 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -183,24 +183,56 @@ documentation::Documentation RenderableAtmosphere::Documentation() { TableVerifier* shadowGroupTable = new TableVerifier({ { - "*", + "Sources", new TableVerifier({ { - "Name", - new StringVerifier, - Optional::No, - "The scene graph node name of the caster/source" - }, - { - "Radius", - new DoubleVerifier, - Optional::No, - "The radius of the object in meters" + "*", + new TableVerifier({ + { + "Name", + new StringVerifier, + Optional::No, + "The scene graph node name of the source" + }, + { + "Radius", + new DoubleVerifier, + Optional::No, + "The radius of the object in meters" + } + }), + Optional::Yes, + "Individual light sources" } }), Optional::No, - "A list of casters and sources. The sources must be named SourceX and the " - "casters be named CasterX where X is a whole number starting at 1" + "A list of light sources" + }, + { + "Casters", + new TableVerifier({ + { + "*", + new TableVerifier({ + { + "Name", + new StringVerifier, + Optional::No, + "The scene graph node name of the caster" + }, + { + "Radius", + new DoubleVerifier, + Optional::No, + "The radius of the object in meters" + } + }), + Optional::Yes, + "Individual shadow casters" + } + }), + Optional::No, + "A list of objects that cast light on this atmosphere" } }); @@ -282,7 +314,7 @@ documentation::Documentation RenderableAtmosphere::Documentation() { }, { keyMiePhaseConstant, - new DoubleVerifier, + new DoubleInRangeVerifier(-1.0, 1.0), Optional::No, "" } @@ -418,51 +450,36 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) if (dictionary.hasKey(KeyShadowGroup)) { ghoul::Dictionary shadowDictionary = dictionary.value(KeyShadowGroup); - bool success = true; + + std::vector> sourceArray; - unsigned int sourceCounter = 1; - while (success) { - std::string baseKey = KeyShadowSource + std::to_string(sourceCounter); - success = shadowDictionary.hasKey(baseKey); + ghoul::Dictionary sources = shadowDictionary.value("Sources"); + for (std::string_view k : sources.keys()) { + ghoul::Dictionary source = sources.value(k); - if (success) { - ghoul::Dictionary s = shadowDictionary.value(baseKey); - - std::string sourceName = s.value("Name"); - double sourceRadius = s.value("Radius"); - sourceArray.emplace_back(sourceName, sourceRadius); - } - - sourceCounter++; + std::string name = source.value("Name"); + double radius = source.value("Radius"); + sourceArray.emplace_back(name, radius); } - success = true; std::vector> casterArray; - unsigned int casterCounter = 1; - while (success) { - std::string baseKey = KeyShadowCaster + std::to_string(casterCounter); - success = shadowDictionary.hasKey(baseKey); + ghoul::Dictionary casters = shadowDictionary.value("Casters"); + for (std::string_view k : casters.keys()) { + ghoul::Dictionary caster = casters.value(k); - if (success) { - ghoul::Dictionary s = shadowDictionary.value(baseKey); - std::string casterName = s.value("Name"); - double casterRadius = s.value("Radius"); - casterArray.emplace_back(casterName, casterRadius); - } - - casterCounter++; + std::string name = caster.value("Name"); + double radius = caster.value("Radius"); + casterArray.emplace_back(name, radius); } - if (!sourceArray.empty() && !casterArray.empty()) { - for (const std::pair& source : sourceArray) { - for (const std::pair& caster : casterArray) { - ShadowConfiguration sc; - sc.source = source; - sc.caster = caster; - _shadowConfArray.push_back(sc); - } + _shadowEnabled = !sourceArray.empty() && !casterArray.empty(); + for (const std::pair& source : sourceArray) { + for (const std::pair& caster : casterArray) { + ShadowConfiguration sc; + sc.source = source; + sc.caster = caster; + _shadowConfArray.push_back(sc); } - _shadowEnabled = true; } } From 2a69758eef014c830a32eef36acd99ef9f7ff574 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sun, 3 Jan 2021 22:10:42 +0100 Subject: [PATCH 082/147] Apply simplification of shadow sources and casters to RenderableGlobe --- .../planets/earth/atmosphere.asset | 169 +++++++++--------- .../solarsystem/planets/earth/earth.asset | 12 +- .../solarsystem/planets/earth/moon/moon.asset | 12 +- .../solarsystem/planets/jupiter/jupiter.asset | 32 +--- .../rendering/renderableatmosphere.cpp | 113 ++++++------ modules/globebrowsing/src/renderableglobe.cpp | 95 +++------- 6 files changed, 184 insertions(+), 249 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 6392fbc1d2..e52677d158 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -6,99 +6,98 @@ local assetHelper = asset.require('util/asset_helper') -- local earthEllipsoid = { 6378137.0, 6378137.0, 6356752.314245 } local earthEllipsoid = { 6378137.0, 6378137.0, 6378137.0 } local Atmosphere = { - Identifier = "EarthAtmosphere", - Parent = transforms.Earth.Identifier, - Renderable = { - Type = "RenderableAtmosphere", - -- Atmosphere radius in Km - AtmosphereHeight = 6447.0 - 6377.0, - PlanetRadius = 6377.0, - PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmission = 0.6, - SunIntensity = 6.9, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, - -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 8.0 - }, - --[[ - Ozone = { - Coefficients = { - -- Extinction coefficients - Extinction = {3.426, 8.298, 0.356} - }, - H_O = 8.0, - }, - ]] - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, - -- Extinction coefficients are a fraction of the Mie coefficients - Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } - }, - -- Height scale (atmosphere thickness for constant density) in Km - H_M = 1.2, - -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 - }, - -- Clear Sky - -- Mie = { - -- Coefficients = { - -- Scattering = {20e-3, 20e-3, 20e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 1.2, - -- G = 0.76, - -- }, - -- Cloudy - -- Mie = { - -- Coefficients = { - -- Scattering = {3e-3, 3e-3, 3e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 3.0, - -- G = 0.65, - -- }, - Debug = { - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false + Identifier = "EarthAtmosphere", + Parent = transforms.Earth.Identifier, + Renderable = { + Type = "RenderableAtmosphere", + -- Atmosphere radius in Km + AtmosphereHeight = 6447.0 - 6377.0, + PlanetRadius = 6377.0, + PlanetAverageGroundReflectance = 0.1, + GroundRadianceEmission = 0.6, + SunIntensity = 6.9, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, + -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. }, - ShadowGroup = { - Sources = { - { Name = "Sun", Radius = 696.3E6 }, - -- { Name = "Monolith", Radius = 0.01E6 } + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 8.0 + }, + --[[ + Ozone = { + Coefficients = { + -- Extinction coefficients + Extinction = {3.426, 8.298, 0.356} + }, + H_O = 8.0, + }, + ]] + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, + -- Extinction coefficients are a fraction of the Mie coefficients + Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } }, - Casters = { - { Name = "Moon", Radius = 1.737E6 }, - -- { Name = "Independence Day Ship", Radius = 0.0 } - - } - } + -- Height scale (atmosphere thickness for constant density) in Km + H_M = 1.2, + -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + -- Clear Sky + -- Mie = { + -- Coefficients = { + -- Scattering = {20e-3, 20e-3, 20e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 1.2, + -- G = 0.76, + -- }, + -- Cloudy + -- Mie = { + -- Coefficients = { + -- Scattering = {3e-3, 3e-3, 3e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 3.0, + -- G = 0.65, + -- }, + Debug = { + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false }, - GUI = { - Name = "Earth Atmosphere", - Path = "/Solar System/Planets/Earth", - Description = [[ Atmosphere of Earth.]] + ShadowGroup = { + Sources = { + { Name = "Sun", Radius = 696.3E6 }, + -- { Name = "Monolith", Radius = 0.01E6 } + }, + Casters = { + { Name = "Moon", Radius = 1.737E6 }, + -- { Name = "Independence Day Ship", Radius = 0.0 } + } } + }, + GUI = { + Name = "Earth Atmosphere", + Path = "/Solar System/Planets/Earth", + Description = [[ Atmosphere of Earth.]] + } } assetHelper.registerSceneGraphNodesAndExport(asset, { Atmosphere }) asset.meta = { - Name = "Earth Atmosphere", - Version = "1.0", - Description = [[ RenderableAtmosphere for Earth.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license", - Identifiers = {"EarthAtmosphere"} + Name = "Earth Atmosphere", + Version = "1.0", + Description = [[ RenderableAtmosphere for Earth.]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = { "EarthAtmosphere" } } diff --git a/data/assets/scene/solarsystem/planets/earth/earth.asset b/data/assets/scene/solarsystem/planets/earth/earth.asset index 476414303f..b4f793cc69 100644 --- a/data/assets/scene/solarsystem/planets/earth/earth.asset +++ b/data/assets/scene/solarsystem/planets/earth/earth.asset @@ -15,15 +15,11 @@ local Earth = { PerformShading = false, Layers = {}, ShadowGroup = { - Source1 = { - Name = "Sun", - -- All radius in meters - Radius = 696.3E6 + Sources = { + { Name = "Sun", Radius = 696.3E6 }, }, - Caster1 = { - Name = "Moon", - -- All radius in meters - Radius = 1.737E6 + Casters = { + { Name = "Moon", Radius = 1.737E6 }, } }, Labels = { diff --git a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset index c6079124a9..ace7442735 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset @@ -26,15 +26,13 @@ local Moon = { SegmentsPerPatch = 64, Layers = {}, ShadowGroup = { - Source1 = { - Name = sunAsset.Sun.Name, - Radius = 696.3E6 + Sources = { + { Name = sunAsset.Sun.Identifier, Radius = 696.3E6 }, }, - Caster1 = { - Name = earthAsset.Earth.Name, - Radius = 6.371E6 + Casters = { + { Name = earthAsset.Earth.Identifier, Radius = 6.371E6 }, } - }, + }, Labels = { Enable = false, FileName = labelsPath .. "/moon.labels", diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset index aee35e5f44..80f4bbd695 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset @@ -19,31 +19,15 @@ local Jupiter = { SegmentsPerPatch = 64, Layers = {}, ShadowGroup = { - Source1 = { - Name = "Sun", - -- All radius in meters - Radius = 696.3E6 - }, - Caster1 = { - Name = "Ganymede", - -- All radius in meters - Radius = 2631000 - }, - Caster2 = { - Name = "Io", - -- All radius in meters - Radius = 1821600 - }, - Caster3 = { - Name = "Europa", - -- All radius in meters - Radius = 1560800 - }, - Caster4 = { - Name = "Callisto", - -- All radius in meters - Radius = 2410000 + Sources = { + { Name = "Sun", Radius = 696.3E6 }, }, + Casters = { + { Name = "Ganymede", Radius = 2631000 }, + { Name = "Io", Radius = 1821600 }, + { Name = "Europa", Radius = 1560800 }, + { Name = "Callisto", Radius = 2410000 } + } } }, Tag = { "planet_solarSystem", "planet_giants" }, diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 5201d6a8d3..cbeb0a028a 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -60,20 +60,20 @@ namespace { constexpr const char* KeyShadowSource = "Source"; constexpr const char* KeyShadowCaster = "Caster"; - constexpr const char* keyPlanetRadius = "PlanetRadius"; - constexpr const char* keyAverageGroundReflectance = "PlanetAverageGroundReflectance"; - constexpr const char* keyRayleigh = "Rayleigh"; - constexpr const char* keyRayleighHeightScale = "H_R"; - constexpr const char* keyOzone = "Ozone"; - constexpr const char* keyOzoneHeightScale = "H_O"; - constexpr const char* keyMie = "Mie"; - constexpr const char* keyMieHeightScale = "H_M"; - constexpr const char* keyMiePhaseConstant = "G"; - constexpr const char* keyImage = "Image"; - constexpr const char* keyToneMappingOp = "ToneMapping"; - constexpr const char* keyATMDebug = "Debug"; - constexpr const char* keyTextureScale = "PreCalculatedTextureScale"; - constexpr const char* keySaveTextures = "SaveCalculatedTextures"; + constexpr const char* KeyPlanetRadius = "PlanetRadius"; + constexpr const char* KeyAverageGroundReflectance = "PlanetAverageGroundReflectance"; + constexpr const char* KeyRayleigh = "Rayleigh"; + constexpr const char* KeyRayleighHeightScale = "H_R"; + constexpr const char* KeyOzone = "Ozone"; + constexpr const char* KeyOzoneHeightScale = "H_O"; + constexpr const char* KeyMie = "Mie"; + constexpr const char* KeyMieHeightScale = "H_M"; + constexpr const char* KeyMiePhaseConstant = "G"; + constexpr const char* KeyImage = "Image"; + constexpr const char* KeyToneMappingOp = "ToneMapping"; + constexpr const char* KeyATMDebug = "Debug"; + constexpr const char* KeyTextureScale = "PreCalculatedTextureScale"; + constexpr const char* KeySaveTextures = "SaveCalculatedTextures"; constexpr openspace::properties::Property::PropertyInfo AtmosphereHeightInfo = { "AtmosphereHeight", @@ -137,7 +137,7 @@ namespace { constexpr openspace::properties::Property::PropertyInfo MieScatteringCoeffInfo = { "MieScatteringCoeff", - "Mie Scattering Coeff (x10e-3)", + "Mie Scattering Coeff", "Mie sea-level scattering coefficients in meters" }; @@ -214,18 +214,18 @@ documentation::Documentation RenderableAtmosphere::Documentation() { { "*", new TableVerifier({ - { - "Name", - new StringVerifier, - Optional::No, - "The scene graph node name of the caster" - }, - { - "Radius", - new DoubleVerifier, - Optional::No, - "The radius of the object in meters" - } + { + "Name", + new StringVerifier, + Optional::No, + "The scene graph node name of the caster" + }, + { + "Radius", + new DoubleVerifier, + Optional::No, + "The radius of the object in meters" + } }), Optional::Yes, "Individual shadow casters" @@ -257,7 +257,7 @@ documentation::Documentation RenderableAtmosphere::Documentation() { "" }, { - keyRayleighHeightScale, + KeyRayleighHeightScale, new DoubleVerifier, Optional::No, "" @@ -266,7 +266,7 @@ documentation::Documentation RenderableAtmosphere::Documentation() { TableVerifier* ozoneTable = new TableVerifier({ { - keyOzoneHeightScale, + KeyOzoneHeightScale, new DoubleVerifier, Optional::Yes, "" @@ -288,7 +288,7 @@ documentation::Documentation RenderableAtmosphere::Documentation() { TableVerifier* mieTable = new TableVerifier({ { - keyMieHeightScale, + KeyMieHeightScale, new DoubleVerifier, Optional::No, "" @@ -313,7 +313,7 @@ documentation::Documentation RenderableAtmosphere::Documentation() { "" }, { - keyMiePhaseConstant, + KeyMiePhaseConstant, new DoubleInRangeVerifier(-1.0, 1.0), Optional::No, "" @@ -338,13 +338,13 @@ documentation::Documentation RenderableAtmosphere::Documentation() { AtmosphereHeightInfo.description }, { - keyPlanetRadius, + KeyPlanetRadius, new DoubleVerifier, Optional::No, "The radius of the planet in meters" }, { - keyAverageGroundReflectance, + KeyAverageGroundReflectance, new DoubleVerifier, Optional::No, "" @@ -368,34 +368,34 @@ documentation::Documentation RenderableAtmosphere::Documentation() { GroundRadianceEmittioninfo.description }, { - keyRayleigh, + KeyRayleigh, rayleighTable, Optional::No, "" }, { - keyOzone, + KeyOzone, ozoneTable, Optional::Yes, "" }, { - keyMie, + KeyMie, mieTable, Optional::No, "" }, { - keyATMDebug, + KeyATMDebug, new TableVerifier({ { - keyTextureScale, + KeyTextureScale, new DoubleInRangeVerifier(0.0, 1.0), Optional::Yes, "" }, { - keySaveTextures, + KeySaveTextures, new BoolVerifier, Optional::Yes, "" @@ -451,7 +451,6 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) ghoul::Dictionary shadowDictionary = dictionary.value(KeyShadowGroup); - std::vector> sourceArray; ghoul::Dictionary sources = shadowDictionary.value("Sources"); for (std::string_view k : sources.keys()) { @@ -489,9 +488,9 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) _atmosphereHeight = static_cast( dictionary.value(AtmosphereHeightInfo.identifier) ); - _planetRadius = static_cast(dictionary.value(keyPlanetRadius)); + _planetRadius = static_cast(dictionary.value(KeyPlanetRadius)); _groundAverageReflectance = static_cast( - dictionary.value(keyAverageGroundReflectance) + dictionary.value(KeyAverageGroundReflectance) ); _groundRadianceEmission = static_cast( dictionary.value(GroundRadianceEmittioninfo.identifier) @@ -510,22 +509,22 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) } { - ghoul::Dictionary rayleighDict = dictionary.value(keyRayleigh); + ghoul::Dictionary rayleighDict = dictionary.value(KeyRayleigh); ghoul::Dictionary coeffs = rayleighDict.value("Coefficients"); _rayleighScatteringCoeff = coeffs.value("Scattering"); _rayleighHeightScale = static_cast( - rayleighDict.value(keyRayleighHeightScale) + rayleighDict.value(KeyRayleighHeightScale) ); } - if (dictionary.hasValue(keyOzone)) { - ghoul::Dictionary ozoneDict = dictionary.value(keyOzone); + if (dictionary.hasValue(KeyOzone)) { + ghoul::Dictionary ozoneDict = dictionary.value(KeyOzone); - if (ozoneDict.hasValue(keyOzoneHeightScale)) { + if (ozoneDict.hasValue(KeyOzoneHeightScale)) { _ozoneHeightScale = static_cast( - ozoneDict.value(keyOzoneHeightScale) + ozoneDict.value(KeyOzoneHeightScale) ); _ozoneEnabled = true; } @@ -539,8 +538,8 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) } { - ghoul::Dictionary mieDict = dictionary.value(keyMie); - _mieHeightScale = static_cast(mieDict.value(keyMieHeightScale)); + ghoul::Dictionary mieDict = dictionary.value(KeyMie); + _mieHeightScale = static_cast(mieDict.value(KeyMieHeightScale)); ghoul::Dictionary coeffs = mieDict.value("Coefficients"); @@ -548,23 +547,23 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary) _mieExtinctionCoeff = coeffs.value("Extinction"); _miePhaseConstant = static_cast( - mieDict.value(keyMiePhaseConstant) + mieDict.value(KeyMiePhaseConstant) ); } - if (dictionary.hasValue(keyATMDebug)) { - ghoul::Dictionary debugDict = dictionary.value(keyATMDebug); - if (debugDict.hasKey(keyTextureScale)) { + if (dictionary.hasValue(KeyATMDebug)) { + ghoul::Dictionary debugDict = dictionary.value(KeyATMDebug); + if (debugDict.hasKey(KeyTextureScale)) { _preCalculatedTexturesScale = static_cast( - debugDict.value(keyTextureScale) + debugDict.value(KeyTextureScale) ); LDEBUG(fmt::format( "Atmosphere Texture Scaled to {}", _preCalculatedTexturesScale )); } - if (debugDict.hasKey(keySaveTextures)) { - _saveCalculationsToTexture = debugDict.value(keySaveTextures); + if (debugDict.hasKey(KeySaveTextures)) { + _saveCalculationsToTexture = debugDict.value(KeySaveTextures); LDEBUG("Saving Precalculated Atmosphere Textures"); } } diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index 50e310bd99..a87e2a3372 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -633,84 +633,43 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) _localChunkBuffer.resize(2048); _traversalMemory.resize(512); - //================================================================ - //======== Reads Shadow (Eclipses) Entries in mod file =========== - //================================================================ - bool success = dictionary.hasValue(KeyShadowGroup); - bool disableShadows = false; - if (success) { + // ================================================================ + // ======== Reads Shadow (Eclipses) Entries in asset file ========= + // ================================================================ + if (dictionary.hasValue(KeyShadowGroup)) { ghoul::Dictionary shadowDictionary = dictionary.value(KeyShadowGroup); + std::vector> sourceArray; - unsigned int sourceCounter = 1; - while (success) { - std::string keyName = - KeyShadowSource + std::to_string(sourceCounter) + ".Name"; - std::string keyRadius = - KeyShadowSource + std::to_string(sourceCounter) + ".Radius"; + ghoul::Dictionary sources = shadowDictionary.value("Sources"); + for (std::string_view k : sources.keys()) { + ghoul::Dictionary source = sources.value(k); - success = shadowDictionary.hasValue(keyName); - if (success) { - std::string sourceName = shadowDictionary.value(keyName); - success = shadowDictionary.hasValue(keyRadius); - if (success) { - double sourceRadius = shadowDictionary.value(keyRadius); - sourceArray.emplace_back(sourceName, sourceRadius); - } - else { - //LWARNING("No Radius value expecified for Shadow Source Name " - // << sourceName << " from " << name - // << " planet.\nDisabling shadows for this planet."); - disableShadows = true; - break; - } - } - sourceCounter++; + std::string name = source.value("Name"); + double radius = source.value("Radius"); + sourceArray.emplace_back(name, radius); } - if (!disableShadows && !sourceArray.empty()) { - success = true; - std::vector> casterArray; - unsigned int casterCounter = 1; - while (success) { - std::string keyName = - KeyShadowCaster + std::to_string(casterCounter) + ".Name"; - std::string keyRadius = - KeyShadowCaster + std::to_string(casterCounter) + ".Radius"; - success = shadowDictionary.hasValue(keyName); + std::vector> casterArray; + ghoul::Dictionary casters = shadowDictionary.value("Casters"); + for (std::string_view k : casters.keys()) { + ghoul::Dictionary caster = casters.value(k); - if (success) { - std::string casterName = shadowDictionary.value(keyName); - success = shadowDictionary.hasValue(keyRadius); - if (success) { - double casterRadius = shadowDictionary.value(keyRadius); - casterArray.emplace_back(casterName, casterRadius); - } - else { - //LWARNING("No Radius value expecified for Shadow Caster Name " - // << casterName << " from " << name - // << " planet.\nDisabling shadows for this planet."); - disableShadows = true; - break; - } - } + std::string name = caster.value("Name"); + double radius = caster.value("Radius"); + casterArray.emplace_back(name, radius); + } - casterCounter++; - } - - std::vector shadowConfArray; - if (!disableShadows && (!sourceArray.empty() && !casterArray.empty())) { - for (const std::pair& source : sourceArray) { - for (const std::pair& caster : casterArray) { - Ellipsoid::ShadowConfiguration sc; - sc.source = source; - sc.caster = caster; - shadowConfArray.push_back(sc); - } - } - _ellipsoid.setShadowConfigurationArray(shadowConfArray); + std::vector shadowConfArray; + for (const std::pair& source : sourceArray) { + for (const std::pair& caster : casterArray) { + Ellipsoid::ShadowConfiguration sc; + sc.source = source; + sc.caster = caster; + shadowConfArray.push_back(sc); } } + _ellipsoid.setShadowConfigurationArray(shadowConfArray); } // Labels Dictionary From 0fea8c5ae3d8e4c4944ee04c207f297796e30aa7 Mon Sep 17 00:00:00 2001 From: corrieroe <49764220+corrieroe@users.noreply.github.com> Date: Mon, 4 Jan 2021 13:33:44 -0500 Subject: [PATCH 083/147] Fixed few typos Removed double spaces after periods and pluralized a "visualization" per Denton's request --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 24a9baf505..19d721dd2a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. +[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. -The project stems from the same academic collaboration between Sweden’s [Linköping University](https://www.liu.se) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH) that led to the creation of Uniview and its parent company [SCISS](http://sciss.se). Development of the software began several years ago through a close collaboration with NASA Goddard’s [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include: +The project stems from the same academic collaboration between Sweden’s [Linköping University](https://www.liu.se) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH) that led to the creation of Uniview and its parent company [SCISS](http://sciss.se). Development of the software began several years ago through a close collaboration with NASA Goddard’s [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include: - Visualization of dynamic simulations via interactive volumetric rendering, as a priority for communicating research in astrophysics. -- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualization that reveal how missions are designed to gather science. +- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualizations that reveal how missions are designed to gather science. - Globe browsing techniques across spatial and temporal scales to examine scientific campaigns on multiple planets, including close up surface exploration. OpenSpace requires graphics support for [OpenGL](https://www.opengl.org/) version 3.3. -This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). +This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw). From ee29a704afd109cdff882f06e2648102b242ae62 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Tue, 5 Jan 2021 10:58:24 -0500 Subject: [PATCH 084/147] Removed assert with problems on GCC and clang. --- include/openspace/documentation/verifier.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 7d9eb83b18..bcab502137 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -328,7 +328,7 @@ template AnnotationVerifier::AnnotationVerifier(std::string a) : annotation(std::move(a)) { - ghoul_assert(!annotation.empty(), "Annotation must not be empty"); + } template From 9dc2802b7cbe110d2f16554bd022980d779d290f Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 7 Jan 2021 10:49:12 +0100 Subject: [PATCH 085/147] Adapt to new Dictionary class --- src/engine/openspaceengine_lua.inl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 0e3b203820..d19a6aab6c 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -307,7 +307,8 @@ int createPixelImage(lua_State* L) { // Would like to clean this up with a more direct use of the Verifier in the future using namespace openspace::documentation; const std::string& key = "color"; - ghoul::Dictionary colorDict = {{ key, d }}; + ghoul::Dictionary colorDict; + colorDict.setValue(key, d); TestResult res = DoubleVector3Verifier()(colorDict, key); if (!res.success) { @@ -317,7 +318,7 @@ int createPixelImage(lua_State* L) { ); } - const glm::vec3 color = colorDict.value(key); + const glm::dvec3 color = colorDict.value(key); const std::string& fileName = FileSys.cacheManager()->cachedFilename( fmt::format("{}.ppm", name), From cc825143a3f0d0e61e20ffb74bf4acd4cb443cdf Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 11 Jan 2021 10:41:13 +0100 Subject: [PATCH 086/147] Bring back fading of sphere with only fade out threshold specified Without this, the milkyway sphere does not fade out at all --- modules/base/rendering/renderablesphere.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 8ea072fac1..fdde7eeea7 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -282,7 +282,8 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) addProperty(_fadeInThreshold); } - if (dictionary.hasKey(FadeInThresholdInfo.identifier)) { + if (dictionary.hasKey(FadeInThresholdInfo.identifier) || + dictionary.hasKey(FadeOutThresholdInfo.identifier)) { _disableFadeInDistance.set(false); addProperty(_disableFadeInDistance); } From f98730ef25c253205acac164fae4872f282ab4a5 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 11 Jan 2021 11:04:26 +0100 Subject: [PATCH 087/147] Add missing documentation --- modules/exoplanets/exoplanetsmodule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index bdaea22756..b962f758e1 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -93,7 +93,8 @@ void ExoplanetsModule::internalInitialize(const ghoul::Dictionary&) { std::vector ExoplanetsModule::documentations() const { return { - ExoplanetsDataPreparationTask::documentation() + ExoplanetsDataPreparationTask::documentation(), + RenderableOrbitDisc::Documentation() }; } From 50bae273fb2af5fe2dab96856ab497b648f6ed60 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Tue, 12 Jan 2021 04:28:11 -0500 Subject: [PATCH 088/147] Fixed Deep Sky Objects basic unit and increased maximum scale range. (#1452) * Fixed Deep Sky Objects basic unit and increased maximum scale range. --- data/assets/scene/digitaluniverse/deepsky.asset | 4 ++-- modules/digitaluniverse/rendering/renderableplanescloud.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/assets/scene/digitaluniverse/deepsky.asset b/data/assets/scene/digitaluniverse/deepsky.asset index 8d858cc663..3c16db2cbb 100644 --- a/data/assets/scene/digitaluniverse/deepsky.asset +++ b/data/assets/scene/digitaluniverse/deepsky.asset @@ -33,7 +33,7 @@ local deepSkyPoints = { TextColor = { 0.1, 0.4, 0.6 }, TextSize = 20.50, TextMinSize = 16.0, - Unit = "Mpc", + Unit = "pc", -- Fade in value in the same unit as "Unit" --FadeInDistances = { 0.05, 1.0 }, -- Max size in pixels @@ -68,7 +68,7 @@ local deepSkyImages = { TexturePath = textures, Luminosity = "radius", ScaleLuminosity = 0.001, - Unit = "Mpc", + Unit = "pc", -- Fade in value in the same unit as "Unit" --FadeInDistances = {0.001, 0.05010}, PlaneMinSize = 5.0 diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 8694956201..4d77511e6c 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -299,7 +299,7 @@ documentation::Documentation RenderablePlanesCloud::Documentation() { RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _scaleFactor(ScaleFactorInfo, 1.f, 0.f, 100.f) + , _scaleFactor(ScaleFactorInfo, 1.f, 0.f, 300000.f) , _textColor(TextColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) , _textOpacity(TextOpacityInfo, 1.f, 0.f, 1.f) , _textSize(TextSizeInfo, 8.0, 0.5, 24.0) From 65803e134d62fdafc823b45dd89807aefa304b6e Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Tue, 12 Jan 2021 04:28:49 -0500 Subject: [PATCH 089/147] Issue/1447 (#1451) * Fixed missing calls to OpenGL cache system. --- ext/ghoul | 2 +- .../rendering/renderableplanescloud.cpp | 2 +- modules/galaxy/rendering/renderablegalaxy.cpp | 30 ++------- modules/globebrowsing/src/shadowcomponent.cpp | 61 ++++--------------- modules/globebrowsing/src/shadowcomponent.h | 2 +- modules/globebrowsing/src/tileprovider.cpp | 2 +- modules/space/rendering/renderablestars.cpp | 28 +-------- src/rendering/framebufferrenderer.cpp | 33 ++-------- 8 files changed, 27 insertions(+), 133 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index 1f97e924b3..4ee9c60ede 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 1f97e924b36bedcf95a7e4e562e23319338ee238 +Subproject commit 4ee9c60ededc5b71ffaaab45bba86ae7bcbc1150 diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 4d77511e6c..71d7dc33bf 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -569,7 +569,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&, glDisable(GL_CULL_FACE); GLint viewport[4]; - glGetIntegerv(GL_VIEWPORT, viewport); + global::renderEngine->openglStateCache().viewport(viewport); ghoul::opengl::TextureUnit unit; unit.activate(); diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 100f72fafb..5964eff426 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -695,24 +695,7 @@ void RenderableGalaxy::renderBillboards(const RenderData& data) { return; } - // Saving current OpenGL state - GLenum blendEquationRGB; - GLenum blendEquationAlpha; - GLenum blendDestAlpha; - GLenum blendDestRGB; - GLenum blendSrcAlpha; - GLenum blendSrcRGB; - GLboolean depthMask; - - glGetIntegerv(GL_BLEND_EQUATION_RGB, &blendEquationRGB); - glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &blendEquationAlpha); - glGetIntegerv(GL_BLEND_DST_ALPHA, &blendDestAlpha); - glGetIntegerv(GL_BLEND_DST_RGB, &blendDestRGB); - glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha); - glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB); - - glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask); - + // Change OpenGL Blending and Depth states glBlendFunc(GL_SRC_ALPHA, GL_ONE); glDepthMask(false); glDisable(GL_DEPTH_TEST); @@ -764,14 +747,9 @@ void RenderableGalaxy::renderBillboards(const RenderData& data) { _billboardsProgram->deactivate(); - glEnable(GL_DEPTH_TEST); - glDepthMask(true); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - // Restores OpenGL blending state - glBlendEquationSeparate(blendEquationRGB, blendEquationAlpha); - glBlendFuncSeparate(blendSrcRGB, blendDestRGB, blendSrcAlpha, blendDestAlpha); - glDepthMask(depthMask); + // Restores OpenGL Rendering State + global::renderEngine->openglStateCache().resetBlendState(); + global::renderEngine->openglStateCache().resetDepthState(); } float RenderableGalaxy::safeLength(const glm::vec3& vector) const { diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index 891a2603c6..ab237291c4 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -320,20 +321,9 @@ RenderData ShadowComponent::begin(const RenderData& data) { // Saves current state - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO); - glGetIntegerv(GL_VIEWPORT, _mViewport); - _faceCulling = glIsEnabled(GL_CULL_FACE); - glGetIntegerv(GL_CULL_FACE_MODE, &_faceToCull); - _polygonOffSet = glIsEnabled(GL_POLYGON_OFFSET_FILL); - glGetFloatv(GL_POLYGON_OFFSET_FACTOR, &_polygonOffSetFactor); - glGetFloatv(GL_POLYGON_OFFSET_UNITS, &_polygonOffSetUnits); - glGetFloatv(GL_COLOR_CLEAR_VALUE, _colorClearValue); - glGetFloatv(GL_DEPTH_CLEAR_VALUE, &_depthClearValue); - _depthIsEnabled = glIsEnabled(GL_DEPTH_TEST); - glGetIntegerv(GL_DEPTH_FUNC, &_depthFunction); - _blendIsEnabled = glIsEnabled(GL_BLEND); - - + glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_currentFBO); + global::renderEngine->openglStateCache().viewport(_mViewport); + glBindFramebuffer(GL_FRAMEBUFFER, _shadowFBO); GLenum drawBuffers[] = { GL_COLOR_ATTACHMENT0, GL_NONE, GL_NONE }; glDrawBuffers(3, drawBuffers); @@ -370,45 +360,18 @@ void ShadowComponent::end() { } // Restores system state - glBindFramebuffer(GL_FRAMEBUFFER, _defaultFBO); + glBindFramebuffer(GL_FRAMEBUFFER, _currentFBO); GLenum drawBuffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2 }; glDrawBuffers(3, drawBuffers); glViewport(_mViewport[0], _mViewport[1], _mViewport[2], _mViewport[3]); - if (_faceCulling) { - glEnable(GL_CULL_FACE); - glCullFace(_faceToCull); - } - else { - glDisable(GL_CULL_FACE); - } - - if (_depthIsEnabled) { - glEnable(GL_DEPTH_TEST); - } - else { - glDisable(GL_DEPTH_TEST); - } - - glDepthFunc(_depthFunction); - - if (_polygonOffSet) { - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(_polygonOffSetFactor, _polygonOffSetUnits); - } - else { - glDisable(GL_POLYGON_OFFSET_FILL); - } - - glClearColor( - _colorClearValue[0], - _colorClearValue[1], - _colorClearValue[2], - _colorClearValue[3] - ); - glClearDepth(_depthClearValue); + // Restores OpenGL Rendering State + global::renderEngine->openglStateCache().resetColorState(); + global::renderEngine->openglStateCache().resetBlendState(); + global::renderEngine->openglStateCache().resetDepthState(); + global::renderEngine->openglStateCache().resetPolygonAndClippingState(); if (_blendIsEnabled) { glEnable(GL_BLEND); @@ -467,7 +430,7 @@ void ShadowComponent::createDepthTexture() { void ShadowComponent::createShadowFBO() { // Saves current FBO first - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO); + glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_currentFBO); glGenFramebuffers(1, &_shadowFBO); glBindFramebuffer(GL_FRAMEBUFFER, _shadowFBO); @@ -492,7 +455,7 @@ void ShadowComponent::createShadowFBO() { checkFrameBufferState("createShadowFBO()"); // Restores system state - glBindFramebuffer(GL_FRAMEBUFFER, _defaultFBO); + glBindFramebuffer(GL_FRAMEBUFFER, _currentFBO); } void ShadowComponent::updateDepthTexture() { diff --git a/modules/globebrowsing/src/shadowcomponent.h b/modules/globebrowsing/src/shadowcomponent.h index 38a40cdee4..30aabbe057 100644 --- a/modules/globebrowsing/src/shadowcomponent.h +++ b/modules/globebrowsing/src/shadowcomponent.h @@ -117,7 +117,7 @@ private: GLuint _dDepthTexture = 0; GLuint _positionInLightSpaceTexture = 0; GLuint _shadowFBO = 0; - GLint _defaultFBO = 0; + GLint _currentFBO = 0; GLint _mViewport[4]; GLboolean _faceCulling; diff --git a/modules/globebrowsing/src/tileprovider.cpp b/modules/globebrowsing/src/tileprovider.cpp index c53928cd81..379857325d 100644 --- a/modules/globebrowsing/src/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider.cpp @@ -213,7 +213,7 @@ Tile tile(TextTileProvider& t, const TileIndex& tileIndex) { // Keep track of defaultFBO and viewport to be able to reset state when done GLint defaultFBO; //GLint viewport[4]; - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO); + defaultFBO = global::renderEngine->openglStateCache().defaultFramebuffer(); //glGetIntegerv(GL_VIEWPORT, viewport); // Render to texture diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 55bccde601..8233058ea5 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -860,7 +860,7 @@ void RenderableStars::loadPSFTexture() { void RenderableStars::renderPSFToTexture() { // Saves current FBO first GLint defaultFBO; - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO); + defaultFBO = global::renderEngine->openglStateCache().defaultFramebuffer(); // GLint m_viewport[4]; // global::renderEngine.openglStateCache().viewPort(m_viewport); @@ -973,24 +973,6 @@ void RenderableStars::render(const RenderData& data, RendererTasks&) { return; } - // Saving current OpenGL state - GLenum blendEquationRGB; - GLenum blendEquationAlpha; - GLenum blendDestAlpha; - GLenum blendDestRGB; - GLenum blendSrcAlpha; - GLenum blendSrcRGB; - GLboolean depthMask; - - glGetIntegerv(GL_BLEND_EQUATION_RGB, &blendEquationRGB); - glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &blendEquationAlpha); - glGetIntegerv(GL_BLEND_DST_ALPHA, &blendDestAlpha); - glGetIntegerv(GL_BLEND_DST_RGB, &blendDestRGB); - glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha); - glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB); - - glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); glDepthMask(false); @@ -1093,13 +1075,9 @@ void RenderableStars::render(const RenderData& data, RendererTasks&) { glBindVertexArray(0); _program->deactivate(); - glDepthMask(true); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - // Restores OpenGL blending state - glBlendEquationSeparate(blendEquationRGB, blendEquationAlpha); - glBlendFuncSeparate(blendSrcRGB, blendDestRGB, blendSrcAlpha, blendDestAlpha); - glDepthMask(depthMask); + global::renderEngine->openglStateCache().resetBlendState(); + global::renderEngine->openglStateCache().resetDepthState(); } void RenderableStars::update(const UpdateData&) { diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index 39d2d9a9cf..70c9b8bc07 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -556,27 +556,6 @@ void FramebufferRenderer::updateDownscaleTextures() { } void FramebufferRenderer::writeDownscaledVolume() { - // Saving current OpenGL state - GLboolean blendEnabled = glIsEnabledi(GL_BLEND, 0); - - GLenum blendEquationRGB; - glGetIntegerv(GL_BLEND_EQUATION_RGB, &blendEquationRGB); - - GLenum blendEquationAlpha; - glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &blendEquationAlpha); - - GLenum blendDestAlpha; - glGetIntegerv(GL_BLEND_DST_ALPHA, &blendDestAlpha); - - GLenum blendDestRGB; - glGetIntegerv(GL_BLEND_DST_RGB, &blendDestRGB); - - GLenum blendSrcAlpha; - glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha); - - GLenum blendSrcRGB; - glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB); - glEnablei(GL_BLEND, 0); glBlendFunc(GL_SRC_ALPHA, GL_ONE); @@ -620,14 +599,9 @@ void FramebufferRenderer::writeDownscaledVolume() { _downscaledVolumeProgram->deactivate(); - // Restores blending state - glBlendEquationSeparate(blendEquationRGB, blendEquationAlpha); - glBlendFuncSeparate(blendSrcRGB, blendDestRGB, blendSrcAlpha, blendDestAlpha); - - if (!blendEnabled) { - glDisablei(GL_BLEND, 0); - } - + // Restores OpenGL Rendering State + global::renderEngine->openglStateCache().resetBlendState(); + global::renderEngine->openglStateCache().resetDepthState(); } void FramebufferRenderer::update() { @@ -1125,6 +1099,7 @@ void FramebufferRenderer::render(Scene* scene, Camera* camera, float blackoutFac TracyGpuZone("FramebufferRenderer") glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_defaultFBO); + global::renderEngine->openglStateCache().setDefaultFramebuffer(_defaultFBO); GLint viewport[4] = { 0 }; global::renderEngine->openglStateCache().viewport(viewport); From cdbc1c2695b90fe1b9af1b40e5fd6ed8b577ecf1 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Tue, 12 Jan 2021 02:29:43 -0700 Subject: [PATCH 090/147] Fixes for getting all unit tests passing on linux (#1454) --- modules/iswa/rendering/iswacygnet.cpp | 2 +- modules/kameleon/ext/kameleon | 2 +- tests/AssetLoaderTest/assetfunctionsexist.asset | 1 - tests/test_documentation.cpp | 3 ++- tests/test_luaconversions.cpp | 7 ++++++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index dd4421e71f..267f00ac53 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -184,7 +184,7 @@ void IswaCygnet::render(const RenderData& data, RendererTasks&) { _data.spatialScale.x * _data.offset, _data.spatialScale.w ); - glm::vec3 position = glm::vec3(pposition) * pow(10.f, pposition.w); + glm::vec3 position = glm::vec3(pposition) * static_cast(pow(10.f, pposition.w)); // Activate shader _shader->activate(); diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 606edb945b..8a5e966659 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 606edb945b62d0151f20270ddb2db4a9f558aaa1 +Subproject commit 8a5e9666599e9578d50bf3801dd07a9edf95ccdb diff --git a/tests/AssetLoaderTest/assetfunctionsexist.asset b/tests/AssetLoaderTest/assetfunctionsexist.asset index ad5d5fb4cb..3eb012cb33 100644 --- a/tests/AssetLoaderTest/assetfunctionsexist.asset +++ b/tests/AssetLoaderTest/assetfunctionsexist.asset @@ -1,5 +1,4 @@ assert(type(asset.require) == "function", "require should be function") -assert(type(asset.request) == "function", "request should be function") assert(type(asset.localResource) == "function", "localResource should be function") assert(type(asset.syncedResource) == "function", "syncedResource should be function") assert(type(asset.export) == "function", "export should be function") diff --git a/tests/test_documentation.cpp b/tests/test_documentation.cpp index 3a1526e747..5347b0e4ab 100644 --- a/tests/test_documentation.cpp +++ b/tests/test_documentation.cpp @@ -2738,7 +2738,8 @@ TEST_CASE("Documentation: DeprecatedVerifier", "[documentation]") { TestResult positiveRes = testSpecification(doc, positive); REQUIRE(positiveRes.success); REQUIRE(positiveRes.offenses.empty()); - REQUIRE(positiveRes.warnings.size() == 13); + REQUIRE(positiveRes.warnings.size() == doc.entries.size()); + REQUIRE(positiveRes.warnings[0].offender == "bool"); REQUIRE(positiveRes.warnings[0].reason == TestResult::Warning::Reason::Deprecated); REQUIRE(positiveRes.warnings[1].offender == "double"); diff --git a/tests/test_luaconversions.cpp b/tests/test_luaconversions.cpp index f003c4d45f..958b73db65 100644 --- a/tests/test_luaconversions.cpp +++ b/tests/test_luaconversions.cpp @@ -77,6 +77,7 @@ #include #include #include +#include namespace { constexpr const int NumberFuzzTests = 10000; @@ -304,8 +305,12 @@ TEMPLATE_TEST_CASE("LuaConversion Float Fuzz", "[luaconversion]", float, double, success2 ); REQUIRE(success2); - REQUIRE(value == val); + if (typeid(T) == typeid(long double)) { + if (value != std::numeric_limits::infinity()) { + REQUIRE(value == val); + } + } lua_pop(state, 1); } From 595d23ec75b746064ba67dc521b738c191ac9cc6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 12 Jan 2021 11:26:00 +0100 Subject: [PATCH 091/147] Fix issue where the CEF libraries would not be copied to the bin folder --- apps/OpenSpace/CMakeLists.txt | 6 ------ modules/webbrowser/CMakeLists.txt | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 2ccf23c951..7622653bf6 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -154,12 +154,6 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) set_cef_targets("${CEF_ROOT}" OpenSpace) run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") - - # @TODO (abock, 2020-12-12) This should be handled more gracefully. Right now we *have* - # to build OpenSpace or otherwise the necessary files will not be copied over - # Copy binary and resource files to the target output directory. - copy_files("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "$") - copy_files("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "$") elseif () message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () diff --git a/modules/webbrowser/CMakeLists.txt b/modules/webbrowser/CMakeLists.txt index 3721c37c3b..50024e8ec7 100644 --- a/modules/webbrowser/CMakeLists.txt +++ b/modules/webbrowser/CMakeLists.txt @@ -236,6 +236,15 @@ set_folder_location(openspace_web_helper "Helper") # Display CEF configuration settings. -PRINT_CEF_CONFIG() +# PRINT_CEF_CONFIG() target_include_directories(${webbrowser_module} SYSTEM PUBLIC ${CEF_ROOT}) + +set(deps "") +foreach (i ${CEF_BINARY_FILES}) + list(APPEND deps "${CEF_BINARY_DIR}/${i}") +endforeach() +foreach (j ${CEF_RESOURCE_FILES}) +list(APPEND deps "${CEF_RESOURCE_DIR}/${j}") +endforeach() +add_external_library_dependencies("${deps}") From d23cfd1d03104ff0f9aacc55b2d799ea668ae696 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 12 Jan 2021 15:42:48 +0100 Subject: [PATCH 092/147] Update Ghoul repository --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index 4ee9c60ede..e42b3f58c4 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 4ee9c60ededc5b71ffaaab45bba86ae7bcbc1150 +Subproject commit e42b3f58c493d57afde415cf5be8af88585c320b From 647ae18bef5f68846d043886a6f0c7aaa9bf3889 Mon Sep 17 00:00:00 2001 From: Malin Ejdbo Date: Thu, 14 Jan 2021 14:48:30 +0100 Subject: [PATCH 093/147] Fix reading of horizons files * Take back initial "empty" loop to ignore header information --- modules/space/translation/horizonstranslation.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index 5750505dab..3c71906207 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -176,9 +176,16 @@ void HorizonsTranslation::readHorizonsTextFile() { return; } + // The beginning of a Horizons file has a header with a lot of information about the + // query that we do not care about. Ignore everything until data starts, including + // the row marked by $$SOE (i.e. Start Of Ephemerides). + std::string line; + while (line[0] != '$') { + std::getline(fileStream, line); + } + // Read data line by line until $$EOE (i.e. End Of Ephemerides). // Skip the rest of the file. - std::string line; std::getline(fileStream, line); while (line[0] != '$') { std::stringstream str(line); From f5d3659e8a56cd6e9cd9cca4ccbb197f4d133f4b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 19 Jan 2021 10:28:08 +0100 Subject: [PATCH 094/147] Updated SGCT configuration link (closes #1457) --- openspace.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openspace.cfg b/openspace.cfg index d94f164206..2eba4ff450 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -21,7 +21,7 @@ SGCTConfig = sgct.config.single{vsync=false} -- SGCTConfig = sgct.config.single{2560, 1440, shared=true, name="WV_OBS_SPOUT1"} --for more details about sgct configuration options see: --- http://wiki.openspaceproject.com/docs/users/configfile +-- https://sgct.github.io/configuration-files.html -- To use a sgct configuration file set the variable like below -- SGCTConfig = "${CONFIG}/single_gui.xml" From 0b510edffdb29bcf485e08bfd4f1e3e3c6a91ba6 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Tue, 19 Jan 2021 02:37:16 -0700 Subject: [PATCH 095/147] Updated ext/json to 3.9.1 to fix gcc10 build (#1456) --- ext/json/json.hpp | 11897 ++++++++++++++++++++++++++++++-------------- 1 file changed, 8251 insertions(+), 3646 deletions(-) diff --git a/ext/json/json.hpp b/ext/json/json.hpp index 5003a4fa2d..a70aaf8cbc 100644 --- a/ext/json/json.hpp +++ b/ext/json/json.hpp @@ -1,7 +1,7 @@ /* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 3.6.1 +| | |__ | | | | | | version 3.9.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Licensed under the MIT License . @@ -31,12 +31,10 @@ SOFTWARE. #define INCLUDE_NLOHMANN_JSON_HPP_ #define NLOHMANN_JSON_VERSION_MAJOR 3 -#define NLOHMANN_JSON_VERSION_MINOR 6 +#define NLOHMANN_JSON_VERSION_MINOR 9 #define NLOHMANN_JSON_VERSION_PATCH 1 #include // all_of, find, for_each -#include // assert -#include // and, not, or #include // nullptr_t, ptrdiff_t, size_t #include // hash, less #include // initializer_list @@ -58,7 +56,6 @@ SOFTWARE. #include // transform #include // array -#include // and, not #include // forward_list #include // inserter, front_inserter, end #include // map @@ -105,6 +102,2216 @@ struct position_t } // namespace detail } // namespace nlohmann +// #include + + +#include // pair +// #include +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + * + * To the extent possible under law, the author(s) have dedicated all + * copyright and related and neighboring rights to this software to + * the public domain worldwide. This software is distributed without + * any warranty. + * + * For details, see . + * SPDX-License-Identifier: CC0-1.0 + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 13) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 13 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(_MSC_VER) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP \ +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + JSON_HEDLEY_HAS_FEATURE(c_static_assert) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow to override assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + namespace nlohmann { @@ -146,6 +2353,7 @@ class exception : public std::exception { public: /// returns the explanatory string + JSON_HEDLEY_RETURNS_NON_NULL const char* what() const noexcept override { return m.what(); @@ -155,6 +2363,7 @@ class exception : public std::exception const int id; protected: + JSON_HEDLEY_NON_NULL(3) exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} static std::string name(const std::string& ename, int id_) @@ -194,6 +2403,7 @@ json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vect json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). +json.exception.parse_error.115 | parse error at byte 5: syntax error while parsing UBJSON high-precision number: invalid number text: 1A | A UBJSON high-precision number could not be parsed. @note For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also @@ -307,6 +2517,7 @@ class invalid_iterator : public exception } private: + JSON_HEDLEY_NON_NULL(3) invalid_iterator(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -360,6 +2571,7 @@ class type_error : public exception } private: + JSON_HEDLEY_NON_NULL(3) type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -380,7 +2592,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. -json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. (until version 3.8.0) | json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | @@ -406,6 +2618,7 @@ class out_of_range : public exception } private: + JSON_HEDLEY_NON_NULL(3) out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -443,6 +2656,7 @@ class other_error : public exception } private: + JSON_HEDLEY_NON_NULL(3) other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} }; } // namespace detail @@ -450,161 +2664,9 @@ class other_error : public exception // #include - -#include // pair - -// This file contains all internal macro definitions -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) - #if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #endif -#endif - -// disable float-equal warnings on GCC/clang -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - -// disable documentation warnings on clang -#if defined(__clang__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdocumentation" -#endif - -// allow for portable deprecation warnings -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #define JSON_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) - #define JSON_DEPRECATED __declspec(deprecated) -#else - #define JSON_DEPRECATED -#endif - -// allow for portable nodiscard warnings -#if defined(__has_cpp_attribute) - #if __has_cpp_attribute(nodiscard) - #define JSON_NODISCARD [[nodiscard]] - #elif __has_cpp_attribute(gnu::warn_unused_result) - #define JSON_NODISCARD [[gnu::warn_unused_result]] - #else - #define JSON_NODISCARD - #endif -#else - #define JSON_NODISCARD -#endif - -// allow to disable exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) - #define JSON_THROW(exception) throw exception - #define JSON_TRY try - #define JSON_CATCH(exception) catch(exception) - #define JSON_INTERNAL_CATCH(exception) catch(exception) -#else - #include - #define JSON_THROW(exception) std::abort() - #define JSON_TRY if(true) - #define JSON_CATCH(exception) if(false) - #define JSON_INTERNAL_CATCH(exception) if(false) -#endif - -// override exception macros -#if defined(JSON_THROW_USER) - #undef JSON_THROW - #define JSON_THROW JSON_THROW_USER -#endif -#if defined(JSON_TRY_USER) - #undef JSON_TRY - #define JSON_TRY JSON_TRY_USER -#endif -#if defined(JSON_CATCH_USER) - #undef JSON_CATCH - #define JSON_CATCH JSON_CATCH_USER - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_CATCH_USER -#endif -#if defined(JSON_INTERNAL_CATCH_USER) - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER -#endif - -// manual branch prediction -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #define JSON_LIKELY(x) __builtin_expect(x, 1) - #define JSON_UNLIKELY(x) __builtin_expect(x, 0) -#else - #define JSON_LIKELY(x) x - #define JSON_UNLIKELY(x) x -#endif - -// C++ language standard detection -#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 -#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) - #define JSON_HAS_CPP_14 -#endif - -/*! -@brief macro to briefly define a mapping between an enum and JSON -@def NLOHMANN_JSON_SERIALIZE_ENUM -@since version 3.4.0 -*/ -#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ - template \ - inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [e](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.first == e; \ - }); \ - j = ((it != std::end(m)) ? it : std::begin(m))->second; \ - } \ - template \ - inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [j](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.second == j; \ - }); \ - e = ((it != std::end(m)) ? it : std::begin(m))->first; \ - } - -// Ugly macros to avoid uglier copy-paste when specializing basic_json. They -// may be removed in the future once the class is split. - -#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ - template class ObjectType, \ - template class ArrayType, \ - class StringType, class BooleanType, class NumberIntegerType, \ - class NumberUnsignedType, class NumberFloatType, \ - template class AllocatorType, \ - template class JSONSerializer> - -#define NLOHMANN_BASIC_JSON_TPL \ - basic_json - // #include -#include // not #include // size_t #include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type @@ -669,7 +2731,6 @@ constexpr T static_const::value; // #include -#include // not #include // numeric_limits #include // false_type, is_constructible, is_integral, is_same, true_type #include // declval @@ -686,11 +2747,11 @@ namespace nlohmann { namespace detail { -template struct make_void +template struct make_void { using type = void; }; -template using void_t = typename make_void::type; +template using void_t = typename make_void::type; } // namespace detail } // namespace nlohmann @@ -701,10 +2762,10 @@ namespace nlohmann { namespace detail { -template +template struct iterator_types {}; -template +template struct iterator_types < It, void_t +template struct iterator_traits { }; -template +template struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> : iterator_types { }; -template +template struct iterator_traits::value>> { using iterator_category = std::random_access_iterator_tag; @@ -754,7 +2815,7 @@ struct iterator_traits::value>> // #include -// http://en.cppreference.com/w/cpp/experimental/is_detected +// https://en.cppreference.com/w/cpp/experimental/is_detected namespace nlohmann { namespace detail @@ -769,39 +2830,39 @@ struct nonesuch void operator=(nonesuch&&) = delete; }; -template class Op, - class... Args> +template class Op, + class... Args> struct detector { using value_t = std::false_type; using type = Default; }; -template class Op, class... Args> +template class Op, class... Args> struct detector>, Op, Args...> { using value_t = std::true_type; using type = Op; }; -template