diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index a1f0df4617..6d61c9663d 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -310,7 +310,7 @@ void mainInitFunc() { #endif // OPENSPACE_HAS_SPOUT } - + std::string k = openspace::ConfigurationManager::KeyScreenshotUseDate; std::string screenshotPath = "${SCREENSHOTS}"; std::string screenshotNames = "OpenSpace"; @@ -329,7 +329,7 @@ void mainInitFunc() { SgctEngine->getWindowPtr(i)->getScreenCapturePointer(0); sgct_core::ScreenCapture* cpt1 = SgctEngine->getWindowPtr(i)->getScreenCapturePointer(1); - + if (cpt0) { cpt0->setPathAndFileName( absPath(screenshotPath), diff --git a/ext/ghoul b/ext/ghoul index a152a4d9b7..1e338147f0 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit a152a4d9b792c5a6a00c036d3c513181e177ac74 +Subproject commit 1e338147f0cf81ff2a565841c4e464d1a8cef351 diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index e916b12484..5606e26e6a 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -192,7 +192,7 @@ void DashboardItemSimulationIncrement::render(glm::vec2& penPosition) { double convertedT = convertTime(t, TimeUnit::Second, unit); deltaTime = { convertedT, nameForTimeUnit(unit, convertedT != 1.0) }; } - + penPosition.y -= _font->height(); RenderFont( *_font, diff --git a/modules/base/rendering/renderableplaneimageonline.cpp b/modules/base/rendering/renderableplaneimageonline.cpp index 3202c4410e..e8c7b8cd84 100644 --- a/modules/base/rendering/renderableplaneimageonline.cpp +++ b/modules/base/rendering/renderableplaneimageonline.cpp @@ -62,7 +62,8 @@ documentation::Documentation RenderablePlaneImageOnline::Documentation() { }; } -RenderablePlaneImageOnline::RenderablePlaneImageOnline(const ghoul::Dictionary& dictionary) +RenderablePlaneImageOnline::RenderablePlaneImageOnline( + const ghoul::Dictionary& dictionary) : RenderablePlane(dictionary) , _texturePath(TextureInfo) , _texture(nullptr) diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index a55f5b889c..455fde80a6 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -213,7 +213,8 @@ void RenderableTrailOrbit::update(const UpdateData& data) { // 3 if (!report.permanentPointsNeedUpdate) { if (report.floatingPointNeedsUpdate) { - // If no other values have been touched, we only need to upload the floating value + // If no other values have been touched, we only need to upload the + // floating value glBufferSubData( GL_ARRAY_BUFFER, _primaryRenderInformation.first * sizeof(TrailVBOLayout), diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index df3bf45500..c6d2529e5c 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -94,7 +94,7 @@ int addDashboardItemToScreenSpace(lua_State* L) { } dash->dashboard().addDashboardItem(DashboardItem::createFromDictionary(d)); - + lua_settop(L, 0); return 0; } diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index d28719d1d0..cfda8dbff7 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -730,7 +730,7 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data, "screenSize", glm::vec2(OsEng.renderEngine().renderingResolution()) ); - + _program->setUniform(_uniformCache.modelViewProjection, projMatrix * modelViewMatrix); _program->setUniform( _uniformCache.cameraPos, diff --git a/modules/fieldlinessequence/fieldlinessequencemodule.h b/modules/fieldlinessequence/fieldlinessequencemodule.h index a855a215eb..647a4d8b51 100644 --- a/modules/fieldlinessequence/fieldlinessequencemodule.h +++ b/modules/fieldlinessequence/fieldlinessequencemodule.h @@ -34,7 +34,7 @@ public: constexpr static const char* Name = "FieldlinesSequence"; FieldlinesSequenceModule(); - + static std::string DefaultTransferFunctionFile; private: diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index a7cbb4869f..da4e146390 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -49,29 +49,42 @@ namespace { // ----- KEYS POSSIBLE IN MODFILE. EXPECTED DATA TYPE OF VALUE IN [BRACKETS] ----- // // ---------------------------- MANDATORY MODFILE KEYS ---------------------------- // - const char* KeyInputFileType = "InputFileType"; // [STRING] "cdf", "json" or "osfls" - const char* KeySourceFolder = "SourceFolder"; // [STRING] should be path to folder containing the input files + // [STRING] "cdf", "json" or "osfls" + constexpr const char* KeyInputFileType = "InputFileType"; + // [STRING] should be path to folder containing the input files + constexpr const char* KeySourceFolder = "SourceFolder"; - // ---------------------- MANDATORY INPUT TYPE SPECIFIC KEYS ---------------------- // - const char* KeyCdfSeedPointFile = "SeedPointFile"; // [STRING] Path to a .txt file containing seed points - const char* KeyJsonSimulationModel = "SimulationModel"; // [STRING] Currently supports: "batsrus", "enlil" & "pfss" + // ---------------------- MANDATORY INPUT TYPE SPECIFIC KEYS ---------------------- // + // [STRING] Path to a .txt file containing seed points + constexpr const char* KeyCdfSeedPointFile = "SeedPointFile"; + // [STRING] Currently supports: "batsrus", "enlil" & "pfss" + constexpr const char* KeyJsonSimulationModel = "SimulationModel"; - // ----------------------- OPTIONAL INPUT TYPE SPECIFIC KEYS ---------------------- // - const char* KeyCdfExtraVariables = "ExtraVariables"; // [STRING ARRAY] - const char* KeyCdfTracingVariable = "TracingVariable"; // [STRING] - const char* KeyJsonScalingFactor = "ScaleToMeters"; // [STRING] - const char* KeyOslfsLoadAtRuntime = "LoadAtRuntime"; // [BOOLEAN] If value False => Load in initializing step and store in RAM + // ----------------------- OPTIONAL INPUT TYPE SPECIFIC KEYS ---------------------- // + // [STRING ARRAY] + constexpr const char* KeyCdfExtraVariables = "ExtraVariables"; + // [STRING] + constexpr const char* KeyCdfTracingVariable = "TracingVariable"; + // [STRING] + constexpr const char* KeyJsonScalingFactor = "ScaleToMeters"; + // [BOOLEAN] If value False => Load in initializing step and store in RAM + constexpr const char* KeyOslfsLoadAtRuntime = "LoadAtRuntime"; - // ---------------------------- OPTIONAL MODFILE KEYS ---------------------------- // - const char* KeyColorTablePaths = "ColorTablePaths"; // [STRING ARRAY] Values should be paths to .txt files - const char* KeyColorTableRanges = "ColorTableRanges";// [VEC2 ARRAY] Values should be entered as {X, Y}, where X & Y are numbers - const char* KeyMaskingRanges = "MaskingRanges"; // [VEC2 ARRAY] Values should be entered as {X, Y}, where X & Y are numbers - const char* KeyOutputFolder = "OutputFolder"; // [STRING] Value should be path to folder where states are saved (JSON/CDF input => osfls output & oslfs input => JSON output) + // ---------------------------- OPTIONAL MODFILE KEYS ---------------------------- // + // [STRING ARRAY] Values should be paths to .txt files + constexpr const char* KeyColorTablePaths = "ColorTablePaths"; + // [VEC2 ARRAY] Values should be entered as {X, Y}, where X & Y are numbers + constexpr const char* KeyColorTableRanges = "ColorTableRanges"; + // [VEC2 ARRAY] Values should be entered as {X, Y}, where X & Y are numbers + constexpr const char* KeyMaskingRanges = "MaskingRanges" + // [STRING] Value should be path to folder where states are saved (JSON/CDF input + // => osfls output & oslfs input => JSON output) + constexpr const char* KeyOutputFolder = "OutputFolder"; - // ------------- POSSIBLE STRING VALUES FOR CORRESPONDING MODFILE KEY ------------- // - const char* ValueInputFileTypeCdf = "cdf"; - const char* ValueInputFileTypeJson = "json"; - const char* ValueInputFileTypeOsfls = "osfls"; + // ------------- POSSIBLE STRING VALUES FOR CORRESPONDING MODFILE KEY ------------- // + constexpr const char* ValueInputFileTypeCdf = "cdf"; + constexpr const char* ValueInputFileTypeJson = "json"; + constexpr const char* ValueInputFileTypeOsfls = "osfls"; // --------------------------------- Property Info -------------------------------- // static const openspace::properties::Property::PropertyInfo ColorMethodInfo = { @@ -288,7 +301,8 @@ void RenderableFieldlinesSequence::initializeGL() { std::string outputFolderPath; extractOptionalInfoFromDictionary(outputFolderPath); - // EXTRACT SOURCE FILE TYPE SPECIFIC INFOMRATION FROM DICTIONARY & GET STATES FROM SOURCE + // EXTRACT SOURCE FILE TYPE SPECIFIC INFOMRATION FROM DICTIONARY & GET STATES FROM + // SOURCE switch (sourceFileType) { case SourceFileType::Cdf: if (!getStatesFromCdfFiles(outputFolderPath)) { @@ -536,7 +550,8 @@ bool RenderableFieldlinesSequence::extractJsonInfoFromDictionary(fls::Model& mod return true; } -bool RenderableFieldlinesSequence::loadJsonStatesIntoRAM(const std::string& outputFolder) { +bool RenderableFieldlinesSequence::loadJsonStatesIntoRAM(const std::string& outputFolder) +{ fls::Model model; if (!extractJsonInfoFromDictionary(model)) { return false; @@ -570,7 +585,8 @@ bool RenderableFieldlinesSequence::prepareForOsflsStreaming() { } -void RenderableFieldlinesSequence::loadOsflsStatesIntoRAM(const std::string& outputFolder) { +void RenderableFieldlinesSequence::loadOsflsStatesIntoRAM(const std::string& outputFolder) +{ // Load states from .osfls files into RAM! for (const std::string filePath : _sourceFiles) { FieldlinesState newState; @@ -1107,12 +1123,12 @@ void RenderableFieldlinesSequence::update(const UpdateData& data) { const int nextIdx = _activeTriggerTimeIndex + 1; if ( // true => Previous frame was not within the sequence interval - _activeTriggerTimeIndex < 0 + _activeTriggerTimeIndex < 0 // true => We stepped back to a time represented by another state - || currentTime < _startTimes[_activeTriggerTimeIndex] + || currentTime < _startTimes[_activeTriggerTimeIndex] // true => We stepped forward to a time represented by another state || (nextIdx < _nStates && currentTime >= _startTimes[nextIdx])) - { + { updateActiveTriggerTimeIndex(currentTime); if (_loadingStatesDynamically) { diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index ff1437d438..748e91026f 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -155,7 +155,7 @@ int goToChunk(lua_State* L) { int goToGeo(lua_State* L) { int nArguments = ghoul::lua::checkArgumentsAndThrow(L, 2, 3, "lua::goToGeo"); - + using ghoul::lua::luaTypeToString; double latitude = lua_tonumber(L, 1); diff --git a/modules/imgui/include/guispacetimecomponent.h b/modules/imgui/include/guispacetimecomponent.h index 41dbc556eb..0a162c85f5 100644 --- a/modules/imgui/include/guispacetimecomponent.h +++ b/modules/imgui/include/guispacetimecomponent.h @@ -49,10 +49,6 @@ private: bool _firstFrame; std::string _timeUnits; - - - //properties::FloatProperty _minMaxDeltaTime; - //float _localMinMaxDeltatime; // We don't want the default display inside the component }; } // namespace openspace::gui diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index 69fe3b419e..1669b9f84a 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -317,8 +317,8 @@ void GuiPropertyComponent::render() { if (lhsIt != ordering.end() && rhsIt != ordering.end()) { if (lhsToken[1] != rhsToken[1]) { - // If both top-level groups are in the ordering list, the order - // of the iterators gives us the order of the groups + // If both top-level groups are in the ordering list, the + // order of the iterators gives us the order of the groups return lhsIt < rhsIt; } else { diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index a99d3e3ddf..fe752b0d2d 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -111,7 +111,7 @@ double getTime(ccmc::Kameleon* kameleon) { case 17: // YYYY-MM-DDTHH:MM: => YYYY-MM-DDTHH:MM:SS seqStartStr += "00"; [[fallthrough]]; - // case 19 : // YYYY-MM-DDTHH:MM:SS => YYYY-MM-DDTHH:MM:SS.000 + // case 19 : // YYYY-MM-DDTHH:MM:SS => YYYY-MM-DDTHH:MM:SS.000 // seqStartStr += ".000"; // case 23 : // YYYY-MM-DDTHH:MM:SS. => YYYY-MM-DDTHH:MM:SS.000Z // seqStartStr += "Z"; @@ -142,7 +142,7 @@ double getTime(ccmc::Kameleon* kameleon) { Time::convertTime( seqStartStr.substr(0, seqStartStr.length() - 2)); } else { - LWARNING("No starting time attribute could be found in the .cdf file." + LWARNING("No starting time attribute could be found in the .cdf file." "Starting time is set to 01.JAN.2000 12:00."); seqStartDbl = 0.0; } diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index 63051fcff4..91ee83a814 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -132,8 +132,7 @@ namespace { }; } // namespace -namespace openspace { -namespace kameleonvolume { +namespace openspace::kameleonvolume { RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) @@ -182,7 +181,7 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict if (dictionary.getValue(KeySource, sourcePath)) { _sourcePath = absPath(sourcePath); } - + std::string variable; if (dictionary.getValue(KeyVariable, variable)) { _variable = variable; @@ -256,12 +255,12 @@ RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dict } } } - + RenderableKameleonVolume::~RenderableKameleonVolume() {} void RenderableKameleonVolume::initializeGL() { load(); - + _volumeTexture->uploadTexture(); _transferFunction->update(); @@ -323,7 +322,7 @@ void RenderableKameleonVolume::initializeGL() { void RenderableKameleonVolume::updateRaycasterModelTransform() { glm::vec3 lowerBoundingBoxBound = _domainScale.value() * _lowerDomainBound.value(); glm::vec3 upperBoundingBoxBound = _domainScale.value() * _upperDomainBound.value(); - + glm::vec3 scale = upperBoundingBoxBound - lowerBoundingBoxBound; glm::vec3 translation = (lowerBoundingBoxBound + upperBoundingBoxBound) * 0.5f; @@ -398,7 +397,7 @@ void RenderableKameleonVolume::loadCdf(const std::string& path) { } std::vector variables = reader.gridVariableNames(); - + if (variables.size() == 3 && _autoDomainBounds) { _lowerDomainBound = glm::vec3( reader.minValue(variables[0]), @@ -458,18 +457,18 @@ void RenderableKameleonVolume::storeRaw(const std::string& path) { volume::RawVolumeWriter writer(path); writer.write(*_rawVolume); } - + void RenderableKameleonVolume::deinitializeGL() { if (_raycaster) { OsEng.renderEngine().raycasterManager().detachRaycaster(*_raycaster.get()); _raycaster = nullptr; } } - + bool RenderableKameleonVolume::isReady() const { return true; } - + void RenderableKameleonVolume::update(const UpdateData&) { if (_raycaster) { _raycaster->setStepSize(_stepSize); @@ -479,6 +478,5 @@ void RenderableKameleonVolume::update(const UpdateData&) { void RenderableKameleonVolume::render(const RenderData& data, RendererTasks& tasks) { tasks.raycasterTasks.push_back({ _raycaster.get(), data }); } - -} -} + +} // openspace::kameleonvolume diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index 81dea97f1e..e519bbcad6 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -56,7 +56,7 @@ namespace { constexpr const char* KeyBoundsSimplification = "SimplifyBounds"; const int InterpolationSteps = 5; - + const double Epsilon = 1e-4; static const openspace::properties::Property::PropertyInfo LineWidthInfo = { @@ -360,7 +360,7 @@ void RenderableFov::initializeGL() { "RenderableFov" ); } - + if (_simplifyBounds) { const size_t sizeBefore = res.bounds.size(); for (size_t i = 1; i < res.bounds.size() - 1; ++i) { diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 27043f349c..b4b584bd01 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -225,7 +225,9 @@ void RenderableModelProjection::initializeGL() { _fboUniformCache.ProjectorMatrix = _fboProgramObject->uniformLocation( "ProjectorMatrix" ); - _fboUniformCache.ModelTransform = _fboProgramObject->uniformLocation("ModelTransform"); + _fboUniformCache.ModelTransform = _fboProgramObject->uniformLocation( + "ModelTransform" + ); _fboUniformCache.boresight = _fboProgramObject->uniformLocation("boresight"); diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp index 494491dbc3..ae5f31066c 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp @@ -604,7 +604,10 @@ void RenderablePlanetProjection::render(const RenderData& data, RendererTasks&) glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() * modelTransform; - _programObject->setUniform(_mainUniformCache.modelTransform, glm::mat4(modelTransform)); + _programObject->setUniform( + _mainUniformCache.modelTransform, + glm::mat4(modelTransform) + ); _programObject->setUniform(_mainUniformCache .modelViewProjectionTransform, data.camera.projectionMatrix() * glm::mat4(modelViewTransform) diff --git a/modules/spacecraftinstruments/util/imagesequencer.h b/modules/spacecraftinstruments/util/imagesequencer.h index d953622a6e..3af08edc51 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.h +++ b/modules/spacecraftinstruments/util/imagesequencer.h @@ -125,7 +125,7 @@ public: * makes the request. If an instance is not registered in the class then the singleton * returns false and no projections will occur. */ - bool getImagePaths(std::vector& captures, std::string projectee, + bool getImagePaths(std::vector& captures, std::string projectee, std::string instrumentRequest, double sinceTime); /* diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index 53e9ba80a2..292939f768 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -515,7 +515,7 @@ void ProjectionComponent::imageProjectBegin() { if (!FramebufferObject::errorChecking(status).empty()) { LERROR(fmt::format( "Read Buffer ({}): {}", - msg, + msg, FramebufferObject::errorChecking(status) )); } diff --git a/modules/spout/renderableplanespout.cpp b/modules/spout/renderableplanespout.cpp index f1cbccd352..5e82dda7a4 100644 --- a/modules/spout/renderableplanespout.cpp +++ b/modules/spout/renderableplanespout.cpp @@ -53,7 +53,7 @@ namespace { "selected, its value is stored in the 'SpoutName' property, overwriting its " "previous value." }; - + static const openspace::properties::Property::PropertyInfo UpdateInfo = { "UpdateSelection", "Update Selection", @@ -120,7 +120,7 @@ RenderablePlaneSpout::RenderablePlaneSpout(const ghoul::Dictionary& dictionary) } _spoutName.onChange([this]() { - _isSpoutDirty = true; + _isSpoutDirty = true; _isErrorMessageDisplayed = false; _receiver->SetActiveSender(_spoutName.value().c_str()); @@ -206,7 +206,7 @@ void RenderablePlaneSpout::update(const UpdateData& data) { if (!createSuccess) { LWARNINGC( - LoggerCat, + LoggerCat, fmt::format("Could not create receiver for {}", _currentSenderName) ); return; @@ -215,7 +215,7 @@ void RenderablePlaneSpout::update(const UpdateData& data) { unsigned int width; unsigned int height; - + bool receiveSuccess = _receiver->ReceiveTexture( _currentSenderName, width, diff --git a/modules/spout/renderableplanespout.h b/modules/spout/renderableplanespout.h index fb9809af67..0af9de3b71 100644 --- a/modules/spout/renderableplanespout.h +++ b/modules/spout/renderableplanespout.h @@ -69,6 +69,6 @@ private: } // namespace openspace -#endif // __OPENSPACE_MODULE_SPOUT___RENDERABLEPLANESPOUT___H__ - #endif // WIN32 + +#endif // __OPENSPACE_MODULE_SPOUT___RENDERABLEPLANESPOUT___H__ diff --git a/modules/spout/screenspacespout.cpp b/modules/spout/screenspacespout.cpp index 9d738689c3..c515b2b7ce 100644 --- a/modules/spout/screenspacespout.cpp +++ b/modules/spout/screenspacespout.cpp @@ -48,7 +48,7 @@ namespace { "selected, its value is stored in the 'SpoutName' property, overwriting its " "previous value." }; - + static const openspace::properties::Property::PropertyInfo UpdateInfo = { "UpdateSelection", "Update Selection", @@ -115,7 +115,7 @@ ScreenSpaceSpout::ScreenSpaceSpout(const ghoul::Dictionary& dictionary) } _spoutName.onChange([this]() { - _isSpoutDirty = true; + _isSpoutDirty = true; _isErrorMessageDisplayed = false; _receiver->SetActiveSender(_spoutName.value().c_str()); @@ -214,7 +214,7 @@ void ScreenSpaceSpout::update() { unsigned int width; unsigned int height; - + bool receiveSuccess = _receiver->ReceiveTexture( _currentSenderName, width, diff --git a/modules/spout/screenspacespout.h b/modules/spout/screenspacespout.h index b3dc16f28c..2cf3f480fb 100644 --- a/modules/spout/screenspacespout.h +++ b/modules/spout/screenspacespout.h @@ -69,6 +69,6 @@ private: } // namespace openspace -#endif // __OPENSPACE_MODULE_SPOUT___SCREENSPACESPOUT___H__ - #endif // WIN32 + +#endif // __OPENSPACE_MODULE_SPOUT___SCREENSPACESPOUT___H__ diff --git a/modules/sync/syncs/torrentsynchronization.cpp b/modules/sync/syncs/torrentsynchronization.cpp index 4fbb4d4a4b..bd16bb8e9c 100644 --- a/modules/sync/syncs/torrentsynchronization.cpp +++ b/modules/sync/syncs/torrentsynchronization.cpp @@ -167,9 +167,9 @@ bool TorrentSynchronization::hasSyncFile() { void TorrentSynchronization::createSyncFile() { std::string directoryName = directory(); std::string filepath = directoryName + ".ossync"; - + FileSys.createDirectory(directoryName, ghoul::filesystem::Directory::Recursive::Yes); - + std::ofstream syncFile(filepath, std::ofstream::out); syncFile << "Synchronized"; syncFile.close(); diff --git a/modules/sync/torrentclient.cpp b/modules/sync/torrentclient.cpp index c3a2f3170e..4a53c05281 100644 --- a/modules/sync/torrentclient.cpp +++ b/modules/sync/torrentclient.cpp @@ -85,7 +85,7 @@ void TorrentClient::initialize() { settings.set_int(libtorrent::settings_pack::active_downloads, -1); settings.set_int(libtorrent::settings_pack::active_seeds, -1); settings.set_int(libtorrent::settings_pack::active_limit, 30); - + settings.set_str( libtorrent::settings_pack::dht_bootstrap_nodes, "router.utorrent.com,dht.transmissionbt.com,router.bittorrent.com,\ @@ -146,7 +146,7 @@ void TorrentClient::deinitialize() { void TorrentClient::pollAlerts() { #ifdef SYNC_USE_LIBTORRENT // Libtorrent does not seem to reliably generate alerts for all added torrents. - // To make sure that the program does not keep waiting for already finished + // To make sure that the program does not keep waiting for already finished // downsloads, we go through the whole list of torrents when polling. // However, in theory, the commented code below should be more efficient: /* diff --git a/modules/sync/torrentclient.h b/modules/sync/torrentclient.h index 10568da4b9..2aa16effbf 100644 --- a/modules/sync/torrentclient.h +++ b/modules/sync/torrentclient.h @@ -97,7 +97,7 @@ public: TorrentProgressCallback cb); void removeTorrent(TorrentId id); - + private: struct Torrent { TorrentId id; diff --git a/src/engine/configurationmanager.cpp b/src/engine/configurationmanager.cpp index aedf5a1799..9fe4d1f82a 100644 --- a/src/engine/configurationmanager.cpp +++ b/src/engine/configurationmanager.cpp @@ -60,7 +60,8 @@ const string ConfigurationManager::PartFile = "File"; const string ConfigurationManager::KeyLuaDocumentation = "LuaDocumentation"; const string ConfigurationManager::KeyScriptLog = "ScriptLog"; const string ConfigurationManager::KeyPropertyDocumentation = "PropertyDocumentation"; -const string ConfigurationManager::KeyScenePropertyDocumentation = "ScenePropertyDocumentation"; +const string ConfigurationManager::KeyScenePropertyDocumentation = + "ScenePropertyDocumentation"; const string ConfigurationManager::KeyKeyboardShortcuts = "KeyboardShortcuts"; const string ConfigurationManager::KeyDocumentation = "Documentation"; const string ConfigurationManager::KeyFactoryDocumentation = "FactoryDocumentation"; diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 4fb984ac3f..a7ec6712be 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -998,7 +998,10 @@ void OpenSpaceEngine::writeSceneDocumentation() { } // If a PropertyDocumentationFile was specified, generate it now. - if (configurationManager().hasKey(ConfigurationManager::KeyScenePropertyDocumentation)) { + if (configurationManager().hasKey( + ConfigurationManager::KeyScenePropertyDocumentation + )) + { _scene->writeDocumentation( absPath(configurationManager().value( ConfigurationManager::KeyScenePropertyDocumentation @@ -1173,7 +1176,7 @@ void OpenSpaceEngine::initializeGL() { LERRORC( "OpenGL Invalid State", fmt::format( - "Function {}: GL_INVALID_FRAMEBUFFER_OPERATION", + "Function {}: GL_INVALID_FRAMEBUFFER_OPERATION", f.toString() ) ); diff --git a/src/interaction/navigationhandler_lua.inl b/src/interaction/navigationhandler_lua.inl index 9839d56fe1..8ad65f406e 100644 --- a/src/interaction/navigationhandler_lua.inl +++ b/src/interaction/navigationhandler_lua.inl @@ -79,7 +79,7 @@ int saveCameraStateToFile(lua_State* L) { int resetCameraDirection(lua_State* L) { ghoul::lua::checkArgumentsAndThrow(L, 0, "lua::resetCameraDirection"); - + using ghoul::lua::luaTypeToString; OsEng.navigationHandler().resetCameraDirection(); diff --git a/src/mission/missionmanager_lua.inl b/src/mission/missionmanager_lua.inl index 24b998e230..8ea5caaf23 100644 --- a/src/mission/missionmanager_lua.inl +++ b/src/mission/missionmanager_lua.inl @@ -31,7 +31,7 @@ int loadMission(lua_State* L) { if (missionFileName.empty()) { return luaL_error(L, "Filepath is empty"); } - + std::string name = MissionManager::ref().loadMission(absPath(missionFileName)); lua_pushstring(L, name.c_str()); @@ -64,7 +64,7 @@ int hasMission(lua_State* L) { if (missionName.empty()) { return luaL_error(L, "Missing name is empty"); } - + bool hasMission = MissionManager::ref().hasMission(missionName); lua_pushboolean(L, hasMission); diff --git a/src/rendering/renderengine_lua.inl b/src/rendering/renderengine_lua.inl index bda30ee27a..ee437b9799 100644 --- a/src/rendering/renderengine_lua.inl +++ b/src/rendering/renderengine_lua.inl @@ -119,7 +119,7 @@ int addScreenSpaceRenderable(lua_State* L) { int removeScreenSpaceRenderable(lua_State* L) { ghoul::lua::checkArgumentsAndThrow(L, 1, "lua::removeScreenSpaceRenderable"); - + using ghoul::lua::errorLocation; std::string name = ghoul::lua::checkStringAndPop(L); diff --git a/src/scene/assetloader.cpp b/src/scene/assetloader.cpp index ee8a64542b..9a2c42784e 100644 --- a/src/scene/assetloader.cpp +++ b/src/scene/assetloader.cpp @@ -423,11 +423,11 @@ int AssetLoader::onInitializeDependencyLua(Asset* dependant, Asset* dependency) int AssetLoader::onDeinitializeDependencyLua(Asset* dependant, Asset* dependency) { ghoul::lua::checkArgumentsAndThrow(*_luaState, 1, "lua::onDeinitializeDependency"); - + int referenceIndex = luaL_ref(*_luaState, LUA_REGISTRYINDEX); _onDependencyDeinitializationFunctionRefs[dependant][dependency] .push_back(referenceIndex); - + lua_settop(*_luaState, 0); return 0; } diff --git a/src/scene/assetmanager_lua.inl b/src/scene/assetmanager_lua.inl index a02c6ad58a..0d94f96679 100644 --- a/src/scene/assetmanager_lua.inl +++ b/src/scene/assetmanager_lua.inl @@ -52,7 +52,7 @@ int remove(lua_State* state) { int removeAll(lua_State* state) { ghoul::lua::checkArgumentsAndThrow(state, 0, "lua::removeAll"); - + AssetManager* assetManager = reinterpret_cast(lua_touserdata(state, lua_upvalueindex(1))); diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index 89462a04b0..ea08a2774e 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -310,7 +310,7 @@ int directoryForPath(lua_State* L) { const std::string path = ghoul::filesystem::File(file).directoryName(); lua_pushstring(L, path.c_str()); - + return 1; } diff --git a/src/util/powerscaledcoordinate.cpp b/src/util/powerscaledcoordinate.cpp index e5fbdbb512..902214eba1 100644 --- a/src/util/powerscaledcoordinate.cpp +++ b/src/util/powerscaledcoordinate.cpp @@ -93,9 +93,9 @@ PowerScaledCoordinate // rescale and return double tp = 1.0 / pow(k, digits); return PowerScaledCoordinate( - static_cast(d1 * tp), - static_cast(d2 * tp), - static_cast(d3 * tp), + static_cast(d1 * tp), + static_cast(d2 * tp), + static_cast(d3 * tp), static_cast(digits)); } @@ -178,12 +178,14 @@ PowerScaledCoordinate& PowerScaledCoordinate::operator+=(const PowerScaledCoordi double p = pow(k, -ds); *this = PowerScaledCoordinate(static_cast(rhs._vec[0] * p + _vec[0]), static_cast(rhs._vec[1] * p + _vec[1]), - static_cast(rhs._vec[2] * p + _vec[2]), _vec[3]); + static_cast(rhs._vec[2] * p + _vec[2]), + _vec[3]); } else { double p = pow(k, ds); *this = PowerScaledCoordinate(static_cast(rhs._vec[0] + _vec[0] * p), static_cast(rhs._vec[1] + _vec[1] * p), - static_cast(rhs._vec[2] + _vec[2] * p), rhs._vec[3]); + static_cast(rhs._vec[2] + _vec[2] * p), + rhs._vec[3]); } return *this; @@ -202,12 +204,14 @@ PowerScaledCoordinate& PowerScaledCoordinate::operator-=(const PowerScaledCoordi double p = pow(k, -ds); *this = PowerScaledCoordinate(static_cast(-rhs._vec[0] * p + _vec[0]), static_cast(-rhs._vec[1] * p + _vec[1]), - static_cast(-rhs._vec[2] * p + _vec[2]), _vec[3]); + static_cast(-rhs._vec[2] * p + _vec[2]), + _vec[3]); } else { double p = pow(k, ds); *this = PowerScaledCoordinate(static_cast(-rhs._vec[0] + _vec[0] * p), static_cast(-rhs._vec[1] + _vec[1] * p), - static_cast(-rhs._vec[2] + _vec[2] * p), rhs._vec[3]); + static_cast(-rhs._vec[2] + _vec[2] * p), + rhs._vec[3]); } return *this; @@ -215,8 +219,8 @@ PowerScaledCoordinate& PowerScaledCoordinate::operator-=(const PowerScaledCoordi PowerScaledCoordinate PowerScaledCoordinate::operator*(const double& rhs) const { - return PowerScaledCoordinate(static_cast(_vec[0] * rhs), - static_cast(_vec[1] * rhs), + return PowerScaledCoordinate(static_cast(_vec[0] * rhs), + static_cast(_vec[1] * rhs), static_cast(_vec[2] * rhs), _vec[3]); } @@ -231,13 +235,13 @@ PowerScaledCoordinate& PowerScaledCoordinate::operator*=(const PowerScaledScalar if (ds >= 0.0) { double p = pow(k, -ds); *this = PowerScaledCoordinate( - static_cast(rhs._data[0] * p * _vec[0]), + static_cast(rhs._data[0] * p * _vec[0]), static_cast(rhs._data[0] * p * _vec[1]), static_cast(rhs._data[0] * p * _vec[2]), this->_vec[3] + _vec[3]); } else { double p = pow(k, ds); *this = PowerScaledCoordinate( - static_cast(rhs._data[0] * _vec[0] * p), + static_cast(rhs._data[0] * _vec[0] * p), static_cast(rhs._data[0] * _vec[1] * p), static_cast(rhs._data[0] * _vec[2] * p), rhs._data[1] + rhs._data[1]); } diff --git a/src/util/powerscaledscalar.cpp b/src/util/powerscaledscalar.cpp index 05c742340b..890f4f597c 100644 --- a/src/util/powerscaledscalar.cpp +++ b/src/util/powerscaledscalar.cpp @@ -97,11 +97,11 @@ PowerScaledScalar & PowerScaledScalar::operator+=(const PowerScaledScalar &rhs) double ds = this->_data[1] - rhs._data[1]; if(ds >= 0.0) { *this = PowerScaledScalar( - static_cast(rhs._data[0] * pow(k, -ds) + this->_data[0]), + static_cast(rhs._data[0] * pow(k, -ds) + this->_data[0]), this->_data[1]); } else { *this = PowerScaledScalar( - static_cast(rhs._data[0] + this->_data[0] * pow(k, ds)), + static_cast(rhs._data[0] + this->_data[0] * pow(k, ds)), rhs._data[1]); } @@ -117,11 +117,11 @@ PowerScaledScalar & PowerScaledScalar::operator-=(const PowerScaledScalar &rhs) double ds = this->_data[1] - rhs._data[1]; if(ds >= 0.0) { *this = PowerScaledScalar( - static_cast(-rhs._data[0] * pow(k, -ds) + this->_data[0]), + static_cast(-rhs._data[0] * pow(k, -ds) + this->_data[0]), this->_data[1]); } else { *this = PowerScaledScalar( - static_cast(-rhs._data[0] + this->_data[0] * pow(k, ds)), + static_cast(-rhs._data[0] + this->_data[0] * pow(k, ds)), rhs._data[1]); } @@ -136,11 +136,11 @@ PowerScaledScalar & PowerScaledScalar::operator*=(const PowerScaledScalar &rhs) double ds = this->_data[1] - rhs._data[1]; if(ds >= 0.0) { *this = PowerScaledScalar( - static_cast(rhs._data[0] * pow(k, -ds) * this->_data[0]), + static_cast(rhs._data[0] * pow(k, -ds) * this->_data[0]), this->_data[1] + this->_data[1]); } else { *this = PowerScaledScalar( - static_cast(rhs._data[0] * this->_data[0] * pow(k, ds)), + static_cast(rhs._data[0] * this->_data[0] * pow(k, ds)), rhs._data[1] + rhs._data[1]); } @@ -157,7 +157,7 @@ PowerScaledScalar & PowerScaledScalar::operator*=(const float &rhs) { double ds = this->_data[1]; if(ds >= 0) { *this = PowerScaledScalar( - static_cast(rhs*pow(k, -ds) * this->_data[0]), + static_cast(rhs*pow(k, -ds) * this->_data[0]), this->_data[1] + this->_data[1]); } else { *this = PowerScaledScalar( @@ -188,11 +188,6 @@ bool PowerScaledScalar::operator<(const PowerScaledScalar &other) const { if(ds >= 0) { double upscaled = other._data[0]*pow(k,-ds); return _data[0] < upscaled; - /* - bool retur =(vec_[0] < upscaled); - std::printf("this: %f, upscaled: %f, this upscaled; diff --git a/src/util/powerscaledsphere.cpp b/src/util/powerscaledsphere.cpp index 4308fe7a51..fa0983b035 100644 --- a/src/util/powerscaledsphere.cpp +++ b/src/util/powerscaledsphere.cpp @@ -94,12 +94,12 @@ PowerScaledSphere::PowerScaledSphere(const PowerScaledScalar& radius, int segmen const int t = segments + 1; _iarray[nr] = t * (i - 1) + j + 0; //1 ++nr; - _iarray[nr] = t * (i + 0) + j + 0; //2 + _iarray[nr] = t * (i + 0) + j + 0; //2 ++nr; _iarray[nr] = t * (i + 0) + j + 1; //3 ++nr; - _iarray[nr] = t * (i - 1) + j + 0; //4 + _iarray[nr] = t * (i - 1) + j + 0; //4 ++nr; _iarray[nr] = t * (i + 0) + j + 1; //5 ++nr; @@ -109,20 +109,20 @@ PowerScaledSphere::PowerScaledSphere(const PowerScaledScalar& radius, int segmen /* _iarray[nr] = t * (i - 1) + j + 0; //1 ++nr; - _iarray[nr] = t * (i + 0) + j + 0; //2 + _iarray[nr] = t * (i + 0) + j + 0; //2 ++nr; _iarray[nr] = t * (i + 0) + j + 1; //3 ++nr; _iarray[nr] = t * (i - 1) + j + 1; //6 ++nr; - _iarray[nr] = t * (i - 1) + j + 0; //4 + _iarray[nr] = t * (i - 1) + j + 0; //4 ++nr; */ } } } -// Alternative Constructor for using accurate triaxial ellipsoid +// Alternative Constructor for using accurate triaxial ellipsoid PowerScaledSphere::PowerScaledSphere(glm::vec3 radius, int segments) : _vaoID(0) , _vBufferID(0) @@ -181,12 +181,12 @@ PowerScaledSphere::PowerScaledSphere(glm::vec3 radius, int segments) const int t = segments + 1; _iarray[nr] = t * (i - 1) + j + 0; //1 ++nr; - _iarray[nr] = t * (i + 0) + j + 0; //2 + _iarray[nr] = t * (i + 0) + j + 0; //2 ++nr; _iarray[nr] = t * (i + 0) + j + 1; //3 ++nr; - _iarray[nr] = t * (i - 1) + j + 0; //4 + _iarray[nr] = t * (i - 1) + j + 0; //4 ++nr; _iarray[nr] = t * (i + 0) + j + 1; //5 ++nr; @@ -196,7 +196,7 @@ PowerScaledSphere::PowerScaledSphere(glm::vec3 radius, int segments) } } -PowerScaledSphere::PowerScaledSphere(const PowerScaledSphere& cpy) +PowerScaledSphere::PowerScaledSphere(const PowerScaledSphere& cpy) : _vaoID(cpy._vaoID) , _vBufferID(cpy._vBufferID) , _iBufferID(cpy._iBufferID) diff --git a/src/util/timeconversion.cpp b/src/util/timeconversion.cpp index eb61bc6950..08228e7b1c 100644 --- a/src/util/timeconversion.cpp +++ b/src/util/timeconversion.cpp @@ -55,7 +55,7 @@ std::pair simplifyTime(double seconds, bool forceSingularFo double val = seconds / 1e-3; return { val, - (val == 1.0 || forceSingularForm) ? "millisecond" : "milliseconds" + (val == 1.0 || forceSingularForm) ? "millisecond" : "milliseconds" }; }