From c02e59b9f8a8a7aeb13dc15ca1eb1c622790c3d3 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 16 Dec 2025 13:40:19 +0100 Subject: [PATCH] Fixing more includes and forward declarations (#3876) --- .../ext/launcher/include/backgroundimage.h | 3 + .../ext/launcher/include/filesystemaccess.h | 6 + .../ext/launcher/include/launcherwindow.h | 7 +- .../ext/launcher/include/notificationwindow.h | 2 + .../launcher/include/profile/actiondialog.h | 4 +- .../include/profile/additionalscriptsdialog.h | 5 + .../ext/launcher/include/profile/assetedit.h | 4 - .../launcher/include/profile/assetsdialog.h | 14 +- .../launcher/include/profile/assettreeitem.h | 1 + .../launcher/include/profile/assettreemodel.h | 6 + .../launcher/include/profile/cameradialog.h | 2 + .../include/profile/deltatimesdialog.h | 6 + .../launcher/include/profile/horizonsdialog.h | 4 + .../include/profile/marknodesdialog.h | 5 + .../ext/launcher/include/profile/metadialog.h | 2 +- .../launcher/include/profile/modulesdialog.h | 3 + .../launcher/include/profile/profileedit.h | 6 +- .../include/profile/propertiesdialog.h | 3 + .../include/profile/scriptlogdialog.h | 4 + .../ext/launcher/include/profile/timedialog.h | 2 + .../launcher/include/profile/uipanelsdialog.h | 4 + .../ext/launcher/include/settingsdialog.h | 1 + .../include/sgctedit/displaywindowunion.h | 2 + .../launcher/include/sgctedit/monitorbox.h | 6 +- .../ext/launcher/include/sgctedit/sgctedit.h | 1 + .../launcher/include/sgctedit/windowcontrol.h | 5 + .../ext/launcher/include/splitcombobox.h | 5 +- .../ext/launcher/src/backgroundimage.cpp | 5 + .../ext/launcher/src/filesystemaccess.cpp | 3 + .../ext/launcher/src/launcherwindow.cpp | 10 +- .../ext/launcher/src/notificationwindow.cpp | 7 + .../ext/launcher/src/profile/actiondialog.cpp | 2 + .../src/profile/additionalscriptsdialog.cpp | 1 + .../ext/launcher/src/profile/assetsdialog.cpp | 5 +- .../launcher/src/profile/assettreeitem.cpp | 4 + .../launcher/src/profile/assettreemodel.cpp | 2 + .../ext/launcher/src/profile/cameradialog.cpp | 5 + .../launcher/src/profile/deltatimesdialog.cpp | 1 - .../launcher/src/profile/horizonsdialog.cpp | 7 +- .../ext/launcher/src/profile/metadialog.cpp | 1 + .../launcher/src/profile/modulesdialog.cpp | 2 + .../ext/launcher/src/profile/profileedit.cpp | 6 +- .../launcher/src/profile/propertiesdialog.cpp | 3 + .../launcher/src/profile/scriptlogdialog.cpp | 4 +- .../launcher/src/profile/uipanelsdialog.cpp | 3 + .../ext/launcher/src/settingsdialog.cpp | 6 + .../src/sgctedit/displaywindowunion.cpp | 4 + .../ext/launcher/src/sgctedit/monitorbox.cpp | 1 + .../ext/launcher/src/sgctedit/sgctedit.cpp | 8 + .../launcher/src/sgctedit/windowcontrol.cpp | 8 +- .../ext/launcher/src/splitcombobox.cpp | 2 + apps/OpenSpace/ext/launcher/src/usericon.cpp | 3 + apps/OpenSpace/ext/sgct | 2 +- ext/ghoul | 2 +- include/openspace/camera/camera.h | 4 + include/openspace/data/csvloader.h | 3 + include/openspace/data/datamapping.h | 2 + include/openspace/data/speckloader.h | 8 +- .../documentation/documentationengine.h | 1 + include/openspace/documentation/verifier.h | 9 + include/openspace/documentation/verifier.inl | 5 +- include/openspace/engine/configuration.h | 2 +- include/openspace/engine/downloadmanager.h | 1 + include/openspace/engine/globals.h | 38 +- include/openspace/engine/moduleengine.h | 4 +- include/openspace/engine/openspaceengine.h | 9 +- include/openspace/engine/settings.h | 1 + include/openspace/engine/syncengine.h | 2 +- include/openspace/events/event.h | 20 +- include/openspace/events/eventengine.h | 8 +- include/openspace/interaction/actionmanager.h | 2 + .../openspace/interaction/delayedvariable.h | 1 + .../interaction/joystickcamerastates.h | 4 + .../interaction/joystickinputstate.h | 4 + .../openspace/interaction/keybindingmanager.h | 6 +- .../interaction/keyboardinputstate.h | 1 + .../interaction/keyframerecordinghandler.h | 4 +- .../openspace/interaction/mousecamerastates.h | 3 +- .../openspace/interaction/sessionrecording.h | 3 +- .../interaction/sessionrecordinghandler.h | 11 + .../interaction/tasks/convertrecformattask.h | 7 +- .../interaction/websocketcamerastates.h | 4 + .../interaction/websocketinputstate.h | 2 + include/openspace/mission/mission.h | 3 +- include/openspace/mission/missionmanager.h | 1 - .../openspace/navigation/keyframenavigator.h | 4 +- .../openspace/navigation/navigationhandler.h | 13 +- .../openspace/navigation/navigationstate.h | 9 +- .../openspace/navigation/orbitalnavigator.h | 6 +- include/openspace/navigation/path.h | 10 +- include/openspace/navigation/pathcurve.h | 1 + .../pathcurves/avoidcollisioncurve.h | 2 +- .../pathcurves/zoomoutoverviewcurve.h | 2 +- include/openspace/navigation/pathnavigator.h | 3 +- include/openspace/network/messagestructures.h | 435 ++---------------- .../network/messagestructureshelper.h | 6 +- .../openspace/network/parallelconnection.h | 2 + include/openspace/network/parallelpeer.h | 1 + .../properties/list/doublelistproperty.h | 2 +- .../properties/list/intlistproperty.h | 2 +- .../properties/list/stringlistproperty.h | 5 +- .../properties/matrix/dmat2property.h | 3 +- .../properties/matrix/dmat3property.h | 3 +- .../properties/matrix/dmat4property.h | 3 +- .../properties/matrix/mat2property.h | 4 +- .../properties/matrix/mat3property.h | 3 +- .../properties/matrix/mat4property.h | 2 +- .../openspace/properties/misc/listproperty.h | 4 +- .../properties/misc/optionproperty.h | 6 +- .../properties/misc/selectionproperty.h | 2 - .../properties/misc/stringproperty.h | 2 +- .../properties/misc/triggerproperty.h | 2 +- .../openspace/properties/numericalproperty.h | 3 +- include/openspace/properties/property.h | 7 + include/openspace/properties/propertyowner.h | 1 + .../properties/scalar/boolproperty.h | 2 +- .../properties/scalar/doubleproperty.h | 3 +- .../properties/scalar/floatproperty.h | 3 +- .../openspace/properties/scalar/intproperty.h | 1 + .../properties/scalar/longproperty.h | 3 +- .../properties/scalar/shortproperty.h | 3 +- .../properties/scalar/uintproperty.h | 3 +- .../properties/scalar/ulongproperty.h | 3 +- .../properties/scalar/ushortproperty.h | 3 +- .../properties/vector/dvec2property.h | 3 +- .../properties/vector/dvec3property.h | 3 +- .../properties/vector/dvec4property.h | 3 +- .../properties/vector/ivec2property.h | 2 +- .../properties/vector/ivec3property.h | 2 +- .../properties/vector/ivec4property.h | 2 +- .../properties/vector/uvec2property.h | 2 +- .../properties/vector/uvec3property.h | 2 +- .../properties/vector/uvec4property.h | 2 +- .../properties/vector/vec2property.h | 2 +- .../properties/vector/vec3property.h | 2 +- .../properties/vector/vec4property.h | 2 +- include/openspace/query/query.h | 8 +- .../rendering/colormappingcomponent.h | 7 + include/openspace/rendering/dashboard.h | 2 + include/openspace/rendering/dashboarditem.h | 1 + .../openspace/rendering/dashboardtextitem.h | 3 - include/openspace/rendering/deferredcaster.h | 15 +- .../openspace/rendering/framebufferrenderer.h | 3 - include/openspace/rendering/helper.h | 12 +- include/openspace/rendering/labelscomponent.h | 4 +- include/openspace/rendering/loadingscreen.h | 5 +- include/openspace/rendering/luaconsole.h | 2 + .../openspace/rendering/raycastermanager.h | 2 +- include/openspace/rendering/renderable.h | 18 +- include/openspace/rendering/renderengine.h | 23 +- .../rendering/screenspacerenderable.h | 3 + .../screenspacerenderableframebuffer.h | 10 +- .../rendering/screenspacerenderabletext.h | 17 +- .../openspace/rendering/texturecomponent.h | 1 + include/openspace/rendering/volumeraycaster.h | 13 +- include/openspace/scene/asset.h | 5 +- include/openspace/scene/assetmanager.h | 11 +- include/openspace/scene/lightsource.h | 1 - include/openspace/scene/profile.h | 6 +- include/openspace/scene/rotation.h | 5 +- include/openspace/scene/scale.h | 4 +- include/openspace/scene/scene.h | 27 +- include/openspace/scene/scenegraphnode.h | 13 +- include/openspace/scene/sceneinitializer.h | 3 +- include/openspace/scene/timeframe.h | 6 +- include/openspace/scene/translation.h | 4 +- include/openspace/scripting/lualibrary.h | 3 +- include/openspace/scripting/scriptengine.h | 7 +- include/openspace/scripting/scriptscheduler.h | 6 +- include/openspace/util/coordinateconversion.h | 1 + include/openspace/util/distanceconstants.h | 34 +- include/openspace/util/distanceconversion.h | 3 +- include/openspace/util/downloadeventengine.h | 3 +- .../util/dynamicfilesequencedownloader.h | 2 +- include/openspace/util/ellipsoid.h | 1 + include/openspace/util/factorymanager.h | 2 + include/openspace/util/factorymanager.inl | 1 + include/openspace/util/histogram.h | 3 +- include/openspace/util/httprequest.h | 5 +- include/openspace/util/json_helper.h | 3 +- include/openspace/util/keys.h | 2 + include/openspace/util/openspacemodule.h | 5 +- .../openspace/util/resourcesynchronization.h | 1 + include/openspace/util/syncable.h | 8 +- include/openspace/util/syncbuffer.h | 1 + include/openspace/util/task.h | 9 +- include/openspace/util/threadpool.h | 12 +- include/openspace/util/timeconversion.h | 3 + include/openspace/util/touch.h | 6 +- .../rendering/atmospheredeferredcaster.cpp | 15 + .../rendering/atmospheredeferredcaster.h | 11 +- .../rendering/renderableatmosphere.cpp | 12 +- .../rendering/renderableatmosphere.h | 18 +- modules/audio/audiomodule.cpp | 11 +- modules/audio/audiomodule.h | 6 +- modules/audio/audiomodule_lua.inl | 2 +- modules/base/basemodule.cpp | 5 +- modules/base/dashboard/dashboarditemangle.cpp | 10 +- modules/base/dashboard/dashboarditemangle.h | 2 - .../dashboarditemcameraorientation.cpp | 4 +- modules/base/dashboard/dashboarditemdate.cpp | 7 +- modules/base/dashboard/dashboarditemdate.h | 2 - .../base/dashboard/dashboarditemdistance.cpp | 9 +- .../base/dashboard/dashboarditemdistance.h | 2 - .../dashboard/dashboarditemelapsedtime.cpp | 10 +- .../base/dashboard/dashboarditemelapsedtime.h | 2 - .../base/dashboard/dashboarditemframerate.cpp | 8 +- .../base/dashboard/dashboarditemframerate.h | 4 - .../dashboard/dashboarditeminputstate.cpp | 8 +- .../base/dashboard/dashboarditeminputstate.h | 3 - .../base/dashboard/dashboarditemmission.cpp | 6 +- modules/base/dashboard/dashboarditemmission.h | 2 - .../dashboarditemparallelconnection.cpp | 7 +- .../dashboarditemparallelconnection.h | 2 - .../dashboard/dashboarditempropertyvalue.cpp | 12 +- .../dashboard/dashboarditempropertyvalue.h | 2 - .../dashboarditemsimulationincrement.cpp | 9 +- .../dashboarditemsimulationincrement.h | 2 - .../base/dashboard/dashboarditemspacing.cpp | 2 +- modules/base/dashboard/dashboarditemspacing.h | 2 - modules/base/dashboard/dashboarditemtext.cpp | 5 +- modules/base/dashboard/dashboarditemtext.h | 2 - .../dashboarditemtimevaryingtext.cpp | 11 +- .../dashboard/dashboarditemtimevaryingtext.h | 5 +- .../base/dashboard/dashboarditemvelocity.cpp | 8 +- .../base/dashboard/dashboarditemvelocity.h | 5 - .../base/lightsource/cameralightsource.cpp | 2 +- modules/base/lightsource/cameralightsource.h | 2 - .../lightsource/scenegraphlightsource.cpp | 2 +- .../base/lightsource/scenegraphlightsource.h | 2 +- .../rendering/grids/renderableboxgrid.cpp | 7 +- .../base/rendering/grids/renderableboxgrid.h | 6 - .../base/rendering/grids/renderablegrid.cpp | 6 +- modules/base/rendering/grids/renderablegrid.h | 5 +- .../rendering/grids/renderableradialgrid.cpp | 5 +- .../rendering/grids/renderableradialgrid.h | 7 +- .../grids/renderablesphericalgrid.cpp | 6 +- .../rendering/grids/renderablesphericalgrid.h | 5 +- .../renderableinterpolatedpoints.cpp | 8 +- .../pointcloud/renderableinterpolatedpoints.h | 7 +- .../pointcloud/renderablepointcloud.cpp | 23 +- .../pointcloud/renderablepointcloud.h | 18 +- .../pointcloud/renderablepolygoncloud.cpp | 7 +- .../pointcloud/renderablepolygoncloud.h | 8 +- .../pointcloud/sizemappingcomponent.cpp | 4 + .../pointcloud/sizemappingcomponent.h | 2 + .../rendering/renderablecartesianaxes.cpp | 7 +- .../base/rendering/renderablecartesianaxes.h | 8 - modules/base/rendering/renderabledisc.cpp | 5 +- modules/base/rendering/renderabledisc.h | 7 +- .../rendering/renderabledistancelabel.cpp | 5 +- .../base/rendering/renderabledistancelabel.h | 2 - modules/base/rendering/renderablelabel.cpp | 17 +- modules/base/rendering/renderablelabel.h | 16 +- modules/base/rendering/renderablemodel.cpp | 14 +- modules/base/rendering/renderablemodel.h | 27 +- .../base/rendering/renderablenodearrow.cpp | 15 +- modules/base/rendering/renderablenodearrow.h | 7 +- modules/base/rendering/renderablenodeline.cpp | 6 +- modules/base/rendering/renderablenodeline.h | 10 +- modules/base/rendering/renderableplane.cpp | 13 +- modules/base/rendering/renderableplane.h | 13 +- .../rendering/renderableplaneimagelocal.cpp | 8 +- .../rendering/renderableplaneimagelocal.h | 9 +- .../rendering/renderableplaneimageonline.cpp | 9 +- .../rendering/renderableplaneimageonline.h | 11 +- .../renderableplanetimevaryingimage.cpp | 12 +- .../renderableplanetimevaryingimage.h | 11 +- modules/base/rendering/renderableprism.cpp | 6 +- modules/base/rendering/renderableprism.h | 7 +- modules/base/rendering/renderablesphere.cpp | 9 +- modules/base/rendering/renderablesphere.h | 15 +- .../rendering/renderablesphereimagelocal.cpp | 7 +- .../rendering/renderablesphereimagelocal.h | 9 +- .../rendering/renderablesphereimageonline.cpp | 7 +- .../rendering/renderablesphereimageonline.h | 11 +- modules/base/rendering/renderableswitch.cpp | 13 +- modules/base/rendering/renderableswitch.h | 7 +- .../rendering/renderabletimevaryingsphere.cpp | 8 +- .../rendering/renderabletimevaryingsphere.h | 9 +- modules/base/rendering/renderabletrail.cpp | 7 +- modules/base/rendering/renderabletrail.h | 10 - .../base/rendering/renderabletrailorbit.cpp | 18 +- modules/base/rendering/renderabletrailorbit.h | 2 - .../rendering/renderabletrailtrajectory.cpp | 6 +- .../rendering/renderabletrailtrajectory.h | 3 - .../base/rendering/screenspacedashboard.cpp | 9 +- modules/base/rendering/screenspacedashboard.h | 6 - .../rendering/screenspacedashboard_lua.inl | 1 + modules/base/rendering/screenspacedate.cpp | 7 +- .../base/rendering/screenspaceimagelocal.cpp | 6 +- .../base/rendering/screenspaceimagelocal.h | 2 - .../base/rendering/screenspaceimageonline.cpp | 6 +- .../base/rendering/screenspaceimageonline.h | 3 +- .../rendering/screenspaceinsetblackout.cpp | 16 +- .../base/rendering/screenspaceinsetblackout.h | 7 +- .../screenspacerenderablerenderable.cpp | 6 + .../screenspacerenderablerenderable.h | 8 +- modules/base/rendering/screenspacetext.cpp | 5 +- .../screenspacetimevaryingimageonline.cpp | 9 +- .../screenspacetimevaryingimageonline.h | 3 +- modules/base/rotation/constantrotation.cpp | 2 +- modules/base/rotation/constantrotation.h | 2 - modules/base/rotation/fixedrotation.cpp | 3 +- modules/base/rotation/fixedrotation.h | 3 - modules/base/rotation/globerotation.cpp | 7 +- modules/base/rotation/luarotation.cpp | 5 +- modules/base/rotation/luarotation.h | 4 +- modules/base/rotation/multirotation.cpp | 6 +- modules/base/rotation/multirotation.h | 6 - modules/base/rotation/staticrotation.cpp | 2 +- modules/base/rotation/staticrotation.h | 2 - modules/base/rotation/timelinerotation.cpp | 3 +- modules/base/rotation/timelinerotation.h | 4 - modules/base/scale/luascale.cpp | 5 +- modules/base/scale/luascale.h | 3 +- modules/base/scale/multiscale.cpp | 6 +- modules/base/scale/multiscale.h | 2 - modules/base/scale/nonuniformstaticscale.cpp | 2 +- modules/base/scale/nonuniformstaticscale.h | 2 - modules/base/scale/staticscale.cpp | 1 - modules/base/scale/staticscale.h | 2 - modules/base/scale/timedependentscale.cpp | 3 +- modules/base/scale/timedependentscale.h | 2 - modules/base/scale/timelinescale.cpp | 3 +- modules/base/scale/timelinescale.h | 5 - modules/base/task/convertmodeltask.cpp | 2 + modules/base/task/convertmodeltask.h | 1 - modules/base/timeframe/timeframeinterval.cpp | 4 +- modules/base/timeframe/timeframeinterval.h | 6 +- modules/base/timeframe/timeframeunion.cpp | 6 +- modules/base/timeframe/timeframeunion.h | 4 - modules/base/translation/globetranslation.cpp | 7 +- modules/base/translation/luatranslation.cpp | 4 +- modules/base/translation/luatranslation.h | 2 - modules/base/translation/multitranslation.cpp | 6 +- modules/base/translation/multitranslation.h | 4 - .../base/translation/statictranslation.cpp | 1 - modules/base/translation/statictranslation.h | 4 - .../base/translation/timelinetranslation.cpp | 3 +- .../base/translation/timelinetranslation.h | 5 - modules/cefwebgui/cefwebguimodule.cpp | 1 + modules/cefwebgui/cefwebguimodule.h | 1 + modules/cefwebgui/include/guirenderhandler.h | 1 - modules/cefwebgui/src/guikeyboardhandler.cpp | 1 + modules/cefwebgui/src/guirenderhandler.cpp | 3 +- modules/debugging/debuggingmodule.cpp | 11 +- modules/debugging/debuggingmodule_lua.inl | 4 + modules/debugging/rendering/debugrenderer.cpp | 5 + .../rendering/screenspacedebugplane.cpp | 2 + .../digitaluniverse/digitaluniversemodule.cpp | 3 + .../rendering/renderabledumeshes.cpp | 20 +- .../rendering/renderabledumeshes.h | 9 +- modules/exoplanets/datastructure.cpp | 7 +- modules/exoplanets/datastructure.h | 2 +- modules/exoplanets/exoplanetshelper.cpp | 8 +- modules/exoplanets/exoplanetshelper.h | 1 - modules/exoplanets/exoplanetsmodule.cpp | 17 +- modules/exoplanets/exoplanetsmodule.h | 1 + modules/exoplanets/exoplanetsmodule_lua.inl | 3 + .../rendering/renderableorbitdisc.cpp | 9 +- .../rendering/renderableorbitdisc.h | 7 +- .../tasks/exoplanetsdatapreparationtask.cpp | 9 +- .../tasks/exoplanetsdatapreparationtask.h | 3 +- modules/fieldlines/fieldlinesmodule.cpp | 1 + .../rendering/renderablefieldlines.cpp | 7 +- .../rendering/renderablefieldlines.h | 5 +- .../fieldlinessequencemodule.cpp | 3 + .../renderablefieldlinessequence.cpp | 14 +- .../rendering/renderablefieldlinessequence.h | 6 +- .../tasks/kameleonvolumetofieldlinestask.cpp | 15 +- .../tasks/kameleonvolumetofieldlinestask.h | 2 +- .../util/fieldlinesstate.cpp | 8 + .../util/kameleonfieldlinehelper.cpp | 15 +- .../util/kameleonfieldlinehelper.h | 1 + .../fitsfilereader/fitsfilereadermodule.cpp | 2 + .../fitsfilereader/include/fitsfilereader.h | 2 - .../include/renderabletimevaryingfitssphere.h | 10 +- .../fitsfilereader/include/wsafitshelper.h | 11 +- modules/fitsfilereader/src/fitsfilereader.cpp | 9 +- .../src/renderabletimevaryingfitssphere.cpp | 18 +- modules/fitsfilereader/src/wsafitshelper.cpp | 11 +- modules/gaia/gaiamodule.cpp | 4 + modules/gaia/gaiamodule.h | 2 - modules/gaia/rendering/gaiaoptions.h | 20 +- modules/gaia/rendering/octreeculler.cpp | 2 +- modules/gaia/rendering/octreeculler.h | 1 - modules/gaia/rendering/octreemanager.cpp | 6 +- modules/gaia/rendering/octreemanager.h | 7 +- .../gaia/rendering/renderablegaiastars.cpp | 16 +- modules/gaia/rendering/renderablegaiastars.h | 12 +- modules/gaia/tasks/constructoctreetask.cpp | 8 +- modules/gaia/tasks/constructoctreetask.h | 3 +- modules/gaia/tasks/readfilejob.cpp | 7 +- modules/gaia/tasks/readfilejob.h | 5 +- modules/gaia/tasks/readfitstask.cpp | 12 +- modules/gaia/tasks/readfitstask.h | 6 +- modules/gaia/tasks/readspecktask.cpp | 4 +- modules/gaia/tasks/readspecktask.h | 3 - modules/galaxy/galaxymodule.cpp | 3 + modules/galaxy/rendering/galaxyraycaster.cpp | 6 +- modules/galaxy/rendering/galaxyraycaster.h | 14 +- modules/galaxy/rendering/renderablegalaxy.cpp | 12 +- modules/galaxy/rendering/renderablegalaxy.h | 6 +- .../galaxy/tasks/milkywayconversiontask.cpp | 1 + modules/galaxy/tasks/milkywayconversiontask.h | 3 - .../tasks/milkywaypointsconversiontask.cpp | 34 +- .../tasks/milkywaypointsconversiontask.h | 6 +- modules/globebrowsing/globebrowsingmodule.cpp | 27 +- modules/globebrowsing/globebrowsingmodule.h | 18 +- .../globebrowsing/globebrowsingmodule_lua.inl | 8 +- .../src/asynctiledataprovider.cpp | 13 +- .../globebrowsing/src/asynctiledataprovider.h | 3 +- modules/globebrowsing/src/basictypes.h | 4 +- .../src/dashboarditemglobelocation.cpp | 19 +- .../src/dashboarditemglobelocation.h | 4 - modules/globebrowsing/src/gdalwrapper.cpp | 6 +- modules/globebrowsing/src/gdalwrapper.h | 2 - modules/globebrowsing/src/geodeticpatch.cpp | 4 + modules/globebrowsing/src/geodeticpatch.h | 1 - .../src/geojson/geojsoncomponent.cpp | 19 +- .../src/geojson/geojsoncomponent.h | 24 +- .../src/geojson/geojsonmanager.cpp | 10 +- .../src/geojson/geojsonmanager.h | 9 +- .../src/geojson/geojsonproperties.cpp | 5 +- .../src/geojson/geojsonproperties.h | 1 - .../src/geojson/globegeometryfeature.cpp | 24 +- .../src/geojson/globegeometryfeature.h | 19 +- .../src/geojson/globegeometryhelper.cpp | 12 + .../src/geojson/globegeometryhelper.h | 6 +- .../src/globelabelscomponent.cpp | 16 +- .../globebrowsing/src/globelabelscomponent.h | 14 +- modules/globebrowsing/src/gpulayergroup.cpp | 9 +- modules/globebrowsing/src/gpulayergroup.h | 8 - modules/globebrowsing/src/layer.cpp | 17 +- modules/globebrowsing/src/layer.h | 8 +- modules/globebrowsing/src/layeradjustment.cpp | 3 +- modules/globebrowsing/src/layeradjustment.h | 2 + modules/globebrowsing/src/layergroup.cpp | 6 + modules/globebrowsing/src/layergroup.h | 4 +- modules/globebrowsing/src/layergroupid.cpp | 2 + modules/globebrowsing/src/layergroupid.h | 6 +- modules/globebrowsing/src/layermanager.cpp | 6 +- modules/globebrowsing/src/layermanager.h | 3 - .../globebrowsing/src/layerrendersettings.cpp | 4 + .../globebrowsing/src/layerrendersettings.h | 1 + modules/globebrowsing/src/lrucache.h | 1 + modules/globebrowsing/src/lruthreadpool.inl | 3 + .../src/memoryawaretilecache.cpp | 8 +- .../globebrowsing/src/memoryawaretilecache.h | 10 +- .../src/prioritizingconcurrentjobmanager.h | 2 + .../src/prioritizingconcurrentjobmanager.inl | 1 + modules/globebrowsing/src/rawtile.h | 3 - .../globebrowsing/src/rawtiledatareader.cpp | 334 +++++++------- modules/globebrowsing/src/rawtiledatareader.h | 21 +- modules/globebrowsing/src/renderableglobe.cpp | 24 +- modules/globebrowsing/src/renderableglobe.h | 17 +- modules/globebrowsing/src/ringscomponent.cpp | 17 +- modules/globebrowsing/src/ringscomponent.h | 11 +- modules/globebrowsing/src/shadowcomponent.cpp | 19 +- modules/globebrowsing/src/shadowcomponent.h | 24 +- modules/globebrowsing/src/skirtedgrid.cpp | 5 +- modules/globebrowsing/src/skirtedgrid.h | 2 - modules/globebrowsing/src/tileindex.cpp | 2 + modules/globebrowsing/src/tileindex.h | 2 +- modules/globebrowsing/src/tileloadjob.cpp | 1 + modules/globebrowsing/src/tileloadjob.h | 2 +- .../src/tileprovider/defaulttileprovider.cpp | 9 + .../src/tileprovider/defaulttileprovider.h | 8 +- .../imagesequencetileprovider.cpp | 5 + .../tileprovider/imagesequencetileprovider.h | 3 + .../tileprovider/singleimagetileprovider.cpp | 7 + .../tileprovider/singleimagetileprovider.h | 3 +- .../sizereferencetileprovider.cpp | 8 +- .../tileprovider/sizereferencetileprovider.h | 2 + .../src/tileprovider/spoutimageprovider.cpp | 9 +- .../src/tileprovider/spoutimageprovider.h | 8 +- .../src/tileprovider/temporaltileprovider.cpp | 15 +- .../src/tileprovider/temporaltileprovider.h | 15 +- .../src/tileprovider/texttileprovider.cpp | 6 + .../src/tileprovider/texttileprovider.h | 10 + .../tileprovider/tileindextileprovider.cpp | 7 + .../src/tileprovider/tileprovider.cpp | 27 -- .../src/tileprovider/tileprovider.h | 33 +- .../src/tileprovider/tileproviderbydate.cpp | 7 +- .../src/tileprovider/tileproviderbydate.h | 2 - .../src/tileprovider/tileproviderbyindex.cpp | 7 + .../src/tileprovider/tileproviderbyindex.h | 3 + .../src/tileprovider/tileproviderbylevel.cpp | 6 + .../globebrowsing/src/tiletextureinitdata.cpp | 116 ++--- .../globebrowsing/src/tiletextureinitdata.h | 1 + modules/globebrowsing/src/timequantizer.cpp | 6 +- modules/globebrowsing/src/timequantizer.h | 2 +- modules/imgui/imguimodule.cpp | 15 + modules/imgui/imguimodule.h | 3 + modules/imgui/include/guicomponent.h | 1 + modules/imgui/include/guigibscomponent.h | 2 - .../imgui/include/guiglobebrowsingcomponent.h | 2 - modules/imgui/include/guipropertycomponent.h | 3 - modules/imgui/include/guiscenecomponent.h | 2 - modules/imgui/include/guispacetimecomponent.h | 1 + modules/imgui/include/renderproperties.h | 53 +-- modules/imgui/src/guiactioncomponent.cpp | 4 + modules/imgui/src/guicomponent.cpp | 2 + modules/imgui/src/guigibscomponent.cpp | 2 + .../imgui/src/guiglobebrowsingcomponent.cpp | 11 + modules/imgui/src/guimemorycomponent.cpp | 1 + modules/imgui/src/guimissioncomponent.cpp | 2 + modules/imgui/src/guiparallelcomponent.cpp | 4 +- modules/imgui/src/guipropertycomponent.cpp | 4 + modules/imgui/src/guiscenecomponent.cpp | 4 +- modules/imgui/src/guispacetimecomponent.cpp | 11 +- modules/imgui/src/renderproperties.cpp | 101 ++-- modules/iswa/iswamodule.cpp | 2 +- modules/iswa/iswamodule.h | 8 +- modules/iswa/rendering/iswabasegroup.cpp | 4 +- modules/iswa/rendering/iswabasegroup.h | 6 +- modules/iswa/rendering/iswadatagroup.cpp | 3 +- modules/iswa/rendering/iswadatagroup.h | 2 + modules/iswa/rendering/iswakameleongroup.cpp | 16 +- modules/iswa/rendering/iswakameleongroup.h | 5 + .../iswa/rendering/renderabledatacygnet.cpp | 8 + modules/iswa/rendering/renderabledatacygnet.h | 2 +- modules/iswa/rendering/renderabledataplane.h | 5 - .../iswa/rendering/renderabledatasphere.cpp | 4 +- modules/iswa/rendering/renderabledatasphere.h | 4 - .../iswa/rendering/renderableiswacygnet.cpp | 8 +- modules/iswa/rendering/renderableiswacygnet.h | 7 +- .../rendering/renderablekameleonplane.cpp | 17 +- .../iswa/rendering/renderablekameleonplane.h | 7 +- .../rendering/renderabletexturecygnet.cpp | 5 + .../iswa/rendering/renderabletexturecygnet.h | 4 +- .../iswa/rendering/renderabletextureplane.cpp | 1 + .../iswa/rendering/renderabletextureplane.h | 2 - modules/iswa/rendering/screenspacecygnet.cpp | 4 + modules/iswa/rendering/screenspacecygnet.h | 3 - modules/iswa/util/dataprocessor.cpp | 4 +- modules/iswa/util/dataprocessor.h | 3 +- modules/iswa/util/dataprocessorjson.cpp | 36 +- modules/iswa/util/dataprocessorjson.h | 2 + modules/iswa/util/dataprocessorkameleon.cpp | 8 +- modules/iswa/util/dataprocessorkameleon.h | 1 + modules/iswa/util/dataprocessortext.cpp | 5 +- modules/iswa/util/dataprocessortext.h | 2 + modules/iswa/util/iswamanager.cpp | 16 +- modules/iswa/util/iswamanager.h | 3 +- modules/iswa/util/iswamanager_lua.inl | 7 + modules/kameleon/include/kameleonhelper.h | 4 +- modules/kameleon/include/kameleonwrapper.h | 2 +- modules/kameleon/src/kameleonhelper.cpp | 6 +- modules/kameleon/src/kameleonwrapper.cpp | 12 +- .../kameleonvolume/kameleonvolumemodule.cpp | 2 + modules/kameleonvolume/kameleonvolumemodule.h | 4 - .../kameleonvolume/kameleonvolumereader.cpp | 8 +- modules/kameleonvolume/kameleonvolumereader.h | 4 +- .../rendering/renderablekameleonvolume.cpp | 12 +- .../rendering/renderablekameleonvolume.h | 12 +- .../tasks/kameleondocumentationtask.cpp | 10 +- .../tasks/kameleondocumentationtask.h | 1 - .../tasks/kameleonmetadatatojsontask.cpp | 6 +- .../tasks/kameleonmetadatatojsontask.h | 1 - .../tasks/kameleonvolumetorawtask.cpp | 6 +- .../tasks/kameleonvolumetorawtask.h | 1 - modules/multiresvolume/CMakeLists.txt | 1 + .../multiresvolume/multiresvolumemodule.cpp | 1 + .../multiresvolume/rendering/atlasmanager.cpp | 3 + .../multiresvolume/rendering/atlasmanager.h | 3 +- .../multiresvolume/rendering/brickmanager.cpp | 17 +- .../multiresvolume/rendering/brickmanager.h | 13 +- .../multiresvolume/rendering/brickselection.h | 4 +- .../rendering/brickselector.cpp | 33 ++ .../multiresvolume/rendering/brickselector.h | 4 +- .../rendering/errorhistogrammanager.cpp | 37 +- .../rendering/errorhistogrammanager.h | 25 +- .../rendering/histogrammanager.cpp | 12 +- .../rendering/histogrammanager.h | 1 + .../rendering/localerrorhistogrammanager.cpp | 9 +- .../rendering/localerrorhistogrammanager.h | 23 +- .../rendering/localtfbrickselector.cpp | 5 +- .../rendering/localtfbrickselector.h | 9 +- .../rendering/multiresvolumeraycaster.cpp | 5 +- .../rendering/multiresvolumeraycaster.h | 15 +- .../rendering/renderablemultiresvolume.cpp | 11 +- .../rendering/renderablemultiresvolume.h | 16 +- .../rendering/shenbrickselector.h | 9 +- .../rendering/simpletfbrickselector.cpp | 5 +- .../rendering/simpletfbrickselector.h | 1 - .../rendering/tfbrickselector.cpp | 2 + .../rendering/tfbrickselector.h | 13 +- modules/multiresvolume/rendering/tsp.cpp | 5 +- modules/multiresvolume/rendering/tsp.h | 7 +- modules/opensoundcontrol/CMakeLists.txt | 4 +- .../include/opensoundcontrolconnection.h | 6 +- .../opensoundcontrolmodule.cpp | 1 - .../opensoundcontrol/opensoundcontrolmodule.h | 2 +- .../src/opensoundcontrolconnection.cpp | 2 + modules/server/include/connection.h | 1 + modules/server/include/connectionpool.h | 2 +- modules/server/include/jsonconverters.h | 3 +- .../server/include/logging/notificationlog.h | 1 + modules/server/include/serverinterface.h | 4 + modules/server/include/topics/bouncetopic.h | 2 - .../server/include/topics/camerapathtopic.h | 1 + modules/server/include/topics/cameratopic.h | 2 + .../include/topics/downloadeventtopic.h | 3 +- modules/server/include/topics/errorlogtopic.h | 8 +- modules/server/include/topics/eventtopic.h | 1 + .../include/topics/flightcontrollertopic.h | 25 +- modules/server/include/topics/missiontopic.h | 6 +- modules/server/include/topics/profiletopic.h | 2 - .../server/include/topics/skybrowsertopic.h | 1 + .../server/include/topics/subscriptiontopic.h | 4 +- modules/server/include/topics/timetopic.h | 2 + modules/server/include/topics/topic.h | 2 + modules/server/servermodule.cpp | 17 +- modules/server/servermodule.h | 13 +- modules/server/src/connection.cpp | 18 +- modules/server/src/connectionpool.cpp | 1 + modules/server/src/jsonconverters.cpp | 5 +- .../server/src/logging/notificationlog.cpp | 2 + modules/server/src/serverinterface.cpp | 2 + .../server/src/topics/actionkeybindtopic.cpp | 30 +- .../server/src/topics/authorizationtopic.cpp | 5 +- modules/server/src/topics/camerapathtopic.cpp | 13 +- modules/server/src/topics/cameratopic.cpp | 9 +- .../server/src/topics/documentationtopic.cpp | 7 - .../server/src/topics/downloadeventtopic.cpp | 12 +- modules/server/src/topics/enginemodetopic.cpp | 10 +- modules/server/src/topics/errorlogtopic.cpp | 4 + modules/server/src/topics/eventtopic.cpp | 13 +- .../src/topics/flightcontrollertopic.cpp | 8 +- modules/server/src/topics/luascripttopic.cpp | 7 +- modules/server/src/topics/missiontopic.cpp | 25 +- modules/server/src/topics/profiletopic.cpp | 9 +- .../src/topics/sessionrecordingtopic.cpp | 14 +- .../server/src/topics/setpropertytopic.cpp | 5 +- modules/server/src/topics/skybrowsertopic.cpp | 17 +- .../server/src/topics/subscriptiontopic.cpp | 47 +- modules/server/src/topics/timetopic.cpp | 15 +- modules/server/src/topics/topic.cpp | 3 +- .../src/topics/triggerpropertytopic.cpp | 9 +- modules/server/src/topics/versiontopic.cpp | 8 +- .../skybrowser/include/renderableskytarget.h | 8 +- .../include/screenspaceskybrowser.h | 10 +- .../skybrowser/include/targetbrowserpair.h | 8 +- modules/skybrowser/include/utility.h | 4 +- modules/skybrowser/include/wwtcommunicator.h | 18 +- modules/skybrowser/include/wwtdatahandler.h | 6 +- modules/skybrowser/skybrowsermodule.cpp | 20 +- modules/skybrowser/skybrowsermodule.h | 3 +- modules/skybrowser/skybrowsermodule_lua.inl | 4 - .../skybrowser/src/renderableskytarget.cpp | 14 +- .../skybrowser/src/screenspaceskybrowser.cpp | 16 +- modules/skybrowser/src/targetbrowserpair.cpp | 8 +- modules/skybrowser/src/utility.cpp | 2 + modules/skybrowser/src/wwtcommunicator.cpp | 13 +- modules/skybrowser/src/wwtdatahandler.cpp | 11 +- modules/space/horizonsfile.cpp | 17 +- modules/space/horizonsfile.h | 8 +- modules/space/kepler.h | 1 + .../renderableconstellationbounds.cpp | 11 +- .../rendering/renderableconstellationbounds.h | 7 +- .../renderableconstellationlines.cpp | 10 +- .../rendering/renderableconstellationlines.h | 13 +- .../renderableconstellationsbase.cpp | 12 +- .../rendering/renderableconstellationsbase.h | 15 +- .../space/rendering/renderableeclipsecone.cpp | 7 +- .../space/rendering/renderableeclipsecone.h | 11 +- .../space/rendering/renderablefluxnodes.cpp | 23 +- modules/space/rendering/renderablefluxnodes.h | 36 +- .../rendering/renderablehabitablezone.cpp | 7 +- .../space/rendering/renderablehabitablezone.h | 4 +- .../rendering/renderableorbitalkepler.cpp | 27 +- .../space/rendering/renderableorbitalkepler.h | 12 +- modules/space/rendering/renderablerings.cpp | 8 +- modules/space/rendering/renderablerings.h | 11 +- modules/space/rendering/renderablestars.cpp | 14 +- modules/space/rendering/renderablestars.h | 12 +- .../space/rendering/renderabletravelspeed.cpp | 5 + .../space/rendering/renderabletravelspeed.h | 6 +- modules/space/rotation/spicerotation.cpp | 3 +- modules/space/rotation/spicerotation.h | 2 - modules/space/spacemodule.cpp | 9 +- modules/space/spacemodule_lua.inl | 1 + modules/space/timeframe/timeframekernel.cpp | 11 +- modules/space/timeframe/timeframekernel.h | 1 + modules/space/translation/gptranslation.cpp | 5 +- .../space/translation/horizonstranslation.cpp | 12 +- .../space/translation/horizonstranslation.h | 12 +- .../space/translation/keplertranslation.cpp | 9 +- modules/space/translation/keplertranslation.h | 17 +- .../space/translation/spicetranslation.cpp | 6 +- .../dashboard/dashboarditeminstruments.cpp | 8 +- .../dashboard/dashboarditeminstruments.h | 2 - .../rendering/renderablecrawlingline.cpp | 5 +- .../rendering/renderablecrawlingline.h | 3 +- .../rendering/renderablefov.cpp | 52 ++- .../rendering/renderablefov.h | 10 +- .../rendering/renderablemodelprojection.cpp | 11 +- .../rendering/renderablemodelprojection.h | 14 +- .../rendering/renderableplaneprojection.cpp | 9 +- .../rendering/renderableplaneprojection.h | 7 - .../rendering/renderableplanetprojection.cpp | 9 +- .../rendering/renderableplanetprojection.h | 14 +- .../rendering/renderableshadowcylinder.cpp | 6 +- .../rendering/renderableshadowcylinder.h | 7 - .../spacecraftinstrumentsmodule.cpp | 10 + .../spacecraftinstrumentsmodule.h | 1 + .../util/hongkangparser.cpp | 8 +- .../util/hongkangparser.h | 2 + modules/spacecraftinstruments/util/image.h | 2 +- .../util/imagesequencer.cpp | 9 +- .../util/imagesequencer.h | 9 +- .../util/instrumentdecoder.cpp | 2 - .../util/instrumenttimesparser.cpp | 7 +- .../util/instrumenttimesparser.h | 2 + .../util/labelparser.cpp | 7 +- .../spacecraftinstruments/util/labelparser.h | 2 + .../util/projectioncomponent.cpp | 9 +- .../util/projectioncomponent.h | 2 + .../util/scannerdecoder.cpp | 1 + .../util/scannerdecoder.h | 2 - .../util/sequenceparser.cpp | 4 - .../util/sequenceparser.h | 1 + modules/spout/renderableplanespout.cpp | 8 +- modules/spout/renderableplanespout.h | 2 - modules/spout/renderablespherespout.cpp | 7 +- modules/spout/renderablespherespout.h | 2 - modules/spout/screenspacespout.cpp | 4 +- modules/spout/screenspacespout.h | 2 - modules/spout/spoutmodule.cpp | 7 +- modules/spout/spoutwrapper.cpp | 7 + modules/spout/spoutwrapper.h | 10 +- modules/statemachine/include/state.h | 3 +- modules/statemachine/include/statemachine.h | 4 + modules/statemachine/include/transition.h | 3 +- modules/statemachine/src/state.cpp | 2 + modules/statemachine/src/statemachine.cpp | 2 + modules/statemachine/src/transition.cpp | 2 + modules/statemachine/statemachinemodule.cpp | 12 +- .../statemachine/statemachinemodule_lua.inl | 5 + modules/sync/syncmodule.cpp | 11 +- modules/sync/syncmodule_lua.inl | 3 + modules/sync/syncs/httpsynchronization.cpp | 13 +- modules/sync/syncs/urlsynchronization.cpp | 15 +- modules/sync/syncs/urlsynchronization.h | 4 +- .../include/general/anglemodetelemetry.h | 2 + .../include/general/cameratelemetry.h | 2 + .../include/general/focustelemetry.h | 4 +- .../include/general/nodestelemetry.h | 2 + .../telemetry/include/general/timetelemetry.h | 2 + .../specific/planetscomparesonification.h | 3 + .../specific/planetsoverviewsonification.h | 4 + .../include/specific/planetssonification.h | 4 + modules/telemetry/include/telemetrybase.h | 5 +- modules/telemetry/include/util.h | 270 +++++------ .../src/general/anglemodetelemetry.cpp | 1 + .../telemetry/src/general/cameratelemetry.cpp | 4 + .../telemetry/src/general/focustelemetry.cpp | 1 + .../telemetry/src/general/nodestelemetry.cpp | 6 + .../telemetry/src/general/timetelemetry.cpp | 3 + .../specific/planetscomparesonification.cpp | 7 +- .../specific/planetsoverviewsonification.cpp | 3 + .../src/specific/planetssonification.cpp | 12 + modules/telemetry/src/telemetrybase.cpp | 5 +- modules/telemetry/src/util.cpp | 5 +- modules/telemetry/telemetrymodule.cpp | 7 +- modules/telemetry/telemetrymodule.h | 4 +- modules/touch/include/directinputsolver.h | 3 +- modules/touch/include/touchinteraction.h | 10 +- modules/touch/include/touchmarker.h | 9 +- modules/touch/include/tuioear.h | 13 +- modules/touch/include/win32_touch.h | 1 + modules/touch/src/directinputsolver.cpp | 6 + modules/touch/src/touchinteraction.cpp | 15 +- modules/touch/src/touchmarker.cpp | 1 - modules/touch/src/tuioear.cpp | 9 +- modules/touch/src/win32_touch.cpp | 15 +- modules/touch/touchmodule.cpp | 10 + modules/touch/touchmodule.h | 3 +- .../rendering/renderabletoyvolume.cpp | 13 +- .../toyvolume/rendering/renderabletoyvolume.h | 8 +- .../rendering/toyvolumeraycaster.cpp | 7 +- .../toyvolume/rendering/toyvolumeraycaster.h | 10 +- modules/toyvolume/toyvolumemodule.cpp | 9 + modules/toyvolume/toyvolumemodule.h | 2 + modules/video/include/renderablevideoplane.h | 3 +- modules/video/include/renderablevideosphere.h | 2 - modules/video/include/screenspacevideo.h | 5 - modules/video/include/videoplayer.h | 14 +- modules/video/include/videotileprovider.h | 15 +- modules/video/src/renderablevideoplane.cpp | 5 +- modules/video/src/renderablevideosphere.cpp | 4 +- modules/video/src/screenspacevideo.cpp | 8 +- modules/video/src/videoplayer.cpp | 14 +- modules/video/src/videotileprovider.cpp | 17 +- modules/video/videomodule.cpp | 6 +- modules/video/videomodule.h | 2 - modules/volume/envelope.cpp | 13 +- modules/volume/envelope.h | 3 + modules/volume/linearlrucache.h | 4 +- modules/volume/linearlrucache.inl | 2 +- modules/volume/lrucache.h | 4 +- modules/volume/rawvolume.inl | 1 + modules/volume/rawvolumemetadata.cpp | 2 +- modules/volume/rawvolumemetadata.h | 3 +- modules/volume/rawvolumereader.h | 2 +- modules/volume/rawvolumewriter.h | 5 +- modules/volume/rawvolumewriter.inl | 8 +- .../volume/rendering/basicvolumeraycaster.cpp | 8 +- .../volume/rendering/basicvolumeraycaster.h | 15 +- .../rendering/renderabletimevaryingvolume.cpp | 14 +- .../rendering/renderabletimevaryingvolume.h | 7 +- modules/volume/rendering/volumeclipplane.cpp | 1 + modules/volume/rendering/volumeclipplane.h | 1 + modules/volume/rendering/volumeclipplanes.cpp | 1 + modules/volume/rendering/volumeclipplanes.h | 4 +- .../tasks/generaterawvolumefromfiletask.cpp | 11 +- .../tasks/generaterawvolumefromfiletask.h | 1 - .../volume/tasks/generaterawvolumetask.cpp | 12 +- modules/volume/tasks/generaterawvolumetask.h | 1 - modules/volume/textureslicevolumereader.h | 1 + modules/volume/textureslicevolumereader.inl | 2 + modules/volume/transferfunction.cpp | 24 +- modules/volume/transferfunction.h | 11 +- modules/volume/transferfunctionhandler.cpp | 2 +- modules/volume/transferfunctionhandler.h | 7 +- modules/volume/transferfunctionproperty.cpp | 4 +- modules/volume/volumegridtype.cpp | 5 +- modules/volume/volumegridtype.h | 3 +- modules/volume/volumemodule.cpp | 3 +- modules/webbrowser/include/browserclient.h | 2 +- modules/webbrowser/include/browserinstance.h | 8 +- modules/webbrowser/include/cefhost.h | 14 - .../include/defaultbrowserlauncher.h | 18 +- .../webbrowser/include/screenspacebrowser.h | 4 +- .../webbrowser/include/webkeyboardhandler.h | 1 - modules/webbrowser/include/webrenderhandler.h | 14 +- modules/webbrowser/src/browserinstance.cpp | 4 +- modules/webbrowser/src/cefhost.cpp | 22 +- modules/webbrowser/src/eventhandler.cpp | 11 + modules/webbrowser/src/screenspacebrowser.cpp | 6 +- modules/webbrowser/src/webrenderhandler.cpp | 5 +- modules/webbrowser/webbrowsermodule.cpp | 10 +- modules/webbrowser/webbrowsermodule.h | 15 +- modules/webgui/webguimodule.cpp | 4 +- modules/webgui/webguimodule.h | 3 + src/CMakeLists.txt | 3 + src/camera/camera.cpp | 3 + src/data/csvloader.cpp | 8 +- src/data/dataloader.cpp | 13 + src/data/datamapping.cpp | 9 +- src/data/speckloader.cpp | 10 + src/documentation/core_registration.cpp | 2 + src/documentation/documentation.cpp | 4 + src/documentation/documentationengine.cpp | 19 + src/documentation/verifier.cpp | 20 +- src/engine/configuration.cpp | 9 +- src/engine/downloadmanager.cpp | 7 + src/engine/globals.cpp | 3 +- src/engine/globalscallbacks.cpp | 1 + src/engine/logfactory.cpp | 4 + src/engine/moduleengine.cpp | 9 +- src/engine/openspaceengine.cpp | 33 +- src/engine/openspaceengine_lua.inl | 11 +- src/engine/settings.cpp | 2 + src/engine/syncengine.cpp | 1 + src/events/event.cpp | 8 +- src/events/eventengine.cpp | 7 + src/events/eventengine_lua.inl | 6 +- src/interaction/actionmanager.cpp | 9 +- src/interaction/actionmanager_lua.inl | 4 +- src/interaction/joystickcamerastates.cpp | 3 +- src/interaction/keybindingmanager.cpp | 3 + src/interaction/keybindingmanager_lua.inl | 7 + src/interaction/keyframerecordinghandler.cpp | 16 + .../keyframerecordinghandler_lua.inl | 2 +- src/interaction/mousecamerastates.cpp | 4 + src/interaction/sessionrecording.cpp | 17 +- src/interaction/sessionrecordinghandler.cpp | 25 + .../sessionrecordinghandler_lua.inl | 6 + .../tasks/convertrecformattask.cpp | 13 +- src/interaction/websocketcamerastates.cpp | 1 + src/mission/mission.cpp | 11 +- src/mission/missionmanager.cpp | 5 + src/mission/missionmanager_lua.inl | 4 +- src/navigation/keyframenavigator.cpp | 4 + src/navigation/navigationhandler.cpp | 19 +- src/navigation/navigationhandler_lua.inl | 25 +- src/navigation/navigationstate.cpp | 8 +- src/navigation/orbitalnavigator.cpp | 16 +- src/navigation/orbitalnavigator_lua.inl | 3 + src/navigation/path.cpp | 18 +- src/navigation/pathcurve.cpp | 7 + .../pathcurves/avoidcollisioncurve.cpp | 7 +- .../pathcurves/zoomoutoverviewcurve.cpp | 3 +- src/navigation/pathnavigator.cpp | 8 +- src/navigation/pathnavigator_lua.inl | 2 +- src/navigation/waypoint.cpp | 114 ++--- src/network/messagestructures.cpp | 431 +++++++++++++++++ src/network/messagestructureshelper.cpp | 2 + src/network/parallelconnection.cpp | 2 + src/network/parallelpeer.cpp | 13 +- src/network/parallelpeer_lua.inl | 2 +- src/properties/matrix/dmat2property.cpp | 1 - src/properties/matrix/dmat3property.cpp | 1 - src/properties/matrix/dmat4property.cpp | 1 - src/properties/matrix/mat2property.cpp | 1 - src/properties/matrix/mat3property.cpp | 1 - src/properties/matrix/mat4property.cpp | 1 - src/properties/misc/optionproperty.cpp | 1 - src/properties/misc/selectionproperty.cpp | 2 +- src/properties/property.cpp | 4 +- src/properties/propertyowner.cpp | 6 +- src/properties/scalar/doubleproperty.cpp | 1 - src/properties/scalar/floatproperty.cpp | 1 - src/properties/scalar/intproperty.cpp | 1 - src/properties/scalar/longproperty.cpp | 1 - src/properties/scalar/shortproperty.cpp | 1 - src/properties/scalar/uintproperty.cpp | 1 - src/properties/scalar/ulongproperty.cpp | 1 - src/properties/scalar/ushortproperty.cpp | 1 - src/properties/vector/dvec2property.cpp | 1 - src/properties/vector/dvec3property.cpp | 1 - src/properties/vector/dvec4property.cpp | 1 - src/properties/vector/ivec2property.cpp | 1 - src/properties/vector/ivec3property.cpp | 1 - src/properties/vector/ivec4property.cpp | 1 - src/properties/vector/uvec2property.cpp | 1 - src/properties/vector/uvec3property.cpp | 1 - src/properties/vector/uvec4property.cpp | 1 - src/properties/vector/vec2property.cpp | 1 - src/properties/vector/vec3property.cpp | 1 - src/properties/vector/vec4property.cpp | 1 - src/query/query.cpp | 3 + src/rendering/colormappingcomponent.cpp | 5 + src/rendering/dashboard.cpp | 3 +- src/rendering/dashboard_lua.inl | 5 + src/rendering/dashboarditem.cpp | 4 + src/rendering/dashboardtextitem.cpp | 2 + src/rendering/deferredcaster.cpp | 37 ++ src/rendering/framebufferrenderer.cpp | 12 +- src/rendering/helper.cpp | 18 +- src/rendering/labelscomponent.cpp | 2 + src/rendering/loadingscreen.cpp | 6 +- src/rendering/luaconsole.cpp | 9 +- src/rendering/renderable.cpp | 11 +- src/rendering/renderengine.cpp | 18 +- src/rendering/renderengine_lua.inl | 3 + src/rendering/screenspacerenderable.cpp | 8 +- .../screenspacerenderableframebuffer.cpp | 4 + src/rendering/screenspacerenderabletext.cpp | 3 +- src/rendering/texturecomponent.cpp | 3 + src/rendering/transferfunction.cpp | 5 + src/scene/asset.cpp | 9 +- src/scene/assetmanager.cpp | 8 + src/scene/assetmanager_lua.inl | 1 + src/scene/lightsource.cpp | 5 +- src/scene/profile.cpp | 68 +-- src/scene/profile_lua.inl | 2 + src/scene/rotation.cpp | 3 +- src/scene/scale.cpp | 3 +- src/scene/scene.cpp | 22 +- src/scene/scene_lua.inl | 11 +- src/scene/scenegraphnode.cpp | 14 +- src/scene/sceneinitializer.cpp | 5 + src/scene/timeframe.cpp | 3 +- src/scene/translation.cpp | 8 +- src/scripting/lualibrary.cpp | 3 + src/scripting/scriptengine.cpp | 8 +- src/scripting/scriptengine_lua.inl | 4 + src/scripting/scriptscheduler.cpp | 7 +- .../systemcapabilitiesbinding_lua.inl | 5 + src/util/blockplaneintersectiongeometry.cpp | 4 +- src/util/boxgeometry.cpp | 3 +- src/util/collisionhelper.cpp | 3 + src/util/coordinateconversion.cpp | 4 + src/util/distanceconversion.cpp | 3 +- src/util/downloadeventengine.cpp | 2 + src/util/dynamicfilesequencedownloader.cpp | 16 +- src/util/ellipsoid.cpp | 4 +- src/util/factorymanager.cpp | 4 +- src/util/geodetic.cpp | 3 + src/util/histogram.cpp | 5 +- src/util/httprequest.cpp | 7 +- src/util/json_helper.cpp | 5 + src/util/openspacemodule.cpp | 2 + src/util/planegeometry.cpp | 4 +- src/util/progressbar.cpp | 1 + src/util/resourcesynchronization.cpp | 4 +- src/util/sphere.cpp | 5 +- src/util/spicemanager.cpp | 43 +- src/util/spicemanager_lua.inl | 7 + src/util/syncable.cpp | 33 ++ src/util/syncbuffer.cpp | 8 +- src/util/task.cpp | 2 +- src/util/taskloader.cpp | 4 + src/util/threadpool.cpp | 42 +- src/util/time.cpp | 6 +- src/util/time_lua.inl | 10 + src/util/timeconversion.cpp | 5 +- src/util/timemanager.cpp | 13 + src/util/timerange.cpp | 2 +- src/util/touch.cpp | 1 + src/util/transformationmanager.cpp | 20 +- src/util/tstring.cpp | 1 + src/util/universalhelpers.cpp | 3 + src/util/versionchecker.cpp | 110 +++-- support/coding/codegen | 2 +- 1009 files changed, 5216 insertions(+), 3589 deletions(-) create mode 100644 modules/multiresvolume/rendering/brickselector.cpp create mode 100644 src/network/messagestructures.cpp create mode 100644 src/rendering/deferredcaster.cpp create mode 100644 src/util/syncable.cpp diff --git a/apps/OpenSpace/ext/launcher/include/backgroundimage.h b/apps/OpenSpace/ext/launcher/include/backgroundimage.h index dbfb3ee26c..062c8cefac 100644 --- a/apps/OpenSpace/ext/launcher/include/backgroundimage.h +++ b/apps/OpenSpace/ext/launcher/include/backgroundimage.h @@ -27,8 +27,11 @@ #include +#include #include +class QWidget; + class BackgroundImage final : public QLabel { Q_OBJECT public: diff --git a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h index 0817c93efc..f49927c0de 100644 --- a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h +++ b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h @@ -25,8 +25,14 @@ #ifndef __OPENSPACE_UI_LAUNCHER___FILESYSTEMACCESS___H__ #define __OPENSPACE_UI_LAUNCHER___FILESYSTEMACCESS___H__ +#include #include +#include +#include + +class QFileInfo; + class FileSystemAccess { public: /** diff --git a/apps/OpenSpace/ext/launcher/include/launcherwindow.h b/apps/OpenSpace/ext/launcher/include/launcherwindow.h index c8b63783de..5a49a24ba1 100644 --- a/apps/OpenSpace/ext/launcher/include/launcherwindow.h +++ b/apps/OpenSpace/ext/launcher/include/launcherwindow.h @@ -27,14 +27,13 @@ #include -#include "sgctedit/sgctedit.h" #include -#include -#include -#include #include #include +#include +class QKeyEvent; +class QPushButton; class SplitComboBox; namespace openspace { struct Configuration; } diff --git a/apps/OpenSpace/ext/launcher/include/notificationwindow.h b/apps/OpenSpace/ext/launcher/include/notificationwindow.h index fd7007c88f..9ff164d812 100644 --- a/apps/OpenSpace/ext/launcher/include/notificationwindow.h +++ b/apps/OpenSpace/ext/launcher/include/notificationwindow.h @@ -30,6 +30,8 @@ #include #include +class QWidget; + class NotificationWindow final : public QTextEdit { Q_OBJECT public: diff --git a/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h b/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h index 7ccb610590..b4039f1715 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/actiondialog.h @@ -28,6 +28,8 @@ #include #include +#include +#include class QCheckBox; class QComboBox; @@ -39,6 +41,7 @@ class QLineEdit; class QListWidget; class QPushButton; class QTextEdit; +class QWidget; class ActionDialog final : public QDialog { Q_OBJECT @@ -50,7 +53,6 @@ private: void createWidgets(); void createActionWidgets(QGridLayout* layout); void createKeyboardWidgets(QGridLayout* layout); - void applyChanges(); openspace::Profile::Action* selectedAction(); void actionAdd(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h index 031e364f3e..c7c6180beb 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h @@ -27,7 +27,12 @@ #include +#include +#include + +class QPushButton; class QTextEdit; +class QWidget; class AdditionalScriptsDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetedit.h b/apps/OpenSpace/ext/launcher/include/profile/assetedit.h index a41b019d48..2afae40b94 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetedit.h @@ -27,11 +27,7 @@ #include -namespace openspace { class Asset; } - class QBoxLayout; -class QComboBox; -class QLabel; class QLineEdit; class QWidget; diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h index 4b4cf20f48..937ac49a4b 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h @@ -26,12 +26,21 @@ #define __OPENSPACE_UI_LAUNCHER___ASSETSDIALOG___H__ #include -#include #include -#include "assettreemodel.h" +#include "assettreemodel.h" +#include + +class QObject; +class QString; +class QLineEdit; +class QModelIndex; +class QRegularExpression; class QTextEdit; class QTreeView; +class QWidget; + +namespace openspace { class Profile; } class SearchProxyModel : public QSortFilterProxyModel { Q_OBJECT @@ -81,7 +90,6 @@ private slots: void searchTextChanged(const QString& text); private: - void createWidgets(); void setViewToBaseModel(); void parseSelections(); void selected(const QModelIndex&); diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h index a4100b9e3b..cd233d8b79 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h @@ -25,6 +25,7 @@ #ifndef __OPENSPACE_UI_LAUNCHER___ASSETTREEITEM___H__ #define __OPENSPACE_UI_LAUNCHER___ASSETTREEITEM___H__ +#include #include #include diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h index 7409a34a31..69327691b1 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h @@ -29,7 +29,13 @@ #include "assettreeitem.h" #include "openspace/scene/profile.h" +#include +#include #include +#include +#include + +class QObject; class AssetTreeModel final : public QAbstractItemModel { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h index ae86162acb..1ddbde1bba 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h @@ -33,7 +33,9 @@ class QLabel; class QLineEdit; class QMessageBox; +class QString; class QTabWidget; +class QWidget; class CameraDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index b27201888d..7858e5b17a 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -27,12 +27,18 @@ #include +#include +#include +#include + class QComboBox; class QDialogButtonBox; +class QKeyEvent; class QLabel; class QListWidget; class QLineEdit; class QPushButton; +class QWidget; class DeltaTimesDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/horizonsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/horizonsdialog.h index f1cee0e0ea..7f5f58767b 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/horizonsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/horizonsdialog.h @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef OPENSPACE_MODULE_SPACE_ENABLED #include @@ -43,6 +44,9 @@ class QNetworkAccessManager; class QNetworkReply; class QPlainTextEdit; class QProgressBar; +class QPushButton; +class QVariant; +class QWidget; class HorizonsDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index 3ddf7aceac..955a2821a3 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -27,10 +27,15 @@ #include +#include +#include + +class QKeyEvent; class QLineEdit; class QListWidget; class QListWidgetItem; class QPushButton; +class QWidget; class MarkNodesDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h index 25268a5c8e..132f0e1a4b 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h @@ -32,6 +32,7 @@ class QLineEdit; class QTextEdit; +class QWidget; class MetaDialog final : public QDialog { Q_OBJECT @@ -47,7 +48,6 @@ public: private: void createWidgets(); - void save(); std::optional* _meta = nullptr; diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index 96a961023b..39670c2b62 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -28,12 +28,15 @@ #include #include +#include class QDialogButtonBox; +class QKeyEvent; class QLabel; class QLineEdit; class QListWidget; class QPushButton; +class QWidget; class ModulesDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h index 59dfa6ae69..c54f85f63b 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h @@ -26,15 +26,17 @@ #define __OPENSPACE_UI_LAUNCHER___PROFILEEDIT___H__ #include + +#include #include -#include namespace openspace { class Profile; } -class QWidget; +class QKeyEvent; class QLabel; class QLineEdit; class QTextEdit; +class QWidget; class ProfileEdit final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h index 99f6cac5b1..2a1b1a484e 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h @@ -28,14 +28,17 @@ #include #include +#include class QComboBox; class QDialogButtonBox; +class QKeyEvent; class QLabel; class QLineEdit; class QListWidget; class QMessageBox; class QPushButton; +class QWidget; class PropertiesDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h b/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h index 582741433d..a34b1f4d7c 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/scriptlogdialog.h @@ -27,9 +27,13 @@ #include +#include +#include + class QLineEdit; class QListWidget; class QPushButton; +class QWidget; class ScriptLogDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h index cb08267e1b..49717b80f4 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h @@ -28,12 +28,14 @@ #include #include +#include class QCheckBox; class QDateTimeEdit; class QLabel; class QLineEdit; class QTabWidget; +class QWidget; class TimeDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/profile/uipanelsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/uipanelsdialog.h index d6ea979a74..eae8b1a0b2 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/uipanelsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/uipanelsdialog.h @@ -27,7 +27,11 @@ #include +#include +#include + class QCheckBox; +class QWidget; class UiPanelsDialog final : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/settingsdialog.h b/apps/OpenSpace/ext/launcher/include/settingsdialog.h index 8180b5d2d9..731fe9f623 100644 --- a/apps/OpenSpace/ext/launcher/include/settingsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/settingsdialog.h @@ -34,6 +34,7 @@ class QComboBox; class QDialogButtonBox; class QLabel; class QLineEdit; +class QWidget; class SettingsDialog : public QDialog { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h b/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h index 53d3f9f54a..e0341f7652 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/displaywindowunion.h @@ -32,6 +32,8 @@ class QFrame; class QPushButton; +class QRect; +class QRectF; class QVBoxLayout; class WindowControl; diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/monitorbox.h b/apps/OpenSpace/ext/launcher/include/sgctedit/monitorbox.h index 5347e9c88e..b008d022fb 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/monitorbox.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/monitorbox.h @@ -27,10 +27,12 @@ #include -#include -#include #include +class QPaintEvent; +class QRect; +class QRectF; + class MonitorBox final : public QWidget { Q_OBJECT public: diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/sgctedit.h b/apps/OpenSpace/ext/launcher/include/sgctedit/sgctedit.h index 6bb4201c41..82e41a0d6d 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/sgctedit.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/sgctedit.h @@ -35,6 +35,7 @@ class DisplayWindowUnion; class QCheckBox; class QComboBox; class QLineEdit; +class QWidget; const sgct::config::GeneratorVersion VersionMin { "SgctWindowConfig", 1, 1 }; const sgct::config::GeneratorVersion VersionLegacy18 { "OpenSpace", 0, 18 }; diff --git a/apps/OpenSpace/ext/launcher/include/sgctedit/windowcontrol.h b/apps/OpenSpace/ext/launcher/include/sgctedit/windowcontrol.h index fccf2d45cc..0faf72d7e2 100644 --- a/apps/OpenSpace/ext/launcher/include/sgctedit/windowcontrol.h +++ b/apps/OpenSpace/ext/launcher/include/sgctedit/windowcontrol.h @@ -29,13 +29,18 @@ #include #include +#include #include class QCheckBox; class QComboBox; class QDoubleSpinBox; +class QFrame; class QLabel; class QLineEdit; +class QPushButton; +class QRect; +class QRectF; class QSpinBox; class WindowControl final : public QWidget { diff --git a/apps/OpenSpace/ext/launcher/include/splitcombobox.h b/apps/OpenSpace/ext/launcher/include/splitcombobox.h index e1420356c6..0f2b8202ff 100644 --- a/apps/OpenSpace/ext/launcher/include/splitcombobox.h +++ b/apps/OpenSpace/ext/launcher/include/splitcombobox.h @@ -28,9 +28,12 @@ #include #include +#include #include #include -#include +#include + +class QWidget; class SplitComboBox final : public QComboBox { Q_OBJECT diff --git a/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp b/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp index 91868b8fbe..670bbe6d41 100644 --- a/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp +++ b/apps/OpenSpace/ext/launcher/src/backgroundimage.cpp @@ -25,8 +25,13 @@ #include "backgroundimage.h" #include +#include #include +#include #include +#include +#include +#include BackgroundImage::BackgroundImage(QRect size, const std::filesystem::path& syncFolder, QWidget* parent) diff --git a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp index 858570061e..1caf5d46ec 100644 --- a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp +++ b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp @@ -24,6 +24,9 @@ #include "filesystemaccess.h" +#include +#include + FileSystemAccess::FileSystemAccess(std::string fileExtension, bool hideFileExtensions, bool useCheckboxes) : _fileExtension(std::move(fileExtension)) diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index b6ca263267..7e7cc0a79d 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -25,21 +25,29 @@ #include "launcherwindow.h" #include "profile/profileedit.h" +#include "sgctedit/sgctedit.h" #include "backgroundimage.h" #include "notificationwindow.h" #include "settingsdialog.h" #include "splitcombobox.h" +#include +#include #include +#include #include +#include #include +#include #include #include #include #include #include #include -#include #include +#include +#include +#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp index a50dd9ffd9..648b27d926 100644 --- a/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/notificationwindow.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include #include @@ -34,6 +36,11 @@ #include #include #include +#include +#include +#include +#include +#include #include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp index c4174d2794..9665179a5b 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/actiondialog.cpp @@ -27,7 +27,9 @@ #include "profile/line.h" #include "profile/scriptlogdialog.h" #include +#include #include +#include #include #include #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp index 8cfcb05c9a..f17cbb483c 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp index b11ca492fc..415a7eac72 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp @@ -25,8 +25,10 @@ #include "profile/assetsdialog.h" #include "profile/assetedit.h" +#include #include "profile/line.h" #include +#include #include #include #include @@ -34,7 +36,8 @@ #include #include #include -#include +#include +#include namespace { bool traverseToExpandSelectedItems(QTreeView& tree, AssetTreeModel& model, int rows, diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp index 1e4ec6e347..0c0f5d326d 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp @@ -24,6 +24,10 @@ #include "profile/assettreeitem.h" +#include +#include +#include + AssetTreeItem::AssetTreeItem(std::vector data, AssetTreeItem* parentItem) : _itemData(std::move(data)) , _parentItem(parentItem) diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp index 9eab2845e0..4d38c1be55 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp @@ -28,6 +28,8 @@ #include "filesystemaccess.h" #include #include +#include +#include namespace { constexpr std::string_view Header1 = "Asset"; diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index 1b6930c151..1dd1824a1b 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -33,6 +33,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace { constexpr int CameraTypeNode = 0; diff --git a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp index b901ed4032..f7b69df523 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp index 0d2d7bcf24..60a96d2f03 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp @@ -25,7 +25,9 @@ #include "profile/horizonsdialog.h" #include "profile/line.h" +#include #include +#include #include #include #include @@ -41,9 +43,12 @@ #include #include #include -#include +#include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "HorizonsDialog"; diff --git a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp index c1d60ca3e8..bdf1bc78ea 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp @@ -31,6 +31,7 @@ #include #include #include +#include MetaDialog::MetaDialog(QWidget* parent, std::optional* meta) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp index 1b7588b5e3..c37d3991ac 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp @@ -32,6 +32,8 @@ #include #include #include +#include +#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp index ce3ec6f5d4..185e717f4e 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp @@ -37,6 +37,9 @@ #include "profile/timedialog.h" #include "profile/uipanelsdialog.h" #include +#include +#include +#include #include #include #include @@ -47,9 +50,10 @@ #include #include #include -#include #include #include +#include +#include #ifdef WIN32 #include diff --git a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp index 4602f71e38..8b4061bfbd 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp @@ -34,6 +34,9 @@ #include #include #include +#include +#include +#include using namespace openspace; diff --git a/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp index 26865d06ac..6e88076d55 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/scriptlogdialog.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -38,11 +39,8 @@ #include #include #include -#include #include -#include #include -#include ScriptLogDialog::ScriptLogDialog(QWidget* parent, std::string filter) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/profile/uipanelsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/uipanelsdialog.cpp index 38d3f38e04..eed363fc5c 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/uipanelsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/uipanelsdialog.cpp @@ -31,8 +31,11 @@ #include #include #include +#include #include +#include #include +#include namespace { constexpr std::string_view DefaultPanelPath = "${DATA}/web/default_ui_panels.json"; diff --git a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp index 11508a9004..dec8791b3c 100644 --- a/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/settingsdialog.cpp @@ -25,12 +25,18 @@ #include "settingsdialog.h" #include "profile/line.h" +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include SettingsDialog::SettingsDialog(openspace::Settings settings, QWidget* parent) : QDialog(parent) diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp index 92d26a3018..03769d131d 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/displaywindowunion.cpp @@ -25,11 +25,15 @@ #include "sgctedit/displaywindowunion.h" #include "sgctedit/windowcontrol.h" +#include #include #include #include #include #include +#include +#include +#include namespace { template struct overloaded : Ts... { using Ts::operator()...; }; diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp index 930c83dc0a..e0d7922e36 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/monitorbox.cpp @@ -26,6 +26,7 @@ #include "windowcolors.h" #include +#include MonitorBox::MonitorBox(QRect widgetSize, const std::vector& monitorResolutions, QWidget* parent) diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp index 5e7e65dfe8..938df0a13e 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/sgctedit.cpp @@ -26,7 +26,9 @@ #include #include +#include #include +#include #include #include #include @@ -36,7 +38,13 @@ #include #include #include +#include +#include #include +#include +#include +#include +#include namespace { constexpr int MaxNumberWindows = 4; diff --git a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp index f671b2326a..5f920a7ed4 100644 --- a/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp +++ b/apps/OpenSpace/ext/launcher/src/sgctedit/windowcontrol.cpp @@ -24,18 +24,24 @@ #include "sgctedit/windowcontrol.h" +#include #include +#include +#include #include "windowcolors.h" #include #include #include #include -#include #include #include #include #include #include +#include +#include +#include +#include namespace { std::array, 10> Quality = { diff --git a/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp b/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp index d34f6865ca..b14196c760 100644 --- a/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp +++ b/apps/OpenSpace/ext/launcher/src/splitcombobox.cpp @@ -26,7 +26,9 @@ #include "usericon.h" #include +#include #include +#include SplitComboBox::SplitComboBox(QWidget* parent, std::filesystem::path userPath, std::string userHeader, std::filesystem::path hardcodedPath, diff --git a/apps/OpenSpace/ext/launcher/src/usericon.cpp b/apps/OpenSpace/ext/launcher/src/usericon.cpp index 2374c39e4a..5dab7f8936 100644 --- a/apps/OpenSpace/ext/launcher/src/usericon.cpp +++ b/apps/OpenSpace/ext/launcher/src/usericon.cpp @@ -24,7 +24,10 @@ #include "usericon.h" +#include +#include #include +#include QIcon userIcon() { QPixmap px = QPixmap(40, 50); diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index c3ae514b21..58640fcd78 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit c3ae514b21e97e74c7dc36597a3ac65a785cc987 +Subproject commit 58640fcd780a542a515adfae13f0915006e18210 diff --git a/ext/ghoul b/ext/ghoul index 570de399b4..524a5760d9 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 570de399b4e2cbc84434d0495bb69877e46c0959 +Subproject commit 524a5760d993df75a935418722faee960ceb8f7d diff --git a/include/openspace/camera/camera.h b/include/openspace/camera/camera.h index bb1424d488..a19e114561 100644 --- a/include/openspace/camera/camera.h +++ b/include/openspace/camera/camera.h @@ -27,12 +27,16 @@ #include #include +#include #include +#include +#include namespace openspace { struct CameraPose; class SceneGraphNode; +class Syncable; /** * This class still needs some more love. Suggested improvements: diff --git a/include/openspace/data/csvloader.h b/include/openspace/data/csvloader.h index ad4b6c297c..d1a2da683c 100644 --- a/include/openspace/data/csvloader.h +++ b/include/openspace/data/csvloader.h @@ -26,8 +26,11 @@ #define __OPENSPACE_CORE___CSVLOADER___H__ #include +#include #include #include +#include +#include namespace openspace::dataloader::csv { diff --git a/include/openspace/data/datamapping.h b/include/openspace/data/datamapping.h index da203e690d..1777b1ac04 100644 --- a/include/openspace/data/datamapping.h +++ b/include/openspace/data/datamapping.h @@ -25,8 +25,10 @@ #ifndef __OPENSPACE_CORE___DATAMAPPING___H__ #define __OPENSPACE_CORE___DATAMAPPING___H__ +#include #include #include +#include #include namespace ghoul { class Dictionary; } diff --git a/include/openspace/data/speckloader.h b/include/openspace/data/speckloader.h index fe4175f9f4..3419350253 100644 --- a/include/openspace/data/speckloader.h +++ b/include/openspace/data/speckloader.h @@ -25,10 +25,16 @@ #ifndef __OPENSPACE_CORE___SPECKLOADER___H__ #define __OPENSPACE_CORE___SPECKLOADER___H__ -#include +#include #include #include +namespace openspace::dataloader { + struct ColorMap; + struct Dataset; + struct Labelset; +} // namespace openspace::dataloader + namespace openspace::dataloader::speck { Dataset loadSpeckFile(std::filesystem::path path, diff --git a/include/openspace/documentation/documentationengine.h b/include/openspace/documentation/documentationengine.h index 25690c4778..38b538e961 100644 --- a/include/openspace/documentation/documentationengine.h +++ b/include/openspace/documentation/documentationengine.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace openspace::documentation { diff --git a/include/openspace/documentation/verifier.h b/include/openspace/documentation/verifier.h index ce5610db4c..f6aaa0e214 100644 --- a/include/openspace/documentation/verifier.h +++ b/include/openspace/documentation/verifier.h @@ -27,7 +27,16 @@ #include #include +#include +#include +#include +#include +#include #include +#include +#include + +namespace ghoul { class Dictionary; } namespace openspace::documentation { diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 61aa451861..635443af72 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -24,9 +24,10 @@ #include #include -#include +#include #include #include +#include namespace openspace::documentation { @@ -254,7 +255,7 @@ TestResult OperatorVerifier::operator()(const ghoul::Dictionary& di else if constexpr (std::is_same_v) { const double d = dict.value(key); double intPart; - bool isInt = modf(d, &intPart) == 0.0; + bool isInt = std::modf(d, &intPart) == 0.0; if (isInt) { val = static_cast(d); } diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index 920b6b51b6..eb566f686d 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -25,9 +25,9 @@ #ifndef __OPENSPACE_CORE___CONFIGURATION___H__ #define __OPENSPACE_CORE___CONFIGURATION___H__ -#include #include #include +#include #include #include #include diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index 54519e4c71..243a4c3de6 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___DOWNLOADMANAGER___H__ #include +#include #include #include #include diff --git a/include/openspace/engine/globals.h b/include/openspace/engine/globals.h index 380165f991..942422fc99 100644 --- a/include/openspace/engine/globals.h +++ b/include/openspace/engine/globals.h @@ -32,25 +32,6 @@ namespace ghoul::fontrendering { class FontManager; } namespace openspace { -struct Configuration; -class Dashboard; -class DeferredcasterManager; -class DownloadEventEngine; -class DownloadManager; -class EventEngine; -class LuaConsole; -class MemoryManager; -class MissionManager; -class ModuleEngine; -class OpenSpaceEngine; -class ParallelPeer; -class RaycasterManager; -class RenderEngine; -class ScreenSpaceRenderable; -class SyncEngine; -class TimeManager; -class VersionChecker; -struct WindowDelegate; namespace interaction { struct JoystickInputStates; struct WebsocketInputStates; @@ -66,7 +47,26 @@ namespace scripting { class ScriptEngine; class ScriptScheduler; } // namespace scripting +struct Configuration; +class Dashboard; +class DeferredcasterManager; +class DownloadEventEngine; +class DownloadManager; +class EventEngine; +class LuaConsole; +class MemoryManager; +class MissionManager; +class ModuleEngine; +class OpenSpaceEngine; +class ParallelPeer; class Profile; +class RaycasterManager; +class RenderEngine; +class ScreenSpaceRenderable; +class SyncEngine; +class TimeManager; +class VersionChecker; +struct WindowDelegate; namespace global { diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h index 9cb789dc81..e9413d55de 100644 --- a/include/openspace/engine/moduleengine.h +++ b/include/openspace/engine/moduleengine.h @@ -30,6 +30,7 @@ #include #include #include +#include #include namespace ghoul { class Dictionary; } @@ -37,10 +38,9 @@ namespace ghoul::systemcapabilities { struct Version; } namespace openspace { -class OpenSpaceModule; - namespace documentation { struct Documentation; } namespace scripting { struct LuaLibrary; } +class OpenSpaceModule; /** * The ModuleEngine is the central repository for registering and accessing diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index a9cc5400e4..50515a8db5 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -37,19 +37,24 @@ #include #include #include +#include +#include +#include +#include #include #include +#include #include +#include #include namespace openspace { +namespace scripting { struct LuaLibrary; } class AssetManager; class LoadingScreen; class Scene; -namespace scripting { struct LuaLibrary; } - /** * Structure that is responsible for the delayed shutdown of the application. */ diff --git a/include/openspace/engine/settings.h b/include/openspace/engine/settings.h index e549fc57a0..ee51f2b51e 100644 --- a/include/openspace/engine/settings.h +++ b/include/openspace/engine/settings.h @@ -29,6 +29,7 @@ #include #include #include +#include namespace openspace { diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index 3da9fbea23..f2cfc395fe 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -26,8 +26,8 @@ #define __OPENSPACE_CORE___SYNCENGINE___H__ #include - #include +#include #include namespace openspace { diff --git a/include/openspace/events/event.h b/include/openspace/events/event.h index 20b2754cc6..585d3c6d1e 100644 --- a/include/openspace/events/event.h +++ b/include/openspace/events/event.h @@ -28,17 +28,19 @@ #include #include #include +#include +#include +#include namespace openspace { -namespace properties { class Property; } - -class Camera; -class Layer; -class Profile; -class Renderable; -class SceneGraphNode; -class ScreenSpaceRenderable; -class Time; + namespace properties { class Property; } + class Camera; + class Layer; + class Profile; + class Renderable; + class SceneGraphNode; + class ScreenSpaceRenderable; + class Time; } // namespace openspace namespace openspace::events { diff --git a/include/openspace/events/eventengine.h b/include/openspace/events/eventengine.h index 1c3d484cd0..1aa671dd1a 100644 --- a/include/openspace/events/eventengine.h +++ b/include/openspace/events/eventengine.h @@ -26,13 +26,17 @@ #define __OPENSPACE_CORE___EVENTENGINE___H__ #include -#include +#include #include +#include +#include +#include #include +#include namespace openspace { -namespace events { struct Event; } +namespace scripting { struct LuaLibrary; } class EventEngine { public: diff --git a/include/openspace/interaction/actionmanager.h b/include/openspace/interaction/actionmanager.h index ef139163f3..aa43fcfdbd 100644 --- a/include/openspace/interaction/actionmanager.h +++ b/include/openspace/interaction/actionmanager.h @@ -26,7 +26,9 @@ #define __OPENSPACE_CORE___ACTIONMANAGER___H__ #include +#include #include +#include namespace ghoul { class Dictionary; } namespace openspace::scripting { struct LuaLibrary; } diff --git a/include/openspace/interaction/delayedvariable.h b/include/openspace/interaction/delayedvariable.h index 790e0d5ac5..0b284fb1e1 100644 --- a/include/openspace/interaction/delayedvariable.h +++ b/include/openspace/interaction/delayedvariable.h @@ -36,6 +36,7 @@ template class DelayedVariable { public: DelayedVariable(ScaleType scaleFactor, ScaleType friction); + void set(T value, double dt); void decelerate(double dt); void setHard(T value); diff --git a/include/openspace/interaction/joystickcamerastates.h b/include/openspace/interaction/joystickcamerastates.h index f2c0adaa73..b32dc8b70b 100644 --- a/include/openspace/interaction/joystickcamerastates.h +++ b/include/openspace/interaction/joystickcamerastates.h @@ -28,8 +28,12 @@ #include #include +#include #include +#include #include +#include +#include #include namespace openspace::interaction { diff --git a/include/openspace/interaction/joystickinputstate.h b/include/openspace/interaction/joystickinputstate.h index eee1e65bd0..2b4e8bb376 100644 --- a/include/openspace/interaction/joystickinputstate.h +++ b/include/openspace/interaction/joystickinputstate.h @@ -25,10 +25,14 @@ #ifndef __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__ #define __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__ +#include #include #include #include +#include #include +#include +#include namespace openspace::interaction { diff --git a/include/openspace/interaction/keybindingmanager.h b/include/openspace/interaction/keybindingmanager.h index 94707e68e4..5e89f8172f 100644 --- a/include/openspace/interaction/keybindingmanager.h +++ b/include/openspace/interaction/keybindingmanager.h @@ -26,14 +26,16 @@ #define __OPENSPACE_CORE___KEYBINDINGMANAGER___H__ #include +#include +#include +#include namespace openspace { + namespace scripting { struct LuaLibrary; } class Camera; class SceneGraphNode; } // namespace openspace -namespace openspace::scripting { struct LuaLibrary; } - namespace openspace::interaction { class KeybindingManager { diff --git a/include/openspace/interaction/keyboardinputstate.h b/include/openspace/interaction/keyboardinputstate.h index 481ebae77c..8ea75ab294 100644 --- a/include/openspace/interaction/keyboardinputstate.h +++ b/include/openspace/interaction/keyboardinputstate.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___KEYBOARDINPUTSTATE___H__ #include +#include #include namespace openspace::interaction { diff --git a/include/openspace/interaction/keyframerecordinghandler.h b/include/openspace/interaction/keyframerecordinghandler.h index 64e96ed3b1..807a3b7956 100644 --- a/include/openspace/interaction/keyframerecordinghandler.h +++ b/include/openspace/interaction/keyframerecordinghandler.h @@ -28,11 +28,13 @@ #include #include -#include #include #include #include +namespace ghoul { class Dictionary; } +namespace openspace::scripting { struct LuaLibrary; } + namespace openspace::interaction { class KeyframeRecordingHandler : public properties::PropertyOwner { diff --git a/include/openspace/interaction/mousecamerastates.h b/include/openspace/interaction/mousecamerastates.h index dcffb435bc..36d0d786e7 100644 --- a/include/openspace/interaction/mousecamerastates.h +++ b/include/openspace/interaction/mousecamerastates.h @@ -29,8 +29,8 @@ namespace openspace::interaction { -class MouseInputState; class KeyboardInputState; +class MouseInputState; class MouseCameraStates : public CameraInteractionStates { public: @@ -43,7 +43,6 @@ public: private: bool _isMouseButtonInverted = false; - double _currentSensitivityRamp = 1.0; }; diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index 2eee114608..42ce14fa28 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -26,13 +26,14 @@ #define __OPENSPACE_CORE___SESSIONRECORDING___H__ #include -#include #include #include #include #include #include +namespace ghoul { class Dictionary; } + namespace openspace::interaction { enum class DataMode { diff --git a/include/openspace/interaction/sessionrecordinghandler.h b/include/openspace/interaction/sessionrecordinghandler.h index 1e2114a21d..a511a2b8dc 100644 --- a/include/openspace/interaction/sessionrecordinghandler.h +++ b/include/openspace/interaction/sessionrecordinghandler.h @@ -30,6 +30,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace openspace::properties { class Property; } namespace openspace::interaction { diff --git a/include/openspace/interaction/tasks/convertrecformattask.h b/include/openspace/interaction/tasks/convertrecformattask.h index 2f8ae62366..530a210bb4 100644 --- a/include/openspace/interaction/tasks/convertrecformattask.h +++ b/include/openspace/interaction/tasks/convertrecformattask.h @@ -26,11 +26,12 @@ #define __OPENSPACE_CORE___CONVERTRECFORMATTASK___H__ #include -#include -#include +#include #include -#include + +namespace ghoul { class Dictionary; } +namespace openspace::documentation { struct Documentation; } namespace openspace::interaction { diff --git a/include/openspace/interaction/websocketcamerastates.h b/include/openspace/interaction/websocketcamerastates.h index 3e5c80ce92..79d0bb4cc8 100644 --- a/include/openspace/interaction/websocketcamerastates.h +++ b/include/openspace/interaction/websocketcamerastates.h @@ -29,7 +29,11 @@ #include #include +#include +#include #include +#include +#include #include namespace openspace::interaction { diff --git a/include/openspace/interaction/websocketinputstate.h b/include/openspace/interaction/websocketinputstate.h index 1251948ba4..6d7bce59bc 100644 --- a/include/openspace/interaction/websocketinputstate.h +++ b/include/openspace/interaction/websocketinputstate.h @@ -28,8 +28,10 @@ #include #include #include +#include #include #include +#include namespace openspace::interaction { diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h index 0258bec3e1..7ae028c18a 100644 --- a/include/openspace/mission/mission.h +++ b/include/openspace/mission/mission.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -121,7 +122,6 @@ public: */ const std::vector& phases() const; - /** * Returns all important dates. * @@ -129,7 +129,6 @@ public: */ const std::vector& milestones() const; - /** * Returns all actions. * diff --git a/include/openspace/mission/missionmanager.h b/include/openspace/mission/missionmanager.h index b6200d67ac..f61e1350ad 100644 --- a/include/openspace/mission/missionmanager.h +++ b/include/openspace/mission/missionmanager.h @@ -26,7 +26,6 @@ #define __OPENSPACE_CORE___MISSIONMANAGER___H__ #include - #include #include diff --git a/include/openspace/navigation/keyframenavigator.h b/include/openspace/navigation/keyframenavigator.h index dd946f3125..516ee42a1e 100644 --- a/include/openspace/navigation/keyframenavigator.h +++ b/include/openspace/navigation/keyframenavigator.h @@ -25,13 +25,13 @@ #ifndef __OPENSPACE_CORE___KEYFRAMENAVIGATOR___H__ #define __OPENSPACE_CORE___KEYFRAMENAVIGATOR___H__ -#include #include #include #include -#include +#include namespace openspace { + namespace datamessagestructures { struct CameraKeyframe; } class Camera; class TimeManager; } // namespace openspace diff --git a/include/openspace/navigation/navigationhandler.h b/include/openspace/navigation/navigationhandler.h index 053f6526b4..41a8320745 100644 --- a/include/openspace/navigation/navigationhandler.h +++ b/include/openspace/navigation/navigationhandler.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -38,16 +39,22 @@ #include #include #include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include namespace openspace { + namespace scripting { struct LuaLibrary; } class Camera; class SceneGraphNode; } // namespace openspace -namespace openspace::scripting { struct LuaLibrary; } - namespace openspace::interaction { struct JoystickInputStates; diff --git a/include/openspace/navigation/navigationstate.h b/include/openspace/navigation/navigationstate.h index fec5b79d04..78dffabfcf 100644 --- a/include/openspace/navigation/navigationstate.h +++ b/include/openspace/navigation/navigationstate.h @@ -25,11 +25,16 @@ #ifndef __OPENSPACE_CORE___NAVIGATIONSTATE___H__ #define __OPENSPACE_CORE___NAVIGATIONSTATE___H__ -#include #include +#include #include +#include -namespace openspace { struct CameraPose; } +namespace ghoul { class Dictionary; } +namespace openspace { + namespace documentation { struct Documentation; } + struct CameraPose; +} // namespace openspace namespace openspace::interaction { diff --git a/include/openspace/navigation/orbitalnavigator.h b/include/openspace/navigation/orbitalnavigator.h index 37061bbbc3..bd968b2035 100644 --- a/include/openspace/navigation/orbitalnavigator.h +++ b/include/openspace/navigation/orbitalnavigator.h @@ -39,18 +39,18 @@ #include #include #include -#include #include +#include namespace openspace { + namespace scripting { struct LuaLibrary; } class Camera; struct CameraPose; class SceneGraphNode; struct SurfacePositionHandle; + class Syncable; } // namespace -namespace openspace::scripting { struct LuaLibrary; } - namespace openspace::interaction { class MouseInputState; diff --git a/include/openspace/navigation/path.h b/include/openspace/navigation/path.h index 2b3680f677..59a650a837 100644 --- a/include/openspace/navigation/path.h +++ b/include/openspace/navigation/path.h @@ -25,14 +25,18 @@ #ifndef __OPENSPACE_CORE___PATH___H__ #define __OPENSPACE_CORE___PATH___H__ -#include #include #include -#include +#include #include +#include #include -namespace openspace { struct CameraPose; } +namespace ghoul { class Dictionary; } +namespace openspace { + namespace documentation { struct Documentation; } + struct CameraPose; +} // namespace openspace namespace openspace::interaction { diff --git a/include/openspace/navigation/pathcurve.h b/include/openspace/navigation/pathcurve.h index 3b5e312b2f..6748e45718 100644 --- a/include/openspace/navigation/pathcurve.h +++ b/include/openspace/navigation/pathcurve.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace openspace::interaction { diff --git a/include/openspace/navigation/pathcurves/avoidcollisioncurve.h b/include/openspace/navigation/pathcurves/avoidcollisioncurve.h index 034a6f926c..ee384e0b36 100644 --- a/include/openspace/navigation/pathcurves/avoidcollisioncurve.h +++ b/include/openspace/navigation/pathcurves/avoidcollisioncurve.h @@ -33,7 +33,7 @@ namespace openspace { class SceneGraphNode; } namespace openspace::interaction { -class WayPoint; +class Waypoint; class AvoidCollisionCurve : public PathCurve { public: diff --git a/include/openspace/navigation/pathcurves/zoomoutoverviewcurve.h b/include/openspace/navigation/pathcurves/zoomoutoverviewcurve.h index 32ee9ee5d8..756d71de9a 100644 --- a/include/openspace/navigation/pathcurves/zoomoutoverviewcurve.h +++ b/include/openspace/navigation/pathcurves/zoomoutoverviewcurve.h @@ -29,7 +29,7 @@ namespace openspace::interaction { -class WayPoint; +class Waypoint; class ZoomOutOverviewCurve : public PathCurve { public: diff --git a/include/openspace/navigation/pathnavigator.h b/include/openspace/navigation/pathnavigator.h index 8f157dd7e9..15aa10e777 100644 --- a/include/openspace/navigation/pathnavigator.h +++ b/include/openspace/navigation/pathnavigator.h @@ -36,13 +36,12 @@ #include namespace openspace { + namespace scripting { struct LuaLibrary; } class Camera; struct CameraPose; class SceneGraphNode; } // namespace openspace -namespace openspace::scripting { struct LuaLibrary; } - namespace openspace::interaction { class Path; diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index bf6b50b94d..fb0794a36b 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -25,12 +25,8 @@ #ifndef __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ #define __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ -#include #include -#include -#include -#include -#include +#include #include #include #include @@ -47,17 +43,18 @@ enum class Type : uint32_t { struct CameraKeyframe { CameraKeyframe() = default; - explicit CameraKeyframe(const std::vector& buffer) { - deserialize(buffer); - } + explicit CameraKeyframe(const std::vector& buffer); CameraKeyframe(glm::dvec3 pos, glm::dquat rot, std::string focusNode, - bool followNodeRot, float scale) - : _position(pos) - , _rotation(rot) - , _followNodeRotation(followNodeRot) - , _focusNode(focusNode) - , _scale(scale) - {} + bool followNodeRot, float scale); + + void serialize(std::vector& buffer) const; + size_t deserialize(const std::vector& buffer, size_t offset = 0); + + void write(std::ostream& out) const; + void write(std::stringstream& out) const; + + void read(std::istream* in); + void read(std::istringstream& iss); glm::dvec3 _position = glm::dvec3(0.0); glm::dquat _rotation = glm::dquat(1.0, 0.0, 0.0, 0.0); @@ -66,411 +63,57 @@ struct CameraKeyframe { float _scale = 0.f; double _timestamp = 0.0; - - void serialize(std::vector& buffer) const { - // Add position - buffer.insert( - buffer.end(), - reinterpret_cast(&_position), - reinterpret_cast(&_position) + sizeof(_position) - ); - - // Add orientation - buffer.insert( - buffer.end(), - reinterpret_cast(&_rotation), - reinterpret_cast(&_rotation) + sizeof(_rotation) - ); - - // Follow focus node rotation? - buffer.insert( - buffer.end(), - reinterpret_cast(&_followNodeRotation), - reinterpret_cast(&_followNodeRotation) + - sizeof(_followNodeRotation) - ); - - uint32_t nodeNameLength = static_cast(_focusNode.size()); - - // Add focus node - buffer.insert( - buffer.end(), - reinterpret_cast(&nodeNameLength), - reinterpret_cast(&nodeNameLength) + sizeof(uint32_t) - ); - buffer.insert( - buffer.end(), - _focusNode.data(), - _focusNode.data() + nodeNameLength - ); - - buffer.insert( - buffer.end(), - reinterpret_cast(&_scale), - reinterpret_cast(&_scale) + sizeof(_scale) - ); - - // Add timestamp - buffer.insert( - buffer.end(), - reinterpret_cast(&_timestamp), - reinterpret_cast(&_timestamp) + sizeof(_timestamp) - ); - } - - size_t deserialize(const std::vector& buffer, size_t offset = 0) { - int size = 0; - - // Position - size = sizeof(_position); - std::memcpy(glm::value_ptr(_position), buffer.data() + offset, size); - offset += size; - - // Orientation - size = sizeof(_rotation); - std::memcpy(glm::value_ptr(_rotation), buffer.data() + offset, size); - offset += size; - - // Follow focus node rotation? - size = sizeof(_followNodeRotation); - std::memcpy(&_followNodeRotation, buffer.data() + offset, size); - offset += size; - - // Focus node - int nodeNameLength; - size = sizeof(int); - std::memcpy(&nodeNameLength, buffer.data() + offset, size); - offset += size; - size = nodeNameLength; - _focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size); - offset += size; - - // Scale - size = sizeof(_scale); - std::memcpy(&_scale, buffer.data() + offset, size); - offset += size; - - // Timestamp - size = sizeof(_timestamp); - std::memcpy(&_timestamp, buffer.data() + offset, size); - offset += size; - - return offset; - } - - void write(std::ostream& out) const { - 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( - reinterpret_cast(&_followNodeRotation), - sizeof(_followNodeRotation) - ); - - int nodeNameLength = static_cast(_focusNode.size()); - - // Write focus node - out.write(reinterpret_cast(&nodeNameLength), sizeof(nodeNameLength)); - out.write(_focusNode.c_str(), _focusNode.size()); - - // Write scale - out.write(reinterpret_cast(&_scale), sizeof(_scale)); - - // Write timestamp - out.write(reinterpret_cast(&_timestamp), sizeof(_timestamp)); - } - - void write(std::stringstream& out) const { - // Add camera position - out << std::setprecision(std::numeric_limits::max_digits10); - out << _position.x << ' ' << _position.y << ' ' << _position.z << ' '; - // Add camera rotation - out << _rotation.x << ' ' - << _rotation.y << ' ' - << _rotation.z << ' ' - << _rotation.w << ' '; - out << std::scientific << _scale << ' '; - if (_followNodeRotation) { - out << "F "; - } - else { - out << "- "; - } - out << _focusNode; - } - - void read(std::istream* in) { - // Read position - in->read(reinterpret_cast(&_position), sizeof(_position)); - - // Read orientation - in->read(reinterpret_cast(&_rotation), sizeof(_rotation)); - - // Read follow focus node rotation - unsigned char b; - in->read(reinterpret_cast(&b), sizeof(unsigned char)); - _followNodeRotation = (b == 1); - - // Read focus node - int nodeNameLength = static_cast(_focusNode.size()); - in->read(reinterpret_cast(&nodeNameLength), sizeof(nodeNameLength)); - std::vector temp(static_cast(nodeNameLength) + 1); - in->read(temp.data(), nodeNameLength); - - temp[nodeNameLength] = '\0'; - _focusNode = temp.data(); - - // Read scale - in->read(reinterpret_cast(&_scale), sizeof(_scale)); - - // Read timestamp - in->read(reinterpret_cast(&_timestamp), sizeof(_timestamp)); - } - - void read(std::istringstream& iss) { - std::string rotationFollowing; - - iss >> _position.x - >> _position.y - >> _position.z - >> _rotation.x - >> _rotation.y - >> _rotation.z - >> _rotation.w - >> _scale - >> rotationFollowing - >> _focusNode; - _followNodeRotation = (rotationFollowing == "F"); - } }; struct TimeKeyframe { TimeKeyframe() = default; - TimeKeyframe(const std::vector& buffer) { - deserialize(buffer); - } + TimeKeyframe(const std::vector& buffer); + + void serialize(std::vector& buffer) const; + size_t deserialize(const std::vector& buffer, size_t offset = 0); + + void write(std::ostream* out) const; + void write(std::stringstream& out) const; + + void read(std::istream* in); + void read(std::istringstream& iss); double _time = 0.0; double _dt = 0.0; bool _paused = false; bool _requiresTimeJump = false; double _timestamp = 0.0; - - void serialize(std::vector& buffer) const { - buffer.insert( - buffer.end(), - reinterpret_cast(this), - reinterpret_cast(this) + sizeof(TimeKeyframe) - ); - } - - size_t deserialize(const std::vector& buffer, size_t offset = 0) { - *this = *reinterpret_cast(buffer.data() + offset); - offset += sizeof(TimeKeyframe); - return offset; - } - - void write(std::ostream* out) const { - out->write(reinterpret_cast(this), sizeof(TimeKeyframe)); - } - - void write(std::stringstream& out) const { - out << ' ' << _dt; - if (_paused) { - out << " P"; - } - else { - out << " R"; - } - if (_requiresTimeJump) { - out << " J"; - } - else { - out << " -"; - } - } - - void read(std::istream* in) { - in->read(reinterpret_cast(this), sizeof(TimeKeyframe)); - } - - void read(std::istringstream& iss) { - std::string paused, jump; - - iss >> _dt - >> paused - >> jump; - _paused = (paused == "P"); - _requiresTimeJump = (jump == "J"); - } }; struct TimeTimeline { TimeTimeline() = default; - TimeTimeline(const std::vector& buffer) { - deserialize(buffer); - } + TimeTimeline(const std::vector& buffer); + + void serialize(std::vector& buffer) const; + size_t deserialize(const std::vector& buffer, size_t offset = 0); + + void write(std::ostream* out) const; + void read(std::istream* in); bool _clear = true; std::vector _keyframes; - - void serialize(std::vector& buffer) const { - buffer.insert( - buffer.end(), - reinterpret_cast(&_clear), - reinterpret_cast(&_clear) + sizeof(bool) - ); - - int64_t nKeyframes = _keyframes.size(); - buffer.insert( - buffer.end(), - reinterpret_cast(&nKeyframes), - reinterpret_cast(&nKeyframes) + sizeof(int64_t) - ); - for (const TimeKeyframe& k : _keyframes) { - k.serialize(buffer); - } - } - - size_t deserialize(const std::vector& buffer, size_t offset = 0) { - int size = 0; - - size = sizeof(_clear); - std::memcpy(&_clear, buffer.data() + offset, size); - offset += size; - - int64_t nKeyframes = _keyframes.size(); - size = sizeof(nKeyframes); - std::memcpy(&nKeyframes, buffer.data() + offset, size); - offset += size; - - _keyframes.resize(nKeyframes); - for (TimeKeyframe& k : _keyframes) { - offset = k.deserialize(buffer, offset); - } - return offset; - } - - void write(std::ostream* out) const { - out->write(reinterpret_cast(&_clear), sizeof(bool)); - - int64_t nKeyframes = _keyframes.size(); - out->write(reinterpret_cast(&nKeyframes), sizeof(int64_t)); - for (const TimeKeyframe& k : _keyframes) { - k.write(out); - } - } - - void read(std::istream* in) { - in->read(reinterpret_cast(&_clear), sizeof(bool)); - - int64_t nKeyframes = _keyframes.size(); - in->read(reinterpret_cast(&nKeyframes), sizeof(int64_t)); - for (TimeKeyframe& k : _keyframes) { - k.read(in); - } - } }; struct ScriptMessage { ScriptMessage() = default; + void serialize(std::vector& buffer) const; + void deserialize(const std::vector& buffer); + + void write(std::ostream* out) const; + void write(unsigned char* buf, size_t& idx, std::ofstream& file) const; + void write(std::stringstream& ss) const; + + void read(std::istream* in); + void read(std::istringstream& iss); + std::string _script; double _timestamp = 0.0; - - void serialize(std::vector& buffer) const { - uint32_t strLen = static_cast(_script.size()); - - const char* p = reinterpret_cast(&strLen); - buffer.insert(buffer.end(), p, p + sizeof(uint32_t)); - - buffer.insert(buffer.end(), _script.begin(), _script.end()); - } - - void deserialize(const std::vector& buffer) { - const char* p = buffer.data(); - const uint32_t len = *reinterpret_cast(p); - - if (buffer.size() != (sizeof(uint32_t) + len)) { - LERRORC( - "ParallelPeer", - std::format( - "Received buffer with wrong size. Expected {} got {}", - len, buffer.size() - ) - ); - return; - } - - // We can skip over the first uint32_t that encoded the length - _script.assign(buffer.begin() + sizeof(uint32_t), buffer.end()); - } - - void write(std::ostream* out) const { - out->write(_script.c_str(), _script.size()); - } - - void write(unsigned char* buf, size_t& idx, std::ofstream& file) const { - size_t strLen = _script.size(); - size_t writeSize_bytes = sizeof(size_t); - - unsigned char const *p = reinterpret_cast(&strLen); - memcpy((buf + idx), p, writeSize_bytes); - idx += static_cast(writeSize_bytes); - - memcpy((buf + idx), _script.c_str(), _script.size()); - idx += static_cast(strLen); - file.write(reinterpret_cast(buf), idx); - //Write directly to file because some scripts can be very long - file.write(_script.c_str(), _script.size()); - } - - void write(std::stringstream& ss) const { - unsigned int numLinesInScript = static_cast( - std::count(_script.begin(), _script.end(), '\n') - ); - ss << ' ' << (numLinesInScript + 1) << ' '; - ss << _script; - } - - void read(std::istream* in) { - uint32_t strLen = 0; - //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 read(std::istringstream& iss) { - int numScriptLines; - iss >> numScriptLines; - if (numScriptLines < 0) { - numScriptLines = 0; - } - std::string tmpReadbackScript; - _script.erase(); - for (int i = 0; i < numScriptLines; i++) { - ghoul::getline(iss, tmpReadbackScript); - size_t start = tmpReadbackScript.find_first_not_of(" "); - tmpReadbackScript = tmpReadbackScript.substr(start); - _script.append(tmpReadbackScript); - if (i < (numScriptLines - 1)) { - _script.append("\n"); - } - } - } }; } // namespace openspace::messagestructures diff --git a/include/openspace/network/messagestructureshelper.h b/include/openspace/network/messagestructureshelper.h index dac6cd0504..5e034cfa20 100644 --- a/include/openspace/network/messagestructureshelper.h +++ b/include/openspace/network/messagestructureshelper.h @@ -25,10 +25,14 @@ #ifndef __OPENSPACE_CORE___MESSAGESTRUCTURESHELPER___H__ #define __OPENSPACE_CORE___MESSAGESTRUCTURESHELPER___H__ -#include +#include namespace openspace::datamessagestructures { +struct CameraKeyframe; +struct ScriptMessage; +struct TimeKeyframe; + /** * Method that creates a CameraKeyframe object and populates it with the current * properties of the camera from the navigation handler. diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 59382c3c7a..191139c2dc 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include namespace openspace { diff --git a/include/openspace/network/parallelpeer.h b/include/openspace/network/parallelpeer.h index f03bf09f6b..d59920cd1c 100644 --- a/include/openspace/network/parallelpeer.h +++ b/include/openspace/network/parallelpeer.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/include/openspace/properties/list/doublelistproperty.h b/include/openspace/properties/list/doublelistproperty.h index 060c2a2142..0469828c86 100644 --- a/include/openspace/properties/list/doublelistproperty.h +++ b/include/openspace/properties/list/doublelistproperty.h @@ -31,7 +31,7 @@ namespace openspace::properties { class DoubleListProperty : public ListProperty { public: - DoubleListProperty(Property::PropertyInfo info, + explicit DoubleListProperty(Property::PropertyInfo info, std::vector values = std::vector()); std::string_view className() const override final; diff --git a/include/openspace/properties/list/intlistproperty.h b/include/openspace/properties/list/intlistproperty.h index eb13bceba8..ab7bd5100b 100644 --- a/include/openspace/properties/list/intlistproperty.h +++ b/include/openspace/properties/list/intlistproperty.h @@ -31,7 +31,7 @@ namespace openspace::properties { class IntListProperty : public ListProperty { public: - IntListProperty(Property::PropertyInfo info, + explicit IntListProperty(Property::PropertyInfo info, std::vector values = std::vector()); std::string_view className() const override final; diff --git a/include/openspace/properties/list/stringlistproperty.h b/include/openspace/properties/list/stringlistproperty.h index 25eb12e441..c5531087d5 100644 --- a/include/openspace/properties/list/stringlistproperty.h +++ b/include/openspace/properties/list/stringlistproperty.h @@ -27,14 +27,11 @@ #include -#include -#include - namespace openspace::properties { class StringListProperty : public ListProperty { public: - StringListProperty(Property::PropertyInfo info, + explicit StringListProperty(Property::PropertyInfo info, std::vector values = std::vector()); std::string_view className() const override final; diff --git a/include/openspace/properties/matrix/dmat2property.h b/include/openspace/properties/matrix/dmat2property.h index 8c25086ef4..cfd6b00118 100644 --- a/include/openspace/properties/matrix/dmat2property.h +++ b/include/openspace/properties/matrix/dmat2property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DMat2Property : public NumericalProperty { public: - DMat2Property(Property::PropertyInfo info, glm::dmat2x2 value = glm::dmat2x2(0.0), + explicit DMat2Property(Property::PropertyInfo info, + glm::dmat2x2 value = glm::dmat2x2(0.0), glm::dmat2x2 minValue = ghoul::createFillMat2x2(std::numeric_limits::lowest()), glm::dmat2x2 maxValue = diff --git a/include/openspace/properties/matrix/dmat3property.h b/include/openspace/properties/matrix/dmat3property.h index 954e56e12a..7d184bd2b0 100644 --- a/include/openspace/properties/matrix/dmat3property.h +++ b/include/openspace/properties/matrix/dmat3property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DMat3Property : public NumericalProperty { public: - DMat3Property(Property::PropertyInfo info, glm::dmat3x3 value = glm::dmat3x3(0.0), + explicit DMat3Property(Property::PropertyInfo info, + glm::dmat3x3 value = glm::dmat3x3(0.0), glm::dmat3x3 minValue = ghoul::createFillMat3x3(std::numeric_limits::lowest()), glm::dmat3x3 maxValue = diff --git a/include/openspace/properties/matrix/dmat4property.h b/include/openspace/properties/matrix/dmat4property.h index 3a21e502c9..8e3ff61135 100644 --- a/include/openspace/properties/matrix/dmat4property.h +++ b/include/openspace/properties/matrix/dmat4property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DMat4Property : public NumericalProperty { public: - DMat4Property(Property::PropertyInfo info, glm::dmat4x4 value = glm::dmat4x4(0.0), + explicit DMat4Property(Property::PropertyInfo info, + glm::dmat4x4 value = glm::dmat4x4(0.0), glm::dmat4x4 minValue = ghoul::createFillMat4x4(std::numeric_limits::lowest()), glm::dmat4x4 maxValue = diff --git a/include/openspace/properties/matrix/mat2property.h b/include/openspace/properties/matrix/mat2property.h index 68513c377d..5e5eb80e28 100644 --- a/include/openspace/properties/matrix/mat2property.h +++ b/include/openspace/properties/matrix/mat2property.h @@ -28,13 +28,13 @@ #include #include -#include namespace openspace::properties { class Mat2Property : public NumericalProperty { public: - Mat2Property(Property::PropertyInfo info, glm::mat2x2 value = glm::mat2x2(0.f), + explicit Mat2Property(Property::PropertyInfo info, + glm::mat2x2 value = glm::mat2x2(0.f), glm::mat2x2 minValue = ghoul::createFillMat2x2(std::numeric_limits::lowest()), glm::mat2x2 maxValue = diff --git a/include/openspace/properties/matrix/mat3property.h b/include/openspace/properties/matrix/mat3property.h index 17cc04876e..372c1116b8 100644 --- a/include/openspace/properties/matrix/mat3property.h +++ b/include/openspace/properties/matrix/mat3property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class Mat3Property : public NumericalProperty { public: - Mat3Property(Property::PropertyInfo info, glm::mat3x3 value = glm::mat3x3(), + explicit Mat3Property(Property::PropertyInfo info, + glm::mat3x3 value = glm::mat3x3(0.f), glm::mat3x3 minValue = ghoul::createFillMat3x3(std::numeric_limits::lowest()), glm::mat3x3 maxValue = diff --git a/include/openspace/properties/matrix/mat4property.h b/include/openspace/properties/matrix/mat4property.h index 0ba714173b..8ae4b0b7cd 100644 --- a/include/openspace/properties/matrix/mat4property.h +++ b/include/openspace/properties/matrix/mat4property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class Mat4Property : public NumericalProperty { public: - Mat4Property(Property::PropertyInfo info, glm::mat4 value = glm::mat4(), + explicit Mat4Property(Property::PropertyInfo info, glm::mat4 value = glm::mat4(0.f), glm::mat4 minValue = ghoul::createFillMat4x4(std::numeric_limits::lowest()), glm::mat4 maxValue = diff --git a/include/openspace/properties/misc/listproperty.h b/include/openspace/properties/misc/listproperty.h index 2453549adc..dd15f7e192 100644 --- a/include/openspace/properties/misc/listproperty.h +++ b/include/openspace/properties/misc/listproperty.h @@ -27,14 +27,12 @@ #include -#include - namespace openspace::properties { template class ListProperty : public TemplateProperty> { public: - ListProperty(Property::PropertyInfo info, std::vector values); + explicit ListProperty(Property::PropertyInfo info, std::vector values); virtual ~ListProperty() override = 0; }; diff --git a/include/openspace/properties/misc/optionproperty.h b/include/openspace/properties/misc/optionproperty.h index deeadd946d..d1f639037c 100644 --- a/include/openspace/properties/misc/optionproperty.h +++ b/include/openspace/properties/misc/optionproperty.h @@ -25,9 +25,7 @@ #ifndef __OPENSPACE_CORE___OPTIONPROPERTY___H__ #define __OPENSPACE_CORE___OPTIONPROPERTY___H__ -#include - -#include +#include namespace openspace::properties { @@ -57,7 +55,7 @@ public: * \pre \p info.identifier must not be empty * \pre \p info.guiName must not be empty */ - OptionProperty(Property::PropertyInfo info); + explicit OptionProperty(Property::PropertyInfo info); /** * Returns the name of the class for reflection purposes. diff --git a/include/openspace/properties/misc/selectionproperty.h b/include/openspace/properties/misc/selectionproperty.h index 8542bb308f..e3beef6e1d 100644 --- a/include/openspace/properties/misc/selectionproperty.h +++ b/include/openspace/properties/misc/selectionproperty.h @@ -28,8 +28,6 @@ #include #include -#include -#include namespace openspace::properties { diff --git a/include/openspace/properties/misc/stringproperty.h b/include/openspace/properties/misc/stringproperty.h index aa63a0d7a7..7441a771c8 100644 --- a/include/openspace/properties/misc/stringproperty.h +++ b/include/openspace/properties/misc/stringproperty.h @@ -31,7 +31,7 @@ namespace openspace::properties { class StringProperty : public TemplateProperty { public: - StringProperty(Property::PropertyInfo info, std::string value = ""); + explicit StringProperty(Property::PropertyInfo info, std::string value = ""); std::string_view className() const override final; ghoul::lua::LuaTypes typeLua() const override final; diff --git a/include/openspace/properties/misc/triggerproperty.h b/include/openspace/properties/misc/triggerproperty.h index e12f06ae98..de8168e041 100644 --- a/include/openspace/properties/misc/triggerproperty.h +++ b/include/openspace/properties/misc/triggerproperty.h @@ -44,7 +44,7 @@ public: * \pre \p info.identifier must not be empty * \pre \p info.guiName must not be empty */ - TriggerProperty(PropertyInfo info); + explicit TriggerProperty(PropertyInfo info); /** * Returns the class name `TriggerProperty`. diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index a83fad6e6d..3aef60e433 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -26,7 +26,8 @@ #define __OPENSPACE_CORE___NUMERICALPROPERTY___H__ #include -#include + +#include namespace openspace::properties { diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 54c646f3e9..2b71d590ba 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -29,9 +29,16 @@ #include #include #include +#include #include +#include +#include #include #include +#include +#include +#include +#include struct lua_State; diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h index 251cd7c062..c965cd3fb1 100644 --- a/include/openspace/properties/propertyowner.h +++ b/include/openspace/properties/propertyowner.h @@ -27,6 +27,7 @@ #include #include +#include #include namespace openspace::properties { diff --git a/include/openspace/properties/scalar/boolproperty.h b/include/openspace/properties/scalar/boolproperty.h index cf3d364e26..54039ffdce 100644 --- a/include/openspace/properties/scalar/boolproperty.h +++ b/include/openspace/properties/scalar/boolproperty.h @@ -35,7 +35,7 @@ namespace openspace::properties { */ class BoolProperty : public TemplateProperty { public: - BoolProperty(Property::PropertyInfo info, bool value = false); + explicit BoolProperty(Property::PropertyInfo info, bool value = false); std::string_view className() const override final; ghoul::lua::LuaTypes typeLua() const override final; diff --git a/include/openspace/properties/scalar/doubleproperty.h b/include/openspace/properties/scalar/doubleproperty.h index b1e1f682fd..2db5ed3eaf 100644 --- a/include/openspace/properties/scalar/doubleproperty.h +++ b/include/openspace/properties/scalar/doubleproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___DOUBLEPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class DoubleProperty : public NumericalProperty { public: - DoubleProperty(Property::PropertyInfo info, double value = 0.0, + explicit DoubleProperty(Property::PropertyInfo info, double value = 0.0, double minValue = std::numeric_limits::lowest(), double maxValue = std::numeric_limits::max(), double stepValue = 0.01); diff --git a/include/openspace/properties/scalar/floatproperty.h b/include/openspace/properties/scalar/floatproperty.h index 074dc44b11..851953b6d3 100644 --- a/include/openspace/properties/scalar/floatproperty.h +++ b/include/openspace/properties/scalar/floatproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___FLOATPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class FloatProperty : public NumericalProperty { public: - FloatProperty(Property::PropertyInfo info, float value = 0.f, + explicit FloatProperty(Property::PropertyInfo info, float value = 0.f, float minValue = std::numeric_limits::lowest(), float maxValue = std::numeric_limits::max(), float stepValue = 0.01f); diff --git a/include/openspace/properties/scalar/intproperty.h b/include/openspace/properties/scalar/intproperty.h index 9872c0c223..a3dc40f75c 100644 --- a/include/openspace/properties/scalar/intproperty.h +++ b/include/openspace/properties/scalar/intproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___INTPROPERTY___H__ #include + #include namespace openspace::properties { diff --git a/include/openspace/properties/scalar/longproperty.h b/include/openspace/properties/scalar/longproperty.h index e5f78d3fdf..c66206eb5d 100644 --- a/include/openspace/properties/scalar/longproperty.h +++ b/include/openspace/properties/scalar/longproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___LONGPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class LongProperty : public NumericalProperty { public: - LongProperty(Property::PropertyInfo info, long value = long(0), + explicit LongProperty(Property::PropertyInfo info, long value = long(0), long minValue = std::numeric_limits::lowest(), long maxValue = std::numeric_limits::max(), long stepValue = long(1)); diff --git a/include/openspace/properties/scalar/shortproperty.h b/include/openspace/properties/scalar/shortproperty.h index 044fb95b8d..8515b92614 100644 --- a/include/openspace/properties/scalar/shortproperty.h +++ b/include/openspace/properties/scalar/shortproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___SHORTPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class ShortProperty : public NumericalProperty { public: - ShortProperty(Property::PropertyInfo info, short value = short(0), + explicit ShortProperty(Property::PropertyInfo info, short value = short(0), short minValue = std::numeric_limits::lowest(), short maxValue = std::numeric_limits::max(), short stepValue = short(1)); diff --git a/include/openspace/properties/scalar/uintproperty.h b/include/openspace/properties/scalar/uintproperty.h index 9ad692a75c..f0dce518ee 100644 --- a/include/openspace/properties/scalar/uintproperty.h +++ b/include/openspace/properties/scalar/uintproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___UINTPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class UIntProperty : public NumericalProperty { public: - UIntProperty(Property::PropertyInfo info, unsigned int value = 0, + explicit UIntProperty(Property::PropertyInfo info, unsigned int value = 0, unsigned int minValue = std::numeric_limits::lowest(), unsigned int maxValue = std::numeric_limits::max(), unsigned int stepValue = 1); diff --git a/include/openspace/properties/scalar/ulongproperty.h b/include/openspace/properties/scalar/ulongproperty.h index 64c7464438..8e6d0757df 100644 --- a/include/openspace/properties/scalar/ulongproperty.h +++ b/include/openspace/properties/scalar/ulongproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___ULONGPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class ULongProperty : public NumericalProperty { public: - ULongProperty(Property::PropertyInfo info, unsigned long value = 0ul, + explicit ULongProperty(Property::PropertyInfo info, unsigned long value = 0ul, unsigned long minValue = std::numeric_limits::lowest(), unsigned long maxValue = std::numeric_limits::max(), unsigned long stepValue = 1ul); diff --git a/include/openspace/properties/scalar/ushortproperty.h b/include/openspace/properties/scalar/ushortproperty.h index 175b6c721f..921a4e17cb 100644 --- a/include/openspace/properties/scalar/ushortproperty.h +++ b/include/openspace/properties/scalar/ushortproperty.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___USHORTPROPERTY___H__ #include + #include namespace openspace::properties { @@ -36,7 +37,7 @@ namespace openspace::properties { */ class UShortProperty : public NumericalProperty { public: - UShortProperty(Property::PropertyInfo info, unsigned short value = 0, + explicit UShortProperty(Property::PropertyInfo info, unsigned short value = 0, unsigned short minValue = std::numeric_limits::lowest(), unsigned short maxValue = std::numeric_limits::max(), unsigned short stepValue = 1); diff --git a/include/openspace/properties/vector/dvec2property.h b/include/openspace/properties/vector/dvec2property.h index 61dd0a8562..bc6b982454 100644 --- a/include/openspace/properties/vector/dvec2property.h +++ b/include/openspace/properties/vector/dvec2property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DVec2Property : public NumericalProperty { public: - DVec2Property(Property::PropertyInfo info, glm::dvec2 value = glm::dvec2(0.0), + explicit DVec2Property(Property::PropertyInfo info, + glm::dvec2 value = glm::dvec2(0.0), glm::dvec2 minValue = glm::dvec2(std::numeric_limits::lowest()), glm::dvec2 maxValue = glm::dvec2(std::numeric_limits::max()), glm::dvec2 stepValue = glm::dvec2(0.01)); diff --git a/include/openspace/properties/vector/dvec3property.h b/include/openspace/properties/vector/dvec3property.h index f78c8a3be2..2f6e222746 100644 --- a/include/openspace/properties/vector/dvec3property.h +++ b/include/openspace/properties/vector/dvec3property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DVec3Property : public NumericalProperty { public: - DVec3Property(Property::PropertyInfo info, glm::dvec3 value = glm::dvec3(0.0), + explicit DVec3Property(Property::PropertyInfo info, + glm::dvec3 value = glm::dvec3(0.0), glm::dvec3 minValue = glm::dvec3(std::numeric_limits::lowest()), glm::dvec3 maxValue = glm::dvec3(std::numeric_limits::max()), glm::dvec3 stepValue = glm::dvec3(0.01)); diff --git a/include/openspace/properties/vector/dvec4property.h b/include/openspace/properties/vector/dvec4property.h index 63c3836fb0..1c999ac62c 100644 --- a/include/openspace/properties/vector/dvec4property.h +++ b/include/openspace/properties/vector/dvec4property.h @@ -34,7 +34,8 @@ namespace openspace::properties { class DVec4Property : public NumericalProperty { public: - DVec4Property(Property::PropertyInfo info, glm::dvec4 value = glm::dvec4(0.0), + explicit DVec4Property(Property::PropertyInfo info, + glm::dvec4 value = glm::dvec4(0.0), glm::dvec4 minValue = glm::dvec4(std::numeric_limits::lowest()), glm::dvec4 maxValue = glm::dvec4(std::numeric_limits::max()), glm::dvec4 stepValue = glm::dvec4(0.01)); diff --git a/include/openspace/properties/vector/ivec2property.h b/include/openspace/properties/vector/ivec2property.h index 49517b1b8f..ba6473df78 100644 --- a/include/openspace/properties/vector/ivec2property.h +++ b/include/openspace/properties/vector/ivec2property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class IVec2Property : public NumericalProperty { public: - IVec2Property(Property::PropertyInfo info, glm::ivec2 value = glm::ivec2(0), + explicit IVec2Property(Property::PropertyInfo info, glm::ivec2 value = glm::ivec2(0), glm::ivec2 minValue = glm::ivec2(std::numeric_limits::lowest()), glm::ivec2 maxValue = glm::ivec2(std::numeric_limits::max()), glm::ivec2 stepValue = glm::ivec2(1)); diff --git a/include/openspace/properties/vector/ivec3property.h b/include/openspace/properties/vector/ivec3property.h index 9126a24b79..a8b6db456b 100644 --- a/include/openspace/properties/vector/ivec3property.h +++ b/include/openspace/properties/vector/ivec3property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class IVec3Property : public NumericalProperty { public: - IVec3Property(Property::PropertyInfo info, glm::ivec3 value = glm::ivec3(0), + explicit IVec3Property(Property::PropertyInfo info, glm::ivec3 value = glm::ivec3(0), glm::ivec3 minValue = glm::ivec3(std::numeric_limits::lowest()), glm::ivec3 maxValue = glm::ivec3(std::numeric_limits::max()), glm::ivec3 stepValue = glm::ivec3(1)); diff --git a/include/openspace/properties/vector/ivec4property.h b/include/openspace/properties/vector/ivec4property.h index 3c54337213..cb90554fc9 100644 --- a/include/openspace/properties/vector/ivec4property.h +++ b/include/openspace/properties/vector/ivec4property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class IVec4Property : public NumericalProperty { public: - IVec4Property(Property::PropertyInfo info, glm::ivec4 value = glm::ivec4(0), + explicit IVec4Property(Property::PropertyInfo info, glm::ivec4 value = glm::ivec4(0), glm::ivec4 minValue = glm::ivec4(std::numeric_limits::lowest()), glm::ivec4 maxValue = glm::ivec4(std::numeric_limits::max()), glm::ivec4 stepValue = glm::ivec4(1)); diff --git a/include/openspace/properties/vector/uvec2property.h b/include/openspace/properties/vector/uvec2property.h index c5bb2d8676..0b76a83fca 100644 --- a/include/openspace/properties/vector/uvec2property.h +++ b/include/openspace/properties/vector/uvec2property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class UVec2Property : public NumericalProperty { public: - UVec2Property(Property::PropertyInfo info, glm::uvec2 value = glm::uvec2(0), + explicit UVec2Property(Property::PropertyInfo info, glm::uvec2 value = glm::uvec2(0), glm::uvec2 minValue = glm::uvec2(std::numeric_limits::lowest()), glm::uvec2 maxValue = glm::uvec2(std::numeric_limits::max()), glm::uvec2 stepValue = glm::uvec2(1)); diff --git a/include/openspace/properties/vector/uvec3property.h b/include/openspace/properties/vector/uvec3property.h index 92dcbc5d70..d190436f23 100644 --- a/include/openspace/properties/vector/uvec3property.h +++ b/include/openspace/properties/vector/uvec3property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class UVec3Property : public NumericalProperty { public: - UVec3Property(Property::PropertyInfo info, glm::uvec3 value = glm::uvec3(0), + explicit UVec3Property(Property::PropertyInfo info, glm::uvec3 value = glm::uvec3(0), glm::uvec3 minValue = glm::uvec3(std::numeric_limits::lowest()), glm::uvec3 maxValue = glm::uvec3(std::numeric_limits::max()), glm::uvec3 stepValue = glm::uvec3(1)); diff --git a/include/openspace/properties/vector/uvec4property.h b/include/openspace/properties/vector/uvec4property.h index 9e5a4dd89d..72bd965a45 100644 --- a/include/openspace/properties/vector/uvec4property.h +++ b/include/openspace/properties/vector/uvec4property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class UVec4Property : public NumericalProperty { public: - UVec4Property(Property::PropertyInfo info, glm::uvec4 value = glm::uvec4(0), + explicit UVec4Property(Property::PropertyInfo info, glm::uvec4 value = glm::uvec4(0), glm::uvec4 minValue = glm::uvec4(std::numeric_limits::lowest()), glm::uvec4 maxValue = glm::uvec4(std::numeric_limits::max()), glm::uvec4 stepValue = glm::uvec4(1)); diff --git a/include/openspace/properties/vector/vec2property.h b/include/openspace/properties/vector/vec2property.h index fedecf1dda..c5334176ae 100644 --- a/include/openspace/properties/vector/vec2property.h +++ b/include/openspace/properties/vector/vec2property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class Vec2Property : public NumericalProperty { public: - Vec2Property(Property::PropertyInfo info, glm::vec2 value = glm::vec2(0.f), + explicit Vec2Property(Property::PropertyInfo info, glm::vec2 value = glm::vec2(0.f), glm::vec2 minValue = glm::vec2(std::numeric_limits::lowest()), glm::vec2 maxValue = glm::vec2(std::numeric_limits::max()), glm::vec2 stepValue = glm::vec2(0.01f)); diff --git a/include/openspace/properties/vector/vec3property.h b/include/openspace/properties/vector/vec3property.h index 2a90a724e9..f5226956e1 100644 --- a/include/openspace/properties/vector/vec3property.h +++ b/include/openspace/properties/vector/vec3property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class Vec3Property : public NumericalProperty { public: - Vec3Property(Property::PropertyInfo info, glm::vec3 value = glm::vec3(0.f), + explicit Vec3Property(Property::PropertyInfo info, glm::vec3 value = glm::vec3(0.f), glm::vec3 minValue = glm::vec3(std::numeric_limits::lowest()), glm::vec3 maxValue = glm::vec3(std::numeric_limits::max()), glm::vec3 stepValue = glm::vec3(0.01f)); diff --git a/include/openspace/properties/vector/vec4property.h b/include/openspace/properties/vector/vec4property.h index 4179867b4b..4cad546ee5 100644 --- a/include/openspace/properties/vector/vec4property.h +++ b/include/openspace/properties/vector/vec4property.h @@ -34,7 +34,7 @@ namespace openspace::properties { class Vec4Property : public NumericalProperty { public: - Vec4Property(Property::PropertyInfo info, glm::vec4 value = glm::vec4(0.f), + explicit Vec4Property(Property::PropertyInfo info, glm::vec4 value = glm::vec4(0.f), glm::vec4 minValue = glm::vec4(std::numeric_limits::lowest()), glm::vec4 maxValue = glm::vec4(std::numeric_limits::max()), glm::vec4 stepValue = glm::vec4(0.01f)); diff --git a/include/openspace/query/query.h b/include/openspace/query/query.h index f16c10b996..29e41f2623 100644 --- a/include/openspace/query/query.h +++ b/include/openspace/query/query.h @@ -30,12 +30,14 @@ namespace openspace { -namespace properties { class Property; } - +namespace properties { + class Property; + class PropertyOwner; +} // namespace properties +class IswaGroup; class Renderable; class Scene; class SceneGraphNode; -class IswaGroup; class ScreenSpaceRenderable; Scene* sceneGraph(); diff --git a/include/openspace/rendering/colormappingcomponent.h b/include/openspace/rendering/colormappingcomponent.h index 456309be56..158d2ceaa8 100644 --- a/include/openspace/rendering/colormappingcomponent.h +++ b/include/openspace/rendering/colormappingcomponent.h @@ -34,7 +34,14 @@ #include #include #include +#include #include +#include +#include +#include +#include + +namespace ghoul { class Dictionary; } namespace openspace { diff --git a/include/openspace/rendering/dashboard.h b/include/openspace/rendering/dashboard.h index ed30d0a4ec..ccfcf893ab 100644 --- a/include/openspace/rendering/dashboard.h +++ b/include/openspace/rendering/dashboard.h @@ -32,7 +32,9 @@ #include #include #include +#include #include +#include #include namespace openspace { diff --git a/include/openspace/rendering/dashboarditem.h b/include/openspace/rendering/dashboarditem.h index a2024e26e8..2854909256 100644 --- a/include/openspace/rendering/dashboarditem.h +++ b/include/openspace/rendering/dashboarditem.h @@ -29,6 +29,7 @@ #include #include +#include namespace ghoul { class Dictionary; } diff --git a/include/openspace/rendering/dashboardtextitem.h b/include/openspace/rendering/dashboardtextitem.h index f5b10b0dd7..a748d5b30a 100644 --- a/include/openspace/rendering/dashboardtextitem.h +++ b/include/openspace/rendering/dashboardtextitem.h @@ -30,13 +30,10 @@ #include #include -namespace ghoul { class Dictionary; } namespace ghoul::fontrendering { class Font; } namespace openspace { -namespace documentation { struct Documentation; } - class DashboardTextItem : public DashboardItem { public: explicit DashboardTextItem(const ghoul::Dictionary& dictionary); diff --git a/include/openspace/rendering/deferredcaster.h b/include/openspace/rendering/deferredcaster.h index 7705f43643..e5c9c3520f 100644 --- a/include/openspace/rendering/deferredcaster.h +++ b/include/openspace/rendering/deferredcaster.h @@ -26,7 +26,6 @@ #define __OPENSPACE_CORE___DEFERREDCASTER___H #include -#include namespace ghoul::opengl { class Texture; @@ -35,21 +34,21 @@ namespace ghoul::opengl { namespace openspace { -struct RenderData; struct DeferredcastData; +struct RenderData; struct UpdateData; class Deferredcaster { public: virtual ~Deferredcaster() = default; - virtual void preRaycast(const RenderData& /*renderData*/, - const DeferredcastData& /*deferredData*/, - ghoul::opengl::ProgramObject& /*program*/) {} + virtual void preRaycast(const RenderData& renderData, + const DeferredcastData& deferredData, + ghoul::opengl::ProgramObject& program); - virtual void postRaycast(const RenderData& /*renderData*/, - const DeferredcastData& /*deferredData*/, - ghoul::opengl::ProgramObject& /*program*/) {} + virtual void postRaycast(const RenderData& renderData, + const DeferredcastData& deferredData, + ghoul::opengl::ProgramObject& program); virtual std::filesystem::path deferredcastVSPath() const = 0; diff --git a/include/openspace/rendering/framebufferrenderer.h b/include/openspace/rendering/framebufferrenderer.h index 8447ed381a..c0da38b6e8 100644 --- a/include/openspace/rendering/framebufferrenderer.h +++ b/include/openspace/rendering/framebufferrenderer.h @@ -36,7 +36,6 @@ namespace ghoul { class Dictionary; } namespace ghoul::filesystem { class File; } - namespace ghoul::opengl { class ProgramObject; class Texture; @@ -186,11 +185,9 @@ private: std::unique_ptr >; - void resolveMSAA(float blackoutFactor); void applyTMO(float blackoutFactor, const glm::ivec4& viewport); void applyFXAA(const glm::ivec4& viewport); void updateDownscaleTextures() const; - void updateExitVolumeTextures(); void writeDownscaledVolume(const glm::ivec4& viewport); std::map _raycastData; diff --git a/include/openspace/rendering/helper.h b/include/openspace/rendering/helper.h index 635b4102fa..44c5f91677 100644 --- a/include/openspace/rendering/helper.h +++ b/include/openspace/rendering/helper.h @@ -25,7 +25,11 @@ #ifndef __OPENSPACE_CORE___HELPER___H__ #define __OPENSPACE_CORE___HELPER___H__ +#include +#include #include +#include +#include namespace ghoul::opengl { class ProgramObject; @@ -39,13 +43,7 @@ namespace openspace { namespace openspace::rendering::helper { -enum class Anchor { - Center, - NW, - NE, - SW, - SE -}; +enum class Anchor { Center, NW, NE, SW, SE }; void initialize(); void deinitialize(); diff --git a/include/openspace/rendering/labelscomponent.h b/include/openspace/rendering/labelscomponent.h index 71dfb8cc14..f63c22ab7d 100644 --- a/include/openspace/rendering/labelscomponent.h +++ b/include/openspace/rendering/labelscomponent.h @@ -36,13 +36,15 @@ #include #include #include +#include +namespace ghoul { class Dictionary; } namespace ghoul::fontrendering { class Font; } namespace openspace { -struct RenderData; namespace documentation { struct Documentation; } +struct RenderData; class LabelsComponent : public properties::PropertyOwner, public Fadeable { public: diff --git a/include/openspace/rendering/loadingscreen.h b/include/openspace/rendering/loadingscreen.h index a291b1ef25..772140785f 100644 --- a/include/openspace/rendering/loadingscreen.h +++ b/include/openspace/rendering/loadingscreen.h @@ -28,14 +28,17 @@ #include #include #include +#include +#include #include #include #include +#include +#include // #define LOADINGSCREEN_DEBUGGING namespace ghoul::fontrendering { class Font; } - namespace ghoul::opengl { class ProgramObject; class Texture; diff --git a/include/openspace/rendering/luaconsole.h b/include/openspace/rendering/luaconsole.h index be1ebeb795..344ca75504 100644 --- a/include/openspace/rendering/luaconsole.h +++ b/include/openspace/rendering/luaconsole.h @@ -32,9 +32,11 @@ #include #include #include +#include #include #include #include +#include #include namespace ghoul::fontrendering { class Font; } diff --git a/include/openspace/rendering/raycastermanager.h b/include/openspace/rendering/raycastermanager.h index 66d9ae913f..8cc338b191 100644 --- a/include/openspace/rendering/raycastermanager.h +++ b/include/openspace/rendering/raycastermanager.h @@ -29,8 +29,8 @@ namespace openspace { -class VolumeRaycaster; class RaycasterListener; +class VolumeRaycaster; class RaycasterManager { public: diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 5a91fe8948..486be431a4 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -32,16 +32,22 @@ #include #include #include +#include +#include #include +#include -namespace ghoul { class Dictionary; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +namespace ghoul { + namespace opengl { + class ProgramObject; + class Texture; + } // namespace opengl + class Dictionary; +} // namespace ghoul namespace openspace { +namespace documentation { struct Documentation; } class Camera; class Ellipsoid; struct RenderData; @@ -49,8 +55,6 @@ struct RendererTasks; struct SurfacePositionHandle; struct UpdateData; -namespace documentation { struct Documentation; } - // Unfortunately we can't move this struct into the Renderable until // https://bugs.llvm.org/show_bug.cgi?id=36684 is fixed struct RenderableSettings { diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h index 210ea4f002..00f3d80cfc 100644 --- a/include/openspace/rendering/renderengine.h +++ b/include/openspace/rendering/renderengine.h @@ -34,27 +34,30 @@ #include #include #include +#include #include #include +#include +#include +#include +#include namespace ghoul { -namespace fontrendering { class Font; } -namespace opengl { - class ProgramObject; - class OpenGLStateCache; -} // namespace opengl - -class Dictionary; -class SharedMemory; + namespace fontrendering { class Font; } + namespace opengl { + class ProgramObject; + class OpenGLStateCache; + } // namespace opengl + class Dictionary; + class SharedMemory; } // ghoul namespace openspace { namespace scripting { struct LuaLibrary; } - class Camera; -class RaycasterManager; class DeferredcasterManager; +class RaycasterManager; class Scene; class SceneManager; class ScreenLog; diff --git a/include/openspace/rendering/screenspacerenderable.h b/include/openspace/rendering/screenspacerenderable.h index e2bf58921a..adcaa8adbe 100644 --- a/include/openspace/rendering/screenspacerenderable.h +++ b/include/openspace/rendering/screenspacerenderable.h @@ -33,14 +33,17 @@ #include #include #include +#include #include #include +namespace ghoul { class Dictionary; } namespace ghoul::opengl { class ProgramObject; } namespace openspace { namespace documentation { struct Documentation; } +struct RenderData; /** * The base class for screen space images and screen space framebuffers. This base class diff --git a/include/openspace/rendering/screenspacerenderableframebuffer.h b/include/openspace/rendering/screenspacerenderableframebuffer.h index 47ae17fded..813ff3bee1 100644 --- a/include/openspace/rendering/screenspacerenderableframebuffer.h +++ b/include/openspace/rendering/screenspacerenderableframebuffer.h @@ -28,16 +28,12 @@ #include #include - -namespace ghoul::opengl { - class FramebufferObject; - class Texture; -} // namespace ghoul::opengl +#include +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - /** * Creates a texture by rendering to a framebuffer, this is then used on a screen space * plane. This class lets you add renderfunctions that should render to a framebuffer with diff --git a/include/openspace/rendering/screenspacerenderabletext.h b/include/openspace/rendering/screenspacerenderabletext.h index 50f8cc339c..b2666f6cce 100644 --- a/include/openspace/rendering/screenspacerenderabletext.h +++ b/include/openspace/rendering/screenspacerenderabletext.h @@ -29,24 +29,13 @@ #include #include +#include #include - -namespace ghoul { - -class Dictionary; - -namespace fontrendering { class Font; } -namespace opengl { - class FramebufferObject; - class Texture; -} // namespace opengl - -} // namespace ghoul +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceRenderableText : public ScreenSpaceRenderable { public: explicit ScreenSpaceRenderableText(const ghoul::Dictionary& dictionary); diff --git a/include/openspace/rendering/texturecomponent.h b/include/openspace/rendering/texturecomponent.h index 88500194c1..161e3a5751 100644 --- a/include/openspace/rendering/texturecomponent.h +++ b/include/openspace/rendering/texturecomponent.h @@ -27,6 +27,7 @@ #include #include +#include namespace ghoul::filesystem { class File; } namespace ghoul::opengl { class Texture; } diff --git a/include/openspace/rendering/volumeraycaster.h b/include/openspace/rendering/volumeraycaster.h index 135cf488f3..f643cec6cc 100644 --- a/include/openspace/rendering/volumeraycaster.h +++ b/include/openspace/rendering/volumeraycaster.h @@ -35,27 +35,24 @@ namespace ghoul::opengl { namespace openspace { -struct RenderData; struct RaycastData; +struct RenderData; class VolumeRaycaster { public: - /** - * Destructor. - */ virtual ~VolumeRaycaster() = default; /** * Render the volume's entry points (front face of the bounding geometry). */ - virtual void renderEntryPoints(const RenderData& /*data*/, - ghoul::opengl::ProgramObject& /*program*/) = 0; + virtual void renderEntryPoints(const RenderData& data, + ghoul::opengl::ProgramObject& program) = 0; /** * Render the volume's exit points (back face of the bounding geometry). */ - virtual void renderExitPoints(const RenderData& /*data*/, - ghoul::opengl::ProgramObject& /*program*/) = 0; + virtual void renderExitPoints(const RenderData& data, + ghoul::opengl::ProgramObject& program) = 0; /** * Prepare the volume for the ABuffer's resolve step. Make sure textures are up to diff --git a/include/openspace/scene/asset.h b/include/openspace/scene/asset.h index b4f34cfd48..9861311caa 100644 --- a/include/openspace/scene/asset.h +++ b/include/openspace/scene/asset.h @@ -25,13 +25,16 @@ #ifndef __OPENSPACE_CORE___ASSET___H__ #define __OPENSPACE_CORE___ASSET___H__ -#include +#include #include #include +#include +#include namespace openspace { class AssetManager; +class ResourceSynchronization; /** * This class represents a successfully loaded Asset. Each Lua asset file results in diff --git a/include/openspace/scene/assetmanager.h b/include/openspace/scene/assetmanager.h index 45bcf91302..318d5126af 100644 --- a/include/openspace/scene/assetmanager.h +++ b/include/openspace/scene/assetmanager.h @@ -25,16 +25,19 @@ #ifndef __OPENSPACE_CORE___ASSETMANAGER___H__ #define __OPENSPACE_CORE___ASSETMANAGER___H__ -#include #include -#include -#include #include +#include +#include +#include +#include +#include + +namespace ghoul::lua { class LuaState; } namespace openspace { namespace scripting { struct LuaLibrary; } - class Asset; class ResourceSynchronization; diff --git a/include/openspace/scene/lightsource.h b/include/openspace/scene/lightsource.h index 964d6f0f26..d8fd28b3a9 100644 --- a/include/openspace/scene/lightsource.h +++ b/include/openspace/scene/lightsource.h @@ -36,7 +36,6 @@ namespace ghoul { class Dictionary; } namespace openspace { namespace documentation { struct Documentation; } - class SceneGraphNode; struct RenderData; diff --git a/include/openspace/scene/profile.h b/include/openspace/scene/profile.h index e169c1b23c..71de42875f 100644 --- a/include/openspace/scene/profile.h +++ b/include/openspace/scene/profile.h @@ -25,19 +25,21 @@ #ifndef __OPENSPACE_CORE___PROFILE___H__ #define __OPENSPACE_CORE___PROFILE___H__ -#include #include #include #include +#include #include #include +#include #include #include +#include namespace openspace { namespace interaction { struct NavigationState; } - +namespace properties { class PropertyOwner; } namespace scripting { struct LuaLibrary; } class Profile { diff --git a/include/openspace/scene/rotation.h b/include/openspace/scene/rotation.h index 7db4d7ea9c..f7b81f9f30 100644 --- a/include/openspace/scene/rotation.h +++ b/include/openspace/scene/rotation.h @@ -30,14 +30,14 @@ #include #include #include +#include namespace ghoul { class Dictionary; } namespace openspace { -struct UpdateData; - namespace documentation { struct Documentation; } +struct UpdateData; /** * This class represents a configurable rotation which may or may not be time-dependent. @@ -60,7 +60,6 @@ public: static ghoul::mm_unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary); - explicit Rotation(const ghoul::Dictionary& dictionary); virtual ~Rotation() override = default; diff --git a/include/openspace/scene/scale.h b/include/openspace/scene/scale.h index 188a18e6f4..30cd000d6a 100644 --- a/include/openspace/scene/scale.h +++ b/include/openspace/scene/scale.h @@ -30,14 +30,14 @@ #include #include #include +#include namespace ghoul { class Dictionary; } namespace openspace { -struct UpdateData; - namespace documentation { struct Documentation; } +struct UpdateData; class Scale : public properties::PropertyOwner { public: diff --git a/include/openspace/scene/scene.h b/include/openspace/scene/scene.h index 9a052ae3a8..9663634fe6 100644 --- a/include/openspace/scene/scene.h +++ b/include/openspace/scene/scene.h @@ -28,25 +28,35 @@ #include #include +#include #include +#include #include +#include +#include +#include #include #include +#include +#include #include #include -namespace ghoul { - -class Dictionary; -namespace lua { class LuaState; } -namespace opengl { class ProgramObject; } - -} // namespace ghoul +namespace ghoul { class Dictionary; } +namespace ghoul::lua { class LuaState; } +namespace ghoul::opengl { class ProgramObject; } namespace openspace { namespace documentation { struct Documentation; } +namespace properties { class Property; } namespace scripting { struct LuaLibrary; } +class Camera; +class Profile; +struct RenderData; +struct RendererTasks; +class SceneInitializer; +struct UpdateData; enum class PropertyValueType { Boolean = 0, @@ -56,9 +66,6 @@ enum class PropertyValueType { Nil }; -class Profile; -class SceneInitializer; - // Notifications: // SceneGraphFinishedLoading class Scene : public properties::PropertyOwner { diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index 1be70e9852..17458d645d 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include // #define Debugging_Core_SceneGraphNode_Indices @@ -49,20 +51,19 @@ namespace ghoul::opengl { class ProgramObject; } namespace openspace { +namespace documentation { struct Documentation; } class Camera; -struct RenderData; class Renderable; +struct RenderData; struct RendererTasks; class Rotation; -class Translation; class Scale; class Scene; -struct UpdateData; struct SurfacePositionHandle; -class TimeFrame; class Time; - -namespace documentation { struct Documentation; } +class TimeFrame; +class Translation; +struct UpdateData; class SceneGraphNode : public properties::PropertyOwner { public: diff --git a/include/openspace/scene/sceneinitializer.h b/include/openspace/scene/sceneinitializer.h index c1014a311c..aeb33a8311 100644 --- a/include/openspace/scene/sceneinitializer.h +++ b/include/openspace/scene/sceneinitializer.h @@ -27,6 +27,7 @@ #include #include +#include #include namespace openspace { @@ -41,7 +42,7 @@ class SceneGraphNode; */ class SceneInitializer { public: - SceneInitializer(unsigned int nThreads = 0); + explicit SceneInitializer(unsigned int nThreads = 0); void initializeNode(SceneGraphNode* node); std::vector takeInitializedNodes(); diff --git a/include/openspace/scene/timeframe.h b/include/openspace/scene/timeframe.h index adcd0ec836..87eb4dbfa4 100644 --- a/include/openspace/scene/timeframe.h +++ b/include/openspace/scene/timeframe.h @@ -27,17 +27,15 @@ #include -#include -#include +#include #include namespace ghoul { class Dictionary; } namespace openspace { -class Time; - namespace documentation { struct Documentation; } +class Time; class TimeFrame : public properties::PropertyOwner { public: diff --git a/include/openspace/scene/translation.h b/include/openspace/scene/translation.h index 9096e9a1af..de4e2f52be 100644 --- a/include/openspace/scene/translation.h +++ b/include/openspace/scene/translation.h @@ -31,15 +31,15 @@ #include #include #include +#include namespace ghoul { class Dictionary; } namespace openspace { +namespace documentation { struct Documentation; } struct UpdateData; -namespace documentation { struct Documentation; } - class Translation : public properties::PropertyOwner { public: static ghoul::mm_unique_ptr createFromDictionary( diff --git a/include/openspace/scripting/lualibrary.h b/include/openspace/scripting/lualibrary.h index 716dfad495..0a6caab48e 100644 --- a/include/openspace/scripting/lualibrary.h +++ b/include/openspace/scripting/lualibrary.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___LUALIBRARY___H__ #include +#include #include #include @@ -44,7 +45,7 @@ struct LuaLibrary { * the function. */ struct Function { - using lua_CFunction =int(*)(lua_State* L); + using lua_CFunction = int(*)(lua_State* L); /// The name of the function std::string name; diff --git a/include/openspace/scripting/scriptengine.h b/include/openspace/scripting/scriptengine.h index 16c8d6642d..e0e09480ae 100644 --- a/include/openspace/scripting/scriptengine.h +++ b/include/openspace/scripting/scriptengine.h @@ -30,11 +30,16 @@ #include #include #include +#include #include #include -#include +#include +#include +#include +namespace ghoul { class Dictionary; } namespace openspace { class SyncBuffer; } +struct lua_State; namespace openspace::scripting { diff --git a/include/openspace/scripting/scriptscheduler.h b/include/openspace/scripting/scriptscheduler.h index 68189c7952..72c45827fa 100644 --- a/include/openspace/scripting/scriptscheduler.h +++ b/include/openspace/scripting/scriptscheduler.h @@ -27,13 +27,9 @@ #include -#include #include -#include - -#include +#include #include -#include #include #include diff --git a/include/openspace/util/coordinateconversion.h b/include/openspace/util/coordinateconversion.h index 42b557dbee..3b04d9ad7c 100644 --- a/include/openspace/util/coordinateconversion.h +++ b/include/openspace/util/coordinateconversion.h @@ -27,6 +27,7 @@ #include #include +#include namespace openspace { diff --git a/include/openspace/util/distanceconstants.h b/include/openspace/util/distanceconstants.h index 332b69a03b..294f2d4b97 100644 --- a/include/openspace/util/distanceconstants.h +++ b/include/openspace/util/distanceconstants.h @@ -26,23 +26,25 @@ #define __OPENSPACE_CORE___DISTANCECONSTANTS___H__ namespace openspace::distanceconstants { - constexpr double EarthRadius = 6371E3; - constexpr double JupiterRadius = 7.1492E7; - constexpr double SolarRadius = 6.95700E8; - constexpr double LightYear = 9.4607304725808E15; - constexpr double LightMonth = LightYear / 12; - constexpr double LightDay = LightYear / 365; - constexpr double LightHour = LightDay / 24; - constexpr double LightSecond = 299792458.0; - constexpr double AstronomicalUnit = 1.495978707E11; - constexpr double Parsec = 3.0856776E16; - constexpr double Inch = 0.0254; - constexpr double Foot = 0.3048; - constexpr double Yard = 0.9144; - constexpr double Chain = 20.1168; - constexpr double Mile = 1609.344; - constexpr double NauticalMile = 1852.0; +constexpr double EarthRadius = 6371E3; +constexpr double JupiterRadius = 7.1492E7; +constexpr double SolarRadius = 6.95700E8; +constexpr double LightYear = 9.4607304725808E15; +constexpr double LightMonth = LightYear / 12; +constexpr double LightDay = LightYear / 365; +constexpr double LightHour = LightDay / 24; +constexpr double LightSecond = 299792458.0; +constexpr double AstronomicalUnit = 1.495978707E11; +constexpr double Parsec = 3.0856776E16; + +constexpr double Inch = 0.0254; +constexpr double Foot = 0.3048; +constexpr double Yard = 0.9144; +constexpr double Chain = 20.1168; +constexpr double Mile = 1609.344; +constexpr double NauticalMile = 1852.0; + } // openspace::distanceconstants #endif // __OPENSPACE_CORE___DISTANCECONSTANTS___H__ diff --git a/include/openspace/util/distanceconversion.h b/include/openspace/util/distanceconversion.h index 063c3f0853..1f4e3691cd 100644 --- a/include/openspace/util/distanceconversion.h +++ b/include/openspace/util/distanceconversion.h @@ -26,12 +26,13 @@ #define __OPENSPACE_CORE___DISTANCECONVERSION___H__ #include - #include #include #include #include +#include #include +#include namespace openspace { diff --git a/include/openspace/util/downloadeventengine.h b/include/openspace/util/downloadeventengine.h index fcb8343ace..ec3f77cc5f 100644 --- a/include/openspace/util/downloadeventengine.h +++ b/include/openspace/util/downloadeventengine.h @@ -25,11 +25,12 @@ #ifndef __OPENSPACE_CORE___DOWNLOAD_EVENT_ENGINE___H__ #define __OPENSPACE_CORE___DOWNLOAD_EVENT_ENGINE___H__ +#include #include -#include #include #include #include +#include namespace openspace { diff --git a/include/openspace/util/dynamicfilesequencedownloader.h b/include/openspace/util/dynamicfilesequencedownloader.h index a9d13028f2..b113275e65 100644 --- a/include/openspace/util/dynamicfilesequencedownloader.h +++ b/include/openspace/util/dynamicfilesequencedownloader.h @@ -56,7 +56,7 @@ public: DynamicFileSequenceDownloader(int dataID, const std::string& identifier, std::string infoUrl, std::string dataUrl, size_t nFilesToQueue); - void deinitialize(bool cacheFiles); + void deinitialize(bool cacheFiles) const; void requestDataInfo(std::string httpInfoRequest); void requestAvailableFiles(std::string httpDataRequest, std::filesystem::path syncDir); diff --git a/include/openspace/util/ellipsoid.h b/include/openspace/util/ellipsoid.h index 5ab77df487..a6064c61e9 100644 --- a/include/openspace/util/ellipsoid.h +++ b/include/openspace/util/ellipsoid.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___ELLIPSOID___H__ #include +#include #include namespace openspace { diff --git a/include/openspace/util/factorymanager.h b/include/openspace/util/factorymanager.h index 71a97266ff..e31ae1e310 100644 --- a/include/openspace/util/factorymanager.h +++ b/include/openspace/util/factorymanager.h @@ -28,6 +28,8 @@ #include #include #include +#include +#include namespace openspace { diff --git a/include/openspace/util/factorymanager.inl b/include/openspace/util/factorymanager.inl index 7c52b7255e..b4ab1764a2 100644 --- a/include/openspace/util/factorymanager.inl +++ b/include/openspace/util/factorymanager.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include namespace openspace { diff --git a/include/openspace/util/histogram.h b/include/openspace/util/histogram.h index b473526b4c..01cc1c2a80 100644 --- a/include/openspace/util/histogram.h +++ b/include/openspace/util/histogram.h @@ -25,6 +25,7 @@ #ifndef __OPENSPACE_CORE___HISTOGRAM___H__ #define __OPENSPACE_CORE___HISTOGRAM___H__ +#include #include namespace openspace { @@ -58,7 +59,7 @@ public: float interpolate(float bin) const; float sample(int binIndex) const; const float* data() const; - std::vector> getDecimated(int numBins) const; + std::vector> getDecimated(int numBins) const; void normalize(); void print() const; diff --git a/include/openspace/util/httprequest.h b/include/openspace/util/httprequest.h index 2dde039fde..b9f0d81ff1 100644 --- a/include/openspace/util/httprequest.h +++ b/include/openspace/util/httprequest.h @@ -25,18 +25,19 @@ #ifndef __OPENSPACE_CORE___HTTPREQUEST___H__ #define __OPENSPACE_CORE___HTTPREQUEST___H__ -#include +#include #include #include +#include #include #include #include #include +#include #include #include #include #include -#include namespace openspace { diff --git a/include/openspace/util/json_helper.h b/include/openspace/util/json_helper.h index 9d64113c8c..ef291e3c62 100644 --- a/include/openspace/util/json_helper.h +++ b/include/openspace/util/json_helper.h @@ -26,10 +26,11 @@ #define __OPENSPACE_CORE___JSON_HELPER___H__ #include -#include #include #include +namespace ghoul { class Dictionary; } + namespace openspace { /** diff --git a/include/openspace/util/keys.h b/include/openspace/util/keys.h index 27e34ea2bd..83e43e09ea 100644 --- a/include/openspace/util/keys.h +++ b/include/openspace/util/keys.h @@ -61,6 +61,8 @@ #include #include #include +#include +#include namespace openspace { diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h index 4ff6d55c43..548941283a 100644 --- a/include/openspace/util/openspacemodule.h +++ b/include/openspace/util/openspacemodule.h @@ -28,16 +28,13 @@ #include #include -#include -#include namespace ghoul { class Dictionary; } namespace openspace { -namespace documentation { struct Documentation; } +namespace documentation { struct Documentation; } namespace scripting { struct LuaLibrary; } - class ModuleEngine; /** diff --git a/include/openspace/util/resourcesynchronization.h b/include/openspace/util/resourcesynchronization.h index e19c528c7c..0b7ed964b6 100644 --- a/include/openspace/util/resourcesynchronization.h +++ b/include/openspace/util/resourcesynchronization.h @@ -27,6 +27,7 @@ #include #include +#include #include namespace ghoul { class Dictionary; } diff --git a/include/openspace/util/syncable.h b/include/openspace/util/syncable.h index 584e74bf6d..e4303b9769 100644 --- a/include/openspace/util/syncable.h +++ b/include/openspace/util/syncable.h @@ -41,10 +41,10 @@ protected: // from the used of implementations of the interface friend class SyncEngine; - virtual void preSync(bool /*isMaster*/) {} - virtual void encode(SyncBuffer* /*syncBuffer*/) = 0; - virtual void decode(SyncBuffer* /*syncBuffer*/) = 0; - virtual void postSync(bool /*isMaster*/) {} + virtual void preSync(bool isMaster); + virtual void encode(SyncBuffer* syncBuffer) = 0; + virtual void decode(SyncBuffer* syncBuffer) = 0; + virtual void postSync(bool isMaster); }; } // namespace openspace diff --git a/include/openspace/util/syncbuffer.h b/include/openspace/util/syncbuffer.h index 4408cf6781..cfd072d84f 100644 --- a/include/openspace/util/syncbuffer.h +++ b/include/openspace/util/syncbuffer.h @@ -26,6 +26,7 @@ #define __OPENSPACE_CORE___SYNCBUFFER___H__ #include +#include #include #include diff --git a/include/openspace/util/task.h b/include/openspace/util/task.h index eb3904047d..48d83faf70 100644 --- a/include/openspace/util/task.h +++ b/include/openspace/util/task.h @@ -27,6 +27,7 @@ #include #include +#include namespace ghoul { class Dictionary; } @@ -38,14 +39,14 @@ class Task { public: using ProgressCallback = std::function; - virtual ~Task() = default; - virtual void perform(const ProgressCallback& onProgress) = 0; - virtual std::string description() = 0; - static std::unique_ptr createFromDictionary( const ghoul::Dictionary& dictionary ); + virtual ~Task() = default; + virtual void perform(const ProgressCallback& onProgress) = 0; + virtual std::string description() = 0; + static documentation::Documentation documentation(); }; diff --git a/include/openspace/util/threadpool.h b/include/openspace/util/threadpool.h index 89b5a06567..10f2c20d39 100644 --- a/include/openspace/util/threadpool.h +++ b/include/openspace/util/threadpool.h @@ -44,7 +44,7 @@ public: void operator()(); private: - ThreadPool& pool; + ThreadPool& _pool; }; class ThreadPool { @@ -61,14 +61,14 @@ public: private: friend class Worker; - std::vector workers; + std::vector _workers; - std::deque> tasks; + std::deque> _tasks; - std::mutex queue_mutex; - std::condition_variable condition; + std::mutex _queueMutex; + std::condition_variable _condition; - bool stop; + bool _shouldStop = false; }; } // namespace openspace diff --git a/include/openspace/util/timeconversion.h b/include/openspace/util/timeconversion.h index 5b71a3e1a1..ba039dc56e 100644 --- a/include/openspace/util/timeconversion.h +++ b/include/openspace/util/timeconversion.h @@ -31,6 +31,9 @@ #include #include #include +#include +#include +#include namespace openspace { diff --git a/include/openspace/util/touch.h b/include/openspace/util/touch.h index 5ee1a84785..047c394163 100644 --- a/include/openspace/util/touch.h +++ b/include/openspace/util/touch.h @@ -25,8 +25,7 @@ #ifndef __OPENSPACE_CORE___TOUCH___H__ #define __OPENSPACE_CORE___TOUCH___H__ -#include - +#include #include namespace openspace { @@ -38,6 +37,7 @@ namespace openspace { */ struct TouchInput { TouchInput(size_t touchDeviceId, size_t fingerId, float x, float y, double timestamp); + glm::vec2 screenCoordinates(const glm::vec2& resolution) const; glm::vec2 currentWindowCoordinates() const; bool isMoving() const; @@ -59,7 +59,7 @@ struct TouchInput { */ class TouchInputHolder { public: - TouchInputHolder(TouchInput input); + explicit TouchInputHolder(TouchInput input); /** * Succeeds upon a different input than last. Fails upon a too similar input as last. diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp index c28c9f8ea2..3fa3aa5a49 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.cpp +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.cpp @@ -56,16 +56,31 @@ #include +#include #include #include #include #include +#include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "AtmosphereDeferredcaster"; diff --git a/modules/atmosphere/rendering/atmospheredeferredcaster.h b/modules/atmosphere/rendering/atmospheredeferredcaster.h index f7cb74db4b..8b9baf5acb 100644 --- a/modules/atmosphere/rendering/atmospheredeferredcaster.h +++ b/modules/atmosphere/rendering/atmospheredeferredcaster.h @@ -27,22 +27,14 @@ #include -#include #include #include #include -#include #include -namespace ghoul::opengl { - class Texture; - class ProgramObject; -} // namespace ghoul::opengl - namespace openspace { -struct RenderData; -struct DeferredcastData; +class SceneGraphNode; struct ShadowConfiguration; struct ShadowRenderingStruct { @@ -113,7 +105,6 @@ private: void calculateInscattering(int scatteringOrder, ghoul::opengl::ProgramObject& program, GLuint deltaSRayleigh); - UniformCache(cullAtmosphere, opacity, Rg, Rt, groundRadianceEmission, HR, betaRayleigh, HM, betaMieExtinction, mieG, sunRadiance, ozoneLayerEnabled, HO, betaOzoneExtinction, SAMPLES_R, SAMPLES_MU, SAMPLES_MU_S, SAMPLES_NU, diff --git a/modules/atmosphere/rendering/renderableatmosphere.cpp b/modules/atmosphere/rendering/renderableatmosphere.cpp index 5b2d0dd92c..baf3b2e6d0 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.cpp +++ b/modules/atmosphere/rendering/renderableatmosphere.cpp @@ -27,15 +27,21 @@ #include #include #include -#include #include #include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include namespace { constexpr float KM_TO_M = 1000.f; diff --git a/modules/atmosphere/rendering/renderableatmosphere.h b/modules/atmosphere/rendering/renderableatmosphere.h index 15d95b4b12..cc3234d899 100644 --- a/modules/atmosphere/rendering/renderableatmosphere.h +++ b/modules/atmosphere/rendering/renderableatmosphere.h @@ -28,26 +28,15 @@ #include #include -#include -#include #include #include #include -#include -#include #include -#include -#include - -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +#include namespace openspace { class AtmosphereDeferredcaster; - struct TransformData; // Shadow structure @@ -60,9 +49,6 @@ struct ShadowConfiguration { bool printedCasterError = false; }; -namespace documentation { struct Documentation; } -namespace planetgeometry { class PlanetGeometry; } - class RenderableAtmosphere : public Renderable { public: explicit RenderableAtmosphere(const ghoul::Dictionary& dictionary); @@ -77,7 +63,7 @@ public: static documentation::Documentation Documentation(); private: - glm::dmat4 computeModelTransformMatrix(const openspace::TransformData& data); + glm::dmat4 computeModelTransformMatrix(const TransformData& data); void updateAtmosphereParameters(); void setDimmingCoefficient(const glm::dmat4& modelTransform); diff --git a/modules/audio/audiomodule.cpp b/modules/audio/audiomodule.cpp index d94eb09293..1cc6055894 100644 --- a/modules/audio/audiomodule.cpp +++ b/modules/audio/audiomodule.cpp @@ -24,11 +24,20 @@ #include -#include +#include #include +#include +#include +#include #include +#include +#include +#include #include #include +#include +#include +#include #include "audiomodule_lua.inl" diff --git a/modules/audio/audiomodule.h b/modules/audio/audiomodule.h index 6087fbd7a9..63bad67f60 100644 --- a/modules/audio/audiomodule.h +++ b/modules/audio/audiomodule.h @@ -27,9 +27,11 @@ #include -#include -#include +#include #include +#include +#include +#include namespace SoLoud { class Soloud; diff --git a/modules/audio/audiomodule_lua.inl b/modules/audio/audiomodule_lua.inl index 2f54c348c1..51516b29ec 100644 --- a/modules/audio/audiomodule_lua.inl +++ b/modules/audio/audiomodule_lua.inl @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include #include -#include namespace { diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index 22f16a8437..f4e7fc5d81 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -96,12 +96,13 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include +#include namespace openspace { diff --git a/modules/base/dashboard/dashboarditemangle.cpp b/modules/base/dashboard/dashboarditemangle.cpp index d39bd100c2..038a6e26a8 100644 --- a/modules/base/dashboard/dashboarditemangle.cpp +++ b/modules/base/dashboard/dashboarditemangle.cpp @@ -26,18 +26,20 @@ #include #include -#include #include #include #include #include #include #include -#include -#include -#include +#include #include +#include #include +#include +#include +#include +#include namespace { enum Type { diff --git a/modules/base/dashboard/dashboarditemangle.h b/modules/base/dashboard/dashboarditemangle.h index cde4aedb8e..410fd5830a 100644 --- a/modules/base/dashboard/dashboarditemangle.h +++ b/modules/base/dashboard/dashboarditemangle.h @@ -35,8 +35,6 @@ namespace openspace { class SceneGraphNode; -namespace documentation { struct Documentation; } - class DashboardItemAngle : public DashboardTextItem { public: explicit DashboardItemAngle(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemcameraorientation.cpp b/modules/base/dashboard/dashboarditemcameraorientation.cpp index e4887ec377..7808790146 100644 --- a/modules/base/dashboard/dashboarditemcameraorientation.cpp +++ b/modules/base/dashboard/dashboarditemcameraorientation.cpp @@ -29,7 +29,9 @@ #include #include #include -#include +#include +#include +#include namespace { // This `DashboardItem` shows the current camera orientation in the yaw, pitch, and diff --git a/modules/base/dashboard/dashboarditemdate.cpp b/modules/base/dashboard/dashboarditemdate.cpp index 5f4287629d..ee88d71f14 100644 --- a/modules/base/dashboard/dashboarditemdate.cpp +++ b/modules/base/dashboard/dashboarditemdate.cpp @@ -25,15 +25,14 @@ #include #include -#include #include #include #include -#include -#include -#include +#include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { diff --git a/modules/base/dashboard/dashboarditemdate.h b/modules/base/dashboard/dashboarditemdate.h index d620f1f699..d465a3dcac 100644 --- a/modules/base/dashboard/dashboarditemdate.h +++ b/modules/base/dashboard/dashboarditemdate.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemDate : public DashboardTextItem { public: explicit DashboardItemDate(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemdistance.cpp b/modules/base/dashboard/dashboarditemdistance.cpp index 57d28fbf68..1f0eeb6aee 100644 --- a/modules/base/dashboard/dashboarditemdistance.cpp +++ b/modules/base/dashboard/dashboarditemdistance.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -34,11 +33,13 @@ #include #include #include -#include -#include -#include +#include #include +#include #include +#include +#include +#include namespace { enum Type { diff --git a/modules/base/dashboard/dashboarditemdistance.h b/modules/base/dashboard/dashboarditemdistance.h index cea0fd1966..3a81c6fc52 100644 --- a/modules/base/dashboard/dashboarditemdistance.h +++ b/modules/base/dashboard/dashboarditemdistance.h @@ -36,8 +36,6 @@ namespace openspace { class SceneGraphNode; -namespace documentation { struct Documentation; } - class DashboardItemDistance : public DashboardTextItem { public: explicit DashboardItemDistance(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemelapsedtime.cpp b/modules/base/dashboard/dashboarditemelapsedtime.cpp index 7595594b06..ed874ee38f 100644 --- a/modules/base/dashboard/dashboarditemelapsedtime.cpp +++ b/modules/base/dashboard/dashboarditemelapsedtime.cpp @@ -25,15 +25,15 @@ #include #include -#include #include -#include #include #include #include -#include -#include -#include +#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { diff --git a/modules/base/dashboard/dashboarditemelapsedtime.h b/modules/base/dashboard/dashboarditemelapsedtime.h index fecbab5712..b7c646754a 100644 --- a/modules/base/dashboard/dashboarditemelapsedtime.h +++ b/modules/base/dashboard/dashboarditemelapsedtime.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemElapsedTime : public DashboardTextItem { public: explicit DashboardItemElapsedTime(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemframerate.cpp b/modules/base/dashboard/dashboarditemframerate.cpp index 4b4c32d29e..c78b35de84 100644 --- a/modules/base/dashboard/dashboarditemframerate.cpp +++ b/modules/base/dashboard/dashboarditemframerate.cpp @@ -25,14 +25,14 @@ #include #include -#include #include #include -#include -#include -#include +#include +#include +#include #include #include +#include namespace { enum FrametimeType { diff --git a/modules/base/dashboard/dashboarditemframerate.h b/modules/base/dashboard/dashboarditemframerate.h index feaddb7075..c8ff593fe3 100644 --- a/modules/base/dashboard/dashboarditemframerate.h +++ b/modules/base/dashboard/dashboarditemframerate.h @@ -30,12 +30,8 @@ #include #include -namespace ghoul { class Dictionary; } - namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemFramerate : public DashboardTextItem { public: explicit DashboardItemFramerate(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditeminputstate.cpp b/modules/base/dashboard/dashboarditeminputstate.cpp index 89a68e4d18..7b082f7c8f 100644 --- a/modules/base/dashboard/dashboarditeminputstate.cpp +++ b/modules/base/dashboard/dashboarditeminputstate.cpp @@ -25,13 +25,13 @@ #include #include -#include #include #include -#include -#include -#include +#include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ShowWhenEnabledInfo = { diff --git a/modules/base/dashboard/dashboarditeminputstate.h b/modules/base/dashboard/dashboarditeminputstate.h index 84cdee23f3..734fb753f0 100644 --- a/modules/base/dashboard/dashboarditeminputstate.h +++ b/modules/base/dashboard/dashboarditeminputstate.h @@ -31,9 +31,6 @@ namespace openspace { -namespace properties { class Property; } -namespace documentation { struct Documentation; } - class DashboardItemInputState : public DashboardTextItem { public: explicit DashboardItemInputState(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemmission.cpp b/modules/base/dashboard/dashboarditemmission.cpp index 571773cb23..a831d86ec7 100644 --- a/modules/base/dashboard/dashboarditemmission.cpp +++ b/modules/base/dashboard/dashboarditemmission.cpp @@ -25,16 +25,18 @@ #include #include -#include #include #include #include #include #include -#include #include +#include +#include #include +#include #include +#include namespace { std::string progressToStr(int size, double t) { diff --git a/modules/base/dashboard/dashboarditemmission.h b/modules/base/dashboard/dashboarditemmission.h index 8a7c9a87db..fabb4326cf 100644 --- a/modules/base/dashboard/dashboarditemmission.h +++ b/modules/base/dashboard/dashboarditemmission.h @@ -29,8 +29,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemMission : public DashboardTextItem { public: explicit DashboardItemMission(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemparallelconnection.cpp b/modules/base/dashboard/dashboarditemparallelconnection.cpp index 6a15e397a4..3286fbaffd 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.cpp +++ b/modules/base/dashboard/dashboarditemparallelconnection.cpp @@ -25,13 +25,11 @@ #include #include -#include #include #include #include -#include -#include -#include +#include +#include #include namespace { @@ -44,6 +42,7 @@ namespace { // The information presented contains how many clients are connected to the same // session and whether this machine is currently the host of the session. struct [[codegen::Dictionary(DashboardItemParallelConnection)]] Parameters {}; + #include "dashboarditemparallelconnection_codegen.cpp" } // namespace diff --git a/modules/base/dashboard/dashboarditemparallelconnection.h b/modules/base/dashboard/dashboarditemparallelconnection.h index 6191a8e382..90c599a585 100644 --- a/modules/base/dashboard/dashboarditemparallelconnection.h +++ b/modules/base/dashboard/dashboarditemparallelconnection.h @@ -29,8 +29,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemParallelConnection : public DashboardTextItem { public: explicit DashboardItemParallelConnection(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditempropertyvalue.cpp b/modules/base/dashboard/dashboarditempropertyvalue.cpp index c88b0ad23b..4957588df0 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.cpp +++ b/modules/base/dashboard/dashboarditempropertyvalue.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -46,11 +46,11 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo PropertyUriInfo = { diff --git a/modules/base/dashboard/dashboarditempropertyvalue.h b/modules/base/dashboard/dashboarditempropertyvalue.h index e69ecd30ed..ad2d946b8d 100644 --- a/modules/base/dashboard/dashboarditempropertyvalue.h +++ b/modules/base/dashboard/dashboarditempropertyvalue.h @@ -33,8 +33,6 @@ namespace openspace { namespace properties { class Property; } -namespace documentation { struct Documentation; } - class DashboardItemPropertyValue : public DashboardTextItem { public: DashboardItemPropertyValue(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.cpp b/modules/base/dashboard/dashboarditemsimulationincrement.cpp index 52ee00caa6..e0ae86b24d 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.cpp +++ b/modules/base/dashboard/dashboarditemsimulationincrement.cpp @@ -25,15 +25,16 @@ #include #include -#include #include #include #include -#include -#include -#include +#include #include +#include #include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = { diff --git a/modules/base/dashboard/dashboarditemsimulationincrement.h b/modules/base/dashboard/dashboarditemsimulationincrement.h index 3354a9a5ff..3252fbd094 100644 --- a/modules/base/dashboard/dashboarditemsimulationincrement.h +++ b/modules/base/dashboard/dashboarditemsimulationincrement.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemSimulationIncrement : public DashboardTextItem { public: explicit DashboardItemSimulationIncrement(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemspacing.cpp b/modules/base/dashboard/dashboarditemspacing.cpp index 0d7809494c..0e8b287c3a 100644 --- a/modules/base/dashboard/dashboarditemspacing.cpp +++ b/modules/base/dashboard/dashboarditemspacing.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include namespace { diff --git a/modules/base/dashboard/dashboarditemspacing.h b/modules/base/dashboard/dashboarditemspacing.h index 0fe59e4a34..b40977ee18 100644 --- a/modules/base/dashboard/dashboarditemspacing.h +++ b/modules/base/dashboard/dashboarditemspacing.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemSpacing : public DashboardItem { public: explicit DashboardItemSpacing(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemtext.cpp b/modules/base/dashboard/dashboarditemtext.cpp index 1000e830e1..6bcb6f306c 100644 --- a/modules/base/dashboard/dashboarditemtext.cpp +++ b/modules/base/dashboard/dashboarditemtext.cpp @@ -25,10 +25,7 @@ #include #include -#include -#include -#include -#include +#include #include namespace { diff --git a/modules/base/dashboard/dashboarditemtext.h b/modules/base/dashboard/dashboarditemtext.h index 02fee87f81..783a954a88 100644 --- a/modules/base/dashboard/dashboarditemtext.h +++ b/modules/base/dashboard/dashboarditemtext.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemText : public DashboardTextItem { public: explicit DashboardItemText(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemtimevaryingtext.cpp b/modules/base/dashboard/dashboarditemtimevaryingtext.cpp index 98671ceaa9..e3f2b0cc47 100644 --- a/modules/base/dashboard/dashboarditemtimevaryingtext.cpp +++ b/modules/base/dashboard/dashboarditemtimevaryingtext.cpp @@ -25,13 +25,18 @@ #include #include -#include #include -#include +#include #include -#include +#include #include +#include +#include +#include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { diff --git a/modules/base/dashboard/dashboarditemtimevaryingtext.h b/modules/base/dashboard/dashboarditemtimevaryingtext.h index 80a4f330de..2225ce493b 100644 --- a/modules/base/dashboard/dashboarditemtimevaryingtext.h +++ b/modules/base/dashboard/dashboarditemtimevaryingtext.h @@ -27,13 +27,12 @@ #include -#include #include +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemTimeVaryingText : public DashboardTextItem { public: explicit DashboardItemTimeVaryingText(const ghoul::Dictionary& dictionary); diff --git a/modules/base/dashboard/dashboarditemvelocity.cpp b/modules/base/dashboard/dashboarditemvelocity.cpp index aa0556ee5f..be19e5b121 100644 --- a/modules/base/dashboard/dashboarditemvelocity.cpp +++ b/modules/base/dashboard/dashboarditemvelocity.cpp @@ -26,16 +26,16 @@ #include #include -#include #include #include #include #include -#include #include -#include -#include +#include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo SimplificationInfo = { diff --git a/modules/base/dashboard/dashboarditemvelocity.h b/modules/base/dashboard/dashboarditemvelocity.h index caf2d5c660..f5fdf17cdb 100644 --- a/modules/base/dashboard/dashboarditemvelocity.h +++ b/modules/base/dashboard/dashboarditemvelocity.h @@ -29,14 +29,9 @@ #include #include -#include namespace openspace { -class SceneGraphNode; - -namespace documentation { struct Documentation; } - class DashboardItemVelocity : public DashboardTextItem { public: explicit DashboardItemVelocity(const ghoul::Dictionary& dictionary); diff --git a/modules/base/lightsource/cameralightsource.cpp b/modules/base/lightsource/cameralightsource.cpp index 07d4a4ff13..0bebb4c7fa 100644 --- a/modules/base/lightsource/cameralightsource.cpp +++ b/modules/base/lightsource/cameralightsource.cpp @@ -25,8 +25,8 @@ #include #include -#include #include +#include #include namespace { diff --git a/modules/base/lightsource/cameralightsource.h b/modules/base/lightsource/cameralightsource.h index c3ccad79a7..b09c4bd16f 100644 --- a/modules/base/lightsource/cameralightsource.h +++ b/modules/base/lightsource/cameralightsource.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class CameraLightSource : public LightSource { public: explicit CameraLightSource(const ghoul::Dictionary& dictionary); diff --git a/modules/base/lightsource/scenegraphlightsource.cpp b/modules/base/lightsource/scenegraphlightsource.cpp index 56c2438614..fda3b79e89 100644 --- a/modules/base/lightsource/scenegraphlightsource.cpp +++ b/modules/base/lightsource/scenegraphlightsource.cpp @@ -25,11 +25,11 @@ #include #include -#include #include #include #include #include +#include #include #include diff --git a/modules/base/lightsource/scenegraphlightsource.h b/modules/base/lightsource/scenegraphlightsource.h index 1259ca66ca..4948b007a1 100644 --- a/modules/base/lightsource/scenegraphlightsource.h +++ b/modules/base/lightsource/scenegraphlightsource.h @@ -32,7 +32,7 @@ namespace openspace { -namespace documentation { struct Documentation; } +class SceneGraphNode; class SceneGraphLightSource : public LightSource { public: diff --git a/modules/base/rendering/grids/renderableboxgrid.cpp b/modules/base/rendering/grids/renderableboxgrid.cpp index 6a82d972cf..0991c8f6c1 100644 --- a/modules/base/rendering/grids/renderableboxgrid.cpp +++ b/modules/base/rendering/grids/renderableboxgrid.cpp @@ -25,15 +25,16 @@ #include #include +#include #include -#include #include #include -#include -#include #include +#include +#include #include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ColorInfo = { diff --git a/modules/base/rendering/grids/renderableboxgrid.h b/modules/base/rendering/grids/renderableboxgrid.h index 12b9ee7ac1..8157cf992e 100644 --- a/modules/base/rendering/grids/renderableboxgrid.h +++ b/modules/base/rendering/grids/renderableboxgrid.h @@ -31,12 +31,6 @@ #include #include -namespace ghoul::opengl { - class ProgramObject; -} // namespace ghoul::opengl - -namespace openspace::documentation { struct Documentation; } - namespace openspace { class RenderableBoxGrid : public Renderable { diff --git a/modules/base/rendering/grids/renderablegrid.cpp b/modules/base/rendering/grids/renderablegrid.cpp index a66e631600..e0c5ee5c93 100644 --- a/modules/base/rendering/grids/renderablegrid.cpp +++ b/modules/base/rendering/grids/renderablegrid.cpp @@ -25,15 +25,17 @@ #include #include -#include +#include #include -#include #include #include #include #include +#include #include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ColorInfo = { diff --git a/modules/base/rendering/grids/renderablegrid.h b/modules/base/rendering/grids/renderablegrid.h index 3173ee10c2..1b713b95a7 100644 --- a/modules/base/rendering/grids/renderablegrid.h +++ b/modules/base/rendering/grids/renderablegrid.h @@ -27,16 +27,13 @@ #include -#include #include #include #include #include #include #include - -namespace ghoul::opengl { class ProgramObject; } -namespace openspace::documentation { struct Documentation; } +#include namespace openspace { diff --git a/modules/base/rendering/grids/renderableradialgrid.cpp b/modules/base/rendering/grids/renderableradialgrid.cpp index 2683aecbbb..cdec94acb6 100644 --- a/modules/base/rendering/grids/renderableradialgrid.cpp +++ b/modules/base/rendering/grids/renderableradialgrid.cpp @@ -26,15 +26,18 @@ #include #include +#include #include +#include #include #include -#include #include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ColorInfo = { diff --git a/modules/base/rendering/grids/renderableradialgrid.h b/modules/base/rendering/grids/renderableradialgrid.h index cc9a8db7bf..5fb5525483 100644 --- a/modules/base/rendering/grids/renderableradialgrid.h +++ b/modules/base/rendering/grids/renderableradialgrid.h @@ -35,10 +35,7 @@ #include #include #include - -namespace ghoul::opengl { class ProgramObject; } - -namespace openspace::documentation { struct Documentation; } +#include namespace openspace { @@ -93,6 +90,6 @@ protected: std::unique_ptr _labels; }; -}// namespace openspace +} // namespace openspace #endif // __OPENSPACE_MODULE_BASE___RENDERABLERADIALGRID___H__ diff --git a/modules/base/rendering/grids/renderablesphericalgrid.cpp b/modules/base/rendering/grids/renderablesphericalgrid.cpp index 668979ab36..8c5ee80c90 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.cpp +++ b/modules/base/rendering/grids/renderablesphericalgrid.cpp @@ -25,14 +25,18 @@ #include #include +#include #include #include #include -#include #include #include +#include #include #include +#include +#include +#include #include namespace { diff --git a/modules/base/rendering/grids/renderablesphericalgrid.h b/modules/base/rendering/grids/renderablesphericalgrid.h index 3f24f9d331..ef5d4fe773 100644 --- a/modules/base/rendering/grids/renderablesphericalgrid.h +++ b/modules/base/rendering/grids/renderablesphericalgrid.h @@ -32,13 +32,10 @@ #include #include #include - -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableSphericalGrid : public Renderable { public: explicit RenderableSphericalGrid(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp index 9f0be053e6..d913e5c39a 100644 --- a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp +++ b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp @@ -30,12 +30,14 @@ #include #include #include +#include #include #include -#include +#include +#include #include -#include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableInterpolatedPoints"; diff --git a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.h b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.h index 97bb597b4b..60482391ed 100644 --- a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.h +++ b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.h @@ -31,15 +31,12 @@ #include #include #include - -namespace ghoul::opengl { class Texture; } +#include namespace openspace { -namespace documentation { struct Documentation; } - /** - * A specialization of the RenderablePointCloud that supports interpolation beetween + * A specialization of the RenderablePointCloud that supports interpolation between * different positions for the points. */ class RenderableInterpolatedPoints : public RenderablePointCloud { diff --git a/modules/base/rendering/pointcloud/renderablepointcloud.cpp b/modules/base/rendering/pointcloud/renderablepointcloud.cpp index f0db1b28a1..9d3ab6d46e 100644 --- a/modules/base/rendering/pointcloud/renderablepointcloud.cpp +++ b/modules/base/rendering/pointcloud/renderablepointcloud.cpp @@ -25,35 +25,32 @@ #include #include +#include #include -#include #include -#include #include -#include +#include #include +#include #include #include #include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include #include -#include -#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderablePointCloud"; diff --git a/modules/base/rendering/pointcloud/renderablepointcloud.h b/modules/base/rendering/pointcloud/renderablepointcloud.h index df3419492f..3bb2673a15 100644 --- a/modules/base/rendering/pointcloud/renderablepointcloud.h +++ b/modules/base/rendering/pointcloud/renderablepointcloud.h @@ -28,32 +28,28 @@ #include #include +#include +#include #include #include -#include #include #include #include -#include #include #include #include #include #include +#include #include +#include #include #include -#include - -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - struct TextureFormat { glm::uvec2 resolution; bool useAlpha = false; @@ -157,7 +153,7 @@ protected: void renderPoints(const RenderData& data, const glm::dmat4& modelMatrix, const glm::dvec3& orthoRight, const glm::dvec3& orthoUp, float fadeInVariable); - gl::GLenum internalGlFormat(bool useAlpha) const; + GLenum internalGlFormat(bool useAlpha) const; ghoul::opengl::Texture::Format glFormat(bool useAlpha) const; bool _dataIsDirty = true; diff --git a/modules/base/rendering/pointcloud/renderablepolygoncloud.cpp b/modules/base/rendering/pointcloud/renderablepolygoncloud.cpp index f69a9ba302..f901c5b4d2 100644 --- a/modules/base/rendering/pointcloud/renderablepolygoncloud.cpp +++ b/modules/base/rendering/pointcloud/renderablepolygoncloud.cpp @@ -26,11 +26,12 @@ #include #include -#include #include +#include +#include #include -#include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderablePolygonCloud"; diff --git a/modules/base/rendering/pointcloud/renderablepolygoncloud.h b/modules/base/rendering/pointcloud/renderablepolygoncloud.h index 13cf5a8aa2..681b0b6635 100644 --- a/modules/base/rendering/pointcloud/renderablepolygoncloud.h +++ b/modules/base/rendering/pointcloud/renderablepolygoncloud.h @@ -27,17 +27,11 @@ #include -#include - -namespace ghoul::opengl { class Texture; } - namespace openspace { -namespace documentation { struct Documentation; } - /** * A billboarded point cloud, but with dynamically created uniform polygon shapes instead - * of a custom texture. Overwrites the sprite set in parent class, RenderablePointCloud + * of a custom texture. Overwrites the sprite set in parent class, RenderablePointCloud. */ class RenderablePolygonCloud : public RenderablePointCloud { public: diff --git a/modules/base/rendering/pointcloud/sizemappingcomponent.cpp b/modules/base/rendering/pointcloud/sizemappingcomponent.cpp index c5bf3ea1a9..1e965666dd 100644 --- a/modules/base/rendering/pointcloud/sizemappingcomponent.cpp +++ b/modules/base/rendering/pointcloud/sizemappingcomponent.cpp @@ -27,6 +27,10 @@ #include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "SizeMapping"; diff --git a/modules/base/rendering/pointcloud/sizemappingcomponent.h b/modules/base/rendering/pointcloud/sizemappingcomponent.h index 3da60e6620..0223dc6d1e 100644 --- a/modules/base/rendering/pointcloud/sizemappingcomponent.h +++ b/modules/base/rendering/pointcloud/sizemappingcomponent.h @@ -31,6 +31,8 @@ #include #include +namespace ghoul { class Dictionary; } + namespace openspace { namespace documentation { struct Documentation; } diff --git a/modules/base/rendering/renderablecartesianaxes.cpp b/modules/base/rendering/renderablecartesianaxes.cpp index 71fbc85bee..2eb30818d7 100644 --- a/modules/base/rendering/renderablecartesianaxes.cpp +++ b/modules/base/rendering/renderablecartesianaxes.cpp @@ -25,16 +25,17 @@ #include #include +#include #include #include -#include #include -#include #include #include +#include #include #include -#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo XColorInfo = { diff --git a/modules/base/rendering/renderablecartesianaxes.h b/modules/base/rendering/renderablecartesianaxes.h index fadf761f03..89ebd158ac 100644 --- a/modules/base/rendering/renderablecartesianaxes.h +++ b/modules/base/rendering/renderablecartesianaxes.h @@ -27,17 +27,9 @@ #include -#include -#include -#include -#include #include #include -namespace ghoul::opengl { class ProgramObject; } - -namespace openspace::documentation { struct Documentation; } - namespace openspace { class RenderableCartesianAxes : public Renderable { diff --git a/modules/base/rendering/renderabledisc.cpp b/modules/base/rendering/renderabledisc.cpp index 97d521b8aa..40e16c5b24 100644 --- a/modules/base/rendering/renderabledisc.cpp +++ b/modules/base/rendering/renderabledisc.cpp @@ -25,15 +25,14 @@ #include #include -#include #include #include -#include #include #include -#include +#include #include #include +#include #include #include #include diff --git a/modules/base/rendering/renderabledisc.h b/modules/base/rendering/renderabledisc.h index 588c64cc69..dd8f88db19 100644 --- a/modules/base/rendering/renderabledisc.h +++ b/modules/base/rendering/renderabledisc.h @@ -32,15 +32,10 @@ #include #include #include -#include - -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableDisc : public Renderable { public: explicit RenderableDisc(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderabledistancelabel.cpp b/modules/base/rendering/renderabledistancelabel.cpp index 2a93a3a850..c14f45d75f 100644 --- a/modules/base/rendering/renderabledistancelabel.cpp +++ b/modules/base/rendering/renderabledistancelabel.cpp @@ -26,14 +26,13 @@ #include #include -#include #include #include #include #include +#include #include -#include -#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableDistanceLabel"; diff --git a/modules/base/rendering/renderabledistancelabel.h b/modules/base/rendering/renderabledistancelabel.h index a79c85d527..2d525e2104 100644 --- a/modules/base/rendering/renderabledistancelabel.h +++ b/modules/base/rendering/renderabledistancelabel.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class RenderableDistanceLabel : public RenderableLabel { public: explicit RenderableDistanceLabel(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderablelabel.cpp b/modules/base/rendering/renderablelabel.cpp index 2a56a59abb..15d24de5c6 100644 --- a/modules/base/rendering/renderablelabel.cpp +++ b/modules/base/rendering/renderablelabel.cpp @@ -24,28 +24,19 @@ #include -#include #include -#include #include #include -#include #include #include -#include #include #include -#include -#include -#include -#include +#include +#include #include -#include #include -#include -#include -#include -#include +#include +#include #include namespace { diff --git a/modules/base/rendering/renderablelabel.h b/modules/base/rendering/renderablelabel.h index c931d65b94..8dae1d00b9 100644 --- a/modules/base/rendering/renderablelabel.h +++ b/modules/base/rendering/renderablelabel.h @@ -34,26 +34,12 @@ #include #include #include +#include -#include -#include - -namespace ghoul::filesystem { class File; } namespace ghoul::fontrendering { class Font; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - -struct LinePoint; - class RenderableLabel : public Renderable { public: explicit RenderableLabel(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index d7a9e281e1..e8723ad4a1 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -35,19 +34,28 @@ #include #include #include -#include #include +#include #include +#include #include #include -#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableModel"; diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index bc1aae8cf4..1430a093fc 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -26,33 +26,22 @@ #define __OPENSPACE_MODULE_BASE___RENDERABLEMODEL___H__ #include + #include -#include #include -#include #include +#include #include #include -#include -#include #include #include -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl - namespace ghoul::modelgeometry { class ModelGeometry; } namespace openspace { -struct RenderData; -struct UpdateData; class LightSource; -namespace documentation { struct Documentation; } - class RenderableModel : public Renderable { public: explicit RenderableModel(const ghoul::Dictionary& dictionary); @@ -107,12 +96,12 @@ private: std::filesystem::path _fragmentShaderPath; ghoul::opengl::ProgramObject* _program = nullptr; UniformCache(modelViewTransform, projectionTransform, normalTransform, meshTransform, - meshNormalTransform, ambientIntensity, diffuseIntensity, - specularIntensity, performShading, use_forced_color, has_texture_diffuse, - has_texture_normal, has_texture_specular, has_color_specular, - texture_diffuse, texture_normal, texture_specular, color_diffuse, - color_specular, opacity, nLightSources, lightDirectionsViewSpace, - lightIntensities, performManualDepthTest, gBufferDepthTexture, resolution + meshNormalTransform, ambientIntensity, diffuseIntensity, specularIntensity, + performShading, use_forced_color, has_texture_diffuse, has_texture_normal, + has_texture_specular, has_color_specular, texture_diffuse, texture_normal, + texture_specular, color_diffuse, color_specular, opacity, nLightSources, + lightDirectionsViewSpace, lightIntensities, performManualDepthTest, + gBufferDepthTexture, resolution ) _uniformCache; std::vector> _lightSources; diff --git a/modules/base/rendering/renderablenodearrow.cpp b/modules/base/rendering/renderablenodearrow.cpp index e66e2ef236..08728998cf 100644 --- a/modules/base/rendering/renderablenodearrow.cpp +++ b/modules/base/rendering/renderablenodearrow.cpp @@ -25,22 +25,23 @@ #include #include -#include +#include #include -#include -#include #include #include #include -#include -#include #include +#include #include +#include #include +#include #include #include -#include -#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableNodeArrow"; diff --git a/modules/base/rendering/renderablenodearrow.h b/modules/base/rendering/renderablenodearrow.h index d08d6fcd32..94ead7aa3d 100644 --- a/modules/base/rendering/renderablenodearrow.h +++ b/modules/base/rendering/renderablenodearrow.h @@ -27,20 +27,15 @@ #include +#include #include #include #include #include -#include #include -namespace ghoul::opengl { class ProgramObject; } - namespace openspace { -namespace documentation { struct Documentation; } -class Translation; - /** * Generates an arrow shape that points from the start node to the end node. */ diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index 588434ec64..b0fd5a8133 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -25,18 +25,20 @@ #include #include -#include +#include #include #include #include #include #include -#include #include #include +#include #include +#include #include #include +#include namespace { constexpr std::string_view _loggerCat = "RenderableNodeLine"; diff --git a/modules/base/rendering/renderablenodeline.h b/modules/base/rendering/renderablenodeline.h index 71588fb168..8a6846e07d 100644 --- a/modules/base/rendering/renderablenodeline.h +++ b/modules/base/rendering/renderablenodeline.h @@ -27,21 +27,17 @@ #include +#include #include #include #include -#include #include - -namespace ghoul::opengl { class ProgramObject; } -namespace openspace::documentation { struct Documentation; } +#include namespace openspace { -class Translation; - /** - * This is a class for a line that is drawn between two nodes in OpenSpace. + * This is a class for a line that is drawn between two nodes. */ class RenderableNodeLine : public Renderable { public: diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 0b7731e4a8..e583b24aad 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -26,19 +26,24 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace { diff --git a/modules/base/rendering/renderableplane.h b/modules/base/rendering/renderableplane.h index 70e34f80ec..f6132e9903 100644 --- a/modules/base/rendering/renderableplane.h +++ b/modules/base/rendering/renderableplane.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -35,20 +36,8 @@ namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl - namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - -struct LinePoint; - class RenderablePlane : public Renderable { public: explicit RenderablePlane(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderableplaneimagelocal.cpp b/modules/base/rendering/renderableplaneimagelocal.cpp index 02a95c8ba9..64242bdf1e 100644 --- a/modules/base/rendering/renderableplaneimagelocal.cpp +++ b/modules/base/rendering/renderableplaneimagelocal.cpp @@ -26,16 +26,18 @@ #include #include -#include #include #include +#include #include #include #include +#include #include #include -#include -#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/base/rendering/renderableplaneimagelocal.h b/modules/base/rendering/renderableplaneimagelocal.h index e41d2f61b6..7a27ffc571 100644 --- a/modules/base/rendering/renderableplaneimagelocal.h +++ b/modules/base/rendering/renderableplaneimagelocal.h @@ -27,16 +27,11 @@ #include -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class Texture; } +#include +#include namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderablePlaneImageLocal : public RenderablePlane { public: explicit RenderablePlaneImageLocal(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderableplaneimageonline.cpp b/modules/base/rendering/renderableplaneimageonline.cpp index 9f119d78e7..25b47be4b0 100644 --- a/modules/base/rendering/renderableplaneimageonline.cpp +++ b/modules/base/rendering/renderableplaneimageonline.cpp @@ -25,13 +25,16 @@ #include #include -#include #include -#include +#include #include #include +#include #include -#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/base/rendering/renderableplaneimageonline.h b/modules/base/rendering/renderableplaneimageonline.h index 1f17977536..a94929e774 100644 --- a/modules/base/rendering/renderableplaneimageonline.h +++ b/modules/base/rendering/renderableplaneimageonline.h @@ -28,17 +28,12 @@ #include #include - -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class Texture; } +#include +#include +#include namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderablePlaneImageOnline : public RenderablePlane { public: explicit RenderablePlaneImageOnline(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderableplanetimevaryingimage.cpp b/modules/base/rendering/renderableplanetimevaryingimage.cpp index 241a9d9d47..c32d04e770 100644 --- a/modules/base/rendering/renderableplanetimevaryingimage.cpp +++ b/modules/base/rendering/renderableplanetimevaryingimage.cpp @@ -26,16 +26,16 @@ #include #include -#include -#include -#include -#include -#include +#include #include #include +#include #include #include -#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderablePlaneTimeVaryingImage"; diff --git a/modules/base/rendering/renderableplanetimevaryingimage.h b/modules/base/rendering/renderableplanetimevaryingimage.h index dc1ca2001f..ed14a3474f 100644 --- a/modules/base/rendering/renderableplanetimevaryingimage.h +++ b/modules/base/rendering/renderableplanetimevaryingimage.h @@ -27,18 +27,13 @@ #include +#include #include - -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class Texture; } +#include +#include namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderablePlaneTimeVaryingImage : public RenderablePlane { public: explicit RenderablePlaneTimeVaryingImage(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderableprism.cpp b/modules/base/rendering/renderableprism.cpp index 7d2c857b5e..47fd98d282 100644 --- a/modules/base/rendering/renderableprism.cpp +++ b/modules/base/rendering/renderableprism.cpp @@ -25,15 +25,17 @@ #include #include -#include #include #include #include #include #include -#include +#include +#include +#include #include #include +#include #include namespace { diff --git a/modules/base/rendering/renderableprism.h b/modules/base/rendering/renderableprism.h index 4005ea59d8..e26edfb9be 100644 --- a/modules/base/rendering/renderableprism.h +++ b/modules/base/rendering/renderableprism.h @@ -32,14 +32,11 @@ #include #include #include -#include - -namespace ghoul::opengl { class ProgramObject; } +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderablePrism : public Renderable { public: explicit RenderablePrism(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 16728b1ae4..1f09a62cff 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -26,17 +26,24 @@ #include #include -#include #include #include #include #include #include +#include #include #include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include namespace { diff --git a/modules/base/rendering/renderablesphere.h b/modules/base/rendering/renderablesphere.h index 470dde39b5..56a964e807 100644 --- a/modules/base/rendering/renderablesphere.h +++ b/modules/base/rendering/renderablesphere.h @@ -28,20 +28,17 @@ #include #include -#include +#include +#include +#include +#include #include +#include #include - -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { -class Sphere; -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderableSphere : public Renderable { public: explicit RenderableSphere(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderablesphereimagelocal.cpp b/modules/base/rendering/renderablesphereimagelocal.cpp index 8a2acad954..2f165a5817 100644 --- a/modules/base/rendering/renderablesphereimagelocal.cpp +++ b/modules/base/rendering/renderablesphereimagelocal.cpp @@ -25,12 +25,9 @@ #include #include -#include -#include -#include -#include +#include #include -#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/base/rendering/renderablesphereimagelocal.h b/modules/base/rendering/renderablesphereimagelocal.h index 3117a54468..34b02da986 100644 --- a/modules/base/rendering/renderablesphereimagelocal.h +++ b/modules/base/rendering/renderablesphereimagelocal.h @@ -27,17 +27,11 @@ #include +#include #include -namespace ghoul::opengl { class Texture; } - namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderableSphereImageLocal : public RenderableSphere { public: explicit RenderableSphereImageLocal(const ghoul::Dictionary& dictionary); @@ -56,7 +50,6 @@ protected: void bindTexture() override; private: - properties::StringProperty _texturePath; std::unique_ptr _texture; diff --git a/modules/base/rendering/renderablesphereimageonline.cpp b/modules/base/rendering/renderablesphereimageonline.cpp index 1afe4900f5..5620e59883 100644 --- a/modules/base/rendering/renderablesphereimageonline.cpp +++ b/modules/base/rendering/renderablesphereimageonline.cpp @@ -25,13 +25,14 @@ #include #include -#include +#include #include -#include -#include +#include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/base/rendering/renderablesphereimageonline.h b/modules/base/rendering/renderablesphereimageonline.h index e2a6e4f7e0..c6bc4efabd 100644 --- a/modules/base/rendering/renderablesphereimageonline.h +++ b/modules/base/rendering/renderablesphereimageonline.h @@ -28,18 +28,13 @@ #include #include - -namespace ghoul::opengl { class Texture; } +#include +#include namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - /** - * This class describes a sphere renderable that displays an image from an online source + * This class describes a sphere renderable that displays an image from an online source. */ class RenderableSphereImageOnline : public RenderableSphere { public: diff --git a/modules/base/rendering/renderableswitch.cpp b/modules/base/rendering/renderableswitch.cpp index dacf889e89..844bb14fc9 100644 --- a/modules/base/rendering/renderableswitch.cpp +++ b/modules/base/rendering/renderableswitch.cpp @@ -24,18 +24,11 @@ #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include namespace { diff --git a/modules/base/rendering/renderableswitch.h b/modules/base/rendering/renderableswitch.h index 48b8eda97d..e325e92b08 100644 --- a/modules/base/rendering/renderableswitch.h +++ b/modules/base/rendering/renderableswitch.h @@ -27,13 +27,10 @@ #include +#include + namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderableSwitch : public Renderable { public: explicit RenderableSwitch(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/renderabletimevaryingsphere.cpp b/modules/base/rendering/renderabletimevaryingsphere.cpp index 168c97de13..cd4e0060a7 100644 --- a/modules/base/rendering/renderabletimevaryingsphere.cpp +++ b/modules/base/rendering/renderabletimevaryingsphere.cpp @@ -25,13 +25,15 @@ #include #include -#include -#include +#include #include #include #include -#include #include +#include +#include +#include +#include namespace { // Extract J2000 time from file names diff --git a/modules/base/rendering/renderabletimevaryingsphere.h b/modules/base/rendering/renderabletimevaryingsphere.h index 5bb35a6d92..39f80d5329 100644 --- a/modules/base/rendering/renderabletimevaryingsphere.h +++ b/modules/base/rendering/renderabletimevaryingsphere.h @@ -27,17 +27,14 @@ #include +#include #include +#include namespace ghoul::opengl { class Texture; } namespace openspace { -struct RenderData; -struct UpdateData; - -namespace documentation { struct Documentation; } - class RenderableTimeVaryingSphere : public RenderableSphere { public: explicit RenderableTimeVaryingSphere(const ghoul::Dictionary& dictionary); @@ -59,10 +56,12 @@ private: double time; std::unique_ptr texture; }; + void loadTexture(); void extractMandatoryInfoFromSourceFolder(); void updateActiveTriggerTimeIndex(double currenttime); void computeSequenceEndTime(); + // If there's just one state it should never disappear! double _sequenceEndTime = std::numeric_limits::max(); std::vector _files; diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 0216e9ddfa..daed2265b7 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -26,16 +26,21 @@ #include #include -#include #include #include #include +#include #include #include +#include +#include #include #include #include +#include +#include #include +#include #include namespace { diff --git a/modules/base/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h index a9683b4c8b..cdc8eeaee5 100644 --- a/modules/base/rendering/renderabletrail.h +++ b/modules/base/rendering/renderabletrail.h @@ -28,26 +28,16 @@ #include #include -#include #include #include #include -#include #include -#include #include #include #include -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl - namespace openspace { -namespace documentation { struct Documentation; } - class Translation; /** diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index f4cb5c151f..c8c99988f6 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -25,19 +25,17 @@ #include #include -#include #include #include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include // This class is using a VBO ring buffer + a constantly updated point as follows: // Structure of the array with a _resolution of 16. FF denotes the floating position that diff --git a/modules/base/rendering/renderabletrailorbit.h b/modules/base/rendering/renderabletrailorbit.h index 9864373f15..9996549079 100644 --- a/modules/base/rendering/renderabletrailorbit.h +++ b/modules/base/rendering/renderabletrailorbit.h @@ -32,8 +32,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - /** * This concrete implementation of a RenderableTrail renders an updated trail behind an * object that is likely to have an orbit-like path. However, this is not required and diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 990f33c1fb..89efa6cb8b 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -25,11 +25,15 @@ #include #include -#include #include #include +#include #include #include +#include +#include +#include +#include #include // This class creates the entire trajectory at once and keeps it in memory the entire diff --git a/modules/base/rendering/renderabletrailtrajectory.h b/modules/base/rendering/renderabletrailtrajectory.h index c23971c272..31adcbd265 100644 --- a/modules/base/rendering/renderabletrailtrajectory.h +++ b/modules/base/rendering/renderabletrailtrajectory.h @@ -31,12 +31,9 @@ #include #include #include -#include namespace openspace { -namespace documentation { struct Documentation; } - /** * This concrete implementation of a RenderableTrail renders a fixed trail, regardless of * its shape. The trail is sampled equitemporal (with an interval of _sampleInterval in diff --git a/modules/base/rendering/screenspacedashboard.cpp b/modules/base/rendering/screenspacedashboard.cpp index 2492f87fc4..2246d68038 100644 --- a/modules/base/rendering/screenspacedashboard.cpp +++ b/modules/base/rendering/screenspacedashboard.cpp @@ -25,16 +25,15 @@ #include #include -#include #include #include -#include #include #include -#include -#include -#include +#include +#include +#include #include +#include #include "screenspacedashboard_lua.inl" diff --git a/modules/base/rendering/screenspacedashboard.h b/modules/base/rendering/screenspacedashboard.h index 21579a4a54..f3920d3716 100644 --- a/modules/base/rendering/screenspacedashboard.h +++ b/modules/base/rendering/screenspacedashboard.h @@ -30,14 +30,8 @@ #include #include -namespace ghoul::fontrendering { - class Font; - class FontRenderer; -} // namespace ghoul::fontrendering - namespace openspace { -namespace documentation { struct Documentation; } namespace scripting { struct LuaLibrary; } class ScreenSpaceDashboard : public ScreenSpaceRenderableFramebuffer { diff --git a/modules/base/rendering/screenspacedashboard_lua.inl b/modules/base/rendering/screenspacedashboard_lua.inl index f448e740a7..fc4f80a705 100644 --- a/modules/base/rendering/screenspacedashboard_lua.inl +++ b/modules/base/rendering/screenspacedashboard_lua.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include namespace { diff --git a/modules/base/rendering/screenspacedate.cpp b/modules/base/rendering/screenspacedate.cpp index a4fd2aaf0e..70381151a8 100644 --- a/modules/base/rendering/screenspacedate.cpp +++ b/modules/base/rendering/screenspacedate.cpp @@ -24,12 +24,15 @@ #include +#include +#include #include #include #include +#include #include -#include -#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { diff --git a/modules/base/rendering/screenspaceimagelocal.cpp b/modules/base/rendering/screenspaceimagelocal.cpp index c3807618b0..2cb3556d29 100644 --- a/modules/base/rendering/screenspaceimagelocal.cpp +++ b/modules/base/rendering/screenspaceimagelocal.cpp @@ -25,15 +25,15 @@ #include #include -#include #include +#include #include #include -#include +#include #include -#include #include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TexturePathInfo = { diff --git a/modules/base/rendering/screenspaceimagelocal.h b/modules/base/rendering/screenspaceimagelocal.h index f829a0505f..d9bcd1619c 100644 --- a/modules/base/rendering/screenspaceimagelocal.h +++ b/modules/base/rendering/screenspaceimagelocal.h @@ -33,8 +33,6 @@ namespace ghoul::opengl { class Texture; } namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceImageLocal : public ScreenSpaceRenderable { public: explicit ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/screenspaceimageonline.cpp b/modules/base/rendering/screenspaceimageonline.cpp index 76eb5dd421..8b3058b03f 100644 --- a/modules/base/rendering/screenspaceimageonline.cpp +++ b/modules/base/rendering/screenspaceimageonline.cpp @@ -25,15 +25,15 @@ #include #include -#include #include #include -#include +#include #include #include #include -#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "ScreenSpaceImageOnline"; diff --git a/modules/base/rendering/screenspaceimageonline.h b/modules/base/rendering/screenspaceimageonline.h index 23fd1a6f81..5a3f298dd4 100644 --- a/modules/base/rendering/screenspaceimageonline.h +++ b/modules/base/rendering/screenspaceimageonline.h @@ -29,13 +29,12 @@ #include #include +#include namespace ghoul::opengl { class Texture; } namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceImageOnline : public ScreenSpaceRenderable { public: explicit ScreenSpaceImageOnline(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/screenspaceinsetblackout.cpp b/modules/base/rendering/screenspaceinsetblackout.cpp index bcf156a9bf..3a736eaca7 100644 --- a/modules/base/rendering/screenspaceinsetblackout.cpp +++ b/modules/base/rendering/screenspaceinsetblackout.cpp @@ -23,19 +23,25 @@ ****************************************************************************************/ #include -#include +#include #include -#include #include -#include -#include -#include #include #include +#include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr glm::uvec2 BlackoutTextureSize = glm::uvec2(3840, 2160); diff --git a/modules/base/rendering/screenspaceinsetblackout.h b/modules/base/rendering/screenspaceinsetblackout.h index 3ca71e64b8..c96e81b479 100644 --- a/modules/base/rendering/screenspaceinsetblackout.h +++ b/modules/base/rendering/screenspaceinsetblackout.h @@ -28,12 +28,15 @@ #include #include +#include +#include +#include #include +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceInsetBlackout : public ScreenSpaceRenderable { public: explicit ScreenSpaceInsetBlackout(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rendering/screenspacerenderablerenderable.cpp b/modules/base/rendering/screenspacerenderablerenderable.cpp index 48927938c9..434fef691a 100644 --- a/modules/base/rendering/screenspacerenderablerenderable.cpp +++ b/modules/base/rendering/screenspacerenderablerenderable.cpp @@ -25,11 +25,17 @@ #include #include +#include #include #include #include #include +#include #include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TimeInfo = { diff --git a/modules/base/rendering/screenspacerenderablerenderable.h b/modules/base/rendering/screenspacerenderablerenderable.h index 7905eee1fe..2f39dda1cd 100644 --- a/modules/base/rendering/screenspacerenderablerenderable.h +++ b/modules/base/rendering/screenspacerenderablerenderable.h @@ -27,26 +27,20 @@ #include -#include #include #include #include +#include namespace openspace { -namespace properties { class PropertyOwner; } - class Renderable; class Rotation; class Scale; class Translation; -namespace documentation { struct Documentation; } - class ScreenSpaceRenderableRenderable : public ScreenSpaceRenderableFramebuffer { public: - using RenderFunction = std::function; - explicit ScreenSpaceRenderableRenderable(const ghoul::Dictionary& dictionary); virtual ~ScreenSpaceRenderableRenderable() override; diff --git a/modules/base/rendering/screenspacetext.cpp b/modules/base/rendering/screenspacetext.cpp index aa45a0461a..d0e4e382d7 100644 --- a/modules/base/rendering/screenspacetext.cpp +++ b/modules/base/rendering/screenspacetext.cpp @@ -24,8 +24,9 @@ #include -#include -#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextInfo = { diff --git a/modules/base/rendering/screenspacetimevaryingimageonline.cpp b/modules/base/rendering/screenspacetimevaryingimageonline.cpp index 7edf3b8504..49d88defbd 100644 --- a/modules/base/rendering/screenspacetimevaryingimageonline.cpp +++ b/modules/base/rendering/screenspacetimevaryingimageonline.cpp @@ -25,15 +25,20 @@ #include #include -#include #include #include +#include #include -#include +#include #include #include +#include +#include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "ScreenSpaceTimeVaryingImageOnline"; diff --git a/modules/base/rendering/screenspacetimevaryingimageonline.h b/modules/base/rendering/screenspacetimevaryingimageonline.h index 335a8c442c..6fbf195c71 100644 --- a/modules/base/rendering/screenspacetimevaryingimageonline.h +++ b/modules/base/rendering/screenspacetimevaryingimageonline.h @@ -30,13 +30,12 @@ #include #include #include +#include namespace ghoul::opengl { class Texture; } namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceTimeVaryingImageOnline : public ScreenSpaceRenderable { public: explicit ScreenSpaceTimeVaryingImageOnline(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/constantrotation.cpp b/modules/base/rotation/constantrotation.cpp index 92bbd751aa..85987edcc9 100644 --- a/modules/base/rotation/constantrotation.cpp +++ b/modules/base/rotation/constantrotation.cpp @@ -25,8 +25,8 @@ #include #include -#include #include +#include #include #include diff --git a/modules/base/rotation/constantrotation.h b/modules/base/rotation/constantrotation.h index 8ae5b7da4e..b6691f6b55 100644 --- a/modules/base/rotation/constantrotation.h +++ b/modules/base/rotation/constantrotation.h @@ -32,8 +32,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class ConstantRotation : public Rotation { public: explicit ConstantRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index 2ac5da5df2..9a9c294d3a 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -25,15 +25,14 @@ #include #include -#include #include #include #include #include #include +#include #include #include -#include #include namespace { diff --git a/modules/base/rotation/fixedrotation.h b/modules/base/rotation/fixedrotation.h index 9875fb4096..e88ce53c39 100644 --- a/modules/base/rotation/fixedrotation.h +++ b/modules/base/rotation/fixedrotation.h @@ -31,14 +31,11 @@ #include #include #include -#include namespace openspace { class SceneGraphNode; -namespace documentation { struct Documentation; } - class FixedRotation : public Rotation { public: explicit FixedRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/globerotation.cpp b/modules/base/rotation/globerotation.cpp index 9e76e2b98d..26a36d9447 100644 --- a/modules/base/rotation/globerotation.cpp +++ b/modules/base/rotation/globerotation.cpp @@ -25,16 +25,17 @@ #include #include -#include -#include -#include #include #include #include #include #include +#include #include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "GlobeRotation"; diff --git a/modules/base/rotation/luarotation.cpp b/modules/base/rotation/luarotation.cpp index 11ea70a306..08c6e21e53 100644 --- a/modules/base/rotation/luarotation.cpp +++ b/modules/base/rotation/luarotation.cpp @@ -25,16 +25,17 @@ #include #include -#include #include #include #include #include -#include +#include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ScriptInfo = { diff --git a/modules/base/rotation/luarotation.h b/modules/base/rotation/luarotation.h index 538603c8ac..fe1244d20b 100644 --- a/modules/base/rotation/luarotation.h +++ b/modules/base/rotation/luarotation.h @@ -28,15 +28,13 @@ #include #include - #include +#include namespace ghoul::filesystem { class File; } namespace openspace { -namespace documentation { struct Documentation; } - class LuaRotation : public Rotation { public: explicit LuaRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/multirotation.cpp b/modules/base/rotation/multirotation.cpp index b2c7e7374f..674a2ee4cb 100644 --- a/modules/base/rotation/multirotation.cpp +++ b/modules/base/rotation/multirotation.cpp @@ -25,10 +25,10 @@ #include #include -#include #include -#include -#include +#include +#include +#include namespace { // This Rotation type combines multiple individual rotations that are applied one diff --git a/modules/base/rotation/multirotation.h b/modules/base/rotation/multirotation.h index 8a03d7ce7d..f5438a1fb9 100644 --- a/modules/base/rotation/multirotation.h +++ b/modules/base/rotation/multirotation.h @@ -27,14 +27,8 @@ #include -#include - namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class MultiRotation : public Rotation { public: explicit MultiRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 2106d11c24..c94da01a2e 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo RotationInfo = { diff --git a/modules/base/rotation/staticrotation.h b/modules/base/rotation/staticrotation.h index 81574e22cf..e08330efe6 100644 --- a/modules/base/rotation/staticrotation.h +++ b/modules/base/rotation/staticrotation.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class StaticRotation : public Rotation { public: explicit StaticRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/rotation/timelinerotation.cpp b/modules/base/rotation/timelinerotation.cpp index 139ea611bc..83f2cacf7c 100644 --- a/modules/base/rotation/timelinerotation.cpp +++ b/modules/base/rotation/timelinerotation.cpp @@ -25,11 +25,12 @@ #include #include -#include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ShouldInterpolateInfo = { diff --git a/modules/base/rotation/timelinerotation.h b/modules/base/rotation/timelinerotation.h index 6dc5ff9021..03e48eb30f 100644 --- a/modules/base/rotation/timelinerotation.h +++ b/modules/base/rotation/timelinerotation.h @@ -32,10 +32,6 @@ namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class TimelineRotation : public Rotation { public: explicit TimelineRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/luascale.cpp b/modules/base/scale/luascale.cpp index af64764303..9f80d47689 100644 --- a/modules/base/scale/luascale.cpp +++ b/modules/base/scale/luascale.cpp @@ -25,16 +25,17 @@ #include #include -#include #include #include #include #include -#include +#include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ScriptInfo = { diff --git a/modules/base/scale/luascale.h b/modules/base/scale/luascale.h index 84fb40bfcc..0898c5cf2e 100644 --- a/modules/base/scale/luascale.h +++ b/modules/base/scale/luascale.h @@ -29,13 +29,12 @@ #include #include +#include namespace ghoul::filesystem { class File; } namespace openspace { -namespace documentation { struct Documentation; } - class LuaScale : public Scale { public: explicit LuaScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/multiscale.cpp b/modules/base/scale/multiscale.cpp index 9d683e4ac6..ea1cd2ec8a 100644 --- a/modules/base/scale/multiscale.cpp +++ b/modules/base/scale/multiscale.cpp @@ -25,10 +25,10 @@ #include #include -#include -#include #include -#include +#include +#include +#include namespace { // This Scale type combines multiple individual scale operations that are applied one diff --git a/modules/base/scale/multiscale.h b/modules/base/scale/multiscale.h index e1b6afec43..d418b1367c 100644 --- a/modules/base/scale/multiscale.h +++ b/modules/base/scale/multiscale.h @@ -29,8 +29,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class MultiScale : public Scale { public: explicit MultiScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/nonuniformstaticscale.cpp b/modules/base/scale/nonuniformstaticscale.cpp index 22af0f24b5..73fc25f4ce 100644 --- a/modules/base/scale/nonuniformstaticscale.cpp +++ b/modules/base/scale/nonuniformstaticscale.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ScaleInfo = { diff --git a/modules/base/scale/nonuniformstaticscale.h b/modules/base/scale/nonuniformstaticscale.h index 665126dad6..7cb5ab07c6 100644 --- a/modules/base/scale/nonuniformstaticscale.h +++ b/modules/base/scale/nonuniformstaticscale.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class NonUniformStaticScale : public Scale { public: explicit NonUniformStaticScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index baf2003c0f..df42fada0d 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -25,7 +25,6 @@ #include #include -#include namespace { constexpr openspace::properties::Property::PropertyInfo ScaleInfo = { diff --git a/modules/base/scale/staticscale.h b/modules/base/scale/staticscale.h index 3ce38c3241..a5fc5ce15c 100644 --- a/modules/base/scale/staticscale.h +++ b/modules/base/scale/staticscale.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class StaticScale : public Scale { public: explicit StaticScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/timedependentscale.cpp b/modules/base/scale/timedependentscale.cpp index 3639b27da2..e640e39de7 100644 --- a/modules/base/scale/timedependentscale.cpp +++ b/modules/base/scale/timedependentscale.cpp @@ -25,9 +25,10 @@ #include #include -#include #include #include +#include +#include #include namespace { diff --git a/modules/base/scale/timedependentscale.h b/modules/base/scale/timedependentscale.h index 9c70a6243f..67f2ac0b73 100644 --- a/modules/base/scale/timedependentscale.h +++ b/modules/base/scale/timedependentscale.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class TimeDependentScale : public Scale { public: explicit TimeDependentScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/scale/timelinescale.cpp b/modules/base/scale/timelinescale.cpp index 091e61fdd7..d422f552d2 100644 --- a/modules/base/scale/timelinescale.cpp +++ b/modules/base/scale/timelinescale.cpp @@ -25,11 +25,12 @@ #include #include -#include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ShouldInterpolateInfo = { diff --git a/modules/base/scale/timelinescale.h b/modules/base/scale/timelinescale.h index a298627311..c46113a97c 100644 --- a/modules/base/scale/timelinescale.h +++ b/modules/base/scale/timelinescale.h @@ -29,14 +29,9 @@ #include #include -#include namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class TimelineScale : public Scale { public: explicit TimelineScale(const ghoul::Dictionary& dictionary); diff --git a/modules/base/task/convertmodeltask.cpp b/modules/base/task/convertmodeltask.cpp index a39724d713..606495c086 100644 --- a/modules/base/task/convertmodeltask.cpp +++ b/modules/base/task/convertmodeltask.cpp @@ -24,8 +24,10 @@ #include +#include #include #include +#include namespace { // This task converts a 3D model format from a format that is natively supported both diff --git a/modules/base/task/convertmodeltask.h b/modules/base/task/convertmodeltask.h index d481b0e19d..226ffc1f35 100644 --- a/modules/base/task/convertmodeltask.h +++ b/modules/base/task/convertmodeltask.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace { diff --git a/modules/base/timeframe/timeframeinterval.cpp b/modules/base/timeframe/timeframeinterval.cpp index f2a0bf676d..91ff793e44 100644 --- a/modules/base/timeframe/timeframeinterval.cpp +++ b/modules/base/timeframe/timeframeinterval.cpp @@ -25,10 +25,12 @@ #include #include -#include #include #include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo HasStartInfo = { diff --git a/modules/base/timeframe/timeframeinterval.h b/modules/base/timeframe/timeframeinterval.h index ab375a5b0c..98c798a668 100644 --- a/modules/base/timeframe/timeframeinterval.h +++ b/modules/base/timeframe/timeframeinterval.h @@ -27,15 +27,11 @@ #include -#include #include +#include namespace openspace { -class Time; - -namespace documentation { struct Documentation; } - class TimeFrameInterval : public TimeFrame { public: explicit TimeFrameInterval(const ghoul::Dictionary& dictionary); diff --git a/modules/base/timeframe/timeframeunion.cpp b/modules/base/timeframe/timeframeunion.cpp index 54c2f07088..56f585a36b 100644 --- a/modules/base/timeframe/timeframeunion.cpp +++ b/modules/base/timeframe/timeframeunion.cpp @@ -26,9 +26,11 @@ #include #include -#include -#include #include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TimeFramesInfo = { diff --git a/modules/base/timeframe/timeframeunion.h b/modules/base/timeframe/timeframeunion.h index 260bcda265..ec9a610b83 100644 --- a/modules/base/timeframe/timeframeunion.h +++ b/modules/base/timeframe/timeframeunion.h @@ -29,10 +29,6 @@ namespace openspace { -class Time; - -namespace documentation { struct Documentation; } - class TimeFrameUnion : public TimeFrame { public: explicit TimeFrameUnion(const ghoul::Dictionary& dictionary); diff --git a/modules/base/translation/globetranslation.cpp b/modules/base/translation/globetranslation.cpp index 41e60d9433..93d70b8e80 100644 --- a/modules/base/translation/globetranslation.cpp +++ b/modules/base/translation/globetranslation.cpp @@ -24,17 +24,16 @@ #include -#include #include -#include -#include -#include #include #include #include #include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "GlobeTranslation"; diff --git a/modules/base/translation/luatranslation.cpp b/modules/base/translation/luatranslation.cpp index 9af55740ca..faffd978b3 100644 --- a/modules/base/translation/luatranslation.cpp +++ b/modules/base/translation/luatranslation.cpp @@ -25,17 +25,17 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ScriptInfo = { diff --git a/modules/base/translation/luatranslation.h b/modules/base/translation/luatranslation.h index e5cd7fc360..3530de2081 100644 --- a/modules/base/translation/luatranslation.h +++ b/modules/base/translation/luatranslation.h @@ -35,8 +35,6 @@ namespace ghoul::filesystem { class File; } namespace openspace { -namespace documentation { struct Documentation; } - class LuaTranslation : public Translation { public: explicit LuaTranslation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/translation/multitranslation.cpp b/modules/base/translation/multitranslation.cpp index c368d915c8..bab4eb7c45 100644 --- a/modules/base/translation/multitranslation.cpp +++ b/modules/base/translation/multitranslation.cpp @@ -25,10 +25,10 @@ #include #include -#include #include -#include -#include +#include +#include +#include namespace { // This Translation type combines multiple translations that are applied one after the diff --git a/modules/base/translation/multitranslation.h b/modules/base/translation/multitranslation.h index 4a69d65d82..3fd1e78577 100644 --- a/modules/base/translation/multitranslation.h +++ b/modules/base/translation/multitranslation.h @@ -29,10 +29,6 @@ namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class MultiTranslation : public Translation { public: explicit MultiTranslation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index a74fccb2e0..95a3614f32 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -25,7 +25,6 @@ #include #include -#include namespace { constexpr openspace::properties::Property::PropertyInfo PositionInfo = { diff --git a/modules/base/translation/statictranslation.h b/modules/base/translation/statictranslation.h index 81bff8cc33..d6991a010c 100644 --- a/modules/base/translation/statictranslation.h +++ b/modules/base/translation/statictranslation.h @@ -31,10 +31,6 @@ namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class StaticTranslation : public Translation { public: explicit StaticTranslation(const ghoul::Dictionary& dictionary); diff --git a/modules/base/translation/timelinetranslation.cpp b/modules/base/translation/timelinetranslation.cpp index 3899accd81..55d659082b 100644 --- a/modules/base/translation/timelinetranslation.cpp +++ b/modules/base/translation/timelinetranslation.cpp @@ -25,11 +25,12 @@ #include #include -#include #include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ShouldInterpolateInfo = { diff --git a/modules/base/translation/timelinetranslation.h b/modules/base/translation/timelinetranslation.h index 17059ddc30..839d61d1f6 100644 --- a/modules/base/translation/timelinetranslation.h +++ b/modules/base/translation/timelinetranslation.h @@ -29,14 +29,9 @@ #include #include -#include namespace openspace { -struct UpdateData; - -namespace documentation { struct Documentation; } - class TimelineTranslation : public Translation { public: explicit TimelineTranslation(const ghoul::Dictionary& dictionary); diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index d6ac7688cb..c3713bb680 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -37,6 +37,7 @@ #include #include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/modules/cefwebgui/cefwebguimodule.h b/modules/cefwebgui/cefwebguimodule.h index 6c171cf175..9843501015 100644 --- a/modules/cefwebgui/cefwebguimodule.h +++ b/modules/cefwebgui/cefwebguimodule.h @@ -32,6 +32,7 @@ #include #include #include +#include namespace openspace { diff --git a/modules/cefwebgui/include/guirenderhandler.h b/modules/cefwebgui/include/guirenderhandler.h index 7712c5b43e..1680e4e56e 100644 --- a/modules/cefwebgui/include/guirenderhandler.h +++ b/modules/cefwebgui/include/guirenderhandler.h @@ -27,7 +27,6 @@ #include -#include #include namespace ghoul::opengl { class ProgramObject; } diff --git a/modules/cefwebgui/src/guikeyboardhandler.cpp b/modules/cefwebgui/src/guikeyboardhandler.cpp index 109d856c97..d0c31d963c 100644 --- a/modules/cefwebgui/src/guikeyboardhandler.cpp +++ b/modules/cefwebgui/src/guikeyboardhandler.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace openspace { diff --git a/modules/cefwebgui/src/guirenderhandler.cpp b/modules/cefwebgui/src/guirenderhandler.cpp index 9c61b81344..48e25a119d 100644 --- a/modules/cefwebgui/src/guirenderhandler.cpp +++ b/modules/cefwebgui/src/guirenderhandler.cpp @@ -24,11 +24,12 @@ #include -#include #include #include +#include #include #include +#include namespace { constexpr std::string_view _loggerCat = "WebGUI:RenderHandler"; diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index f6c381d316..253bc39e52 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -30,21 +30,16 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include -#include #include #include #include #include #include -#include +#include #include +#include +#include #include #include "debuggingmodule_lua.inl" diff --git a/modules/debugging/debuggingmodule_lua.inl b/modules/debugging/debuggingmodule_lua.inl index 9d7af12c0a..acae63d9a6 100644 --- a/modules/debugging/debuggingmodule_lua.inl +++ b/modules/debugging/debuggingmodule_lua.inl @@ -24,6 +24,10 @@ #include #include +#include +#include +#include +#include namespace { diff --git a/modules/debugging/rendering/debugrenderer.cpp b/modules/debugging/rendering/debugrenderer.cpp index 322441c7c1..5f926cdce5 100644 --- a/modules/debugging/rendering/debugrenderer.cpp +++ b/modules/debugging/rendering/debugrenderer.cpp @@ -24,12 +24,17 @@ #include +#include #include #include +#include #include #include #include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "DebugRenderer"; diff --git a/modules/debugging/rendering/screenspacedebugplane.cpp b/modules/debugging/rendering/screenspacedebugplane.cpp index ec48a80a38..84b12d2d66 100644 --- a/modules/debugging/rendering/screenspacedebugplane.cpp +++ b/modules/debugging/rendering/screenspacedebugplane.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/digitaluniverse/digitaluniversemodule.cpp b/modules/digitaluniverse/digitaluniversemodule.cpp index 47fb5decdd..6803c91e0a 100644 --- a/modules/digitaluniverse/digitaluniversemodule.cpp +++ b/modules/digitaluniverse/digitaluniversemodule.cpp @@ -29,7 +29,10 @@ #include #include #include +#include +#include #include +#include namespace openspace { diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index 992ff7f984..613de291e4 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -26,28 +26,26 @@ #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include -#include +#include +#include #include +#include +#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include #include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableDUMeshes"; diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.h b/modules/digitaluniverse/rendering/renderabledumeshes.h index 8b678db611..5643d80efe 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.h +++ b/modules/digitaluniverse/rendering/renderabledumeshes.h @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -38,19 +37,13 @@ #include #include #include +#include #include -namespace ghoul::filesystem { class File; } namespace ghoul::fontrendering { class Font; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { -namespace documentation { struct Documentation; } - class RenderableDUMeshes : public Renderable { public: explicit RenderableDUMeshes(const ghoul::Dictionary& dictionary); diff --git a/modules/exoplanets/datastructure.cpp b/modules/exoplanets/datastructure.cpp index 9f9b0ceb92..3404678a7f 100644 --- a/modules/exoplanets/datastructure.cpp +++ b/modules/exoplanets/datastructure.cpp @@ -25,11 +25,16 @@ #include #include +#include #include #include #include -#include +#include #include +#include +#include +#include +#include #include namespace { diff --git a/modules/exoplanets/datastructure.h b/modules/exoplanets/datastructure.h index 4b592a0b48..8edabd6bb3 100644 --- a/modules/exoplanets/datastructure.h +++ b/modules/exoplanets/datastructure.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index 488f2ed910..a29e7d17c7 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -28,16 +28,18 @@ #include #include #include -#include #include #include #include #include -#include #include -#include +#include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ExoplanetsModule"; diff --git a/modules/exoplanets/exoplanetshelper.h b/modules/exoplanets/exoplanetshelper.h index 7acaf2c471..34887dc22f 100644 --- a/modules/exoplanets/exoplanetshelper.h +++ b/modules/exoplanets/exoplanetshelper.h @@ -26,7 +26,6 @@ #define __OPENSPACE_MODULE_EXOPLANETS___EXOPLANETSHELPER___H__ #include -#include #include namespace openspace::exoplanets { diff --git a/modules/exoplanets/exoplanetsmodule.cpp b/modules/exoplanets/exoplanetsmodule.cpp index f758fdcb63..f12e960c9c 100644 --- a/modules/exoplanets/exoplanetsmodule.cpp +++ b/modules/exoplanets/exoplanetsmodule.cpp @@ -25,27 +25,18 @@ #include #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include #include #include #include #include #include -#include -#include +#include +#include +#include #include #include "exoplanetsmodule_lua.inl" diff --git a/modules/exoplanets/exoplanetsmodule.h b/modules/exoplanets/exoplanetsmodule.h index 3fbe451075..2e28f14ad8 100644 --- a/modules/exoplanets/exoplanetsmodule.h +++ b/modules/exoplanets/exoplanetsmodule.h @@ -32,6 +32,7 @@ #include #include #include +#include #include namespace openspace { diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 587cfcfe99..d13c4321fc 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -25,7 +25,10 @@ #include #include #include +#include +#include #include +#include #include #include #include diff --git a/modules/exoplanets/rendering/renderableorbitdisc.cpp b/modules/exoplanets/rendering/renderableorbitdisc.cpp index 786576054d..19ac3a7a9d 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.cpp +++ b/modules/exoplanets/rendering/renderableorbitdisc.cpp @@ -25,19 +25,16 @@ #include #include -#include #include #include -#include -#include -#include -#include +#include #include +#include #include #include +#include #include #include -#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/exoplanets/rendering/renderableorbitdisc.h b/modules/exoplanets/rendering/renderableorbitdisc.h index f2676ef0f1..9a890764fe 100644 --- a/modules/exoplanets/rendering/renderableorbitdisc.h +++ b/modules/exoplanets/rendering/renderableorbitdisc.h @@ -33,16 +33,11 @@ #include #include #include -#include #include - -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class ProgramObject; } // namespace ghoul::opengl +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableOrbitDisc : public Renderable { public: explicit RenderableOrbitDisc(const ghoul::Dictionary& dictionary); diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index cd07d51cac..9701130322 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -24,9 +24,7 @@ #include -#include #include -#include #include #include #include @@ -35,8 +33,11 @@ #include #include #include -#include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ExoplanetsDataPreparationTask"; diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h index 5291c46481..a773873976 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.h @@ -28,9 +28,8 @@ #include #include -#include #include -#include +#include namespace openspace::exoplanets { diff --git a/modules/fieldlines/fieldlinesmodule.cpp b/modules/fieldlines/fieldlinesmodule.cpp index 74957005e6..b48274d6aa 100644 --- a/modules/fieldlines/fieldlinesmodule.cpp +++ b/modules/fieldlines/fieldlinesmodule.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace openspace { diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 201a3e3a51..928a8c527d 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -29,13 +29,18 @@ #include #include #include -#include #include +#include #include #include +#include +#include #include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableFieldlines"; diff --git a/modules/fieldlines/rendering/renderablefieldlines.h b/modules/fieldlines/rendering/renderablefieldlines.h index d75c989fd2..561491ccf5 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.h +++ b/modules/fieldlines/rendering/renderablefieldlines.h @@ -34,8 +34,7 @@ #include #include #include - -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { @@ -54,7 +53,7 @@ public: void update(const UpdateData& data) override; private: - typedef std::vector Line; + using Line = std::vector; void initializeDefaultPropertyValues(); void loadSeedPoints(); diff --git a/modules/fieldlinessequence/fieldlinessequencemodule.cpp b/modules/fieldlinessequence/fieldlinessequencemodule.cpp index 6aef48fc51..a0edd4a4c2 100644 --- a/modules/fieldlinessequence/fieldlinessequencemodule.cpp +++ b/modules/fieldlinessequence/fieldlinessequencemodule.cpp @@ -30,8 +30,11 @@ #include #include #include +#include #include #include +#include +#include namespace { constexpr std::string_view DefaultTransferfunctionSource = diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index c40f9e1a17..ca2fd838fa 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -30,14 +30,24 @@ #include #include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include #include #include #include -#include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableFieldlinesSequence"; diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h index b04d395c1f..d65ed7e2ec 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.h @@ -27,17 +27,21 @@ #include +#include #include #include #include #include +#include +#include #include #include #include #include #include +#include #include -#include +#include namespace openspace { diff --git a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp index 64d2d1efda..a59a898020 100644 --- a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp +++ b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp @@ -26,13 +26,18 @@ #include #include -#include -#include -#include +#include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "KameleonVolumeToFieldlinesTask"; diff --git a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.h b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.h index f0dbd70a8c..123d2f4701 100644 --- a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.h +++ b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.h @@ -27,7 +27,7 @@ #include -#include +#include namespace openspace { diff --git a/modules/fieldlinessequence/util/fieldlinesstate.cpp b/modules/fieldlinessequence/util/fieldlinesstate.cpp index ce7ac509b1..a5d569a4fe 100644 --- a/modules/fieldlinessequence/util/fieldlinesstate.cpp +++ b/modules/fieldlinessequence/util/fieldlinesstate.cpp @@ -28,9 +28,17 @@ #include #include #include +#include #include +#include +#include +#include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "FieldlinesState"; diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp index 1597adf846..78cddda56f 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp @@ -29,12 +29,20 @@ #include #include #include +#include #include +#include +#include #include #include +#include +#include +#include #ifdef OPENSPACE_MODULE_KAMELEON_ENABLED +#include + #ifdef _MSC_VER #pragma warning (push) // Boost throws #pragma warning: there is no warning number '4675' @@ -42,9 +50,10 @@ #endif // _MSC_VER #include +#include #include +#include #include -#include #ifdef _MSC_VER #pragma warning (pop) @@ -89,12 +98,12 @@ bool convertCdfToFieldlinesState(FieldlinesState& state, const std::string& cdfP return false; #else // OPENSPACE_MODULE_KAMELEON_ENABLED // Create Kameleon object and open CDF file! - std::unique_ptr kameleon = kameleonHelper::createKameleonObject( + std::unique_ptr kameleon = kameleonhelper::createKameleonObject( cdfPath ); state.setModel(fls::stringToModel(kameleon->getModelName())); - double cdfDoubleTime = kameleonHelper::getTime(kameleon.get(), manualTimeOffset); + double cdfDoubleTime = kameleonhelper::getTime(kameleon.get(), manualTimeOffset); state.setTriggerTime(cdfDoubleTime); // get time as string. diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.h b/modules/fieldlinessequence/util/kameleonfieldlinehelper.h index 330786c79c..02c0ff59d9 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.h +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_FIELDLINESSEQUENCE___KAMELEONFIELDLINEHELPER___H__ #include +#include #include #include #include diff --git a/modules/fitsfilereader/fitsfilereadermodule.cpp b/modules/fitsfilereader/fitsfilereadermodule.cpp index 78436d37c6..8433e0b998 100644 --- a/modules/fitsfilereader/fitsfilereadermodule.cpp +++ b/modules/fitsfilereader/fitsfilereadermodule.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include namespace openspace { diff --git a/modules/fitsfilereader/include/fitsfilereader.h b/modules/fitsfilereader/include/fitsfilereader.h index 4cfd388b64..defad123a0 100644 --- a/modules/fitsfilereader/include/fitsfilereader.h +++ b/modules/fitsfilereader/include/fitsfilereader.h @@ -39,8 +39,6 @@ namespace CCfits { class ExtHDU; } // namespace CCfits -namespace ghoul::opengl { class Texture; } - namespace openspace { template diff --git a/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h b/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h index 4aca6a74aa..e3eea39bf2 100644 --- a/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h +++ b/modules/fitsfilereader/include/renderabletimevaryingfitssphere.h @@ -27,16 +27,18 @@ #include +#include #include +#include #include +#include #include +#include +#include +#include namespace openspace { -struct RenderData; -struct UpdateData; -namespace documentation { struct Documentation; } - class RenderableTimeVaryingFitsSphere : public RenderableSphere { public: enum class LoadingType { diff --git a/modules/fitsfilereader/include/wsafitshelper.h b/modules/fitsfilereader/include/wsafitshelper.h index 5e70e350fc..d5117f2fec 100644 --- a/modules/fitsfilereader/include/wsafitshelper.h +++ b/modules/fitsfilereader/include/wsafitshelper.h @@ -25,15 +25,12 @@ #ifndef __OPENSPACE_MODULE_FITSFILEREADER___WSAFITSHELPER___H__ #define __OPENSPACE_MODULE_FITSFILEREADER___WSAFITSHELPER___H__ -#include -#include +#include +#include +#include #include -namespace CCfits { - class FITS; - class PHDU; - class ExtHDU; -} // namespace CCfits +namespace ghoul::opengl { class Texture; } namespace openspace { diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index 409cb7a8a9..c371d1ac39 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -27,9 +27,15 @@ #include #include #include -#include +#include #include +#include #include +#include +#include +#include +#include +#include #ifdef WIN32 #pragma warning (push) @@ -44,7 +50,6 @@ #pragma warning (pop) #endif // WIN32 - using namespace CCfits; namespace { diff --git a/modules/fitsfilereader/src/renderabletimevaryingfitssphere.cpp b/modules/fitsfilereader/src/renderabletimevaryingfitssphere.cpp index de8fd9df63..4f322bb344 100644 --- a/modules/fitsfilereader/src/renderabletimevaryingfitssphere.cpp +++ b/modules/fitsfilereader/src/renderabletimevaryingfitssphere.cpp @@ -26,18 +26,22 @@ #include #include -#include #include #include -#include +#include #include #include -#include -#include -#include +#include +#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableTimeVaryingFitsSphere"; diff --git a/modules/fitsfilereader/src/wsafitshelper.cpp b/modules/fitsfilereader/src/wsafitshelper.cpp index 0b33686d2a..b1bc053f61 100644 --- a/modules/fitsfilereader/src/wsafitshelper.cpp +++ b/modules/fitsfilereader/src/wsafitshelper.cpp @@ -23,11 +23,20 @@ ****************************************************************************************/ #include + +#include #include +#include #include #include +#include +#include +#include +#include -constexpr std::string_view _loggerCat = "RenderableTimeVaryingSphere"; +namespace { + constexpr std::string_view _loggerCat = "RenderableTimeVaryingSphere"; +} // namespace using namespace CCfits; diff --git a/modules/gaia/gaiamodule.cpp b/modules/gaia/gaiamodule.cpp index 73ef37aa9b..d962edaf29 100644 --- a/modules/gaia/gaiamodule.cpp +++ b/modules/gaia/gaiamodule.cpp @@ -32,8 +32,12 @@ #include #include #include +#include #include #include +#include +#include +#include namespace openspace { diff --git a/modules/gaia/gaiamodule.h b/modules/gaia/gaiamodule.h index 8962e068e7..81f84da7ba 100644 --- a/modules/gaia/gaiamodule.h +++ b/modules/gaia/gaiamodule.h @@ -27,8 +27,6 @@ #include -#include - namespace openspace { class GaiaModule : public OpenSpaceModule { diff --git a/modules/gaia/rendering/gaiaoptions.h b/modules/gaia/rendering/gaiaoptions.h index 4331e8b3c7..544412bbc3 100644 --- a/modules/gaia/rendering/gaiaoptions.h +++ b/modules/gaia/rendering/gaiaoptions.h @@ -29,24 +29,24 @@ namespace openspace::gaia { enum RenderMode { Static = 0, - Color = 1, - Motion = 2 + Color, + Motion }; enum FileReaderOption { Fits = 0, - Speck = 1, - BinaryRaw = 2, - BinaryOctree = 3, - StreamOctree = 4 + Speck, + BinaryRaw, + BinaryOctree, + StreamOctree }; enum ShaderOption { PointSSBO = 0, - PointVBO = 1, - BillboardSSBO = 2, - BillboardVBO = 3, - BillboardSSBONoFBO = 4 + PointVBO, + BillboardSSBO, + BillboardVBO, + BillboardSSBONoFBO }; } // namespace openspace::gaiamission diff --git a/modules/gaia/rendering/octreeculler.cpp b/modules/gaia/rendering/octreeculler.cpp index 728655c1c0..e7140f020c 100644 --- a/modules/gaia/rendering/octreeculler.cpp +++ b/modules/gaia/rendering/octreeculler.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace openspace { diff --git a/modules/gaia/rendering/octreeculler.h b/modules/gaia/rendering/octreeculler.h index f7b3378c85..62c280f048 100644 --- a/modules/gaia/rendering/octreeculler.h +++ b/modules/gaia/rendering/octreeculler.h @@ -40,7 +40,6 @@ namespace openspace { */ class OctreeCuller { public: - /** * \param viewFrustum This is the view space in normalized device coordinates space. * Hence it is an axis aligned bounding box and not a real frustum diff --git a/modules/gaia/rendering/octreemanager.cpp b/modules/gaia/rendering/octreemanager.cpp index eab557afaa..0a1349d86b 100644 --- a/modules/gaia/rendering/octreemanager.cpp +++ b/modules/gaia/rendering/octreemanager.cpp @@ -25,11 +25,13 @@ #include #include +#include #include #include -#include #include -#include +#include +#include +#include #include namespace { diff --git a/modules/gaia/rendering/octreemanager.h b/modules/gaia/rendering/octreemanager.h index bca9d93561..780d4acc49 100644 --- a/modules/gaia/rendering/octreemanager.h +++ b/modules/gaia/rendering/octreemanager.h @@ -26,14 +26,19 @@ #define __OPENSPACE_MODULE_GAIA___OCTREEMANAGER___H__ #include +#include #include -#include #include #include +#include #include +#include #include #include +#include #include +#include +#include #include namespace openspace { diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp index 75affcf0e0..798a20fabd 100644 --- a/modules/gaia/rendering/renderablegaiastars.cpp +++ b/modules/gaia/rendering/renderablegaiastars.cpp @@ -26,19 +26,20 @@ #include #include -#include #include -#include #include -#include #include #include -#include +#include #include +#include #include #include #include -#include +#include +#include +#include +#include #include #include #include @@ -46,6 +47,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableGaiaStars"; diff --git a/modules/gaia/rendering/renderablegaiastars.h b/modules/gaia/rendering/renderablegaiastars.h index a5add6a272..a8a9b85c19 100644 --- a/modules/gaia/rendering/renderablegaiastars.h +++ b/modules/gaia/rendering/renderablegaiastars.h @@ -27,29 +27,27 @@ #include +#include #include #include #include #include -#include #include #include #include #include +#include #include #include #include +#include +#include +#include namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { -namespace documentation { struct Documentation; } - class RenderableGaiaStars : public Renderable { public: explicit RenderableGaiaStars(const ghoul::Dictionary& dictionary); diff --git a/modules/gaia/tasks/constructoctreetask.cpp b/modules/gaia/tasks/constructoctreetask.cpp index 37cc857bc3..eb1d6604e1 100644 --- a/modules/gaia/tasks/constructoctreetask.cpp +++ b/modules/gaia/tasks/constructoctreetask.cpp @@ -25,14 +25,18 @@ #include #include -#include #include #include #include #include -#include +#include +#include #include +#include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "ConstructOctreeTask"; diff --git a/modules/gaia/tasks/constructoctreetask.h b/modules/gaia/tasks/constructoctreetask.h index cc6d8081b6..2fd950253b 100644 --- a/modules/gaia/tasks/constructoctreetask.h +++ b/modules/gaia/tasks/constructoctreetask.h @@ -27,9 +27,10 @@ #include -#include #include +#include #include +#include namespace openspace { diff --git a/modules/gaia/tasks/readfilejob.cpp b/modules/gaia/tasks/readfilejob.cpp index b3432e3be4..b81becda5d 100644 --- a/modules/gaia/tasks/readfilejob.cpp +++ b/modules/gaia/tasks/readfilejob.cpp @@ -24,10 +24,13 @@ #include -#include #include #include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ReadFileJob"; diff --git a/modules/gaia/tasks/readfilejob.h b/modules/gaia/tasks/readfilejob.h index 1459f2f2e0..29737da027 100644 --- a/modules/gaia/tasks/readfilejob.h +++ b/modules/gaia/tasks/readfilejob.h @@ -25,10 +25,13 @@ #ifndef __OPENSPACE_MODULE_GAIA___READFILEJOB___H__ #define __OPENSPACE_MODULE_GAIA___READFILEJOB___H__ -#include +#include #include #include +#include +#include +#include namespace openspace::gaia { diff --git a/modules/gaia/tasks/readfitstask.cpp b/modules/gaia/tasks/readfitstask.cpp index 16ddcdb3b1..9a5f0637e7 100644 --- a/modules/gaia/tasks/readfitstask.cpp +++ b/modules/gaia/tasks/readfitstask.cpp @@ -24,18 +24,22 @@ #include +#include #include #include -#include - #include +#include +#include #include #include #include -#include +#include +#include #include -#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ReadFitsTask"; diff --git a/modules/gaia/tasks/readfitstask.h b/modules/gaia/tasks/readfitstask.h index 1bebeb2843..6aafab2f0c 100644 --- a/modules/gaia/tasks/readfitstask.h +++ b/modules/gaia/tasks/readfitstask.h @@ -27,15 +27,11 @@ #include -#include -#include -#include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - class ReadFitsTask : public Task { public: explicit ReadFitsTask(const ghoul::Dictionary& dictionary); diff --git a/modules/gaia/tasks/readspecktask.cpp b/modules/gaia/tasks/readspecktask.cpp index 123f49a5f6..2bb2ae4a0e 100644 --- a/modules/gaia/tasks/readspecktask.cpp +++ b/modules/gaia/tasks/readspecktask.cpp @@ -26,12 +26,14 @@ #include #include -#include #include #include #include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "ReadSpeckTask"; diff --git a/modules/gaia/tasks/readspecktask.h b/modules/gaia/tasks/readspecktask.h index 437141663c..70cf3c8f98 100644 --- a/modules/gaia/tasks/readspecktask.h +++ b/modules/gaia/tasks/readspecktask.h @@ -28,12 +28,9 @@ #include #include -#include namespace openspace { -namespace documentation { struct Documentation; } - class ReadSpeckTask : public Task { public: explicit ReadSpeckTask(const ghoul::Dictionary& dictionary); diff --git a/modules/galaxy/galaxymodule.cpp b/modules/galaxy/galaxymodule.cpp index 8de67e6678..42a738726e 100644 --- a/modules/galaxy/galaxymodule.cpp +++ b/modules/galaxy/galaxymodule.cpp @@ -30,8 +30,11 @@ #include #include #include +#include #include +#include #include +#include namespace openspace { diff --git a/modules/galaxy/rendering/galaxyraycaster.cpp b/modules/galaxy/rendering/galaxyraycaster.cpp index e1700a40d6..34b7c68d0b 100644 --- a/modules/galaxy/rendering/galaxyraycaster.cpp +++ b/modules/galaxy/rendering/galaxyraycaster.cpp @@ -24,14 +24,18 @@ #include -#include #include #include +#include #include #include #include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view GlslRaycastPath = diff --git a/modules/galaxy/rendering/galaxyraycaster.h b/modules/galaxy/rendering/galaxyraycaster.h index ef0bc8d525..75006a65b8 100644 --- a/modules/galaxy/rendering/galaxyraycaster.h +++ b/modules/galaxy/rendering/galaxyraycaster.h @@ -28,21 +28,12 @@ #include #include -#include -#include #include -namespace ghoul::opengl { - class Texture; - class TextureUnit; - class ProgramObject; -} // namespace ghoul::opengl +namespace ghoul::opengl { class TextureUnit; } namespace openspace { -struct RenderData; -struct RaycastData; - class GalaxyRaycaster : public VolumeRaycaster { public: explicit GalaxyRaycaster(ghoul::opengl::Texture& texture, @@ -89,8 +80,7 @@ private: ghoul::opengl::Texture& _texture; std::unique_ptr _textureUnit; std::filesystem::path _raycastingShader; - -}; // GalaxyRaycaster +}; } // namespace openspace diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 346edc1e57..9f38faec5a 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -32,27 +32,29 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include +#include +#include #include #include -#include #include #include #include #include #include #include -#include +#include +#include +#include #include -#include +#include +#include namespace { constexpr int8_t CurrentCacheVersion = 1; diff --git a/modules/galaxy/rendering/renderablegalaxy.h b/modules/galaxy/rendering/renderablegalaxy.h index 75acb8c6dd..dedd6b7e83 100644 --- a/modules/galaxy/rendering/renderablegalaxy.h +++ b/modules/galaxy/rendering/renderablegalaxy.h @@ -30,18 +30,16 @@ #include #include #include +#include #include #include #include - -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { namespace volume { template class RawVolume; } - class GalaxyRaycaster; -struct RenderData; class RenderableGalaxy : public Renderable { public: diff --git a/modules/galaxy/tasks/milkywayconversiontask.cpp b/modules/galaxy/tasks/milkywayconversiontask.cpp index d2d2b219c1..3145d2df90 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.cpp +++ b/modules/galaxy/tasks/milkywayconversiontask.cpp @@ -29,6 +29,7 @@ #include #include #include +#include namespace { struct [[codegen::Dictionary(MilkywayConversionTask)]] Parameters { diff --git a/modules/galaxy/tasks/milkywayconversiontask.h b/modules/galaxy/tasks/milkywayconversiontask.h index 74384e8451..8cc56c184f 100644 --- a/modules/galaxy/tasks/milkywayconversiontask.h +++ b/modules/galaxy/tasks/milkywayconversiontask.h @@ -28,12 +28,9 @@ #include #include -#include namespace openspace { -namespace documentation { struct Documentation; } - /** * Converts a set of exr image slices to a raw volume with floating point RGBA data (32 * bit per channel). diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp index 5043a444c7..bafe9b84ac 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.cpp +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.cpp @@ -25,18 +25,22 @@ #include #include - +#include +#include #include #include #include namespace openspace { - -/*MilkywayPointsConversionTask::MilkywayPointsConversionTask( - const std::string& inFilename, - const std::string& outFilename) - : _inFilename(inFilename) - , _outFilename(outFilename) {}*/ + +documentation::Documentation MilkywayPointsConversionTask::Documentation() { + return { + "MilkywayPointsConversionTask", + "galaxy_milkywaypointsconversiontask", + "", + {} + }; +} MilkywayPointsConversionTask::MilkywayPointsConversionTask(const ghoul::Dictionary&) {} @@ -46,8 +50,8 @@ std::string MilkywayPointsConversionTask::description() { void MilkywayPointsConversionTask::perform(const Task::ProgressCallback& progressCallback) { - std::ifstream in(_inFilename, std::ios::in); - std::ofstream out(_outFilename, std::ios::out | std::ios::binary); + std::ifstream in = std::ifstream(_inFilename, std::ios::in); + std::ofstream out = std::ofstream(_outFilename, std::ios::out | std::ios::binary); std::string format; int64_t nPoints = 0; @@ -85,18 +89,6 @@ void MilkywayPointsConversionTask::perform(const Task::ProgressCallback& progres out.write(reinterpret_cast(&nPoints), sizeof(int64_t)); out.write(reinterpret_cast(pointData.data()), nFloats * sizeof(float)); - - in.close(); - out.close(); -} - -documentation::Documentation MilkywayPointsConversionTask::Documentation() { - return { - "MilkywayPointsConversionTask", - "galaxy_milkywaypointsconversiontask", - "", - {} - }; } } // namespace openspace diff --git a/modules/galaxy/tasks/milkywaypointsconversiontask.h b/modules/galaxy/tasks/milkywaypointsconversiontask.h index 346424984e..385c91c872 100644 --- a/modules/galaxy/tasks/milkywaypointsconversiontask.h +++ b/modules/galaxy/tasks/milkywaypointsconversiontask.h @@ -27,14 +27,10 @@ #include -#include - namespace openspace { -namespace documentation { struct Documentation; } - /** - * Converts ASCII based point data + * Converts ASCII based point data. * ``` * int64_t n * (float x, float y, float z, float r, float g, float b) * n diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 5109c1e1ab..6c77bf1d89 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -29,15 +29,15 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include +#include +#include +#include #include #include #include @@ -49,31 +49,32 @@ #include #include #include -#include -#include +#include #include #include -#include #include -#include #include -#include +#include #include -#include -#include #include #include #include #include -#include #include #include #include #include -#include +#include #include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/modules/globebrowsing/globebrowsingmodule.h b/modules/globebrowsing/globebrowsingmodule.h index bdfd7af503..836309ae55 100644 --- a/modules/globebrowsing/globebrowsingmodule.h +++ b/modules/globebrowsing/globebrowsingmodule.h @@ -30,24 +30,16 @@ #include #include #include -#include -#include +#include #include #include -#include - -namespace openspace::globebrowsing { - class RenderableGlobe; - struct TileIndex; - - namespace cache { class MemoryAwareTileCache; } -} // namespace openspace::globebrowsing namespace openspace { -class Camera; -struct Geodetic2; -struct Geodetic3; +namespace globebrowsing { + class RenderableGlobe; + namespace cache { class MemoryAwareTileCache; } +} // namespace globebrowsing class SceneGraphNode; class GlobeBrowsingModule : public OpenSpaceModule { diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 5654e717d9..d8ee813d62 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -22,7 +22,13 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/modules/globebrowsing/src/asynctiledataprovider.cpp b/modules/globebrowsing/src/asynctiledataprovider.cpp index e833b4daab..b5fbaedc7a 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.cpp +++ b/modules/globebrowsing/src/asynctiledataprovider.cpp @@ -24,14 +24,17 @@ #include -#include +#include +#include #include #include -#include -#include +#include #include #include -#include +#include +#include +#include +#include namespace openspace::globebrowsing { @@ -40,7 +43,7 @@ namespace { } // namespace AsyncTileDataProvider::AsyncTileDataProvider(std::string name, - std::unique_ptr rawTileDataReader) + std::unique_ptr rawTileDataReader) : _name(std::move(name)) , _rawTileDataReader(std::move(rawTileDataReader)) , _concurrentJobManager(LRUThreadPool(1, 10)) diff --git a/modules/globebrowsing/src/asynctiledataprovider.h b/modules/globebrowsing/src/asynctiledataprovider.h index 0d92d4cef8..49c8ef7258 100644 --- a/modules/globebrowsing/src/asynctiledataprovider.h +++ b/modules/globebrowsing/src/asynctiledataprovider.h @@ -29,9 +29,10 @@ #include #include #include -#include +#include #include #include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/basictypes.h b/modules/globebrowsing/src/basictypes.h index f72f01df3d..dce187f9b5 100644 --- a/modules/globebrowsing/src/basictypes.h +++ b/modules/globebrowsing/src/basictypes.h @@ -27,9 +27,9 @@ #include #include -#include +#include +#include #include -#include namespace ghoul::opengl { class Texture; } diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.cpp b/modules/globebrowsing/src/dashboarditemglobelocation.cpp index 0fac6c869d..7799274e4c 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.cpp +++ b/modules/globebrowsing/src/dashboarditemglobelocation.cpp @@ -24,22 +24,19 @@ #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include #include -#include -#include +#include #include -#include +#include +#include #include +#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo DisplayFormatInfo = { diff --git a/modules/globebrowsing/src/dashboarditemglobelocation.h b/modules/globebrowsing/src/dashboarditemglobelocation.h index 9a0b84bd5b..03f742184b 100644 --- a/modules/globebrowsing/src/dashboarditemglobelocation.h +++ b/modules/globebrowsing/src/dashboarditemglobelocation.h @@ -28,14 +28,10 @@ #include #include -#include -#include #include namespace openspace { -namespace documentation { struct Documentation; } - class DashboardItemGlobeLocation : public DashboardTextItem { public: explicit DashboardItemGlobeLocation(const ghoul::Dictionary& dictionary); diff --git a/modules/globebrowsing/src/gdalwrapper.cpp b/modules/globebrowsing/src/gdalwrapper.cpp index df1f08c932..4518246de6 100644 --- a/modules/globebrowsing/src/gdalwrapper.cpp +++ b/modules/globebrowsing/src/gdalwrapper.cpp @@ -26,14 +26,16 @@ #include #include -#include #include -#include +#include #include +#include #include #include #include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "GdalWrapper"; diff --git a/modules/globebrowsing/src/gdalwrapper.h b/modules/globebrowsing/src/gdalwrapper.h index 31c20cc43a..18093e6f84 100644 --- a/modules/globebrowsing/src/gdalwrapper.h +++ b/modules/globebrowsing/src/gdalwrapper.h @@ -30,8 +30,6 @@ #include #include -#include - namespace openspace::globebrowsing { /** diff --git a/modules/globebrowsing/src/geodeticpatch.cpp b/modules/globebrowsing/src/geodeticpatch.cpp index 61b1392b31..9797370e93 100644 --- a/modules/globebrowsing/src/geodeticpatch.cpp +++ b/modules/globebrowsing/src/geodeticpatch.cpp @@ -26,6 +26,10 @@ #include #include +#include +#include +#include +#include namespace { // Normalizes the angle to the interval [center - pi, center + pi[ diff --git a/modules/globebrowsing/src/geodeticpatch.h b/modules/globebrowsing/src/geodeticpatch.h index 17e5ff7f9d..4cd75dcc92 100644 --- a/modules/globebrowsing/src/geodeticpatch.h +++ b/modules/globebrowsing/src/geodeticpatch.h @@ -68,7 +68,6 @@ public: */ bool contains(const Geodetic2& p) const; - /** * Clamps a point to the patch region. */ diff --git a/modules/globebrowsing/src/geojson/geojsoncomponent.cpp b/modules/globebrowsing/src/geojson/geojsoncomponent.cpp index ad4d39df13..9a7caa7902 100644 --- a/modules/globebrowsing/src/geojson/geojsoncomponent.cpp +++ b/modules/globebrowsing/src/geojson/geojsoncomponent.cpp @@ -24,27 +24,34 @@ #include -#include #include #include #include -#include -#include #include #include #include -#include #include +#include +#include #include #include #include #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include +#include namespace geos_nlohmann = nlohmann; #include diff --git a/modules/globebrowsing/src/geojson/geojsoncomponent.h b/modules/globebrowsing/src/geojson/geojsoncomponent.h index 30a3183803..2efcfaf681 100644 --- a/modules/globebrowsing/src/geojson/geojsoncomponent.h +++ b/modules/globebrowsing/src/geojson/geojsoncomponent.h @@ -28,11 +28,9 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -40,20 +38,22 @@ #include #include #include -#include -#include +#include #include -#include +namespace geos { + namespace geom { class Geometry; } + namespace io { class GeoJSONFeature; } +} // namespace geos +namespace ghoul { + namespace opengl { class ProgramObject; } + class Dictionary; +} // namespace ghoul namespace openspace { - struct RenderData; - class LightSource; namespace documentation { struct Documentation; } - namespace rendering::helper { struct VertexXYZNormal; } -} // namespace::openspace - -namespace ghoul::opengl { class ProgramObject; } -namespace geos::io { class GeoJSONFeature; } + class LightSource; + struct RenderData; +} // namespace openspace namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/geojson/geojsonmanager.cpp b/modules/globebrowsing/src/geojson/geojsonmanager.cpp index a615c3f71e..7e1db1578d 100644 --- a/modules/globebrowsing/src/geojson/geojsonmanager.cpp +++ b/modules/globebrowsing/src/geojson/geojsonmanager.cpp @@ -24,11 +24,17 @@ #include +#include #include -#include +#include #include +#include +#include +#include #include - +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "GeoJsonManager"; diff --git a/modules/globebrowsing/src/geojson/geojsonmanager.h b/modules/globebrowsing/src/geojson/geojsonmanager.h index c8b146d72d..d2a73b1ee7 100644 --- a/modules/globebrowsing/src/geojson/geojsonmanager.h +++ b/modules/globebrowsing/src/geojson/geojsonmanager.h @@ -28,14 +28,13 @@ #include #include - -#include #include -#include namespace ghoul { class Dictionary; } -namespace openspace { struct RenderData; } -namespace openspace::documentation { struct Documentation; } +namespace openspace { + namespace documentation { struct Documentation; } + struct RenderData; +} // namespace openspace namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/geojson/geojsonproperties.cpp b/modules/globebrowsing/src/geojson/geojsonproperties.cpp index b14cb77a70..af4c87d96a 100644 --- a/modules/globebrowsing/src/geojson/geojsonproperties.cpp +++ b/modules/globebrowsing/src/geojson/geojsonproperties.cpp @@ -28,10 +28,13 @@ #include #include #include +#include #include #include #include -#include +#include +#include +#include // Keys used to read properties from GeoJson files namespace geojson::propertykeys { diff --git a/modules/globebrowsing/src/geojson/geojsonproperties.h b/modules/globebrowsing/src/geojson/geojsonproperties.h index 98cfb6f25a..6a6253e51c 100644 --- a/modules/globebrowsing/src/geojson/geojsonproperties.h +++ b/modules/globebrowsing/src/geojson/geojsonproperties.h @@ -35,7 +35,6 @@ #include #include #include -#include namespace geos::io { class GeoJSONFeature; } diff --git a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp index 7a73b52e40..d7cf1ef23f 100644 --- a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp +++ b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp @@ -27,27 +27,39 @@ #include #include #include -#include #include #include -#include #include -#include #include -#include #include #include +#include +#include #include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include -#include +#include +#include +#include +#include namespace { - constexpr const char* _loggerCat = "GlobeGeometryFeature"; + constexpr std::string_view _loggerCat = "GlobeGeometryFeature"; constexpr std::chrono::milliseconds HeightUpdateInterval(10000); } // namespace diff --git a/modules/globebrowsing/src/geojson/globegeometryfeature.h b/modules/globebrowsing/src/geojson/globegeometryfeature.h index 71aa18f951..f9e84738a0 100644 --- a/modules/globebrowsing/src/geojson/globegeometryfeature.h +++ b/modules/globebrowsing/src/geojson/globegeometryfeature.h @@ -25,25 +25,29 @@ #ifndef __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEGEOMETRYFEATURE___H__ #define __OPENSPACE_MODULE_GLOBEBROWSING___GLOBEGEOMETRYFEATURE___H__ -#include - -#include #include #include #include #include #include #include +#include +#include #include -namespace openspace::documentation { struct Documentation; } +namespace geos::geom { class Geometry; } +namespace ghoul::opengl { class ProgramObject; } +namespace openspace { + namespace documentation { struct Documentation; } + struct Geodetic2; + struct Geodetic3; + struct RenderData; +} // namespace openspace namespace rendering::helper { struct LightSourceRenderData; struct VertexXYZNormal; } // namespace rendering::helper -namespace geos::geom { class Geometry; } - namespace openspace::globebrowsing { class RenderableGlobe; @@ -54,11 +58,12 @@ class RenderableGlobe; */ class GlobeGeometryFeature { public: + using Vertex = rendering::helper::VertexXYZNormal; + GlobeGeometryFeature(const RenderableGlobe& globe, GeoJsonProperties& defaultProperties, GeoJsonOverrideProperties& overrideProperties); - using Vertex = rendering::helper::VertexXYZNormal; // TODO: Use instead of numbers //enum class RenderPass { diff --git a/modules/globebrowsing/src/geojson/globegeometryhelper.cpp b/modules/globebrowsing/src/geojson/globegeometryhelper.cpp index d4e13d5490..9779649dbf 100644 --- a/modules/globebrowsing/src/geojson/globegeometryhelper.cpp +++ b/modules/globebrowsing/src/geojson/globegeometryhelper.cpp @@ -26,11 +26,23 @@ #include #include +#include +#include #include +#include #include +#include +#include #include +#include +#include #include #include +#include +#include +#include +#include +#include namespace openspace::globebrowsing::geometryhelper { diff --git a/modules/globebrowsing/src/geojson/globegeometryhelper.h b/modules/globebrowsing/src/geojson/globegeometryhelper.h index 7d4782de5b..030f3a6641 100644 --- a/modules/globebrowsing/src/geojson/globegeometryhelper.h +++ b/modules/globebrowsing/src/geojson/globegeometryhelper.h @@ -29,13 +29,11 @@ #include namespace openspace { - struct Geodetic2; - struct Geodetic3; - namespace globebrowsing { class RenderableGlobe; } namespace rendering::helper { struct VertexXYZNormal; } + struct Geodetic2; + struct Geodetic3; } // namespace openspace - namespace geos::geom { class Coordinate; class Geometry; diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 576e0c0a88..e2ad9f3473 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -27,26 +27,28 @@ #include #include #include -#include -#include #include -#include -#include +#include +#include #include #include #include #include #include +#include #include #include #include #include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "GlobeLabels"; diff --git a/modules/globebrowsing/src/globelabelscomponent.h b/modules/globebrowsing/src/globelabelscomponent.h index 0036635327..b61bdefc53 100644 --- a/modules/globebrowsing/src/globelabelscomponent.h +++ b/modules/globebrowsing/src/globelabelscomponent.h @@ -31,22 +31,24 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include +#include -namespace ghoul { class Dictionary; } -namespace ghoul::opengl { class ProgramObject; } +namespace ghoul { + namespace opengl { class ProgramObject; } + class Dictionary; +} // namespace ghoul namespace openspace { -struct RenderData; - namespace documentation { struct Documentation; } namespace globebrowsing { class RenderableGlobe; } +struct RenderData; class GlobeLabelsComponent : public properties::PropertyOwner, public Fadeable { public: diff --git a/modules/globebrowsing/src/gpulayergroup.cpp b/modules/globebrowsing/src/gpulayergroup.cpp index 6906dcf42d..4528592abf 100644 --- a/modules/globebrowsing/src/gpulayergroup.cpp +++ b/modules/globebrowsing/src/gpulayergroup.cpp @@ -24,11 +24,18 @@ #include +#include #include #include -#include +#include +#include +#include +#include #include +#include #include +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/gpulayergroup.h b/modules/globebrowsing/src/gpulayergroup.h index ec7ae4ec84..6ac2904c99 100644 --- a/modules/globebrowsing/src/gpulayergroup.h +++ b/modules/globebrowsing/src/gpulayergroup.h @@ -27,20 +27,12 @@ #include #include -#include -#include #include namespace ghoul::opengl { class ProgramObject; } namespace openspace::globebrowsing { -struct ChunkTile; -class Layer; -class GPULayer; -struct TileDepthTransform; -struct TileUvTransform; - struct LayerGroup; struct TileIndex; diff --git a/modules/globebrowsing/src/layer.cpp b/modules/globebrowsing/src/layer.cpp index 301089affa..681647c46b 100644 --- a/modules/globebrowsing/src/layer.cpp +++ b/modules/globebrowsing/src/layer.cpp @@ -24,18 +24,17 @@ #include -#include -#include -#include -#include #include -#include #include -#include +#include +#include #include #include - -namespace openspace::globebrowsing { +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "Layer"; @@ -175,6 +174,8 @@ namespace { #include "layer_codegen.cpp" } // namespace +namespace openspace::globebrowsing { + documentation::Documentation Layer::Documentation() { return codegen::doc("globebrowsing_layer"); } diff --git a/modules/globebrowsing/src/layer.h b/modules/globebrowsing/src/layer.h index 3843d45543..c31e682bb3 100644 --- a/modules/globebrowsing/src/layer.h +++ b/modules/globebrowsing/src/layer.h @@ -30,11 +30,17 @@ #include #include +#include #include -#include #include +#include +#include #include +#include +#include +#include +namespace ghoul { class Dictionary; } namespace openspace::documentation { struct Documentation; } namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/layeradjustment.cpp b/modules/globebrowsing/src/layeradjustment.cpp index c30e895cd3..58ba3756f5 100644 --- a/modules/globebrowsing/src/layeradjustment.cpp +++ b/modules/globebrowsing/src/layeradjustment.cpp @@ -25,8 +25,9 @@ #include #include -#include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ChromaKeyColorInfo = { diff --git a/modules/globebrowsing/src/layeradjustment.h b/modules/globebrowsing/src/layeradjustment.h index d1c1869cdf..07a7751a59 100644 --- a/modules/globebrowsing/src/layeradjustment.h +++ b/modules/globebrowsing/src/layeradjustment.h @@ -31,7 +31,9 @@ #include #include #include +#include +namespace ghoul { class Dictionary; } namespace openspace::documentation { struct Documentation; } namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/layergroup.cpp b/modules/globebrowsing/src/layergroup.cpp index e6c32fd28b..520d928822 100644 --- a/modules/globebrowsing/src/layergroup.cpp +++ b/modules/globebrowsing/src/layergroup.cpp @@ -31,8 +31,14 @@ #include #include #include +#include #include +#include +#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "LayerGroup"; diff --git a/modules/globebrowsing/src/layergroup.h b/modules/globebrowsing/src/layergroup.h index e4dc07f9b9..5f27191c46 100644 --- a/modules/globebrowsing/src/layergroup.h +++ b/modules/globebrowsing/src/layergroup.h @@ -29,11 +29,13 @@ #include #include +#include + +namespace ghoul { class Dictionary; } namespace openspace::globebrowsing { class Layer; -struct TileProvider; /** * Convenience class for dealing with multiple `Layer`s. diff --git a/modules/globebrowsing/src/layergroupid.cpp b/modules/globebrowsing/src/layergroupid.cpp index 9c349e8d4c..887c0161e2 100644 --- a/modules/globebrowsing/src/layergroupid.cpp +++ b/modules/globebrowsing/src/layergroupid.cpp @@ -24,6 +24,8 @@ #include +#include + namespace openspace::globebrowsing::layers { // The order and values of these enums are implicitly used in many places in the code and diff --git a/modules/globebrowsing/src/layergroupid.h b/modules/globebrowsing/src/layergroupid.h index 71e94beaf7..2c3b8bede6 100644 --- a/modules/globebrowsing/src/layergroupid.h +++ b/modules/globebrowsing/src/layergroupid.h @@ -25,9 +25,11 @@ #ifndef __OPENSPACE_MODULE_GLOBEBROWSING___LAYERGROUPID___H__ #define __OPENSPACE_MODULE_GLOBEBROWSING___LAYERGROUPID___H__ -#include +#include +#include +#include #include -#include +#include namespace openspace::globebrowsing::layers { diff --git a/modules/globebrowsing/src/layermanager.cpp b/modules/globebrowsing/src/layermanager.cpp index f555e4002c..9f6a02a80d 100644 --- a/modules/globebrowsing/src/layermanager.cpp +++ b/modules/globebrowsing/src/layermanager.cpp @@ -27,11 +27,13 @@ #include #include #include -#include #include -#include #include #include +#include +#include +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/layermanager.h b/modules/globebrowsing/src/layermanager.h index 06042ca9b0..4427ac5afd 100644 --- a/modules/globebrowsing/src/layermanager.h +++ b/modules/globebrowsing/src/layermanager.h @@ -28,20 +28,17 @@ #include #include -#include #include #include #include namespace ghoul { class Dictionary; } - namespace openspace::documentation { struct Documentation; } namespace openspace::globebrowsing { class Layer; struct LayerGroup; -class TileTextureInitData; /** * Manages multiple LayerGroups. diff --git a/modules/globebrowsing/src/layerrendersettings.cpp b/modules/globebrowsing/src/layerrendersettings.cpp index e7f6d8c4b9..c8e5372fa3 100644 --- a/modules/globebrowsing/src/layerrendersettings.cpp +++ b/modules/globebrowsing/src/layerrendersettings.cpp @@ -24,6 +24,10 @@ #include +#include +#include +#include + namespace { constexpr openspace::properties::Property::PropertyInfo SetDefaultInfo = { "SetDefault", diff --git a/modules/globebrowsing/src/layerrendersettings.h b/modules/globebrowsing/src/layerrendersettings.h index 111fcbc195..d1f0fa048e 100644 --- a/modules/globebrowsing/src/layerrendersettings.h +++ b/modules/globebrowsing/src/layerrendersettings.h @@ -29,6 +29,7 @@ #include #include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/lrucache.h b/modules/globebrowsing/src/lrucache.h index d9dd2770ba..aa56d20dc8 100644 --- a/modules/globebrowsing/src/lrucache.h +++ b/modules/globebrowsing/src/lrucache.h @@ -27,6 +27,7 @@ #include #include +#include #include namespace openspace::globebrowsing::cache { diff --git a/modules/globebrowsing/src/lruthreadpool.inl b/modules/globebrowsing/src/lruthreadpool.inl index c46de72dd1..c7dca2ba3e 100644 --- a/modules/globebrowsing/src/lruthreadpool.inl +++ b/modules/globebrowsing/src/lruthreadpool.inl @@ -22,6 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include + namespace openspace::globebrowsing { template diff --git a/modules/globebrowsing/src/memoryawaretilecache.cpp b/modules/globebrowsing/src/memoryawaretilecache.cpp index 2c4f56936d..509a294ace 100644 --- a/modules/globebrowsing/src/memoryawaretilecache.cpp +++ b/modules/globebrowsing/src/memoryawaretilecache.cpp @@ -25,12 +25,18 @@ #include #include -#include +#include #include +#include #include +#include +#include #include #include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "MemoryAwareTileCache"; diff --git a/modules/globebrowsing/src/memoryawaretilecache.h b/modules/globebrowsing/src/memoryawaretilecache.h index 9f9144a8b7..d75bd291e3 100644 --- a/modules/globebrowsing/src/memoryawaretilecache.h +++ b/modules/globebrowsing/src/memoryawaretilecache.h @@ -22,18 +22,20 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___MEMORY_AWARE_TILE_CACHE___H__ -#define __OPENSPACE_MODULE_GLOBEBROWSING___MEMORY_AWARE_TILE_CACHE___H__ +#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___MEMORYAWARETILECACHE___H__ +#define __OPENSPACE_MODULE_GLOBEBROWSING___MEMORYAWARETILECACHE___H__ #include #include #include #include #include -#include #include +#include +#include #include #include +#include #include namespace openspace::globebrowsing { @@ -167,4 +169,4 @@ private: } // namespace openspace::globebrowsing::cache -#endif // __OPENSPACE_MODULE_GLOBEBROWSING___MEMORY_AWARE_TILE_CACHE___H__ +#endif // __OPENSPACE_MODULE_GLOBEBROWSING___MEMORYAWARETILECACHE___H__ diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h index d7319d6a6c..77742644f7 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.h @@ -27,7 +27,9 @@ #include #include +#include #include +#include namespace openspace { template struct Job; } diff --git a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl index b9ddd8f4ff..93e434cd28 100644 --- a/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl +++ b/modules/globebrowsing/src/prioritizingconcurrentjobmanager.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/rawtile.h b/modules/globebrowsing/src/rawtile.h index 4152c57e37..d610b04f58 100644 --- a/modules/globebrowsing/src/rawtile.h +++ b/modules/globebrowsing/src/rawtile.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ namespace openspace::globebrowsing { -class TileTextureInitData; - struct RawTile { enum class ReadError { None = 0, // = CE_None diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index 11f1abc6dd..180a746ae0 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -28,12 +28,28 @@ #include #include #include -#include +#include #include #include #include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning (push) @@ -42,182 +58,176 @@ #endif // _MSC_VER #include -#include -#include - #include #ifdef _MSC_VER #pragma warning (pop) #endif // _MSC_VER -#include -#include -#include -#include - namespace openspace::globebrowsing { namespace { constexpr std::string_view _loggerCat = "RawTileDataReader"; -enum class Side { - Left = 0, - Top, - Right, - Bottom -}; - -float interpretFloat(GLenum glType, const std::byte* src) { - switch (glType) { - case GL_UNSIGNED_BYTE: - return static_cast(*reinterpret_cast(src)); - case GL_UNSIGNED_SHORT: - return static_cast(*reinterpret_cast(src)); - case GL_SHORT: - return static_cast(*reinterpret_cast(src)); - case GL_UNSIGNED_INT: - return static_cast(*reinterpret_cast(src)); - case GL_INT: - return static_cast(*reinterpret_cast(src)); - case GL_HALF_FLOAT: - return static_cast(*reinterpret_cast(src)); - case GL_FLOAT: - return static_cast(*reinterpret_cast(src)); - case GL_DOUBLE: - return static_cast(*reinterpret_cast(src)); - default: - throw ghoul::MissingCaseException(); - } -} - -GDALDataType toGDALDataType(GLenum glType) { - switch (glType) { - case GL_UNSIGNED_BYTE: - return GDT_Byte; - case GL_UNSIGNED_SHORT: - return GDT_UInt16; - case GL_SHORT: - return GDT_Int16; - case GL_UNSIGNED_INT: - return GDT_UInt32; - case GL_INT: - return GDT_Int32; - case GL_FLOAT: - return GDT_Float32; - case GL_DOUBLE: - return GDT_Float64; - default: - LERRORC( - "GDALRawTileDataReader", - std::format( - "OpenGL data type unknown to GDAL: {}", static_cast(glType) - ) - ); - throw ghoul::MissingCaseException(); - } -} - -bool isInside(const PixelRegion& lhs, const PixelRegion& rhs) { - const glm::ivec2 e = lhs.start + lhs.numPixels; - const glm::ivec2 re = rhs.start + rhs.numPixels; - return rhs.start.x <= lhs.start.x && e.x <= re.x && - rhs.start.y <= lhs.start.y && e.y <= re.y; -} - -/** - * Returns the geo transform from raster space to projection coordinates as defined - * by GDAL. - */ -std::array geoTransform(int rasterX, int rasterY) { - const GeodeticPatch cov( - Geodetic2{ 0.0, 0.0 }, - Geodetic2{ glm::half_pi(), glm::pi() } - ); - return { - glm::degrees(cov.corner(Quad::NORTH_WEST).lon), - glm::degrees(cov.size().lon) / rasterX, - 0.0, - glm::degrees(cov.corner(Quad::NORTH_WEST).lat), - 0.0, - glm::degrees(-cov.size().lat) / rasterY + enum class Side { + Left = 0, + Top, + Right, + Bottom }; -} -/** - * Get the pixel corresponding to a specific position on the globe defined by the - * Geodetic2 coordinate \p geo. If the dataset has overviews the function returns the - * pixel at the lowest overview (highest resolution). - * - * \param geo The position on the globe to convert to pixel space. - * \return a pixel coordinate in the dataset. - */ -glm::ivec2 geodeticToPixel(const Geodetic2& geo, - const std::array& transform) -{ - const std::array& t = transform; - - const double Y = glm::degrees(geo.lat); - const double X = glm::degrees(geo.lon); - - const double divisor = t[2] * t[4] - t[1] * t[5]; - ghoul_assert(divisor != 0.0, "Division by zero"); - - const double P = (t[0] * t[5] - t[2] * t[3] + t[2] * Y - t[5] * X) / divisor; - const double L = (-t[0] * t[4] + t[1] * t[3] - t[1] * Y + t[4] * X) / divisor; - // ref: https://www.wolframalpha.com/input/?i=X+%3D+a0+%2B+a1P+%2B+a2L, - // +Y+%3D+b0+%2B+b1P+%2B+b2L,+solve+for+P+and+L - - [[maybe_unused]] const double Xp = t[0] + P * t[1] + L * t[2]; - [[maybe_unused]] const double Yp = t[3] + P * t[4] + L * t[5]; - ghoul_assert(std::abs(X - Xp) < 1e-10, "inverse should yield X as before"); - ghoul_assert(std::abs(Y - Yp) < 1e-10, "inverse should yield Y as before"); - - return glm::ivec2(glm::round(P), glm::round(L)); -} - -/** - * Get a pixel region corresponding to the given GeodeticPatch. If the dataset has - * overviews the function returns the pixel region at the lowest overview (highest - * resolution). - * - * \param \p geodeticPatch is a patch covering an area in geodetic coordinates - * \return A PixelRegion covering the given geodetic patch at highest resolution. - */ -PixelRegion highestResPixelRegion(const GeodeticPatch& geodeticPatch, - const std::array& transform) -{ - const Geodetic2 nwCorner = geodeticPatch.corner(Quad::NORTH_WEST); - const Geodetic2 swCorner = geodeticPatch.corner(Quad::SOUTH_EAST); - const glm::ivec2 pixelStart = geodeticToPixel(nwCorner, transform); - const glm::ivec2 pixelEnd = geodeticToPixel(swCorner, transform); - PixelRegion region; - region.start = pixelStart; - region.numPixels = pixelEnd - pixelStart; - return region; -} - -RawTile::ReadError postProcessErrorCheck(const RawTile& rawTile, - [[maybe_unused]] size_t nRasters, - float noDataValue) -{ - ghoul_assert(nRasters == rawTile.tileMetaData.nValues, "Wrong numbers of max values"); - - const bool hasMissingData = std::any_of( - rawTile.tileMetaData.maxValues.begin(), - rawTile.tileMetaData.maxValues.begin() + rawTile.tileMetaData.nValues, - [noDataValue](float v) { return v == noDataValue; } - ); - - const bool onHighLevel = rawTile.tileIndex.level > 6; - if (hasMissingData && onHighLevel) { - return RawTile::ReadError::Fatal; + float interpretFloat(GLenum glType, const std::byte* src) { + switch (glType) { + case GL_UNSIGNED_BYTE: + return static_cast(*reinterpret_cast(src)); + case GL_UNSIGNED_SHORT: + return static_cast(*reinterpret_cast(src)); + case GL_SHORT: + return static_cast(*reinterpret_cast(src)); + case GL_UNSIGNED_INT: + return static_cast(*reinterpret_cast(src)); + case GL_INT: + return static_cast(*reinterpret_cast(src)); + case GL_HALF_FLOAT: + return static_cast(*reinterpret_cast(src)); + case GL_FLOAT: + return static_cast(*reinterpret_cast(src)); + case GL_DOUBLE: + return static_cast(*reinterpret_cast(src)); + default: + throw ghoul::MissingCaseException(); + } } - else { - return RawTile::ReadError::None; - } -} + GDALDataType toGDALDataType(GLenum glType) { + switch (glType) { + case GL_UNSIGNED_BYTE: + return GDT_Byte; + case GL_UNSIGNED_SHORT: + return GDT_UInt16; + case GL_SHORT: + return GDT_Int16; + case GL_UNSIGNED_INT: + return GDT_UInt32; + case GL_INT: + return GDT_Int32; + case GL_FLOAT: + return GDT_Float32; + case GL_DOUBLE: + return GDT_Float64; + default: + LERRORC( + "GDALRawTileDataReader", + std::format( + "OpenGL data type unknown to GDAL: {}", static_cast(glType) + ) + ); + throw ghoul::MissingCaseException(); + } + } + + bool isInside(const PixelRegion& lhs, const PixelRegion& rhs) { + const glm::ivec2 e = lhs.start + lhs.numPixels; + const glm::ivec2 re = rhs.start + rhs.numPixels; + return rhs.start.x <= lhs.start.x && e.x <= re.x && + rhs.start.y <= lhs.start.y && e.y <= re.y; + } + + /** + * Returns the geo transform from raster space to projection coordinates as defined + * by GDAL. + */ + std::array geoTransform(int rasterX, int rasterY) { + const GeodeticPatch cov( + Geodetic2{ 0.0, 0.0 }, + Geodetic2{ glm::half_pi(), glm::pi() } + ); + return { + glm::degrees(cov.corner(Quad::NORTH_WEST).lon), + glm::degrees(cov.size().lon) / rasterX, + 0.0, + glm::degrees(cov.corner(Quad::NORTH_WEST).lat), + 0.0, + glm::degrees(-cov.size().lat) / rasterY + }; + } + + /** + * Get the pixel corresponding to a specific position on the globe defined by the + * Geodetic2 coordinate \p geo. If the dataset has overviews the function returns the + * pixel at the lowest overview (highest resolution). + * + * \param geo The position on the globe to convert to pixel space. + * \return a pixel coordinate in the dataset. + */ + glm::ivec2 geodeticToPixel(const Geodetic2& geo, + const std::array& transform) + { + const std::array& t = transform; + + const double Y = glm::degrees(geo.lat); + const double X = glm::degrees(geo.lon); + + const double divisor = t[2] * t[4] - t[1] * t[5]; + ghoul_assert(divisor != 0.0, "Division by zero"); + + const double P = (t[0] * t[5] - t[2] * t[3] + t[2] * Y - t[5] * X) / divisor; + const double L = (-t[0] * t[4] + t[1] * t[3] - t[1] * Y + t[4] * X) / divisor; + // ref: https://www.wolframalpha.com/input/?i=X+%3D+a0+%2B+a1P+%2B+a2L, + // +Y+%3D+b0+%2B+b1P+%2B+b2L,+solve+for+P+and+L + + [[maybe_unused]] const double Xp = t[0] + P * t[1] + L * t[2]; + [[maybe_unused]] const double Yp = t[3] + P * t[4] + L * t[5]; + ghoul_assert(std::abs(X - Xp) < 1e-10, "inverse should yield X as before"); + ghoul_assert(std::abs(Y - Yp) < 1e-10, "inverse should yield Y as before"); + + return glm::ivec2(glm::round(P), glm::round(L)); + } + + /** + * Get a pixel region corresponding to the given GeodeticPatch. If the dataset has + * overviews the function returns the pixel region at the lowest overview (highest + * resolution). + * + * \param \p geodeticPatch is a patch covering an area in geodetic coordinates + * \return A PixelRegion covering the given geodetic patch at highest resolution. + */ + PixelRegion highestResPixelRegion(const GeodeticPatch& geodeticPatch, + const std::array& transform) + { + const Geodetic2 nwCorner = geodeticPatch.corner(Quad::NORTH_WEST); + const Geodetic2 swCorner = geodeticPatch.corner(Quad::SOUTH_EAST); + const glm::ivec2 pixelStart = geodeticToPixel(nwCorner, transform); + const glm::ivec2 pixelEnd = geodeticToPixel(swCorner, transform); + PixelRegion region; + region.start = pixelStart; + region.numPixels = pixelEnd - pixelStart; + return region; + } + + RawTile::ReadError postProcessErrorCheck(const RawTile& rawTile, + [[maybe_unused]] size_t nRasters, + float noDataValue) + { + ghoul_assert( + nRasters == rawTile.tileMetaData.nValues, + "Wrong numbers of max values" + ); + + const bool hasMissingData = std::any_of( + rawTile.tileMetaData.maxValues.begin(), + rawTile.tileMetaData.maxValues.begin() + rawTile.tileMetaData.nValues, + [noDataValue](float v) { return v == noDataValue; } + ); + + const bool onHighLevel = rawTile.tileIndex.level > 6; + if (hasMissingData && onHighLevel) { + return RawTile::ReadError::Fatal; + } + else { + return RawTile::ReadError::None; + } + } } // namespace RawTileDataReader::RawTileDataReader(std::string filePath, TileTextureInitData initData, diff --git a/modules/globebrowsing/src/rawtiledatareader.h b/modules/globebrowsing/src/rawtiledatareader.h index 37ef58407b..fc2bab4f35 100644 --- a/modules/globebrowsing/src/rawtiledatareader.h +++ b/modules/globebrowsing/src/rawtiledatareader.h @@ -27,20 +27,21 @@ #include #include -#include #include +#include +#include +#include #include -#include -#include #include +#include +#include +#include +#include class GDALDataset; -class GDALRasterBand; namespace openspace::globebrowsing { -class GeodeticPatch; - class RawTileDataReader { public: BooleanType(PerformPreprocessing); @@ -49,11 +50,11 @@ public: * Opens a GDALDataset in readonly mode and calculates meta data required for * reading tile using a TileIndex. * - * \param filePath the path to a specific file GDAL can read - * \param initData information about the textures that will be creatd by this reader - * \param cacheProperties contains settings about whether the reader should + * \param filePath The path to a specific file GDAL can read + * \param initData Information about the textures that will be creatd by this reader + * \param cacheProperties Contains settings about whether the reader should * utilize cache - * \param preprocess whether the loaded data should be calculate meta data about the + * \param preprocess Whether the loaded data should be calculate meta data about the * dataset */ RawTileDataReader(std::string filePath, TileTextureInitData initData, diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index f530203e3c..ca55fc9b3d 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -29,21 +29,26 @@ #include #include #include +#include +#include #include #include -#include #include #include #include #include #include #include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include @@ -51,18 +56,13 @@ #include #include #include +#include +#include +#include #include -#include -#include - -#if defined(__APPLE__) || (defined(__linux__) && defined(__clang__)) -#include -namespace std { - using namespace experimental; -} // namespace std -#else -#include -#endif +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableGlobe"; diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index d89fe4c17c..bbf56b9b6b 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -37,22 +37,22 @@ #include #include #include +#include #include #include #include #include +#include #include +#include #include -#include +#include +#include #include -namespace openspace::documentation { struct Documentation; } - namespace openspace::globebrowsing { -class GPULayerGroup; -class RenderableGlobe; -struct TileIndex; +class Layer; struct BoundingHeights { float min; @@ -61,9 +61,6 @@ struct BoundingHeights { bool tileOK; }; -namespace chunklevelevaluator { class Evaluator; } -namespace culling { class ChunkCuller; } - struct Chunk { enum class Status : uint8_t { DoNothing, @@ -105,9 +102,9 @@ public: void deinitializeGL() override; bool isReady() const override; + void update(const UpdateData& data) override; void render(const RenderData& data, RendererTasks& rendererTask) override; void renderSecondary(const RenderData& data, RendererTasks&) override; - void update(const UpdateData& data) override; SurfacePositionHandle calculateSurfacePositionHandle( const glm::dvec3& targetModelSpace) const override; diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp index 81feb7d90c..54bbee522f 100644 --- a/modules/globebrowsing/src/ringscomponent.cpp +++ b/modules/globebrowsing/src/ringscomponent.cpp @@ -25,30 +25,29 @@ #include #include -#include #include -#include #include -#include -#include #include #include +#include #include #include -#include -#include +#include #include #include +#include #include #include #include #include #include #include +#include +#include #include -#include -#include -#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RingsComponent"; diff --git a/modules/globebrowsing/src/ringscomponent.h b/modules/globebrowsing/src/ringscomponent.h index 288beb3277..850ee89b14 100644 --- a/modules/globebrowsing/src/ringscomponent.h +++ b/modules/globebrowsing/src/ringscomponent.h @@ -34,20 +34,21 @@ #include #include #include -#include +#include #include +#include +#include #include #include +#include -namespace ghoul { class Dictionary; } -namespace ghoul::filesystem { class File; } namespace ghoul::opengl { class ProgramObject; } namespace openspace { - struct RenderData; - struct UpdateData; namespace documentation { struct Documentation; } +struct RenderData; +struct UpdateData; class RingsComponent : public properties::PropertyOwner, public Fadeable { public: diff --git a/modules/globebrowsing/src/shadowcomponent.cpp b/modules/globebrowsing/src/shadowcomponent.cpp index ae0e14e74f..9d22d7bc2e 100644 --- a/modules/globebrowsing/src/shadowcomponent.cpp +++ b/modules/globebrowsing/src/shadowcomponent.cpp @@ -25,31 +25,20 @@ #include #include -#include -#include #include -#include #include -#include -#include #include #include +#include #include -#include +#include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ShadowComponent"; diff --git a/modules/globebrowsing/src/shadowcomponent.h b/modules/globebrowsing/src/shadowcomponent.h index 167761bf18..1300c7df19 100644 --- a/modules/globebrowsing/src/shadowcomponent.h +++ b/modules/globebrowsing/src/shadowcomponent.h @@ -28,28 +28,24 @@ #include #include -#include #include #include -#include #include -#include -#include #include -#include -#include -#include -#include +#include +#include -namespace ghoul { class Dictionary; } -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { class ProgramObject; } +namespace ghoul { + namespace filesystem { class File; } + namespace opengl { class ProgramObject; } + class Dictionary; +} // namespace ghoul namespace openspace { - struct RenderData; - struct UpdateData; namespace documentation { struct Documentation; } +struct RenderData; +struct UpdateData; class ShadowComponent : public properties::PropertyOwner { public: @@ -120,8 +116,6 @@ private: glm::dvec3 _cameraFocus = glm::dvec3(0.0); glm::dquat _cameraRotation = glm::dquat(1.0, 0.0, 0.0, 0.0); - std::stringstream _serializedCamera; - std::unique_ptr _lightCamera; // DEBUG diff --git a/modules/globebrowsing/src/skirtedgrid.cpp b/modules/globebrowsing/src/skirtedgrid.cpp index a5d32707c6..a49119e696 100644 --- a/modules/globebrowsing/src/skirtedgrid.cpp +++ b/modules/globebrowsing/src/skirtedgrid.cpp @@ -24,8 +24,11 @@ #include -#include #include +#include +#include +#include +#include namespace { size_t numElements(int xSegments, int ySegments) { diff --git a/modules/globebrowsing/src/skirtedgrid.h b/modules/globebrowsing/src/skirtedgrid.h index 022d14cbea..84eb8a9f0c 100644 --- a/modules/globebrowsing/src/skirtedgrid.h +++ b/modules/globebrowsing/src/skirtedgrid.h @@ -25,9 +25,7 @@ #ifndef __OPENSPACE_MODULE_GLOBEBROWSING___SKIRTEDGRID___H__ #define __OPENSPACE_MODULE_GLOBEBROWSING___SKIRTEDGRID___H__ -#include #include -#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileindex.cpp b/modules/globebrowsing/src/tileindex.cpp index 8b9e3c35d1..7890686889 100644 --- a/modules/globebrowsing/src/tileindex.cpp +++ b/modules/globebrowsing/src/tileindex.cpp @@ -24,6 +24,8 @@ #include +#include + namespace openspace::globebrowsing { bool operator==(const TileIndex& lhs, const TileIndex& rhs) { diff --git a/modules/globebrowsing/src/tileindex.h b/modules/globebrowsing/src/tileindex.h index 83469d76c2..3768de81b3 100644 --- a/modules/globebrowsing/src/tileindex.h +++ b/modules/globebrowsing/src/tileindex.h @@ -27,7 +27,7 @@ #include #include -#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileloadjob.cpp b/modules/globebrowsing/src/tileloadjob.cpp index 15257ac386..ca077d3d75 100644 --- a/modules/globebrowsing/src/tileloadjob.cpp +++ b/modules/globebrowsing/src/tileloadjob.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileloadjob.h b/modules/globebrowsing/src/tileloadjob.h index 326876e58d..5ff93fa58c 100644 --- a/modules/globebrowsing/src/tileloadjob.h +++ b/modules/globebrowsing/src/tileloadjob.h @@ -26,8 +26,8 @@ #define __OPENSPACE_MODULE_GLOBEBROWSING___TILELOADJOB___H__ #include - #include + #include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp index b1d99ae53d..18c3cc9634 100644 --- a/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/defaulttileprovider.cpp @@ -29,7 +29,16 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FilePathInfo = { diff --git a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h index de1b514fc8..f297355b25 100644 --- a/modules/globebrowsing/src/tileprovider/defaulttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/defaulttileprovider.h @@ -26,9 +26,13 @@ #define __OPENSPACE_MODULE_GLOBEBROWSING___TILEPROVIDER__DEFAULTTILEPROVIDER___H__ #include -#include + #include -#include +#include +#include +#include +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.cpp b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.cpp index e3128d3d77..cbee800bcb 100644 --- a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.cpp @@ -24,8 +24,13 @@ #include +#include #include #include +#include +#include +#include +#include #include namespace { diff --git a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h index ab26c8389a..89634287a8 100644 --- a/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/imagesequencetileprovider.h @@ -28,6 +28,9 @@ #include #include +#include +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.cpp b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.cpp index eb8c324d4f..e72e6f93cb 100644 --- a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.cpp @@ -25,7 +25,14 @@ #include #include +#include #include +#include +#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo FilePathInfo = { diff --git a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h index eed769ac3a..ea48cb0e83 100644 --- a/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/singleimagetileprovider.h @@ -27,7 +27,8 @@ #include -namespace openspace { struct Documentation; } +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp index 2ebe0e231b..67a413705d 100644 --- a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp @@ -25,10 +25,16 @@ #include #include +#include +#include #include #include #include -#include +#include +#include +#include +#include +#include #include #include diff --git a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h index 622301f8f7..02d6642df3 100644 --- a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h +++ b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.h @@ -27,6 +27,8 @@ #include +#include + namespace openspace::globebrowsing { class SizeReferenceTileProvider : public TextTileProvider { diff --git a/modules/globebrowsing/src/tileprovider/spoutimageprovider.cpp b/modules/globebrowsing/src/tileprovider/spoutimageprovider.cpp index f0080b81f6..626da0fc05 100644 --- a/modules/globebrowsing/src/tileprovider/spoutimageprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/spoutimageprovider.cpp @@ -24,7 +24,12 @@ #include +#include #include +#include +#include +#include +#include #ifdef OPENSPACE_HAS_SPOUT #ifndef WIN32_LEAN_AND_MEAN @@ -175,7 +180,7 @@ void SpoutImageProvider::internalDeinitialize() { Tile SpoutImageProvider::tile(const TileIndex& tileIndex) { ZoneScoped; - spoutUpdate = true; + _spoutUpdate = true; return tiles[tileIndex.x]; } @@ -189,7 +194,7 @@ TileDepthTransform SpoutImageProvider::depthTransform() { void SpoutImageProvider::update() { #ifdef OPENSPACE_HAS_SPOUT - if (!spoutUpdate) { + if (!_spoutUpdate) { return; } diff --git a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h index 31b185c83f..5feeb42408 100644 --- a/modules/globebrowsing/src/tileprovider/spoutimageprovider.h +++ b/modules/globebrowsing/src/tileprovider/spoutimageprovider.h @@ -27,7 +27,13 @@ #include +#include +#include +#include + +#ifdef OPENSPACE_HAS_SPOUT namespace openspace::spout { class SpoutReceiverPropertyProxy; } +#endif // OPENSPACE_HAS_SPOUT namespace openspace::globebrowsing { @@ -57,7 +63,7 @@ private: std::unique_ptr spoutReceiver; #endif // OPENSPACE_HAS_SPOUT - bool spoutUpdate = false; + bool _spoutUpdate = false; }; } // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp index 29432982e5..344020049d 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp @@ -26,22 +26,35 @@ #include #include +#include #include +#include #include #include #include #include #include #include +#include #include #include +#include #include #include +#include +#include +#include +#include #include +#include #include +#include +#include +#include #include #include -#include +#include +#include #include namespace { diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h index cdb064b6ab..4a9fda77e7 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.h +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.h @@ -28,7 +28,20 @@ #include #include -#include +#include +#include +#include +#include +#include +#include +#include + +namespace ghoul::opengl { + class ProgramObject; + class Texture; +} // namespace ghoul::opengl + +namespace openspace { class Time; } namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/texttileprovider.cpp b/modules/globebrowsing/src/tileprovider/texttileprovider.cpp index ef94b8565a..4277af1d61 100644 --- a/modules/globebrowsing/src/tileprovider/texttileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/texttileprovider.cpp @@ -26,12 +26,18 @@ #include #include +#include +#include #include #include #include #include #include #include +#include +#include +#include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tileprovider/texttileprovider.h b/modules/globebrowsing/src/tileprovider/texttileprovider.h index 0f2acbf2f8..ae9483502c 100644 --- a/modules/globebrowsing/src/tileprovider/texttileprovider.h +++ b/modules/globebrowsing/src/tileprovider/texttileprovider.h @@ -27,8 +27,18 @@ #include +#include +#include + +namespace ghoul::fontrendering { + class Font; + class FontRenderer; +} // namespace ghoul::fontrendering + namespace openspace::globebrowsing { +namespace cache { class MemoryAwareTileCache; } + class TextTileProvider : public TileProvider { public: explicit TextTileProvider(TileTextureInitData initData_, size_t fontSize_ = 48); diff --git a/modules/globebrowsing/src/tileprovider/tileindextileprovider.cpp b/modules/globebrowsing/src/tileprovider/tileindextileprovider.cpp index aa50fbfb04..527c961ef2 100644 --- a/modules/globebrowsing/src/tileprovider/tileindextileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/tileindextileprovider.cpp @@ -25,6 +25,13 @@ #include #include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo UniqueBackgroundColors = { diff --git a/modules/globebrowsing/src/tileprovider/tileprovider.cpp b/modules/globebrowsing/src/tileprovider/tileprovider.cpp index 057ce06a29..1bc8794397 100644 --- a/modules/globebrowsing/src/tileprovider/tileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/tileprovider.cpp @@ -24,39 +24,12 @@ #include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include -#include -#include "cpl_minixml.h" namespace { std::unique_ptr DefaultTileTexture; diff --git a/modules/globebrowsing/src/tileprovider/tileprovider.h b/modules/globebrowsing/src/tileprovider/tileprovider.h index 08522ebc21..ab8f69fb15 100644 --- a/modules/globebrowsing/src/tileprovider/tileprovider.h +++ b/modules/globebrowsing/src/tileprovider/tileprovider.h @@ -28,34 +28,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +namespace ghoul { class Dictionary; } +namespace openspace { struct Documentation; } struct CPLXMLNode; -namespace ghoul::fontrendering { - class Font; - class FontRenderer; -} // namespace ghoul::fontrendering - -namespace openspace { class PixelBuffer; } - namespace openspace::globebrowsing { - class AsyncTileDataProvider; - struct RawTile; - struct TileIndex; - namespace cache { class MemoryAwareTileCache; } -} // namespace openspace::globebrowsing -namespace openspace::globebrowsing { +struct TileIndex; // If you add a new type, also add it to shaders/texturetilemapping.glsl enum class Type { @@ -131,14 +115,11 @@ struct TileProvider : public properties::PropertyOwner { */ virtual float noDataValueAsFloat() = 0; - virtual ChunkTile chunkTile(TileIndex tileIndex, int parents = 0, int maxParents = 1337); ChunkTilePile chunkTilePile(TileIndex tileIndex, int pileSize); - std::string name; - uint16_t uniqueIdentifier = 0; bool isInitialized = false; diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp index e7d943f04a..05656d3457 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.cpp @@ -28,7 +28,12 @@ #include #include #include -#include +#include +#include +#include +#include +#include +#include namespace { struct [[codegen::Dictionary(TileProviderByDate)]] Parameters { diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbydate.h b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h index 89c2f90a5c..17794f186d 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbydate.h +++ b/modules/globebrowsing/src/tileprovider/tileproviderbydate.h @@ -27,8 +27,6 @@ #include -#include - namespace openspace::globebrowsing { class TileProviderByDate : public TileProvider { diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.cpp b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.cpp index e2cd4f918a..6be9b39213 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.cpp +++ b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.cpp @@ -25,6 +25,13 @@ #include #include +#include +#include +#include +#include +#include +#include +#include namespace { // This TileProvider provides the ability to override the contents for tiles at diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h index 5519d41df8..69c4b929f1 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h +++ b/modules/globebrowsing/src/tileprovider/tileproviderbyindex.h @@ -27,6 +27,9 @@ #include +#include +#include + namespace openspace::globebrowsing { class TileProviderByIndex : public TileProvider { diff --git a/modules/globebrowsing/src/tileprovider/tileproviderbylevel.cpp b/modules/globebrowsing/src/tileprovider/tileproviderbylevel.cpp index df59938b58..9d4df09e52 100644 --- a/modules/globebrowsing/src/tileprovider/tileproviderbylevel.cpp +++ b/modules/globebrowsing/src/tileprovider/tileproviderbylevel.cpp @@ -24,7 +24,13 @@ #include +#include #include +#include +#include +#include +#include +#include namespace { // This tile provider will switch between different tile providers specified within diff --git a/modules/globebrowsing/src/tiletextureinitdata.cpp b/modules/globebrowsing/src/tiletextureinitdata.cpp index 68c69993b1..ed8485829f 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.cpp +++ b/modules/globebrowsing/src/tiletextureinitdata.cpp @@ -24,77 +24,79 @@ #include +#include +#include + namespace { -size_t numberOfRasters(ghoul::opengl::Texture::Format format) { - switch (format) { - case ghoul::opengl::Texture::Format::Red: - return 1; - case ghoul::opengl::Texture::Format::RG: - return 2; - case ghoul::opengl::Texture::Format::RGB: - case ghoul::opengl::Texture::Format::BGR: - return 3; - case ghoul::opengl::Texture::Format::RGBA: - case ghoul::opengl::Texture::Format::BGRA: - return 4; - default: - throw ghoul::MissingCaseException(); + size_t numberOfRasters(ghoul::opengl::Texture::Format format) { + switch (format) { + case ghoul::opengl::Texture::Format::Red: + return 1; + case ghoul::opengl::Texture::Format::RG: + return 2; + case ghoul::opengl::Texture::Format::RGB: + case ghoul::opengl::Texture::Format::BGR: + return 3; + case ghoul::opengl::Texture::Format::RGBA: + case ghoul::opengl::Texture::Format::BGRA: + return 4; + default: + throw ghoul::MissingCaseException(); + } } -} -size_t numberOfBytes(GLenum glType) { - switch (glType) { - case GL_UNSIGNED_BYTE: return sizeof(GLubyte); - case GL_BYTE: return sizeof(GLbyte); - case GL_UNSIGNED_SHORT: return sizeof(GLushort); - case GL_SHORT: return sizeof(GLshort); - case GL_UNSIGNED_INT: return sizeof(GLuint); - case GL_INT: return sizeof(GLint); - case GL_HALF_FLOAT: return sizeof(GLhalf); - case GL_FLOAT: return sizeof(GLfloat); - case GL_DOUBLE: return sizeof(GLdouble); - default: - throw ghoul::MissingCaseException(); + size_t numberOfBytes(GLenum glType) { + switch (glType) { + case GL_UNSIGNED_BYTE: return sizeof(GLubyte); + case GL_BYTE: return sizeof(GLbyte); + case GL_UNSIGNED_SHORT: return sizeof(GLushort); + case GL_SHORT: return sizeof(GLshort); + case GL_UNSIGNED_INT: return sizeof(GLuint); + case GL_INT: return sizeof(GLint); + case GL_HALF_FLOAT: return sizeof(GLhalf); + case GL_FLOAT: return sizeof(GLfloat); + case GL_DOUBLE: return sizeof(GLdouble); + default: + throw ghoul::MissingCaseException(); + } } -} -unsigned int uniqueIdForTextureFormat(ghoul::opengl::Texture::Format textureFormat) { - switch (textureFormat) { - case ghoul::opengl::Texture::Format::Red: return 0; - case ghoul::opengl::Texture::Format::RG: return 1; - case ghoul::opengl::Texture::Format::RGB: return 2; - case ghoul::opengl::Texture::Format::BGR: return 3; - case ghoul::opengl::Texture::Format::RGBA: return 4; - case ghoul::opengl::Texture::Format::BGRA: return 5; - case ghoul::opengl::Texture::Format::DepthComponent: return 6; - default: throw ghoul::MissingCaseException(); + unsigned int uniqueIdForTextureFormat(ghoul::opengl::Texture::Format textureFormat) { + switch (textureFormat) { + case ghoul::opengl::Texture::Format::Red: return 0; + case ghoul::opengl::Texture::Format::RG: return 1; + case ghoul::opengl::Texture::Format::RGB: return 2; + case ghoul::opengl::Texture::Format::BGR: return 3; + case ghoul::opengl::Texture::Format::RGBA: return 4; + case ghoul::opengl::Texture::Format::BGRA: return 5; + case ghoul::opengl::Texture::Format::DepthComponent: return 6; + default: throw ghoul::MissingCaseException(); + } } -} -openspace::globebrowsing::TileTextureInitData::HashKey calculateHashKey( + openspace::globebrowsing::TileTextureInitData::HashKey calculateHashKey( const glm::ivec3& dimensions, const ghoul::opengl::Texture::Format& format, const GLenum& glType) -{ - ghoul_assert(dimensions.x > 0, "Incorrect dimension"); - ghoul_assert(dimensions.y > 0, "Incorrect dimension"); - ghoul_assert(dimensions.x <= 1024, "Incorrect dimension"); - ghoul_assert(dimensions.y <= 1024, "Incorrect dimension"); - ghoul_assert(dimensions.z == 1, "Incorrect dimension"); - const unsigned int formatId = uniqueIdForTextureFormat(format); - ghoul_assert(formatId < 256, "Incorrect format"); + { + ghoul_assert(dimensions.x > 0, "Incorrect dimension"); + ghoul_assert(dimensions.y > 0, "Incorrect dimension"); + ghoul_assert(dimensions.x <= 1024, "Incorrect dimension"); + ghoul_assert(dimensions.y <= 1024, "Incorrect dimension"); + ghoul_assert(dimensions.z == 1, "Incorrect dimension"); + const unsigned int formatId = uniqueIdForTextureFormat(format); + ghoul_assert(formatId < 256, "Incorrect format"); - openspace::globebrowsing::TileTextureInitData::HashKey res = 0ULL; + openspace::globebrowsing::TileTextureInitData::HashKey res = 0ULL; - res |= dimensions.x; - res |= dimensions.y << 10; - res |= static_cast>(glType) << (10 + 16); - res |= formatId << (10 + 16 + 4); - - return res; -} + res |= dimensions.x; + res |= dimensions.y << 10; + res |= static_cast>(glType) << (10 + 16); + res |= formatId << (10 + 16 + 4); + return res; + } } // namespace namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/tiletextureinitdata.h b/modules/globebrowsing/src/tiletextureinitdata.h index 6ce5aec05c..38321acc5d 100644 --- a/modules/globebrowsing/src/tiletextureinitdata.h +++ b/modules/globebrowsing/src/tiletextureinitdata.h @@ -30,6 +30,7 @@ #include #include #include +#include namespace openspace::globebrowsing { diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index 40a2a0f1bf..9e2d6806c1 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -34,8 +34,10 @@ #include #include #include -#include -#include +#include +#include +#include +#include // @TODO (abock, 2020-08-07) All of the time handling in this class should be cleaned up // a bit. There are lots of conversions between ISO strings for time and Time diff --git a/modules/globebrowsing/src/timequantizer.h b/modules/globebrowsing/src/timequantizer.h index 62f59f63d2..0dd1727309 100644 --- a/modules/globebrowsing/src/timequantizer.h +++ b/modules/globebrowsing/src/timequantizer.h @@ -25,8 +25,8 @@ #ifndef __OPENSPACE_MODULE_GLOBEBROWSING___TIMEQUANTIZER___H__ #define __OPENSPACE_MODULE_GLOBEBROWSING___TIMEQUANTIZER___H__ -#include #include +#include #include namespace openspace { class Time; } diff --git a/modules/imgui/imguimodule.cpp b/modules/imgui/imguimodule.cpp index 1ee6d88ad1..01cf5bea36 100644 --- a/modules/imgui/imguimodule.cpp +++ b/modules/imgui/imguimodule.cpp @@ -37,9 +37,24 @@ #include #include #include +#include #include #include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include // #define SHOW_IMGUI_HELPERS diff --git a/modules/imgui/imguimodule.h b/modules/imgui/imguimodule.h index 338201994f..033095a233 100644 --- a/modules/imgui/imguimodule.h +++ b/modules/imgui/imguimodule.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -49,6 +50,8 @@ #include #include #include +#include +#include struct ImGuiContext; diff --git a/modules/imgui/include/guicomponent.h b/modules/imgui/include/guicomponent.h index e4511d836a..ce25e65af3 100644 --- a/modules/imgui/include/guicomponent.h +++ b/modules/imgui/include/guicomponent.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_IMGUI___GUICOMPONENT___H__ #include + #include namespace openspace::gui { diff --git a/modules/imgui/include/guigibscomponent.h b/modules/imgui/include/guigibscomponent.h index e3a55b4649..4d7d3d4d6a 100644 --- a/modules/imgui/include/guigibscomponent.h +++ b/modules/imgui/include/guigibscomponent.h @@ -27,8 +27,6 @@ #include -#include - namespace openspace::gui { class GuiGIBSComponent : public GuiComponent { diff --git a/modules/imgui/include/guiglobebrowsingcomponent.h b/modules/imgui/include/guiglobebrowsingcomponent.h index eb609dcbf2..9eb0687c37 100644 --- a/modules/imgui/include/guiglobebrowsingcomponent.h +++ b/modules/imgui/include/guiglobebrowsingcomponent.h @@ -27,8 +27,6 @@ #include -#include - namespace openspace::gui { class GuiGlobeBrowsingComponent : public GuiPropertyComponent { diff --git a/modules/imgui/include/guipropertycomponent.h b/modules/imgui/include/guipropertycomponent.h index 3783fd053a..c6df30088d 100644 --- a/modules/imgui/include/guipropertycomponent.h +++ b/modules/imgui/include/guipropertycomponent.h @@ -27,12 +27,9 @@ #include -#include #include #include #include -#include -#include namespace openspace::properties { class Property; diff --git a/modules/imgui/include/guiscenecomponent.h b/modules/imgui/include/guiscenecomponent.h index 7318a0b105..d4232ca226 100644 --- a/modules/imgui/include/guiscenecomponent.h +++ b/modules/imgui/include/guiscenecomponent.h @@ -27,8 +27,6 @@ #include -namespace openspace { class SceneGraphNode; } - namespace openspace::gui { class GuiSceneComponent : public GuiComponent { diff --git a/modules/imgui/include/guispacetimecomponent.h b/modules/imgui/include/guispacetimecomponent.h index e194c5174b..862ece3a3f 100644 --- a/modules/imgui/include/guispacetimecomponent.h +++ b/modules/imgui/include/guispacetimecomponent.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_IMGUI___GUISPACETIMECOMPONENT___H__ #include + #include namespace openspace::gui { diff --git a/modules/imgui/include/renderproperties.h b/modules/imgui/include/renderproperties.h index e717dc9724..0b6dd5447e 100644 --- a/modules/imgui/include/renderproperties.h +++ b/modules/imgui/include/renderproperties.h @@ -26,85 +26,82 @@ #define __OPENSPACE_MODULE_IMGUI___RENDERPROPERTIES___H__ #include - #include -namespace openspace::properties { class Property; } - namespace openspace { +namespace properties { class Property; } + BooleanType(ShowToolTip); -void executeSetPropertyScript(const std::string& id, const std::string& value); - void renderBoolProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderOptionProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderSelectionProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderStringProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderIntListProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDoubleListProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderStringListProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDoubleProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderIntProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderIVec2Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderIVec3Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderIVec4Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderFloatProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderVec2Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderVec3Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderVec4Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDVec2Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDVec3Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDVec4Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDMat2Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDMat3Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderDMat4Property(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); void renderTriggerProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip = ShowToolTip::Yes, double tooltipDelay = 1.0); + ShowToolTip showTooltip = ShowToolTip::Yes, float tooltipDelay = 1.f); } // namespace openspace diff --git a/modules/imgui/src/guiactioncomponent.cpp b/modules/imgui/src/guiactioncomponent.cpp index 80b5307bab..46549f2b6b 100644 --- a/modules/imgui/src/guiactioncomponent.cpp +++ b/modules/imgui/src/guiactioncomponent.cpp @@ -27,10 +27,14 @@ #include #include #include +#include #include #include #include +#include +#include #include +#include namespace openspace::gui { diff --git a/modules/imgui/src/guicomponent.cpp b/modules/imgui/src/guicomponent.cpp index 2daeac8a5f..23201b9ee2 100644 --- a/modules/imgui/src/guicomponent.cpp +++ b/modules/imgui/src/guicomponent.cpp @@ -24,6 +24,8 @@ #include +#include + namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { "Enabled", diff --git a/modules/imgui/src/guigibscomponent.cpp b/modules/imgui/src/guigibscomponent.cpp index 0f2ff65a05..1ea06f26c2 100644 --- a/modules/imgui/src/guigibscomponent.cpp +++ b/modules/imgui/src/guigibscomponent.cpp @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include namespace { const ImVec2 WindowSize = ImVec2(350, 500); diff --git a/modules/imgui/src/guiglobebrowsingcomponent.cpp b/modules/imgui/src/guiglobebrowsingcomponent.cpp index 5ef2dc2072..fe22014708 100644 --- a/modules/imgui/src/guiglobebrowsingcomponent.cpp +++ b/modules/imgui/src/guiglobebrowsingcomponent.cpp @@ -33,9 +33,20 @@ #include #include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { const ImVec2 WindowSize = ImVec2(350, 500); diff --git a/modules/imgui/src/guimemorycomponent.cpp b/modules/imgui/src/guimemorycomponent.cpp index 9cba11e5a7..17feca9224 100644 --- a/modules/imgui/src/guimemorycomponent.cpp +++ b/modules/imgui/src/guimemorycomponent.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace { const ImVec2 Size = ImVec2(350, 500); diff --git a/modules/imgui/src/guimissioncomponent.cpp b/modules/imgui/src/guimissioncomponent.cpp index 9bb9ba7373..82abcfd4cf 100644 --- a/modules/imgui/src/guimissioncomponent.cpp +++ b/modules/imgui/src/guimissioncomponent.cpp @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include namespace { const ImVec2 Size = ImVec2(350, 500); diff --git a/modules/imgui/src/guiparallelcomponent.cpp b/modules/imgui/src/guiparallelcomponent.cpp index 6588e85827..f68cbc2f9e 100644 --- a/modules/imgui/src/guiparallelcomponent.cpp +++ b/modules/imgui/src/guiparallelcomponent.cpp @@ -28,12 +28,10 @@ #include #include #include +#include #include -#include #include #include -#include -#include namespace { void renderHost() { diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index 130d04ffe3..73a63adc84 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -29,8 +29,12 @@ #include #include #include +#include #include #include +#include +#include +#include //#define Debugging_ImGui_TreeNode_Indices diff --git a/modules/imgui/src/guiscenecomponent.cpp b/modules/imgui/src/guiscenecomponent.cpp index 4c9d6068d6..fbbee82137 100644 --- a/modules/imgui/src/guiscenecomponent.cpp +++ b/modules/imgui/src/guiscenecomponent.cpp @@ -31,9 +31,9 @@ #include #include #include +#include #include -#include -#include +#include namespace { const ImVec2 Size = ImVec2(350, 500); diff --git a/modules/imgui/src/guispacetimecomponent.cpp b/modules/imgui/src/guispacetimecomponent.cpp index 60300e5dab..6c1907515d 100644 --- a/modules/imgui/src/guispacetimecomponent.cpp +++ b/modules/imgui/src/guispacetimecomponent.cpp @@ -32,9 +32,18 @@ #include #include #include +#include #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { const ImVec2 Size = ImVec2(350, 500); diff --git a/modules/imgui/src/renderproperties.cpp b/modules/imgui/src/renderproperties.cpp index edc0317262..41e3f44b5a 100644 --- a/modules/imgui/src/renderproperties.cpp +++ b/modules/imgui/src/renderproperties.cpp @@ -35,9 +35,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -48,35 +50,46 @@ #include #include #include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + void renderTooltip(openspace::properties::Property* prop, float delay) { + if (ImGui::IsItemHovered() && (GImGui->HoveredIdTimer > delay)) { + ImGui::BeginTooltip(); + if (!prop->description().empty()) { + ImGui::TextWrapped("%s", prop->description().c_str()); + ImGui::Spacing(); + } + std::string t = std::format("Identifier: {}", prop->uri()); + ImGui::Text("%s", t.c_str()); + ImGui::EndTooltip(); + } + } + + void executeSetPropertyScript(std::string_view id, const std::string& value) { + openspace::global::scriptEngine->queueScript( + std::format("openspace.setPropertyValueSingle('{}', {});", id, value) + ); + } +} // namespace namespace openspace { using namespace properties; -void renderTooltip(Property* prop, double delay) { - if (ImGui::IsItemHovered() && (GImGui->HoveredIdTimer > delay)) { - ImGui::BeginTooltip(); - if (!prop->description().empty()) { - ImGui::TextWrapped("%s", prop->description().c_str()); - ImGui::Spacing(); - } - std::string t = std::format("Identifier: {}", prop->uri()); - ImGui::Text("%s", t.c_str()); - ImGui::EndTooltip(); - } -} - -void executeSetPropertyScript(std::string_view id, const std::string& value) { - global::scriptEngine->queueScript( - std::format("openspace.setPropertyValueSingle('{}', {});", id, value) - ); -} - void renderBoolProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); @@ -97,7 +110,7 @@ void renderBoolProperty(Property* prop, const std::string& ownerName, } void renderOptionProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); @@ -142,7 +155,7 @@ void renderOptionProperty(Property* prop, const std::string& ownerName, } void renderSelectionProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); SelectionProperty* p = static_cast(prop); @@ -186,7 +199,7 @@ void renderSelectionProperty(Property* prop, const std::string& ownerName, } void renderStringProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); StringProperty* p = static_cast(prop); @@ -248,7 +261,7 @@ void renderListProperty(const std::string& name, std::string_view fullIdentifier } void renderDoubleListProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DoubleListProperty* p = static_cast(prop); @@ -266,7 +279,7 @@ void renderDoubleListProperty(Property* prop, const std::string& ownerName, } void renderIntListProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); IntListProperty* p = static_cast(prop); @@ -284,7 +297,7 @@ void renderIntListProperty(Property* prop, const std::string& ownerName, } void renderStringListProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); StringListProperty* p = static_cast(prop); @@ -302,7 +315,7 @@ void renderStringListProperty(Property* prop, const std::string& ownerName, } void renderDoubleProperty(properties::Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DoubleProperty* p = static_cast(prop); @@ -338,7 +351,7 @@ void renderDoubleProperty(properties::Property* prop, const std::string& ownerNa } void renderIntProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); IntProperty* p = static_cast(prop); @@ -362,7 +375,7 @@ void renderIntProperty(Property* prop, const std::string& ownerName, } void renderIVec2Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); IVec2Property* p = static_cast(prop); @@ -391,7 +404,7 @@ void renderIVec2Property(Property* prop, const std::string& ownerName, } void renderIVec3Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); IVec3Property* p = static_cast(prop); @@ -419,7 +432,7 @@ void renderIVec3Property(Property* prop, const std::string& ownerName, } void renderIVec4Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); IVec4Property* p = static_cast(prop); @@ -447,7 +460,7 @@ void renderIVec4Property(Property* prop, const std::string& ownerName, } void renderFloatProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); FloatProperty* p = static_cast(prop); @@ -477,7 +490,7 @@ void renderFloatProperty(Property* prop, const std::string& ownerName, } void renderVec2Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); Vec2Property* p = static_cast(prop); @@ -513,7 +526,7 @@ void renderVec2Property(Property* prop, const std::string& ownerName, } void renderVec3Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); Vec3Property* p = static_cast(prop); @@ -555,7 +568,7 @@ void renderVec3Property(Property* prop, const std::string& ownerName, } void renderVec4Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); Vec4Property* p = static_cast(prop); @@ -597,7 +610,7 @@ void renderVec4Property(Property* prop, const std::string& ownerName, } void renderDVec2Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DVec2Property* p = static_cast(prop); @@ -633,7 +646,7 @@ void renderDVec2Property(Property* prop, const std::string& ownerName, } void renderDVec3Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DVec3Property* p = static_cast(prop); @@ -669,7 +682,7 @@ void renderDVec3Property(Property* prop, const std::string& ownerName, } void renderDVec4Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DVec4Property* p = static_cast(prop); @@ -705,7 +718,7 @@ void renderDVec4Property(Property* prop, const std::string& ownerName, } void renderDMat2Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DMat2Property* p = static_cast(prop); @@ -763,7 +776,7 @@ void renderDMat2Property(Property* prop, const std::string& ownerName, } void renderDMat3Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DMat3Property* p = static_cast(prop); @@ -831,7 +844,7 @@ void renderDMat3Property(Property* prop, const std::string& ownerName, } void renderDMat4Property(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); DMat4Property* p = static_cast(prop); @@ -909,7 +922,7 @@ void renderDMat4Property(Property* prop, const std::string& ownerName, } void renderTriggerProperty(Property* prop, const std::string& ownerName, - ShowToolTip showTooltip, double tooltipDelay) + ShowToolTip showTooltip, float tooltipDelay) { ghoul_assert(prop, "prop must not be nullptr"); const std::string& name = prop->guiName(); diff --git a/modules/iswa/iswamodule.cpp b/modules/iswa/iswamodule.cpp index 7c62ab78ff..6e9b114580 100644 --- a/modules/iswa/iswamodule.cpp +++ b/modules/iswa/iswamodule.cpp @@ -32,12 +32,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include diff --git a/modules/iswa/iswamodule.h b/modules/iswa/iswamodule.h index b99e35fef4..ca6d2c335c 100644 --- a/modules/iswa/iswamodule.h +++ b/modules/iswa/iswamodule.h @@ -22,12 +22,12 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ - #ifndef __OPENSPACE_MODULE_ISWA___ISWAMODULE___H__ - #define __OPENSPACE_MODULE_ISWA___ISWAMODULE___H__ +#ifndef __OPENSPACE_MODULE_ISWA___ISWAMODULE___H__ +#define __OPENSPACE_MODULE_ISWA___ISWAMODULE___H__ - #include +#include - namespace openspace { +namespace openspace { class IswaModule : public OpenSpaceModule { public: diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index c3edc9ddde..5a6a94bd1b 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -24,12 +24,12 @@ #include -#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "IswaBaseGroup"; - using json = nlohmann::json; constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { "Enabled", diff --git a/modules/iswa/rendering/iswabasegroup.h b/modules/iswa/rendering/iswabasegroup.h index da9f5e5cd7..d3e1c2f6e1 100644 --- a/modules/iswa/rendering/iswabasegroup.h +++ b/modules/iswa/rendering/iswabasegroup.h @@ -31,16 +31,19 @@ #include #include #include +#include + +namespace ghoul { class Dictionary; } namespace openspace { class DataProcessor; -class IswaCygnet; class IswaBaseGroup : public properties::PropertyOwner { public: IswaBaseGroup(std::string name, std::string type); ~IswaBaseGroup(); + bool isType(const std::string& type) const; void updateGroup(); @@ -61,6 +64,7 @@ protected: std::shared_ptr _dataProcessor; bool _registered = false; + private: std::string _iswaType; }; diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index 02da3afb02..65736093a4 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -31,12 +31,11 @@ #include #include #include -#include #include +#include namespace { constexpr std::string_view _loggerCat = "IswaDataGroup"; - using json = nlohmann::json; constexpr openspace::properties::Property::PropertyInfo UseLogInfo = { "UseLog", diff --git a/modules/iswa/rendering/iswadatagroup.h b/modules/iswa/rendering/iswadatagroup.h index b38c2d8502..357060b442 100644 --- a/modules/iswa/rendering/iswadatagroup.h +++ b/modules/iswa/rendering/iswadatagroup.h @@ -29,7 +29,9 @@ #include #include +#include #include +#include namespace openspace { diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index 2651117299..9940835a1d 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -28,13 +28,17 @@ #include #include #include +#include #include +#include #include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "IswaDataGroup"; - using json = nlohmann::json; constexpr openspace::properties::Property::PropertyInfo ResolutionInfo = { "Resolution", @@ -117,10 +121,13 @@ void IswaKameleonGroup::readFieldlinePaths(const std::filesystem::path& indexFil try { //Parse and add each fieldline as an selection - json fieldlines = json::parse(fileContent); + nlohmann::json fieldlines = nlohmann::json::parse(fileContent); int i = 0; - for (json::iterator it = fieldlines.begin(); it != fieldlines.end(); it++) { + for (nlohmann::json::iterator it = fieldlines.begin(); + it != fieldlines.end(); + it++) + { _fieldlines.addOption(it.key()); _fieldlineState[i] = std::make_tuple( identifier() + "/" + it.key(), @@ -130,7 +137,8 @@ void IswaKameleonGroup::readFieldlinePaths(const std::filesystem::path& indexFil i++; } - } catch (const std::exception& e) { + } + catch (const std::exception& e) { LERROR( "Error when reading json file with paths to seedpoints: " + std::string(e.what()) diff --git a/modules/iswa/rendering/iswakameleongroup.h b/modules/iswa/rendering/iswakameleongroup.h index b23f2b5451..4ed891de2e 100644 --- a/modules/iswa/rendering/iswakameleongroup.h +++ b/modules/iswa/rendering/iswakameleongroup.h @@ -27,6 +27,11 @@ #include +#include +#include +#include +#include + namespace openspace { class IswaKameleonGroup : public IswaDataGroup { diff --git a/modules/iswa/rendering/renderabledatacygnet.cpp b/modules/iswa/rendering/renderabledatacygnet.cpp index 4dfa83ba21..0e4983ff35 100644 --- a/modules/iswa/rendering/renderabledatacygnet.cpp +++ b/modules/iswa/rendering/renderabledatacygnet.cpp @@ -28,14 +28,22 @@ #include #include #include +#include #include +#include #include #include +#include +#include #include #include #include #include +#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "DataCygnet"; diff --git a/modules/iswa/rendering/renderabledatacygnet.h b/modules/iswa/rendering/renderabledatacygnet.h index 1214625676..25ba8434d9 100644 --- a/modules/iswa/rendering/renderabledatacygnet.h +++ b/modules/iswa/rendering/renderabledatacygnet.h @@ -29,13 +29,13 @@ #include #include +#include #include #include namespace openspace { class DataProcessor; -namespace documentation { struct Documentation; } /** * This class abstracts away the the loading of data and creation of textures for all data diff --git a/modules/iswa/rendering/renderabledataplane.h b/modules/iswa/rendering/renderabledataplane.h index 5bb94df7a8..4cac4d0aa7 100644 --- a/modules/iswa/rendering/renderabledataplane.h +++ b/modules/iswa/rendering/renderabledataplane.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - /** * DataPlane is a concrete IswaCygnet with data files as its input source. The class * handles creation, destruction and rendering of a plane geometry. It also specifies what @@ -50,9 +48,6 @@ public: static documentation::Documentation Documentation(); private: - /** - * Creates a plane geometry. - */ bool createGeometry() override; bool destroyGeometry() override; void renderGeometry() const override; diff --git a/modules/iswa/rendering/renderabledatasphere.cpp b/modules/iswa/rendering/renderabledatasphere.cpp index 615ff5aa8c..e2a14e64da 100644 --- a/modules/iswa/rendering/renderabledatasphere.cpp +++ b/modules/iswa/rendering/renderabledatasphere.cpp @@ -31,8 +31,10 @@ #include #include #include -#include #include +#include +#include +#include namespace { struct [[codegen::Dictionary(RenderableDataSphere)]] Parameters { diff --git a/modules/iswa/rendering/renderabledatasphere.h b/modules/iswa/rendering/renderabledatasphere.h index d4b7f2fcdb..fb622898f4 100644 --- a/modules/iswa/rendering/renderabledatasphere.h +++ b/modules/iswa/rendering/renderabledatasphere.h @@ -30,7 +30,6 @@ namespace openspace { class Sphere; -namespace documentation { struct Documentation; } /** * DataSphere is a concrete IswaCygnet with data files as its input source. The class @@ -48,9 +47,6 @@ public: static documentation::Documentation Documentation(); protected: - /** - * Creates a sphere geometry. - */ bool createGeometry() override; bool destroyGeometry() override; void renderGeometry() const override; diff --git a/modules/iswa/rendering/renderableiswacygnet.cpp b/modules/iswa/rendering/renderableiswacygnet.cpp index d71eac0b57..9f7a08050e 100644 --- a/modules/iswa/rendering/renderableiswacygnet.cpp +++ b/modules/iswa/rendering/renderableiswacygnet.cpp @@ -29,16 +29,20 @@ #include #include #include +#include #include #include #include #include #include #include -#include +#include #include #include -#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "IswaCygnet"; diff --git a/modules/iswa/rendering/renderableiswacygnet.h b/modules/iswa/rendering/renderableiswacygnet.h index 86a006ce00..f82f58cc44 100644 --- a/modules/iswa/rendering/renderableiswacygnet.h +++ b/modules/iswa/rendering/renderableiswacygnet.h @@ -29,19 +29,18 @@ #include #include -#include +#include #include +#include #include #include -#include +#include namespace openspace { class IswaBaseGroup; class TransferFunction; -namespace documentation { struct Documentation; } - class RenderableIswaCygnet : public Renderable { public: explicit RenderableIswaCygnet(const ghoul::Dictionary& dictionary); diff --git a/modules/iswa/rendering/renderablekameleonplane.cpp b/modules/iswa/rendering/renderablekameleonplane.cpp index fc2caeaa12..4072e62c2a 100644 --- a/modules/iswa/rendering/renderablekameleonplane.cpp +++ b/modules/iswa/rendering/renderablekameleonplane.cpp @@ -33,15 +33,23 @@ #include #include #include +#include #include +#include #include +#include #include +#include #include #include +#include +#include +#include #include +#include +#include namespace { - using json = nlohmann::json; constexpr std::string_view _loggerCat = "KameleonPlane"; constexpr openspace::properties::Property::PropertyInfo FieldLineSeedsInfo = { @@ -357,11 +365,14 @@ void RenderableKameleonPlane::readFieldlinePaths(const std::filesystem::path& in else { try { //Parse and add each fieldline as an selection - json fieldlines = json::parse(seedFile); + nlohmann::json fieldlines = nlohmann::json::parse(seedFile); int i = 0; const std::string& fullName = identifier(); std::string partName = fullName.substr(0,fullName.find_last_of("-")); - for (json::iterator it = fieldlines.begin(); it != fieldlines.end(); it++) { + for (nlohmann::json::iterator it = fieldlines.begin(); + it != fieldlines.end(); + it++) + { _fieldlines.addOption(it.key()); _fieldlineState[i] = std::make_tuple( partName + "/" + it.key(), diff --git a/modules/iswa/rendering/renderablekameleonplane.h b/modules/iswa/rendering/renderablekameleonplane.h index 6b51f7c8f8..6ee72bc68b 100644 --- a/modules/iswa/rendering/renderablekameleonplane.h +++ b/modules/iswa/rendering/renderablekameleonplane.h @@ -28,7 +28,10 @@ #include #include +#include #include +#include +#include namespace openspace { @@ -50,9 +53,6 @@ public: static documentation::Documentation Documentation(); private: - /** - * Creates a plane geometry. - */ bool createGeometry() override; bool destroyGeometry() override; bool updateTextureResource() override; @@ -78,7 +78,6 @@ private: void subscribeToGroup(); void changeKwPath(std::string path); - static int id(); properties::SelectionProperty _fieldlines; properties::FloatProperty _resolution; diff --git a/modules/iswa/rendering/renderabletexturecygnet.cpp b/modules/iswa/rendering/renderabletexturecygnet.cpp index 818f23727f..97d9b40af4 100644 --- a/modules/iswa/rendering/renderabletexturecygnet.cpp +++ b/modules/iswa/rendering/renderabletexturecygnet.cpp @@ -26,9 +26,14 @@ #include #include +#include #include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TextureCygnet"; diff --git a/modules/iswa/rendering/renderabletexturecygnet.h b/modules/iswa/rendering/renderabletexturecygnet.h index ba53897829..3d5df7245c 100644 --- a/modules/iswa/rendering/renderabletexturecygnet.h +++ b/modules/iswa/rendering/renderabletexturecygnet.h @@ -27,9 +27,9 @@ #include -namespace openspace { +#include -namespace documentation { struct Documentation; } +namespace openspace { /** * This class exist to abstract away the loading of images from iSWA and updating of the diff --git a/modules/iswa/rendering/renderabletextureplane.cpp b/modules/iswa/rendering/renderabletextureplane.cpp index bb110acccc..672589f314 100644 --- a/modules/iswa/rendering/renderabletextureplane.cpp +++ b/modules/iswa/rendering/renderabletextureplane.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/modules/iswa/rendering/renderabletextureplane.h b/modules/iswa/rendering/renderabletextureplane.h index c56f061137..c20d8e1fff 100644 --- a/modules/iswa/rendering/renderabletextureplane.h +++ b/modules/iswa/rendering/renderabletextureplane.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - /** * TexturePlane is a "concrete" IswaCygnet with texture as its input source. It handles * the creation, destruction and rendering of a plane geometry. It also specifies which diff --git a/modules/iswa/rendering/screenspacecygnet.cpp b/modules/iswa/rendering/screenspacecygnet.cpp index 2a12dfca1b..6fc581a931 100644 --- a/modules/iswa/rendering/screenspacecygnet.cpp +++ b/modules/iswa/rendering/screenspacecygnet.cpp @@ -25,9 +25,13 @@ #include #include +#include #include #include #include +#include +#include +#include namespace { struct [[codegen::Dictionary(ScreenSpaceCygnet)]] Parameters { diff --git a/modules/iswa/rendering/screenspacecygnet.h b/modules/iswa/rendering/screenspacecygnet.h index 72b7bc0e14..cc64bcdcbc 100644 --- a/modules/iswa/rendering/screenspacecygnet.h +++ b/modules/iswa/rendering/screenspacecygnet.h @@ -27,13 +27,10 @@ #include -#include #include namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceCygnet : public ScreenSpaceImageOnline { public: explicit ScreenSpaceCygnet(const ghoul::Dictionary& dictionary); diff --git a/modules/iswa/util/dataprocessor.cpp b/modules/iswa/util/dataprocessor.cpp index 580eaba557..501d836047 100644 --- a/modules/iswa/util/dataprocessor.cpp +++ b/modules/iswa/util/dataprocessor.cpp @@ -26,8 +26,10 @@ #include #include -#include #include +#include +#include +#include namespace openspace { diff --git a/modules/iswa/util/dataprocessor.h b/modules/iswa/util/dataprocessor.h index 3fc5942621..d0cc76bac4 100644 --- a/modules/iswa/util/dataprocessor.h +++ b/modules/iswa/util/dataprocessor.h @@ -25,6 +25,7 @@ #ifndef __OPENSPACE_MODULE_ISWA___DATAPROCESSOR___H__ #define __OPENSPACE_MODULE_ISWA___DATAPROCESSOR___H__ +#include #include #include #include @@ -36,8 +37,6 @@ namespace openspace { namespace properties { class SelectionProperty; } -class Histogram; - class DataProcessor { public: DataProcessor() = default; diff --git a/modules/iswa/util/dataprocessorjson.cpp b/modules/iswa/util/dataprocessorjson.cpp index 27892dfe21..8a89ce1467 100644 --- a/modules/iswa/util/dataprocessorjson.cpp +++ b/modules/iswa/util/dataprocessorjson.cpp @@ -26,9 +26,10 @@ #include #include -#include - -using json = nlohmann::json; +#include +#include +#include +#include namespace openspace { @@ -41,14 +42,17 @@ std::vector DataProcessorJson::readMetadata(const std::string& data { std::vector options = std::vector(); if (!data.empty()) { - const json& j = json::parse(data); - json variables = j["variables"]; + const nlohmann::json& j = nlohmann::json::parse(data); + nlohmann::json variables = j["variables"]; - for (json::iterator it = variables.begin(); it != variables.end(); it++) { + for (nlohmann::json::iterator it = variables.begin(); + it != variables.end(); + it++) + { std::string option = it.key(); if (option == "ep") { - const json& row = it.value(); - const json& col = row.at(0); + const nlohmann::json& row = it.value(); + const nlohmann::json& col = row.at(0); dimensions = glm::size3_t(col.size(), row.size(), 1); } @@ -68,19 +72,19 @@ void DataProcessorJson::addDataValues(const std::string& data, initializeVectors(numOptions); if (!data.empty()) { - const json& j = json::parse(data); - json variables = j["variables"]; + const nlohmann::json& j = nlohmann::json::parse(data); + nlohmann::json variables = j["variables"]; std::vector sum(numOptions, 0.f); std::vector> optionValues(numOptions, std::vector()); const std::vector& options = dataOptions.options(); for (int i = 0; i < numOptions; i++) { - const json& row = variables[options[i]]; + const nlohmann::json& row = variables[options[i]]; // int rowsize = row.size(); for (size_t y = 0; y < row.size(); y++) { - const json& col = row.at(y); + const nlohmann::json& col = row.at(y); const int colsize = static_cast(col.size()); for (int x = 0; x < colsize; x++) { @@ -104,8 +108,8 @@ std::vector DataProcessorJson::processData(const std::string& data, if (data.empty()) { return std::vector(); } - const json& j = json::parse(data); - json variables = j["variables"]; + const nlohmann::json& j = nlohmann::json::parse(data); + nlohmann::json variables = j["variables"]; const std::set& selectedOptions = optionProp; const std::vector& options = optionProp.options(); @@ -123,11 +127,11 @@ std::vector DataProcessorJson::processData(const std::string& data, // other mechanism (std::vector most likely) dataOptions[option] = new float[dimensions.x * dimensions.y] { 0.f }; - json row = variables[options[option]]; + nlohmann::json row = variables[options[option]]; const int rowsize = static_cast(row.size()); for (int y = 0; y < rowsize; y++) { - json col = row.at(y); + nlohmann::json col = row.at(y); const int colsize = static_cast(col.size()); for (int x = 0; x < colsize; x++) { diff --git a/modules/iswa/util/dataprocessorjson.h b/modules/iswa/util/dataprocessorjson.h index 1adc708c32..10f84c45b6 100644 --- a/modules/iswa/util/dataprocessorjson.h +++ b/modules/iswa/util/dataprocessorjson.h @@ -29,6 +29,8 @@ namespace openspace { +namespace properties { class SelectionProperty; } + class DataProcessorJson : public DataProcessor { public: DataProcessorJson(); diff --git a/modules/iswa/util/dataprocessorkameleon.cpp b/modules/iswa/util/dataprocessorkameleon.cpp index 2bdba7c69b..093d17d297 100644 --- a/modules/iswa/util/dataprocessorkameleon.cpp +++ b/modules/iswa/util/dataprocessorkameleon.cpp @@ -26,12 +26,14 @@ #include #include -#include -#include -#include #include +#include +#include #include #include +#include +#include +#include namespace openspace { diff --git a/modules/iswa/util/dataprocessorkameleon.h b/modules/iswa/util/dataprocessorkameleon.h index 366caeff39..32f4c75624 100644 --- a/modules/iswa/util/dataprocessorkameleon.h +++ b/modules/iswa/util/dataprocessorkameleon.h @@ -29,6 +29,7 @@ namespace openspace { +namespace properties { class SelectionProperty; } class KameleonWrapper; class DataProcessorKameleon : public DataProcessor { diff --git a/modules/iswa/util/dataprocessortext.cpp b/modules/iswa/util/dataprocessortext.cpp index 06b451548f..84152e340f 100644 --- a/modules/iswa/util/dataprocessortext.cpp +++ b/modules/iswa/util/dataprocessortext.cpp @@ -25,9 +25,12 @@ #include #include -#include +#include #include #include +#include +#include +#include #include namespace openspace { diff --git a/modules/iswa/util/dataprocessortext.h b/modules/iswa/util/dataprocessortext.h index 80a6c52c19..b73d1bf746 100644 --- a/modules/iswa/util/dataprocessortext.h +++ b/modules/iswa/util/dataprocessortext.h @@ -29,6 +29,8 @@ namespace openspace { +namespace properties { class SelectionProperty; } + class DataProcessorText : public DataProcessor { public: DataProcessorText(); diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index 67e1c37dd4..88dbb1e1a6 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -29,24 +29,30 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include +#include #include #include -#include +#include #include +#include #include -#include +#include +#include #include -#include +#include +#include +#include #include +#include +#include +#include #include "iswamanager_lua.inl" diff --git a/modules/iswa/util/iswamanager.h b/modules/iswa/util/iswamanager.h index b07beda666..3645d5da31 100644 --- a/modules/iswa/util/iswamanager.h +++ b/modules/iswa/util/iswamanager.h @@ -29,9 +29,9 @@ #include #include +#include #include #include -#include namespace ccmc { class Kameleon; } @@ -40,7 +40,6 @@ namespace openspace { namespace scripting { struct LuaLibrary; } class IswaBaseGroup; -class IswaCygnet; struct CdfInfo { std::string name; diff --git a/modules/iswa/util/iswamanager_lua.inl b/modules/iswa/util/iswamanager_lua.inl index 63df455293..fd394cf578 100644 --- a/modules/iswa/util/iswamanager_lua.inl +++ b/modules/iswa/util/iswamanager_lua.inl @@ -22,7 +22,14 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include +#include +#include #include +#include +#include +#include namespace { diff --git a/modules/kameleon/include/kameleonhelper.h b/modules/kameleon/include/kameleonhelper.h index 00c11d06ac..7b14cc2412 100644 --- a/modules/kameleon/include/kameleonhelper.h +++ b/modules/kameleon/include/kameleonhelper.h @@ -30,7 +30,7 @@ namespace ccmc { class Kameleon; } -namespace openspace::kameleonHelper { +namespace openspace::kameleonhelper { /** * Opens a ccmc::Kameleon object from the provided path to a .cdf file. Path should be @@ -41,6 +41,6 @@ namespace openspace::kameleonHelper { std::unique_ptr createKameleonObject(const std::string& cdfFilePath); double getTime(ccmc::Kameleon* kameleon, double manualOffset); -} //namespace openspace::kameleonHelper +} //namespace openspace::kameleonhelper #endif // __OPENSPACE_MODULE_KAMELEON___KAMELEONHELPER___H__ diff --git a/modules/kameleon/include/kameleonwrapper.h b/modules/kameleon/include/kameleonwrapper.h index 3d83151e82..665ce2a445 100644 --- a/modules/kameleon/include/kameleonwrapper.h +++ b/modules/kameleon/include/kameleonwrapper.h @@ -62,7 +62,7 @@ public: enum class TraceDirection { FORWARD = 1, - BACK = -1 + BACK = -1 }; enum class FieldlineEnd { diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index b621710f8c..a83e325a7e 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef _MSC_VER #pragma warning (push) @@ -34,6 +35,7 @@ #pragma warning (disable : 4619) #endif // _MSC_VER +#include #include #include @@ -46,7 +48,7 @@ namespace { constexpr std::string_view _loggerCat = "KameleonHelper"; } // namespace -namespace openspace::kameleonHelper { +namespace openspace::kameleonhelper { std::unique_ptr createKameleonObject(const std::string& cdfFilePath) { auto kameleon = std::make_unique(); @@ -167,4 +169,4 @@ double getTime(ccmc::Kameleon* kameleon, double manualOffset) { return seqStartDbl + stateStartOffset + manualOffset; } -} // namespace openspace::kameleonHelper { +} // namespace openspace::kameleonhelper { diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index 06c8766ce9..c0334cfada 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -24,14 +24,20 @@ #include -#include -#include #include #include #include #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef WIN32 #pragma warning (push) diff --git a/modules/kameleonvolume/kameleonvolumemodule.cpp b/modules/kameleonvolume/kameleonvolumemodule.cpp index e797f10b0a..9cbb3e1d65 100644 --- a/modules/kameleonvolume/kameleonvolumemodule.cpp +++ b/modules/kameleonvolume/kameleonvolumemodule.cpp @@ -30,7 +30,9 @@ #include #include #include +#include #include +#include #include namespace openspace { diff --git a/modules/kameleonvolume/kameleonvolumemodule.h b/modules/kameleonvolume/kameleonvolumemodule.h index 62bca23d0e..b0c78ff2c0 100644 --- a/modules/kameleonvolume/kameleonvolumemodule.h +++ b/modules/kameleonvolume/kameleonvolumemodule.h @@ -27,12 +27,8 @@ #include -#include - namespace openspace { -namespace documentation { struct Documentation; } - class KameleonVolumeModule : public OpenSpaceModule { public: constexpr static const char* Name = "KameleonVolume"; diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 4e2b6d64f8..035b3ea244 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -27,12 +27,12 @@ #include #include #include -#include -#include #include -#include #include +#include #include +#include +#include #ifdef WIN32 #pragma warning (push) @@ -81,7 +81,7 @@ KameleonVolumeReader::KameleonVolumeReader(std::filesystem::path path) if (!std::filesystem::is_regular_file(_path)) { throw ghoul::FileNotFoundError(_path); } - _kameleon = kameleonHelper::createKameleonObject(_path.string()); + _kameleon = kameleonhelper::createKameleonObject(_path.string()); const long status = _kameleon->open(_path.string()); if (status != ccmc::FileReader::OK) { throw ghoul::RuntimeError(std::format( diff --git a/modules/kameleonvolume/kameleonvolumereader.h b/modules/kameleonvolume/kameleonvolumereader.h index 2a555e2952..e0149e6825 100644 --- a/modules/kameleonvolume/kameleonvolumereader.h +++ b/modules/kameleonvolume/kameleonvolumereader.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_KAMELEONVOLUME___KAMELEONVOLUMEREADER___H__ #include +#include #include #include #include @@ -35,8 +36,7 @@ namespace ccmc { class Attribute; class Interpolator; class Kameleon; -} // namespce ccmc - +} // namespace ccmc namespace ghoul { class Dictionary; } namespace openspace::volume { template class RawVolume; } diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index d09a3b5fe1..3fe19a1621 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -26,27 +26,25 @@ #include #include -#include -#include #include #include #include -#include #include -#include #include -#include #include -#include +#include #include #include #include #include -#include #include +#include #include +#include #include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "RenderableKameleonVolume"; diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.h b/modules/kameleonvolume/rendering/renderablekameleonvolume.h index 818f0e3387..f22c82e771 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.h +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.h @@ -29,19 +29,19 @@ #include #include +#include +#include #include #include #include +#include +#include -namespace openspace { - struct RenderData; - class TransferFunction; -} // namespace openspace +namespace openspace { class TransferFunction; } namespace openspace::volume { class BasicVolumeRaycaster; template class RawVolume; - class TransferFunctionHandler; class VolumeClipPlanes; } // openspace::volume @@ -97,7 +97,7 @@ private: std::unique_ptr _raycaster; std::shared_ptr _volumeTexture; - std::shared_ptr _transferFunction; + std::shared_ptr _transferFunction; }; } // namespace openspace::kameleonvolume diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index 6afa3f12dd..62be18356b 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -26,11 +26,17 @@ #include #include -#include +#include +#include #include +#include +#include #include -#include +#include #include +#include +#include +#include namespace { constexpr std::string_view MainTemplateFilename = diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.h b/modules/kameleonvolume/tasks/kameleondocumentationtask.h index 218b0dd684..c4822a06a6 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.h +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace::kameleonvolume { diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp index a13af5ce2d..3cd155dc25 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp @@ -25,12 +25,14 @@ #include #include -#include +#include +#include #include #include +#include #include -#include #include +#include namespace { struct [[codegen::Dictionary(KameleonMetadataToJsonTask)]] Parameters { diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h index b82aafa668..59c6b58d15 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace::kameleonvolume { diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp index ca5f226fb5..fc0c0575f3 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp @@ -25,14 +25,16 @@ #include #include +#include #include -#include +#include #include #include +#include #include #include -#include #include +#include namespace { struct [[codegen::Dictionary(KameleonVolumeToRawTask)]] Parameters { diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h index c91b9e6901..9ce1b708cf 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.h @@ -29,7 +29,6 @@ #include #include -#include namespace openspace::kameleonvolume { diff --git a/modules/multiresvolume/CMakeLists.txt b/modules/multiresvolume/CMakeLists.txt index b7bc7a1027..0517e3016d 100644 --- a/modules/multiresvolume/CMakeLists.txt +++ b/modules/multiresvolume/CMakeLists.txt @@ -47,6 +47,7 @@ set(SOURCE_FILES rendering/atlasmanager.cpp rendering/brickcover.cpp rendering/brickmanager.cpp + rendering/brickselector.cpp rendering/brickselection.cpp rendering/multiresvolumeraycaster.cpp rendering/shenbrickselector.cpp diff --git a/modules/multiresvolume/multiresvolumemodule.cpp b/modules/multiresvolume/multiresvolumemodule.cpp index 8df8828ae7..a7a76972cc 100644 --- a/modules/multiresvolume/multiresvolumemodule.cpp +++ b/modules/multiresvolume/multiresvolumemodule.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace openspace { diff --git a/modules/multiresvolume/rendering/atlasmanager.cpp b/modules/multiresvolume/rendering/atlasmanager.cpp index 247c0dcfae..f3bab577c1 100644 --- a/modules/multiresvolume/rendering/atlasmanager.cpp +++ b/modules/multiresvolume/rendering/atlasmanager.cpp @@ -26,7 +26,10 @@ #include #include +#include #include +#include +#include #include namespace openspace { diff --git a/modules/multiresvolume/rendering/atlasmanager.h b/modules/multiresvolume/rendering/atlasmanager.h index e68de45c4e..91bf11902a 100644 --- a/modules/multiresvolume/rendering/atlasmanager.h +++ b/modules/multiresvolume/rendering/atlasmanager.h @@ -25,11 +25,10 @@ #ifndef __OPENSPACE_MODULE_MULTIRESVOLUME___ATLASMANAGER___H__ #define __OPENSPACE_MODULE_MULTIRESVOLUME___ATLASMANAGER___H__ -#include #include +#include #include #include -#include #include namespace ghoul::opengl { class Texture; } diff --git a/modules/multiresvolume/rendering/brickmanager.cpp b/modules/multiresvolume/rendering/brickmanager.cpp index d44182bb55..a94cea8cd6 100644 --- a/modules/multiresvolume/rendering/brickmanager.cpp +++ b/modules/multiresvolume/rendering/brickmanager.cpp @@ -29,6 +29,10 @@ #include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "BrickManager"; @@ -157,8 +161,7 @@ bool BrickManager::initialize() { return true; } -bool BrickManager::buildBrickList(BUFFER_INDEX bufferIndex, - std::vector &brickRequest) +bool BrickManager::buildBrickList(BufferIndex bufferIndex, std::vector& brickRequest) { // Keep track of number bricks used and number of bricks cached // (for benchmarking) @@ -281,7 +284,7 @@ void BrickManager::coordinatesFromLinear(int idx, int& x, int& y, int& z) { z = idx; } -bool BrickManager::diskToPBO(BUFFER_INDEX pboIndex) { +bool BrickManager::diskToPBO(BufferIndex pboIndex) { // Map PBO glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _pboHandle[pboIndex]); glBufferData(GL_PIXEL_UNPACK_BUFFER, _volumeSize, nullptr, GL_STREAM_DRAW); @@ -406,8 +409,8 @@ bool BrickManager::diskToPBO(BUFFER_INDEX pboIndex) { return true; } -bool BrickManager::pboToAtlas(BUFFER_INDEX _pboIndex) { - glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _pboHandle[_pboIndex]); +bool BrickManager::pboToAtlas(BufferIndex pboIndex) { + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _pboHandle[pboIndex]); glm::size3_t dim = _textureAtlas->dimensions(); glBindTexture(GL_TEXTURE_3D, *_textureAtlas); glTexSubImage3D( @@ -433,11 +436,11 @@ ghoul::opengl::Texture* BrickManager::textureAtlas() { return _textureAtlas; } -unsigned int BrickManager::pbo(BUFFER_INDEX pboIndex) const { +unsigned int BrickManager::pbo(BufferIndex pboIndex) const { return _pboHandle[pboIndex]; } -const std::vector& BrickManager::brickList(BUFFER_INDEX index) const { +const std::vector& BrickManager::brickList(BufferIndex index) const { return _brickLists.at(index); } diff --git a/modules/multiresvolume/rendering/brickmanager.h b/modules/multiresvolume/rendering/brickmanager.h index 8269f46495..8acab7bd71 100644 --- a/modules/multiresvolume/rendering/brickmanager.h +++ b/modules/multiresvolume/rendering/brickmanager.h @@ -26,7 +26,6 @@ #define __OPENSPACE_MODULE_MULTIRESVOLUME___BRICKMANAGER___H__ #include - #include namespace ghoul::opengl { class Texture; } @@ -35,7 +34,7 @@ namespace openspace { class BrickManager { public: - enum BUFFER_INDEX { EVEN = 0, ODD = 1 }; + enum BufferIndex { EVEN = 0, ODD = 1 }; explicit BrickManager(TSP* tsp); ~BrickManager(); @@ -44,16 +43,16 @@ public: bool initialize(); - bool buildBrickList(BUFFER_INDEX bufferIndex, std::vector& brickRequest); + bool buildBrickList(BufferIndex bufferIndex, std::vector& brickRequest); bool fillVolume(float* in, float* out, unsigned int x, unsigned int y, unsigned int z); - bool diskToPBO(BUFFER_INDEX pboIndex); - bool pboToAtlas(BUFFER_INDEX pboIndex); + bool diskToPBO(BufferIndex pboIndex); + bool pboToAtlas(BufferIndex pboIndex); ghoul::opengl::Texture* textureAtlas(); - unsigned int pbo(BUFFER_INDEX pboIndex) const; - const std::vector& brickList(BUFFER_INDEX index) const; + unsigned int pbo(BufferIndex pboIndex) const; + const std::vector& brickList(BufferIndex index) const; private: void incrementCoordinates(); diff --git a/modules/multiresvolume/rendering/brickselection.h b/modules/multiresvolume/rendering/brickselection.h index 41db300770..38ea33cf9c 100644 --- a/modules/multiresvolume/rendering/brickselection.h +++ b/modules/multiresvolume/rendering/brickselection.h @@ -32,8 +32,8 @@ namespace openspace { struct BrickSelection { enum SplitType { None = 0, - Temporal = 1, - Spatial = 2 + Temporal, + Spatial }; BrickSelection(); diff --git a/modules/multiresvolume/rendering/brickselector.cpp b/modules/multiresvolume/rendering/brickselector.cpp new file mode 100644 index 0000000000..426202d362 --- /dev/null +++ b/modules/multiresvolume/rendering/brickselector.cpp @@ -0,0 +1,33 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * Permission is hereby 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 { + +BrickSelector::~BrickSelector() {} + +bool BrickSelector::initialize() { return true; } + +} // namespace openspace diff --git a/modules/multiresvolume/rendering/brickselector.h b/modules/multiresvolume/rendering/brickselector.h index df7b31a7cf..6d9c94d864 100644 --- a/modules/multiresvolume/rendering/brickselector.h +++ b/modules/multiresvolume/rendering/brickselector.h @@ -31,8 +31,8 @@ namespace openspace { class BrickSelector { public: - virtual ~BrickSelector() {} - virtual bool initialize() { return true; } + virtual ~BrickSelector(); + virtual bool initialize(); virtual void selectBricks(int timestep, std::vector& bricks) = 0; }; diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 9e24526862..aeb8ded73b 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -25,9 +25,14 @@ #include #include +#include #include -#include #include +#include +#include +#include +#include +#include namespace openspace { @@ -44,9 +49,9 @@ bool ErrorHistogramManager::buildHistograms(int numBins) { _maxBin = 1.f; // Should be calculated from tsp file as (maxValue - minValue) unsigned int numOtLevels = _tsp->numOTLevels(); - unsigned int numOtLeaves = static_cast(pow(8, numOtLevels - 1)); + unsigned int numOtLeaves = static_cast(std::pow(8, numOtLevels - 1)); unsigned int numBstLeaves = static_cast( - pow(2, _tsp->numBSTLevels() - 1) + std::pow(2, _tsp->numBSTLevels() - 1) ); _numInnerNodes = _tsp->numTotalNodes() - numOtLeaves * numBstLeaves; @@ -58,7 +63,7 @@ bool ErrorHistogramManager::buildHistograms(int numBins) { // All TSP Leaves int numOtNodes = _tsp->numOTNodes(); - int otOffset = static_cast((pow(8, numOtLevels - 1) - 1) / 7); + int otOffset = static_cast((std::pow(8, numOtLevels - 1) - 1) / 7); int numBstNodes = _tsp->numBSTNodes(); int bstOffset = numBstNodes / 2; @@ -123,7 +128,7 @@ bool ErrorHistogramManager::buildFromLeaf(unsigned int bstOffset, ancestorVoxels = it->second; } - float voxelScale = static_cast(pow(2.f, octreeLevel)); + float voxelScale = static_cast(std::pow(2.f, octreeLevel)); float invVoxelScale = 1.f / voxelScale; // Calculate leaf offset in ancestor sized voxels @@ -162,7 +167,7 @@ bool ErrorHistogramManager::buildFromLeaf(unsigned int bstOffset, octreeLastOnly &= octreeChild == 7; octreeNode = parentOffset(octreeNode, 8); - int childSize = static_cast(pow(2, octreeLevel) * brickDim); + int childSize = static_cast(std::pow(2, octreeLevel) * brickDim); leafOffset.x += (octreeChild % 2) * childSize; leafOffset.y += ((octreeChild / 2) % 2) * childSize; leafOffset.z += (octreeChild / 4) * childSize; @@ -181,7 +186,7 @@ bool ErrorHistogramManager::buildFromLeaf(unsigned int bstOffset, } bool ErrorHistogramManager::loadFromFile(const std::filesystem::path& filename) { - std::ifstream file(filename, std::ios::in | std::ios::binary); + std::ifstream file = std::ifstream(filename, std::ios::in | std::ios::binary); if (!file.is_open()) { return false; } @@ -206,13 +211,12 @@ bool ErrorHistogramManager::loadFromFile(const std::filesystem::path& filename) delete[] histogramData; // No need to deallocate histogram data, since histograms take ownership. - file.close(); return true; } bool ErrorHistogramManager::saveToFile(const std::filesystem::path& filename) { - std::ofstream file(filename, std::ios::out | std::ios::binary); + std::ofstream file = std::ofstream(filename, std::ios::out | std::ios::binary); if (!file.is_open()) { return false; } @@ -233,7 +237,6 @@ bool ErrorHistogramManager::saveToFile(const std::filesystem::path& filename) { file.write(reinterpret_cast(histogramData), sizeof(float) * nFloats); delete[] histogramData; - file.close(); return true; } @@ -302,14 +305,14 @@ int ErrorHistogramManager::parentOffset(int offset, int base) const { return -1; } const int depth = static_cast( - floor(log1p(((base - 1) * offset)) / log(base)) + std::floor(std::log1p(((base - 1) * offset)) / std::log(base)) ); - const int firstInLevel = static_cast((pow(base, depth) - 1) / (base - 1)); + const int firstInLevel = static_cast((std::pow(base, depth) - 1) / (base - 1)); const int inLevelOffset = offset - firstInLevel; const int parentDepth = depth - 1; const int firstInParentLevel = static_cast( - (pow(base, parentDepth) - 1) / (base - 1) + (std::pow(base, parentDepth) - 1) / (base - 1) ); const int parentInLevelOffset = inLevelOffset / base; @@ -339,14 +342,14 @@ unsigned int ErrorHistogramManager::brickToInnerNodeIndex(unsigned int brickInde const unsigned int numBstLevels = _tsp->numBSTLevels(); const unsigned int numInnerBstNodes = static_cast( - (pow(2, numBstLevels - 1) - 1) * numOtNodes + (std::pow(2, numBstLevels - 1) - 1) * numOtNodes ); if (brickIndex < numInnerBstNodes) { return brickIndex; } const unsigned int numOtLeaves = static_cast( - pow(8, _tsp->numOTLevels() - 1) + std::pow(8, _tsp->numOTLevels() - 1) ); const unsigned int numOtInnerNodes = (numOtNodes - numOtLeaves); @@ -375,14 +378,14 @@ unsigned int ErrorHistogramManager::innerNodeToBrickIndex( const unsigned int numBstLevels = _tsp->numBSTLevels(); const unsigned int numInnerBstNodes = static_cast( - (pow(2, numBstLevels - 1) - 1) * numOtNodes + (std::pow(2, numBstLevels - 1) - 1) * numOtNodes ); if (innerNodeIndex < numInnerBstNodes) { return innerNodeIndex; } const unsigned int numOtLeaves = static_cast( - pow(8, _tsp->numOTLevels() - 1) + std::pow(8, _tsp->numOTLevels() - 1) ); const unsigned int numOtInnerNodes = (numOtNodes - numOtLeaves); diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.h b/modules/multiresvolume/rendering/errorhistogrammanager.h index 50d69f9f89..1d1f0d6f33 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.h +++ b/modules/multiresvolume/rendering/errorhistogrammanager.h @@ -28,8 +28,9 @@ #include #include #include -#include +#include #include +#include namespace openspace { @@ -47,17 +48,6 @@ public: bool saveToFile(const std::filesystem::path& filename); private: - TSP* _tsp; - std::ifstream* _file; - - std::vector _histograms; - unsigned int _numInnerNodes; - float _minBin; - float _maxBin; - int _numBins; - - std::map> _voxelCache; - bool buildFromLeaf(unsigned int bstOffset, unsigned int octreeOffset); std::vector readValues(unsigned int brickIndex) const; @@ -71,6 +61,17 @@ private: float interpolate(const glm::vec3& samplePoint, const std::vector& voxels) const; + + TSP* _tsp; + std::ifstream* _file; + + std::vector _histograms; + unsigned int _numInnerNodes; + float _minBin; + float _maxBin; + int _numBins; + + std::map> _voxelCache; }; } // namespace openspace diff --git a/modules/multiresvolume/rendering/histogrammanager.cpp b/modules/multiresvolume/rendering/histogrammanager.cpp index 10c9783b64..e406b59be3 100644 --- a/modules/multiresvolume/rendering/histogrammanager.cpp +++ b/modules/multiresvolume/rendering/histogrammanager.cpp @@ -25,8 +25,10 @@ #include #include +#include #include -#include +#include +#include namespace openspace { @@ -52,7 +54,7 @@ Histogram* HistogramManager::histogram(unsigned int brickIndex) { } bool HistogramManager::buildHistogram(TSP* tsp, unsigned int brickIndex) { - Histogram histogram(_minBin, _maxBin, _numBins); + Histogram histogram = Histogram(_minBin, _maxBin, _numBins); const bool isBstLeaf = tsp->isBstLeaf(brickIndex); const bool isOctreeLeaf = tsp->isOctreeLeaf(brickIndex); @@ -122,7 +124,7 @@ std::vector HistogramManager::readValues(TSP* tsp, unsigned int brickInde } bool HistogramManager::loadFromFile(const std::filesystem::path& filename) { - std::ifstream file(filename, std::ios::in | std::ios::binary); + std::ifstream file = std::ifstream(filename, std::ios::in | std::ios::binary); if (!file.is_open()) { return false; } @@ -147,12 +149,11 @@ bool HistogramManager::loadFromFile(const std::filesystem::path& filename) { _histograms[i] = Histogram(_minBin, _maxBin, _numBins, data); } - file.close(); return true; } bool HistogramManager::saveToFile(const std::filesystem::path& filename) { - std::ofstream file(filename, std::ios::out | std::ios::binary); + std::ofstream file = std::ofstream(filename, std::ios::out | std::ios::binary); if (!file.is_open()) { return false; } @@ -173,7 +174,6 @@ bool HistogramManager::saveToFile(const std::filesystem::path& filename) { file.write(reinterpret_cast(histogramData.data()), sizeof(float) * nFloats); - file.close(); return true; } diff --git a/modules/multiresvolume/rendering/histogrammanager.h b/modules/multiresvolume/rendering/histogrammanager.h index e6843fac31..019f65d986 100644 --- a/modules/multiresvolume/rendering/histogrammanager.h +++ b/modules/multiresvolume/rendering/histogrammanager.h @@ -27,6 +27,7 @@ #include #include +#include namespace openspace { diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp index bab44421e4..aed3fc0532 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp @@ -25,9 +25,16 @@ #include #include +#include #include -#include #include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "LocalErrorHistogramManager"; diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.h b/modules/multiresvolume/rendering/localerrorhistogrammanager.h index df0235e37b..0373dbd1cb 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.h +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.h @@ -28,8 +28,9 @@ #include #include #include -#include +#include #include +#include namespace openspace { @@ -47,16 +48,6 @@ public: bool saveToFile(const std::filesystem::path& filename); private: - TSP* _tsp = nullptr; - std::ifstream* _file; - - std::vector _spatialHistograms; - std::vector _temporalHistograms; - unsigned int _numInnerNodes = 0; - float _minBin = 0.f; - float _maxBin = 0.f; - int _numBins = 0; - std::map> _voxelCache; bool buildFromOctreeChild(unsigned int bstOffset, unsigned int octreeOffset); @@ -73,6 +64,16 @@ private: unsigned int linearCoords(glm::ivec3 coords) const; float interpolate(glm::vec3 samplePoint, const std::vector& voxels) const; + + TSP* _tsp = nullptr; + std::ifstream* _file; + + std::vector _spatialHistograms; + std::vector _temporalHistograms; + unsigned int _numInnerNodes = 0; + float _minBin = 0.f; + float _maxBin = 0.f; + int _numBins = 0; }; } // namespace openspace diff --git a/modules/multiresvolume/rendering/localtfbrickselector.cpp b/modules/multiresvolume/rendering/localtfbrickselector.cpp index 1265978247..481114df14 100644 --- a/modules/multiresvolume/rendering/localtfbrickselector.cpp +++ b/modules/multiresvolume/rendering/localtfbrickselector.cpp @@ -24,11 +24,14 @@ #include -#include +#include #include +#include #include +#include #include #include +#include namespace { bool compareSplitPoints(const openspace::BrickSelection& a, diff --git a/modules/multiresvolume/rendering/localtfbrickselector.h b/modules/multiresvolume/rendering/localtfbrickselector.h index ce1a03226b..797d22b0b9 100644 --- a/modules/multiresvolume/rendering/localtfbrickselector.h +++ b/modules/multiresvolume/rendering/localtfbrickselector.h @@ -55,11 +55,6 @@ public: bool calculateBrickErrors(); private: - TSP* _tsp; - LocalErrorHistogramManager* _histogramManager; - TransferFunction* _transferFunction; - std::vector _brickErrors; - float spatialSplitPoints(unsigned int brickIndex) const; float temporalSplitPoints(unsigned int brickIndex) const; float splitPoints(unsigned int brickIndex, BrickSelection::SplitType& splitType); @@ -67,6 +62,10 @@ private: int linearCoordinates(int x, int y, int z) const; void writeSelection(BrickSelection coveredBricks, std::vector& bricks); + TSP* _tsp; + LocalErrorHistogramManager* _histogramManager; + TransferFunction* _transferFunction; + std::vector _brickErrors; int _memoryBudget; int _streamingBudget; }; diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp index 7ddb2c86aa..37e882346c 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.cpp @@ -26,12 +26,15 @@ #include #include -#include #include #include #include +#include #include #include +#include +#include +#include namespace { constexpr std::string_view GlslRaycastPath = diff --git a/modules/multiresvolume/rendering/multiresvolumeraycaster.h b/modules/multiresvolume/rendering/multiresvolumeraycaster.h index e394fe0002..b9e21b6607 100644 --- a/modules/multiresvolume/rendering/multiresvolumeraycaster.h +++ b/modules/multiresvolume/rendering/multiresvolumeraycaster.h @@ -31,20 +31,13 @@ #include #include #include -#include - -namespace ghoul::opengl { - class Texture; - class ProgramObject; -} // namespace ghoul::opengl +#include namespace openspace { class AtlasManager; -struct RenderData; -struct RaycastData; -class TSP; class TransferFunction; +class TSP; class MultiresVolumeRaycaster : public VolumeRaycaster { public: @@ -72,7 +65,6 @@ public: std::filesystem::path helperPath() const override; void setModelTransform(glm::mat4 transform); - //void setTime(double time); void setStepSizeCoefficient(float coefficient); private: @@ -89,8 +81,7 @@ private: std::unique_ptr< ghoul::opengl::BufferBinding > _atlasMapBinding; - -}; // MultiresVolumeRaycaster +}; } // namespace openspace diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 2221517c38..fb3217f2d3 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -24,20 +24,17 @@ #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -48,17 +45,15 @@ #include #include #include -#include #include #include -#include -#include -#include +#include #include #include #include #include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableMultiresVolume"; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.h b/modules/multiresvolume/rendering/renderablemultiresvolume.h index 61f9b9b6e7..f1e93028f6 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.h +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.h @@ -34,18 +34,11 @@ #include #include #include - -namespace ghoul { class Dictionary; } -namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +#include namespace openspace { class AtlasManager; -class BrickSelector; class ErrorHistogramManager; class HistogramManager; class LocalErrorHistogramManager; @@ -78,12 +71,6 @@ public: virtual void update(const UpdateData& data) override; virtual void render(const RenderData& data, RendererTasks& tasks) override; - //virtual void preResolve(ghoul::opengl::ProgramObject* program) override; - //virtual std::string getHeaderPath() override; - //virtual std::string getHelperPath() override; - //virtual std::vector getTextures() override; - //virtual std::vector getBuffers() override; - private: properties::BoolProperty _useGlobalTime; properties::BoolProperty _loop; @@ -104,7 +91,6 @@ private: double _startTime; double _endTime; - // Stats timers std::string _statsFileName; bool _gatheringStats = false; diff --git a/modules/multiresvolume/rendering/shenbrickselector.h b/modules/multiresvolume/rendering/shenbrickselector.h index 6b323c8d62..961b68a330 100644 --- a/modules/multiresvolume/rendering/shenbrickselector.h +++ b/modules/multiresvolume/rendering/shenbrickselector.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace { @@ -43,10 +42,6 @@ public: void selectBricks(int timestep, std::vector& bricks) override; private: - TSP* _tsp; - float _spatialTolerance; - float _temporalTolerance; - void traverseOT(int timestep, unsigned int brickIndex, BrickCover coveredBricks, std::vector& bricks); @@ -62,6 +57,10 @@ private: void selectCover(BrickCover coveredBricks, unsigned int brickIndex, std::vector& bricks) const; + + TSP* _tsp; + float _spatialTolerance; + float _temporalTolerance; }; } // namespace openspace diff --git a/modules/multiresvolume/rendering/simpletfbrickselector.cpp b/modules/multiresvolume/rendering/simpletfbrickselector.cpp index 245e8d4052..bc4365701a 100644 --- a/modules/multiresvolume/rendering/simpletfbrickselector.cpp +++ b/modules/multiresvolume/rendering/simpletfbrickselector.cpp @@ -24,12 +24,15 @@ #include -#include +#include #include +#include #include #include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "SimpleTfBrickSelector"; diff --git a/modules/multiresvolume/rendering/simpletfbrickselector.h b/modules/multiresvolume/rendering/simpletfbrickselector.h index 7da6e9ba7f..441544d341 100644 --- a/modules/multiresvolume/rendering/simpletfbrickselector.h +++ b/modules/multiresvolume/rendering/simpletfbrickselector.h @@ -28,7 +28,6 @@ #include #include -#include namespace openspace { diff --git a/modules/multiresvolume/rendering/tfbrickselector.cpp b/modules/multiresvolume/rendering/tfbrickselector.cpp index 22c2f3bcd8..70e179ef85 100644 --- a/modules/multiresvolume/rendering/tfbrickselector.cpp +++ b/modules/multiresvolume/rendering/tfbrickselector.cpp @@ -24,12 +24,14 @@ #include +#include #include #include #include #include #include #include +#include namespace { bool compareSplitPoints(const openspace::BrickSelection& a, diff --git a/modules/multiresvolume/rendering/tfbrickselector.h b/modules/multiresvolume/rendering/tfbrickselector.h index 2e4fa43da1..19606dcec0 100644 --- a/modules/multiresvolume/rendering/tfbrickselector.h +++ b/modules/multiresvolume/rendering/tfbrickselector.h @@ -28,13 +28,12 @@ #include #include -#include namespace openspace { -class TSP; class ErrorHistogramManager; class TransferFunction; +class TSP; class TfBrickSelector : public BrickSelector { public: @@ -50,11 +49,6 @@ public: bool calculateBrickErrors(); private: - TSP* _tsp; - ErrorHistogramManager* _histogramManager; - TransferFunction* _transferFunction; - std::vector _brickErrors; - float spatialSplitPoints(unsigned int brickIndex); float temporalSplitPoints(unsigned int brickIndex); float splitPoints(unsigned int brickIndex, BrickSelection::SplitType& splitType); @@ -62,6 +56,11 @@ private: int linearCoords(int x, int y, int z) const; void writeSelection(BrickSelection coveredBricks, std::vector& bricks) const; + TSP* _tsp; + ErrorHistogramManager* _histogramManager; + TransferFunction* _transferFunction; + std::vector _brickErrors; + int _memoryBudget; int _streamingBudget; }; diff --git a/modules/multiresvolume/rendering/tsp.cpp b/modules/multiresvolume/rendering/tsp.cpp index 0c995f587f..7bf2546d0c 100644 --- a/modules/multiresvolume/rendering/tsp.cpp +++ b/modules/multiresvolume/rendering/tsp.cpp @@ -24,15 +24,18 @@ #include -#include #include #include #include #include #include +#include +#include #include +#include #include #include +#include namespace { constexpr std::string_view _loggerCat = "TSP"; diff --git a/modules/multiresvolume/rendering/tsp.h b/modules/multiresvolume/rendering/tsp.h index 0cd2e247ed..291db8853f 100644 --- a/modules/multiresvolume/rendering/tsp.h +++ b/modules/multiresvolume/rendering/tsp.h @@ -28,8 +28,8 @@ #include #include #include +#include #include -#include #include namespace openspace { @@ -109,11 +109,6 @@ private: */ std::list coveredBSTLeafBricks(unsigned int brickIndex) const; - /** - * Return a list of eight children brick incices given a brick index. - */ - std::list childBricks(unsigned int brickIndex); - std::filesystem::path _filename; std::ifstream _file; std::streampos _dataOffset; diff --git a/modules/opensoundcontrol/CMakeLists.txt b/modules/opensoundcontrol/CMakeLists.txt index e797a2f522..3074e31731 100644 --- a/modules/opensoundcontrol/CMakeLists.txt +++ b/modules/opensoundcontrol/CMakeLists.txt @@ -53,6 +53,6 @@ else () target_compile_options(oscpack PRIVATE "-w") endif () -target_include_directories(openspace-module-opensoundcontrol SYSTEM PRIVATE ext/oscpack) -target_link_libraries(openspace-module-opensoundcontrol PRIVATE oscpack) +target_include_directories(openspace-module-opensoundcontrol SYSTEM PUBLIC ext/oscpack) +target_link_libraries(openspace-module-opensoundcontrol PUBLIC oscpack) end_dependency("oscpack") diff --git a/modules/opensoundcontrol/include/opensoundcontrolconnection.h b/modules/opensoundcontrol/include/opensoundcontrolconnection.h index c2a76ae6fa..28758f4008 100644 --- a/modules/opensoundcontrol/include/opensoundcontrolconnection.h +++ b/modules/opensoundcontrol/include/opensoundcontrolconnection.h @@ -25,8 +25,9 @@ #ifndef __OPENSPACE_MODULE_OPENSOUNDCONTROL___OPENSOUNDCONTROLCONNECTION___H__ #define __OPENSPACE_MODULE_OPENSOUNDCONTROL___OPENSOUNDCONTROLCONNECTION___H__ -#include -#include +#include +#include +#include #include #include #include @@ -42,6 +43,7 @@ public: void send(const std::string& label, const std::vector& data); + private: UdpTransmitSocket _socket; char* _buffer = nullptr; diff --git a/modules/opensoundcontrol/opensoundcontrolmodule.cpp b/modules/opensoundcontrol/opensoundcontrolmodule.cpp index b67e2c454e..68a84469fb 100644 --- a/modules/opensoundcontrol/opensoundcontrolmodule.cpp +++ b/modules/opensoundcontrol/opensoundcontrolmodule.cpp @@ -24,7 +24,6 @@ #include - namespace openspace { OpenSoundControlModule::OpenSoundControlModule() : OpenSpaceModule("OpenSoundControl") {} diff --git a/modules/opensoundcontrol/opensoundcontrolmodule.h b/modules/opensoundcontrol/opensoundcontrolmodule.h index f420dad013..ce5ed442ab 100644 --- a/modules/opensoundcontrol/opensoundcontrolmodule.h +++ b/modules/opensoundcontrol/opensoundcontrolmodule.h @@ -25,7 +25,7 @@ #ifndef __OPENSPACE_MODULE_OPENSOUNDCONTROL___OPENSOUNDCONTROLMODULE___H__ #define __OPENSPACE_MODULE_OPENSOUNDCONTROL___OPENSOUNDCONTROLMODULE___H__ -#include "openspace/util/openspacemodule.h" +#include namespace openspace { diff --git a/modules/opensoundcontrol/src/opensoundcontrolconnection.cpp b/modules/opensoundcontrol/src/opensoundcontrolconnection.cpp index d3a7e0665d..2c959e5886 100644 --- a/modules/opensoundcontrol/src/opensoundcontrolconnection.cpp +++ b/modules/opensoundcontrol/src/opensoundcontrolconnection.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "OpenSoundControlConnection"; diff --git a/modules/server/include/connection.h b/modules/server/include/connection.h index 63abaa03d2..da2b3c4b3a 100644 --- a/modules/server/include/connection.h +++ b/modules/server/include/connection.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/modules/server/include/connectionpool.h b/modules/server/include/connectionpool.h index 605152ecdc..46d50ac623 100644 --- a/modules/server/include/connectionpool.h +++ b/modules/server/include/connectionpool.h @@ -51,10 +51,10 @@ public: private: void disconnectAllConnections(); - std::mutex _connectionMutex; void removeDisconnectedSockets(); void acceptNewSockets(); + std::mutex _connectionMutex; SocketHandleFunc _handleSocket; std::vector> _socketServers; std::vector> _sockets; diff --git a/modules/server/include/jsonconverters.h b/modules/server/include/jsonconverters.h index b35e4075ed..dc7bdfaa66 100644 --- a/modules/server/include/jsonconverters.h +++ b/modules/server/include/jsonconverters.h @@ -27,7 +27,6 @@ #include #include -#include namespace openspace::properties { @@ -63,6 +62,8 @@ void to_json(nlohmann::json& j, const Renderable* pR); namespace ghoul { +class Dictionary; + void to_json(nlohmann::json& j, const Dictionary& d); void to_json(nlohmann::json& j, const Dictionary* d); diff --git a/modules/server/include/logging/notificationlog.h b/modules/server/include/logging/notificationlog.h index 09a369fe47..75ef89e915 100644 --- a/modules/server/include/logging/notificationlog.h +++ b/modules/server/include/logging/notificationlog.h @@ -29,6 +29,7 @@ #include #include +#include namespace openspace { diff --git a/modules/server/include/serverinterface.h b/modules/server/include/serverinterface.h index 42117f5297..d02ef53372 100644 --- a/modules/server/include/serverinterface.h +++ b/modules/server/include/serverinterface.h @@ -26,12 +26,16 @@ #define __OPENSPACE_MODULE_SERVER___SERVERINTERFACE___H__ #include + #include #include #include #include #include #include +#include + +namespace ghoul { class Dictionary; } namespace openspace { diff --git a/modules/server/include/topics/bouncetopic.h b/modules/server/include/topics/bouncetopic.h index 2b7107e36c..1c25b5c566 100644 --- a/modules/server/include/topics/bouncetopic.h +++ b/modules/server/include/topics/bouncetopic.h @@ -29,8 +29,6 @@ namespace openspace { -class Connection; - class BounceTopic : public Topic { public: BounceTopic() = default; diff --git a/modules/server/include/topics/camerapathtopic.h b/modules/server/include/topics/camerapathtopic.h index 855ac14741..ed383c2c51 100644 --- a/modules/server/include/topics/camerapathtopic.h +++ b/modules/server/include/topics/camerapathtopic.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_SERVER___CAMERAPATHTOPIC___H__ #include + #include namespace openspace { diff --git a/modules/server/include/topics/cameratopic.h b/modules/server/include/topics/cameratopic.h index 058f98f602..fa30ed11fa 100644 --- a/modules/server/include/topics/cameratopic.h +++ b/modules/server/include/topics/cameratopic.h @@ -26,6 +26,8 @@ #define __OPENSPACE_MODULE_SERVER___CAMERATOPIC___H__ #include + +#include #include namespace openspace { diff --git a/modules/server/include/topics/downloadeventtopic.h b/modules/server/include/topics/downloadeventtopic.h index 8b3b65dcd0..5ed4cf9268 100644 --- a/modules/server/include/topics/downloadeventtopic.h +++ b/modules/server/include/topics/downloadeventtopic.h @@ -28,6 +28,7 @@ #include #include +#include namespace openspace { @@ -41,7 +42,7 @@ public: private: bool _isSubscribedTo = false; int _subscriptionID = -1; - std::unordered_map _lastCallBack; + std::unordered_map _lastCallback; }; } // namespace openspace diff --git a/modules/server/include/topics/errorlogtopic.h b/modules/server/include/topics/errorlogtopic.h index 163df34f2e..dc383d0d6d 100644 --- a/modules/server/include/topics/errorlogtopic.h +++ b/modules/server/include/topics/errorlogtopic.h @@ -26,7 +26,10 @@ #define __OPENSPACE_MODULE_SERVER___ERRORLOGTOPIC____H__ #include -#include + +#include + +namespace ghoul::logging { class Log; } namespace openspace { @@ -46,7 +49,8 @@ private: void createLog(ghoul::logging::LogLevel logLevel); bool _isSubscribedTo = false; - // Non owning but we remove the log from LogManager on destruction + + // Non-owning but we remove the log from LogManager on destruction ghoul::logging::Log* _log = nullptr; }; diff --git a/modules/server/include/topics/eventtopic.h b/modules/server/include/topics/eventtopic.h index bfb589c231..2e203e56e3 100644 --- a/modules/server/include/topics/eventtopic.h +++ b/modules/server/include/topics/eventtopic.h @@ -28,6 +28,7 @@ #include #include +#include namespace openspace::properties { class Property; } diff --git a/modules/server/include/topics/flightcontrollertopic.h b/modules/server/include/topics/flightcontrollertopic.h index 6d6d84ed33..20aef6424f 100644 --- a/modules/server/include/topics/flightcontrollertopic.h +++ b/modules/server/include/topics/flightcontrollertopic.h @@ -29,11 +29,6 @@ #include -namespace openspace::interaction { - struct WebsocketInputStates; - struct WebsocketInputState; -} // namespace openspace::interaction - namespace openspace { class FlightControllerTopic : public Topic { @@ -49,16 +44,6 @@ public: void handleAutopilot(const nlohmann::json &json); private: - bool _isDone = false; - bool _autopilotEngaged; - nlohmann::json _payload; - nlohmann::json _focusNodes; - nlohmann::json _allNodes; - nlohmann::json _interestingTimes; - - openspace::interaction::WebsocketInputStates _inputStates; - openspace::interaction::WebsocketInputState _inputState; - void connect(); void disconnect(); void processInputState(const nlohmann::json& json); @@ -70,6 +55,16 @@ private: void setFriction(const nlohmann::json& json) const; void setFriction(bool roll, bool rotation, bool zoom) const; void setFriction(bool all) const; + + bool _isDone = false; + bool _autopilotEngaged; + nlohmann::json _payload; + nlohmann::json _focusNodes; + nlohmann::json _allNodes; + nlohmann::json _interestingTimes; + + openspace::interaction::WebsocketInputStates _inputStates; + openspace::interaction::WebsocketInputState _inputState; }; } // namespace openspace diff --git a/modules/server/include/topics/missiontopic.h b/modules/server/include/topics/missiontopic.h index 40610daf51..4ac2a87d2e 100644 --- a/modules/server/include/topics/missiontopic.h +++ b/modules/server/include/topics/missiontopic.h @@ -27,12 +27,10 @@ #include -#include - -using nlohmann::json; - namespace openspace { +class MissionPhase; + class MissionTopic : public Topic { public: MissionTopic() = default; diff --git a/modules/server/include/topics/profiletopic.h b/modules/server/include/topics/profiletopic.h index fe932a9abb..b8c085a055 100644 --- a/modules/server/include/topics/profiletopic.h +++ b/modules/server/include/topics/profiletopic.h @@ -27,8 +27,6 @@ #include -using nlohmann::json; - namespace openspace { class ProfileTopic : public Topic { diff --git a/modules/server/include/topics/skybrowsertopic.h b/modules/server/include/topics/skybrowsertopic.h index 12d542465f..9c43584bf9 100644 --- a/modules/server/include/topics/skybrowsertopic.h +++ b/modules/server/include/topics/skybrowsertopic.h @@ -26,6 +26,7 @@ #define __OPENSPACE_MODULE_SERVER___SKY_BROWSER_TOPIC___H__ #include + #include namespace openspace { diff --git a/modules/server/include/topics/subscriptiontopic.h b/modules/server/include/topics/subscriptiontopic.h index 1e4da57f73..a39ad5f809 100644 --- a/modules/server/include/topics/subscriptiontopic.h +++ b/modules/server/include/topics/subscriptiontopic.h @@ -27,10 +27,10 @@ #include -namespace openspace::properties { class Property; } - namespace openspace { +namespace properties { class Property; } + class SubscriptionTopic : public Topic { public: SubscriptionTopic() = default; diff --git a/modules/server/include/topics/timetopic.h b/modules/server/include/topics/timetopic.h index ff2c20aff7..fb465f5b43 100644 --- a/modules/server/include/topics/timetopic.h +++ b/modules/server/include/topics/timetopic.h @@ -26,7 +26,9 @@ #define __OPENSPACE_MODULE_SERVER___TIME_TOPIC___H__ #include + #include +#include namespace openspace { diff --git a/modules/server/include/topics/topic.h b/modules/server/include/topics/topic.h index 9099845f52..8eb9db814f 100644 --- a/modules/server/include/topics/topic.h +++ b/modules/server/include/topics/topic.h @@ -26,6 +26,8 @@ #define __OPENSPACE_MODULE_SERVER___TOPIC___H__ #include +#include +#include namespace openspace { diff --git a/modules/server/servermodule.cpp b/modules/server/servermodule.cpp index 50eca6d3d1..ab14054f27 100644 --- a/modules/server/servermodule.cpp +++ b/modules/server/servermodule.cpp @@ -24,22 +24,21 @@ #include -#include #include #include -#include #include #include -#include -#include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include +#include +#include +#include namespace { struct [[codegen::Dictionary(ServerModule)]] Parameters { @@ -58,7 +57,7 @@ documentation::Documentation ServerModule::Documentation() { ServerModule::ServerModule() : OpenSpaceModule(ServerModule::Name) - , _interfaceOwner({"Interfaces", "Interfaces", "Server Interfaces"}) + , _interfaceOwner({ "Interfaces", "Interfaces", "Server Interfaces" }) { addPropertySubOwner(_interfaceOwner); diff --git a/modules/server/servermodule.h b/modules/server/servermodule.h index aa46637ced..8e241f7689 100644 --- a/modules/server/servermodule.h +++ b/modules/server/servermodule.h @@ -28,10 +28,11 @@ #include #include - #include +#include #include #include +#include namespace openspace { @@ -41,11 +42,6 @@ constexpr int SOCKET_API_VERSION_PATCH = 0; class Connection; -struct Message { - std::weak_ptr connection; - std::string messageString; -}; - class ServerModule : public OpenSpaceModule { public: static constexpr const char* Name = "Server"; @@ -68,6 +64,11 @@ protected: void internalInitialize(const ghoul::Dictionary& configuration) override; private: + struct Message { + std::weak_ptr connection; + std::string messageString; + }; + struct ConnectionData { std::shared_ptr connection; bool isMarkedForRemoval = false; diff --git a/modules/server/src/connection.cpp b/modules/server/src/connection.cpp index ff99ccf5ff..ed3f9ea3f5 100644 --- a/modules/server/src/connection.cpp +++ b/modules/server/src/connection.cpp @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -37,24 +38,28 @@ #include #include #include +#include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include -#include -#include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ServerModule: Connection"; @@ -62,7 +67,6 @@ namespace { constexpr std::string_view MessageKeyType = "type"; constexpr std::string_view MessageKeyPayload = "payload"; constexpr std::string_view MessageKeyTopic = "topic"; - } // namespace namespace openspace { diff --git a/modules/server/src/connectionpool.cpp b/modules/server/src/connectionpool.cpp index 52da146c18..91e26d4e06 100644 --- a/modules/server/src/connectionpool.cpp +++ b/modules/server/src/connectionpool.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace openspace { diff --git a/modules/server/src/jsonconverters.cpp b/modules/server/src/jsonconverters.cpp index 69805ab5b9..59fbf9702b 100644 --- a/modules/server/src/jsonconverters.cpp +++ b/modules/server/src/jsonconverters.cpp @@ -26,9 +26,12 @@ #include #include +#include #include #include -#include +#include +#include +#include using json = nlohmann::json; diff --git a/modules/server/src/logging/notificationlog.cpp b/modules/server/src/logging/notificationlog.cpp index 028700408e..822fb23e6f 100644 --- a/modules/server/src/logging/notificationlog.cpp +++ b/modules/server/src/logging/notificationlog.cpp @@ -24,6 +24,8 @@ #include +#include + namespace openspace { NotificationLog::NotificationLog(CallbackFunction callbackFunction, diff --git a/modules/server/src/serverinterface.cpp b/modules/server/src/serverinterface.cpp index f600a8591c..dff25afd82 100644 --- a/modules/server/src/serverinterface.cpp +++ b/modules/server/src/serverinterface.cpp @@ -25,9 +25,11 @@ #include #include +#include #include #include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/modules/server/src/topics/actionkeybindtopic.cpp b/modules/server/src/topics/actionkeybindtopic.cpp index 8021a9fead..05ec121e78 100644 --- a/modules/server/src/topics/actionkeybindtopic.cpp +++ b/modules/server/src/topics/actionkeybindtopic.cpp @@ -29,12 +29,29 @@ #include #include #include -#include +#include +#include +#include +#include +#include +#include +#include using nlohmann::json; namespace openspace { +void ActionKeybindTopic::handleJson(const nlohmann::json& input) { + const std::string& event = input.at("event").get(); + if (event == "get_all") { + sendData(allActionsKeybinds()); + } + else if (event == "get_action") { + const std::string& identifier = input.at("identifier").get(); + sendData(action(identifier)); + } +} + bool ActionKeybindTopic::isDone() const { return true; } @@ -116,15 +133,4 @@ void ActionKeybindTopic::sendData(nlohmann::json data) const { _connection->sendJson(std::move(payload)); } -void ActionKeybindTopic::handleJson(const nlohmann::json& input) { - const std::string& event = input.at("event").get(); - if (event == "get_all") { - sendData(allActionsKeybinds()); - } - else if (event == "get_action") { - const std::string& identifier = input.at("identifier").get(); - sendData(action(identifier)); - } -} - } // namespace openspace diff --git a/modules/server/src/topics/authorizationtopic.cpp b/modules/server/src/topics/authorizationtopic.cpp index 75451cb6e2..c797dde96a 100644 --- a/modules/server/src/topics/authorizationtopic.cpp +++ b/modules/server/src/topics/authorizationtopic.cpp @@ -25,9 +25,10 @@ #include #include -#include -#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "AuthorizationTopic"; diff --git a/modules/server/src/topics/camerapathtopic.cpp b/modules/server/src/topics/camerapathtopic.cpp index c5a565e95d..68f817d700 100644 --- a/modules/server/src/topics/camerapathtopic.cpp +++ b/modules/server/src/topics/camerapathtopic.cpp @@ -32,7 +32,10 @@ #include #include #include -#include +#include +#include +#include +#include namespace { constexpr std::string_view SubscribeEvent = "start_subscription"; @@ -55,10 +58,6 @@ CameraPathTopic::~CameraPathTopic() { } } -bool CameraPathTopic::isDone() const { - return _isDone; -} - void CameraPathTopic::handleJson(const nlohmann::json& json) { const std::string event = json.at("event").get(); @@ -82,6 +81,10 @@ void CameraPathTopic::handleJson(const nlohmann::json& json) { ); } +bool CameraPathTopic::isDone() const { + return _isDone; +} + void CameraPathTopic::sendCameraPathData() { const interaction::PathNavigator& pathNavigator = global::navigationHandler->pathNavigator(); diff --git a/modules/server/src/topics/cameratopic.cpp b/modules/server/src/topics/cameratopic.cpp index 27c9622179..8075d548ec 100644 --- a/modules/server/src/topics/cameratopic.cpp +++ b/modules/server/src/topics/cameratopic.cpp @@ -24,24 +24,19 @@ #include -#ifdef OPENSPACE_MODULE_SPACE_ENABLED -#include -#endif // OPENSPACE_MODULE_SPACE_ENABLED #include #include #include #include -#include #include #include -#include +#include +#include namespace { constexpr std::string_view SubscribeEvent = "start_subscription"; } // namespace -using nlohmann::json; - namespace openspace { CameraTopic::CameraTopic() diff --git a/modules/server/src/topics/documentationtopic.cpp b/modules/server/src/topics/documentationtopic.cpp index d813f9971c..cf4ef83f2d 100644 --- a/modules/server/src/topics/documentationtopic.cpp +++ b/modules/server/src/topics/documentationtopic.cpp @@ -25,15 +25,8 @@ #include #include -#include #include -#include #include -#include -#include -#include - -using nlohmann::json; namespace openspace { diff --git a/modules/server/src/topics/downloadeventtopic.cpp b/modules/server/src/topics/downloadeventtopic.cpp index dbfc2f5fb4..f594b56acb 100644 --- a/modules/server/src/topics/downloadeventtopic.cpp +++ b/modules/server/src/topics/downloadeventtopic.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace { constexpr std::string_view StartSubscription = "start_subscription"; @@ -44,10 +44,6 @@ DownloadEventTopic::~DownloadEventTopic() { } } -bool DownloadEventTopic::isDone() const { - return !_isSubscribedTo; -} - void DownloadEventTopic::handleJson(const nlohmann::json& json) { const std::string& event = json.at("event").get(); @@ -58,7 +54,7 @@ void DownloadEventTopic::handleJson(const nlohmann::json& json) { // Limit how often we send data to frontend to reduce traffic if (event.type == DownloadEventEngine::DownloadEvent::Type::Progress) { const auto now = std::chrono::steady_clock::now(); - auto& last = _lastCallBack[event.id]; + auto& last = _lastCallback[event.id]; if (now - last >= CallbackUpdateInterval) { last = now; @@ -87,4 +83,8 @@ void DownloadEventTopic::handleJson(const nlohmann::json& json) { } } +bool DownloadEventTopic::isDone() const { + return !_isSubscribedTo; +} + } // namespace openspace diff --git a/modules/server/src/topics/enginemodetopic.cpp b/modules/server/src/topics/enginemodetopic.cpp index 744200c342..6fccc7f305 100644 --- a/modules/server/src/topics/enginemodetopic.cpp +++ b/modules/server/src/topics/enginemodetopic.cpp @@ -26,8 +26,8 @@ #include #include -#include #include +#include namespace { constexpr std::string_view _loggerCat = "EngineModeTopic"; @@ -51,10 +51,6 @@ EngineModeTopic::~EngineModeTopic() { } } -bool EngineModeTopic::isDone() const { - return _isDone; -} - void EngineModeTopic::handleJson(const nlohmann::json& json) { const std::string event = json.at("event").get(); if (event != SubscribeEvent && event != UnsubscribeEvent && @@ -85,6 +81,10 @@ void EngineModeTopic::handleJson(const nlohmann::json& json) { } } +bool EngineModeTopic::isDone() const { + return _isDone; +} + void EngineModeTopic::sendJsonData() { const OpenSpaceEngine::Mode mode = global::openSpaceEngine->currentMode(); std::string modeString; diff --git a/modules/server/src/topics/errorlogtopic.cpp b/modules/server/src/topics/errorlogtopic.cpp index c6d0790004..7a225f34fa 100644 --- a/modules/server/src/topics/errorlogtopic.cpp +++ b/modules/server/src/topics/errorlogtopic.cpp @@ -25,7 +25,11 @@ #include #include +#include #include +#include +#include +#include namespace { constexpr std::string_view StartSubscription = "start_subscription"; diff --git a/modules/server/src/topics/eventtopic.cpp b/modules/server/src/topics/eventtopic.cpp index 9c3f5c2f9e..9af3580809 100644 --- a/modules/server/src/topics/eventtopic.cpp +++ b/modules/server/src/topics/eventtopic.cpp @@ -31,6 +31,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "EventTopic"; @@ -43,10 +48,6 @@ using nlohmann::json; namespace openspace { -bool EventTopic::isDone() const { - return !isSubscribed(); -} - void EventTopic::handleJson(const nlohmann::json& json) { std::vector events; @@ -106,6 +107,10 @@ void EventTopic::handleJson(const nlohmann::json& json) { } } +bool EventTopic::isDone() const { + return !isSubscribed(); +} + bool EventTopic::isSubscribed() const { if (_subscribedEvents.empty()) { return false; diff --git a/modules/server/src/topics/flightcontrollertopic.cpp b/modules/server/src/topics/flightcontrollertopic.cpp index 1c2c364e6c..683409178b 100644 --- a/modules/server/src/topics/flightcontrollertopic.cpp +++ b/modules/server/src/topics/flightcontrollertopic.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -36,14 +35,15 @@ #include #include #include -#include -#include -#include #include #include #include #include #include +#include +#include +#include +#include namespace { enum class Command { diff --git a/modules/server/src/topics/luascripttopic.cpp b/modules/server/src/topics/luascripttopic.cpp index a5f31b41bd..dbf7ad96dd 100644 --- a/modules/server/src/topics/luascripttopic.cpp +++ b/modules/server/src/topics/luascripttopic.cpp @@ -24,14 +24,17 @@ #include -#include #include -#include +#include #include #include +#include #include #include #include +#include +#include +#include namespace { constexpr std::string_view KeyScript = "script"; diff --git a/modules/server/src/topics/missiontopic.cpp b/modules/server/src/topics/missiontopic.cpp index 6011bdf496..34ef9b09c0 100644 --- a/modules/server/src/topics/missiontopic.cpp +++ b/modules/server/src/topics/missiontopic.cpp @@ -25,18 +25,22 @@ #include #include -#include #include #include +#include #include #include #include #include - -using nlohmann::json; +#include namespace openspace { +void MissionTopic::handleJson(const nlohmann::json&) { + const nlohmann::json data = { {"missions", missionJson()} }; + _connection->sendJson(wrappedPayload(data)); +} + bool MissionTopic::isDone() const { return true; } @@ -56,7 +60,7 @@ nlohmann::json MissionTopic::missionJson() const { ); captureTimesString[i] = std::move(str); } - json json; + nlohmann::json json; for (auto const& [identifier, mission] : missions) { nlohmann::json missionJson = createPhaseJson(mission); missionJson["capturetimes"] = captureTimesString; @@ -66,16 +70,16 @@ nlohmann::json MissionTopic::missionJson() const { } nlohmann::json MissionTopic::createPhaseJson(const MissionPhase& phase) const { - json phases = json::array(); + nlohmann::json phases = nlohmann::json::array(); for (const MissionPhase& missionPhase : phase.phases()) { - json subphaseJson = createPhaseJson(missionPhase); + nlohmann::json subphaseJson = createPhaseJson(missionPhase); phases.push_back(std::move(subphaseJson)); } - json milestones = json::array(); + nlohmann::json milestones = nlohmann::json::array(); const std::vector& dates = phase.milestones(); for (const Milestone& date : dates) { - json jsonDate = { + nlohmann::json jsonDate = { { "date", std::string(date.date.ISO8601()) }, { "name", date.name } }; @@ -115,9 +119,4 @@ nlohmann::json MissionTopic::createPhaseJson(const MissionPhase& phase) const { return phaseJson; } -void MissionTopic::handleJson(const nlohmann::json&) { - const nlohmann::json data = { {"missions", missionJson()} }; - _connection->sendJson(wrappedPayload(data)); -} - } // namespace openspace diff --git a/modules/server/src/topics/profiletopic.cpp b/modules/server/src/topics/profiletopic.cpp index 3cf8b9d370..47b8df17bb 100644 --- a/modules/server/src/topics/profiletopic.cpp +++ b/modules/server/src/topics/profiletopic.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -33,10 +32,6 @@ namespace openspace { -bool ProfileTopic::isDone() const { - return true; -} - void ProfileTopic::handleJson(const nlohmann::json&) { // @TODO (2025-04-30, emmbr) If we expose the json converters from profile.cpp, we // could use those here instead and minimize the risk of getting the serialization of @@ -65,4 +60,8 @@ void ProfileTopic::handleJson(const nlohmann::json&) { _connection->sendJson(wrappedPayload(data)); } +bool ProfileTopic::isDone() const { + return true; +} + } // namespace openspace diff --git a/modules/server/src/topics/sessionrecordingtopic.cpp b/modules/server/src/topics/sessionrecordingtopic.cpp index 0b95bf9082..93f745fcda 100644 --- a/modules/server/src/topics/sessionrecordingtopic.cpp +++ b/modules/server/src/topics/sessionrecordingtopic.cpp @@ -26,8 +26,8 @@ #include #include -#include #include +#include namespace { constexpr std::string_view _loggerCat = "SessionRecordingTopic"; @@ -41,8 +41,6 @@ namespace { constexpr const char* StateKey = "state"; } // namespace -using nlohmann::json; - namespace openspace { SessionRecordingTopic::SessionRecordingTopic() { @@ -55,10 +53,6 @@ SessionRecordingTopic::~SessionRecordingTopic() { } } -bool SessionRecordingTopic::isDone() const { - return _isDone; -} - void SessionRecordingTopic::handleJson(const nlohmann::json& json) { const std::string event = json.at("event").get(); if (event != SubscribeEvent && event != UnsubscribeEvent && @@ -112,8 +106,12 @@ void SessionRecordingTopic::handleJson(const nlohmann::json& json) { } } +bool SessionRecordingTopic::isDone() const { + return _isDone; +} + void SessionRecordingTopic::sendJsonData() { - json stateJson; + nlohmann::json stateJson; using SessionRecordingHandler = interaction::SessionRecordingHandler; if (_sendState) { std::string stateString; diff --git a/modules/server/src/topics/setpropertytopic.cpp b/modules/server/src/topics/setpropertytopic.cpp index 94e39d55b6..6a7efa66ba 100644 --- a/modules/server/src/topics/setpropertytopic.cpp +++ b/modules/server/src/topics/setpropertytopic.cpp @@ -24,14 +24,15 @@ #include -#include #include #include -#include #include #include #include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "SetPropertyTopic"; diff --git a/modules/server/src/topics/skybrowsertopic.cpp b/modules/server/src/topics/skybrowsertopic.cpp index 4afc27f17b..4ae66ea919 100644 --- a/modules/server/src/topics/skybrowsertopic.cpp +++ b/modules/server/src/topics/skybrowsertopic.cpp @@ -30,10 +30,11 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view SubscribeEvent = "start_subscription"; @@ -62,10 +63,6 @@ SkyBrowserTopic::~SkyBrowserTopic() { } } -bool SkyBrowserTopic::isDone() const { - return _isDone; -} - void SkyBrowserTopic::handleJson(const nlohmann::json& json) { const std::string event = json.at("event").get(); if (event == UnsubscribeEvent) { @@ -90,6 +87,10 @@ void SkyBrowserTopic::handleJson(const nlohmann::json& json) { ); } +bool SkyBrowserTopic::isDone() const { + return _isDone; +} + void SkyBrowserTopic::sendBrowserData() { using namespace openspace; diff --git a/modules/server/src/topics/subscriptiontopic.cpp b/modules/server/src/topics/subscriptiontopic.cpp index d6e011bbda..2fa1b4f059 100644 --- a/modules/server/src/topics/subscriptiontopic.cpp +++ b/modules/server/src/topics/subscriptiontopic.cpp @@ -25,12 +25,11 @@ #include #include -#include #include #include -#include #include #include +#include namespace { constexpr std::string_view _loggerCat = "SubscriptionTopic"; @@ -47,28 +46,6 @@ SubscriptionTopic::~SubscriptionTopic() { resetCallbacks(); } -bool SubscriptionTopic::isDone() const { - return !_requestedResourceIsSubscribable || !_isSubscribedTo; -} - -void SubscriptionTopic::resetCallbacks() { - if (!_prop) { - return; - } - if (_onChangeHandle != UnsetCallbackHandle) { - _prop->removeOnChange(_onChangeHandle); - _onChangeHandle = UnsetCallbackHandle; - } - if (_onMetaDataChangeHandle != UnsetCallbackHandle) { - _prop->removeOnMetaDataChange(_onMetaDataChangeHandle); - _onMetaDataChangeHandle = UnsetCallbackHandle; - } - if (_onDeleteHandle != UnsetCallbackHandle) { - _prop->removeOnDelete(_onDeleteHandle); - _onDeleteHandle = UnsetCallbackHandle; - } -} - void SubscriptionTopic::handleJson(const nlohmann::json& json) { const std::string& event = json.at("event").get(); @@ -117,4 +94,26 @@ void SubscriptionTopic::handleJson(const nlohmann::json& json) { } } +bool SubscriptionTopic::isDone() const { + return !_requestedResourceIsSubscribable || !_isSubscribedTo; +} + +void SubscriptionTopic::resetCallbacks() { + if (!_prop) { + return; + } + if (_onChangeHandle != UnsetCallbackHandle) { + _prop->removeOnChange(_onChangeHandle); + _onChangeHandle = UnsetCallbackHandle; + } + if (_onMetaDataChangeHandle != UnsetCallbackHandle) { + _prop->removeOnMetaDataChange(_onMetaDataChangeHandle); + _onMetaDataChangeHandle = UnsetCallbackHandle; + } + if (_onDeleteHandle != UnsetCallbackHandle) { + _prop->removeOnDelete(_onDeleteHandle); + _onDeleteHandle = UnsetCallbackHandle; + } +} + } // namespace openspace diff --git a/modules/server/src/topics/timetopic.cpp b/modules/server/src/topics/timetopic.cpp index 6ffc50fdd5..ae5d546c45 100644 --- a/modules/server/src/topics/timetopic.cpp +++ b/modules/server/src/topics/timetopic.cpp @@ -26,10 +26,11 @@ #include #include -#include -#include #include -#include +#include +#include +#include +#include namespace { constexpr std::string_view SubscribeEvent = "start_subscription"; @@ -59,10 +60,6 @@ TimeTopic::~TimeTopic() { } } -bool TimeTopic::isDone() const { - return _isDone; -} - void TimeTopic::handleJson(const nlohmann::json& json) { const std::string event = json.at("event").get(); if (event == UnsubscribeEvent) { @@ -110,6 +107,10 @@ void TimeTopic::handleJson(const nlohmann::json& json) { ); } +bool TimeTopic::isDone() const { + return _isDone; +} + json TimeTopic::getNextPrevDeltaTimeStepJson() { const std::optional nextStep = global::timeManager->nextDeltaTimeStep(); const std::optional prevStep = global::timeManager->previousDeltaTimeStep(); diff --git a/modules/server/src/topics/topic.cpp b/modules/server/src/topics/topic.cpp index eebed65e5a..0a3b36d785 100644 --- a/modules/server/src/topics/topic.cpp +++ b/modules/server/src/topics/topic.cpp @@ -24,9 +24,10 @@ #include -#include +#include #include #include +#include namespace openspace { diff --git a/modules/server/src/topics/triggerpropertytopic.cpp b/modules/server/src/topics/triggerpropertytopic.cpp index 40aa9a362b..f2bcaf048c 100644 --- a/modules/server/src/topics/triggerpropertytopic.cpp +++ b/modules/server/src/topics/triggerpropertytopic.cpp @@ -24,12 +24,13 @@ #include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TriggerPropertyTopic"; diff --git a/modules/server/src/topics/versiontopic.cpp b/modules/server/src/topics/versiontopic.cpp index 598d2cb285..5ee1a55b9e 100644 --- a/modules/server/src/topics/versiontopic.cpp +++ b/modules/server/src/topics/versiontopic.cpp @@ -32,10 +32,6 @@ namespace openspace { -bool VersionTopic::isDone() const { - return true; -} - void VersionTopic::handleJson(const nlohmann::json&) { nlohmann::json versionJson = { { @@ -70,4 +66,8 @@ void VersionTopic::handleJson(const nlohmann::json&) { _connection->sendJson(wrappedPayload(versionJson)); } +bool VersionTopic::isDone() const { + return true; +} + } // namespace openspace diff --git a/modules/skybrowser/include/renderableskytarget.h b/modules/skybrowser/include/renderableskytarget.h index ef2147a114..c1f9729151 100644 --- a/modules/skybrowser/include/renderableskytarget.h +++ b/modules/skybrowser/include/renderableskytarget.h @@ -27,15 +27,13 @@ #include -#include +#include +#include #include - -namespace openspace::documentation { struct Documentation; } +#include namespace openspace { -class ScreenSpaceSkyBrowser; - class RenderableSkyTarget : public RenderablePlane { public: explicit RenderableSkyTarget(const ghoul::Dictionary& dictionary); diff --git a/modules/skybrowser/include/screenspaceskybrowser.h b/modules/skybrowser/include/screenspaceskybrowser.h index bf15beae2e..fcbb3a8298 100644 --- a/modules/skybrowser/include/screenspaceskybrowser.h +++ b/modules/skybrowser/include/screenspaceskybrowser.h @@ -26,12 +26,13 @@ #define __OPENSPACE_MODULE_SKYBROWSER___SCREENSPACESKYBROWSER___H__ #include -#include -#include +#include #include -#include +#include #include +#include +#include namespace openspace { @@ -84,7 +85,8 @@ public: static documentation::Documentation Documentation(); private: - static constexpr int RadiusTimeOut = 25; + static constexpr int RadiusTimeout = 25; + properties::BoolProperty _isHidden; properties::BoolProperty _isPointingSpacecraft; properties::BoolProperty _updateDuringTargetAnimation; diff --git a/modules/skybrowser/include/targetbrowserpair.h b/modules/skybrowser/include/targetbrowserpair.h index b5956d07de..215329b0c0 100644 --- a/modules/skybrowser/include/targetbrowserpair.h +++ b/modules/skybrowser/include/targetbrowserpair.h @@ -26,16 +26,19 @@ #define __OPENSPACE_MODULE_SKYBROWSER___TARGETBROWSERPAIR___H__ #include +#include +#include +#include +#include namespace ghoul { class Dictionary; } namespace openspace { struct ImageData; +class RenderableSkyTarget; class SceneGraphNode; class ScreenSpaceSkyBrowser; -class RenderableSkyTarget; -class ScreenSpaceRenderable; class TargetBrowserPair { public: @@ -105,6 +108,7 @@ public: void loadImageCollection(const std::string& collection); void setImageOpacity(const std::string& imageUrl, float opacity); void hideChromeInterface(); + private: // Target and browser RenderableSkyTarget* _targetRenderable = nullptr; diff --git a/modules/skybrowser/include/utility.h b/modules/skybrowser/include/utility.h index 38fcf78926..b50371d838 100644 --- a/modules/skybrowser/include/utility.h +++ b/modules/skybrowser/include/utility.h @@ -25,10 +25,12 @@ #ifndef __OPENSPACE_MODULE_SKYBROWSER___UTILITY___H__ #define __OPENSPACE_MODULE_SKYBROWSER___UTILITY___H__ -#include #include +#include #include #include +#include +#include namespace openspace::skybrowser { diff --git a/modules/skybrowser/include/wwtcommunicator.h b/modules/skybrowser/include/wwtcommunicator.h index 2495ea56bc..daef9b7815 100644 --- a/modules/skybrowser/include/wwtcommunicator.h +++ b/modules/skybrowser/include/wwtcommunicator.h @@ -25,13 +25,17 @@ #ifndef __OPENSPACE_MODULE_SKYBROWSER___WWTCOMMUNICATOR___H__ #define __OPENSPACE_MODULE_SKYBROWSER___WWTCOMMUNICATOR___H__ -#include -#include - +#include #include +#include +#include +#include + +namespace ghoul { class Dictionary; } namespace openspace { -using SelectedImageDeque = std::deque>; + +class BrowserInstance; class WwtCommunicator { public: @@ -58,15 +62,15 @@ public: void setBorderRadius(double radius); void setIdInBrowser(const std::string& id) const; - SelectedImageDeque::iterator findSelectedImage(const std::string& imageUrl); + std::deque>::iterator findSelectedImage( + const std::string& imageUrl); private: void executeJavascript(const std::string& script) const; void sendMessageToWwt(const ghoul::Dictionary& msg) const; bool _isImageCollectionLoaded = false; - SelectedImageDeque _selectedImages; - + std::deque> _selectedImages; BrowserInstance* _browserInstance = nullptr; }; diff --git a/modules/skybrowser/include/wwtdatahandler.h b/modules/skybrowser/include/wwtdatahandler.h index c3d13e7007..992891d155 100644 --- a/modules/skybrowser/include/wwtdatahandler.h +++ b/modules/skybrowser/include/wwtdatahandler.h @@ -25,16 +25,16 @@ #ifndef __OPENSPACE_MODULE_SKYBROWSER___WWTDATAHANDLER___H__ #define __OPENSPACE_MODULE_SKYBROWSER___WWTDATAHANDLER___H__ +#include #include -#include +#include #include +#include namespace tinyxml2 { class XMLElement; } namespace openspace { -namespace documentation { struct Documentation; } - struct ImageData { std::string name; std::string thumbnailUrl; diff --git a/modules/skybrowser/skybrowsermodule.cpp b/modules/skybrowser/skybrowsermodule.cpp index 10786f8837..25c7417ba6 100644 --- a/modules/skybrowser/skybrowsermodule.cpp +++ b/modules/skybrowser/skybrowsermodule.cpp @@ -27,19 +27,32 @@ #include #include #include -#include #include +#include +#include #include -#include #include +#include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "skybrowsermodule_lua.inl" namespace { - constexpr openspace::properties::Property::PropertyInfo AllowRotationInfo = { "AllowCameraRotation", "Allow camera rotation", @@ -108,7 +121,6 @@ namespace { openspace::properties::Property::Visibility::AdvancedUser }; - struct [[codegen::Dictionary(SkyBrowserModule)]] Parameters { // [[codegen::verbatim(AllowRotationInfo.description)]] std::optional allowCameraRotation; diff --git a/modules/skybrowser/skybrowsermodule.h b/modules/skybrowser/skybrowsermodule.h index 035cc4a0fb..7f40ab0e01 100644 --- a/modules/skybrowser/skybrowsermodule.h +++ b/modules/skybrowser/skybrowsermodule.h @@ -32,13 +32,12 @@ #include #include #include +#include #include namespace openspace { -struct ImageData; class SceneGraphNode; -class ScreenSpaceImageLocal; class TargetBrowserPair; class SkyBrowserModule : public OpenSpaceModule { diff --git a/modules/skybrowser/skybrowsermodule_lua.inl b/modules/skybrowser/skybrowsermodule_lua.inl index 0c2e31df03..72f8bb1a05 100644 --- a/modules/skybrowser/skybrowsermodule_lua.inl +++ b/modules/skybrowser/skybrowsermodule_lua.inl @@ -24,17 +24,13 @@ #include -#include #include -#include #include -#include #include #include #include #include #include -#include #include #include diff --git a/modules/skybrowser/src/renderableskytarget.cpp b/modules/skybrowser/src/renderableskytarget.cpp index 795059ddb2..b23451a152 100644 --- a/modules/skybrowser/src/renderableskytarget.cpp +++ b/modules/skybrowser/src/renderableskytarget.cpp @@ -24,22 +24,20 @@ #include -#include -#include #include #include +#include #include -#include #include -#include #include -#include -#include #include #include +#include +#include #include -#include -#include +#include +#include +#include namespace { enum BlendMode { diff --git a/modules/skybrowser/src/screenspaceskybrowser.cpp b/modules/skybrowser/src/screenspaceskybrowser.cpp index 42ac08d865..ac0c44584b 100644 --- a/modules/skybrowser/src/screenspaceskybrowser.cpp +++ b/modules/skybrowser/src/screenspaceskybrowser.cpp @@ -25,17 +25,19 @@ #include #include -#include #include +#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include +#include #include namespace { @@ -462,7 +464,7 @@ void ScreenSpaceSkyBrowser::update() { } // After the texture has been updated, wait a little bit before updating the border // radius so the browser has time to update its size - if (_radiusIsDirty && _isInitialized && _borderRadiusTimer > RadiusTimeOut) { + if (_radiusIsDirty && _isInitialized && _borderRadiusTimer > RadiusTimeout) { _wwtCommunicator.setBorderRadius(_borderRadius); _radiusIsDirty = false; _borderRadiusTimer = -1; diff --git a/modules/skybrowser/src/targetbrowserpair.cpp b/modules/skybrowser/src/targetbrowserpair.cpp index d6b2e1e390..53c933023a 100644 --- a/modules/skybrowser/src/targetbrowserpair.cpp +++ b/modules/skybrowser/src/targetbrowserpair.cpp @@ -34,11 +34,15 @@ #include #include #include +#include #include +#include #include -#include -#include +#include +#include #include +#include +#include namespace { void aimTargetGalactic(std::string_view id, const glm::dvec3& direction) { diff --git a/modules/skybrowser/src/utility.cpp b/modules/skybrowser/src/utility.cpp index eff7639ab4..460837f63c 100644 --- a/modules/skybrowser/src/utility.cpp +++ b/modules/skybrowser/src/utility.cpp @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include namespace { // Galactic coordinates are projected onto the celestial sphere diff --git a/modules/skybrowser/src/wwtcommunicator.cpp b/modules/skybrowser/src/wwtcommunicator.cpp index 8cdb886433..b3e5c71280 100644 --- a/modules/skybrowser/src/wwtcommunicator.cpp +++ b/modules/skybrowser/src/wwtcommunicator.cpp @@ -24,13 +24,12 @@ #include -#include -#include -#include -#include -#include +#include +#include #include -#include +#include +#include +#include namespace { // WWT messages @@ -197,7 +196,7 @@ bool WwtCommunicator::isImageCollectionLoaded() const { return _isImageCollectionLoaded; } -SelectedImageDeque::iterator WwtCommunicator::findSelectedImage( +std::deque>::iterator WwtCommunicator::findSelectedImage( const std::string& imageUrl) { auto it = std::find_if( diff --git a/modules/skybrowser/src/wwtdatahandler.cpp b/modules/skybrowser/src/wwtdatahandler.cpp index 25d2c41deb..f8b57715e6 100644 --- a/modules/skybrowser/src/wwtdatahandler.cpp +++ b/modules/skybrowser/src/wwtdatahandler.cpp @@ -27,8 +27,17 @@ #include #include #include -#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "WwtDataHandler"; diff --git a/modules/space/horizonsfile.cpp b/modules/space/horizonsfile.cpp index 8f174f436d..4f576297ca 100644 --- a/modules/space/horizonsfile.cpp +++ b/modules/space/horizonsfile.cpp @@ -27,14 +27,15 @@ #include #include #include -#include #include #include #include -#include +#include #include - -using json = nlohmann::json; +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "HorizonsFile"; @@ -116,7 +117,9 @@ std::string constructHorizonsUrl(HorizonsType type, const std::string& target, return url; } -json sendHorizonsRequest(const std::string& url, const std::filesystem::path& filePath) { +nlohmann::json sendHorizonsRequest(const std::string& url, + const std::filesystem::path& filePath) +{ // Set up HTTP request and download result const auto download = std::make_unique( url, @@ -155,10 +158,10 @@ nlohmann::json convertHorizonsDownloadToJson(const std::filesystem::path& filePa answer.append(buf, 0, stream.gcount()); // convert to a json object - return json::parse(answer); + return nlohmann::json::parse(answer); } -HorizonsResultCode isValidHorizonsAnswer(const json& answer) { +HorizonsResultCode isValidHorizonsAnswer(const nlohmann::json& answer) { // Signature, source and version if (auto signature = answer.find("signature"); signature != answer.end()) { if (auto source = signature->find("source"); source != signature->end()) { diff --git a/modules/space/horizonsfile.h b/modules/space/horizonsfile.h index 9cc9d20ca9..b46a0a737d 100644 --- a/modules/space/horizonsfile.h +++ b/modules/space/horizonsfile.h @@ -30,13 +30,14 @@ #include #include #include +#include namespace openspace { /** * A Horizons file is a text file generated from NASA JPL HORIZONS Website - * (https://ssd.jpl.nasa.gov/horizons.cgi). The implementation supports both Vector - * and Observer as Horizons data table. + * (https://ssd.jpl.nasa.gov/horizons.cgi). The implementation supports both Vector and + * Observer as Horizons data table. * * In case of Vector table data the implementation expects a file with format: * TIME(JulianDayNumber = A.D. YYYY-MM-DD HH:MM:SS TDB) @@ -126,8 +127,7 @@ private: // Free functions std::string constructHorizonsUrl(HorizonsType type, const std::string& target, const std::string& observer, const std::string& startTime, - const std::string& stopTime, const std::string& stepSize, - const std::string& unit); + const std::string& stopTime, const std::string& stepSize, const std::string& unit); nlohmann::json sendHorizonsRequest(const std::string& url, const std::filesystem::path& filePath); nlohmann::json convertHorizonsDownloadToJson(const std::filesystem::path& filePath); diff --git a/modules/space/kepler.h b/modules/space/kepler.h index f79ff64fcf..2d8f4f4994 100644 --- a/modules/space/kepler.h +++ b/modules/space/kepler.h @@ -106,6 +106,7 @@ enum class Format { SBDB, ///< Small-Body Database MPC ///< Minor Planet Center }; + /** * Reads the object information from the provided file. * diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 39e9e70989..f69e7bb363 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -29,12 +29,21 @@ #include #include #include +#include #include +#include +#include #include #include +#include "SpiceUsr.h" +#include +#include +#include #include #include -#include "SpiceUsr.h" +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableConstellationBounds"; diff --git a/modules/space/rendering/renderableconstellationbounds.h b/modules/space/rendering/renderableconstellationbounds.h index 7e6dea4a7e..efeac1ea1c 100644 --- a/modules/space/rendering/renderableconstellationbounds.h +++ b/modules/space/rendering/renderableconstellationbounds.h @@ -27,14 +27,13 @@ #include +#include +#include +#include #include -namespace ghoul::opengl { class ProgramObject; } - namespace openspace { -namespace documentation { struct Documentation; } - /** * This class renders the constellation bounds as defined in * http://cdsarc.u-strasbg.fr/viz-bin/Cat?cat=VI%2F49. It contains the bounds on the diff --git a/modules/space/rendering/renderableconstellationlines.cpp b/modules/space/rendering/renderableconstellationlines.cpp index fc5e4e2be5..50c7a448c8 100644 --- a/modules/space/rendering/renderableconstellationlines.cpp +++ b/modules/space/rendering/renderableconstellationlines.cpp @@ -24,21 +24,29 @@ #include +#include #include #include #include #include #include +#include #include #include +#include +#include #include #include #include #include -#include +#include #include #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableConstellationLines"; diff --git a/modules/space/rendering/renderableconstellationlines.h b/modules/space/rendering/renderableconstellationlines.h index 4910cb75c3..2edd08bc97 100644 --- a/modules/space/rendering/renderableconstellationlines.h +++ b/modules/space/rendering/renderableconstellationlines.h @@ -27,20 +27,15 @@ #include +#include +#include +#include +#include #include #include -namespace ghoul::filesystem { class File; } -namespace ghoul::fontrendering { class Font; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl - namespace openspace { -namespace documentation { struct Documentation; } - class RenderableConstellationLines : public RenderableConstellationsBase { public: explicit RenderableConstellationLines(const ghoul::Dictionary& dictionary); diff --git a/modules/space/rendering/renderableconstellationsbase.cpp b/modules/space/rendering/renderableconstellationsbase.cpp index 0a594d8a1e..0523742caf 100644 --- a/modules/space/rendering/renderableconstellationsbase.cpp +++ b/modules/space/rendering/renderableconstellationsbase.cpp @@ -24,18 +24,20 @@ #include +#include #include -#include -#include -#include #include -#include +#include #include #include #include -#include +#include +#include +#include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableConstellationsBase"; diff --git a/modules/space/rendering/renderableconstellationsbase.h b/modules/space/rendering/renderableconstellationsbase.h index 63e69d40ab..e55575503c 100644 --- a/modules/space/rendering/renderableconstellationsbase.h +++ b/modules/space/rendering/renderableconstellationsbase.h @@ -27,23 +27,14 @@ #include -#include #include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include - -namespace ghoul::opengl { class ProgramObject; } +#include namespace openspace { -namespace documentation { struct Documentation; } - /** * This is a base class for constellation lines and bounds. */ diff --git a/modules/space/rendering/renderableeclipsecone.cpp b/modules/space/rendering/renderableeclipsecone.cpp index 60924dd83a..c0beb2fbde 100644 --- a/modules/space/rendering/renderableeclipsecone.cpp +++ b/modules/space/rendering/renderableeclipsecone.cpp @@ -26,12 +26,17 @@ #include #include -#include #include #include #include #include #include +#include +#include +#include +#include +#include +#include namespace { struct VBOLayout { diff --git a/modules/space/rendering/renderableeclipsecone.h b/modules/space/rendering/renderableeclipsecone.h index df0afdd74c..cef5d9549e 100644 --- a/modules/space/rendering/renderableeclipsecone.h +++ b/modules/space/rendering/renderableeclipsecone.h @@ -27,23 +27,16 @@ #include -#include #include -#include +#include #include +#include #include #include #include -namespace ghoul::opengl { class ProgramObject; } - namespace openspace { -namespace documentation { struct Documentation; } - -struct RenderData; -struct UpdateData; - class RenderableEclipseCone : public Renderable { public: explicit RenderableEclipseCone(const ghoul::Dictionary& dictionary); diff --git a/modules/space/rendering/renderablefluxnodes.cpp b/modules/space/rendering/renderablefluxnodes.cpp index 41f4786874..a199258340 100644 --- a/modules/space/rendering/renderablefluxnodes.cpp +++ b/modules/space/rendering/renderablefluxnodes.cpp @@ -24,27 +24,32 @@ #include +#include #include #include -#include -#include #include -#include -#include +#include +#include +#include #include #include #include +#include #include -#include -#include +#include +#include #include #include #include +#include +#include +#include +#include #include -#include +#include +#include #include -#include -#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableFluxNodes"; diff --git a/modules/space/rendering/renderablefluxnodes.h b/modules/space/rendering/renderablefluxnodes.h index 26b9fff32e..01cd61bf15 100644 --- a/modules/space/rendering/renderablefluxnodes.h +++ b/modules/space/rendering/renderablefluxnodes.h @@ -29,14 +29,17 @@ #include #include -#include +#include +#include #include #include #include #include +#include #include -#include +#include #include +#include namespace openspace { @@ -69,33 +72,38 @@ private: std::vector _lineCount; std::vector _lineStart; + // Used to determine if lines should be colored UNIFORMLY or by Flux Value enum class ColorMethod { ByFluxValue = 0, - Uniform = 1 + Uniform }; + enum class GoesEnergyBins { Emin01 = 0, - Emin03 = 1 + Emin03 }; + enum class ScalingMethod { Flux = 0, - RFlux = 1, - R2Flux = 2, - Log10RFlux = 3, - LnRFlux = 4 + RFlux, + R2Flux, + Log10RFlux, + LnRFlux }; + enum class NodeSkipMethod { Uniform = 0, - Flux = 1, - Radius = 2, - Streamnumber = 3 + Flux, + Radius, + Streamnumber }; + enum class EnhanceMethod { SizeScaling = 0, - ColorTables = 1, - SizeAndColor = 2, - Illuminance = 3, + ColorTables, + SizeAndColor, + Illuminance }; UniformCache(streamColor, nodeSize, proximityNodesSize, diff --git a/modules/space/rendering/renderablehabitablezone.cpp b/modules/space/rendering/renderablehabitablezone.cpp index c09aac4a60..489fa2b49c 100644 --- a/modules/space/rendering/renderablehabitablezone.cpp +++ b/modules/space/rendering/renderablehabitablezone.cpp @@ -25,18 +25,17 @@ #include #include -#include #include #include -#include -#include #include #include -#include #include +#include #include #include #include +#include +#include #include namespace { diff --git a/modules/space/rendering/renderablehabitablezone.h b/modules/space/rendering/renderablehabitablezone.h index 01c5091bb1..9b8164e67d 100644 --- a/modules/space/rendering/renderablehabitablezone.h +++ b/modules/space/rendering/renderablehabitablezone.h @@ -26,14 +26,14 @@ #define __OPENSPACE_MODULE_SPACE___RENDERABLEHABITABLEZONE___H__ #include + #include #include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableHabitableZone : public RenderableDisc { public: explicit RenderableHabitableZone(const ghoul::Dictionary& dictionary); diff --git a/modules/space/rendering/renderableorbitalkepler.cpp b/modules/space/rendering/renderableorbitalkepler.cpp index 5f24936354..a72e759cc4 100644 --- a/modules/space/rendering/renderableorbitalkepler.cpp +++ b/modules/space/rendering/renderableorbitalkepler.cpp @@ -26,24 +26,35 @@ #include #include -#include #include #include #include -#include #include #include #include -#include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include -#include +#include +#include +#include +#include #include -#include +#include namespace { // The possible values for the _renderingModes property diff --git a/modules/space/rendering/renderableorbitalkepler.h b/modules/space/rendering/renderableorbitalkepler.h index 4dd17876ce..3e8651adcb 100644 --- a/modules/space/rendering/renderableorbitalkepler.h +++ b/modules/space/rendering/renderableorbitalkepler.h @@ -27,19 +27,18 @@ #include -#include #include -#include +#include #include +#include +#include #include -#include -#include +#include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableOrbitalKepler : public Renderable { public: explicit RenderableOrbitalKepler(const ghoul::Dictionary& dictionary); @@ -56,6 +55,7 @@ public: private: struct Appearance : properties::PropertyOwner { Appearance(); + /// Specifies the base color of the line/point properties::Vec3Property color; /// Line width for the line rendering part diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index eab49a5090..725d66b5f8 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -25,18 +25,24 @@ #include #include -#include #include #include #include +#include #include #include +#include #include #include +#include #include #include #include +#include +#include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TextureInfo = { diff --git a/modules/space/rendering/renderablerings.h b/modules/space/rendering/renderablerings.h index 2baebf077d..2593129956 100644 --- a/modules/space/rendering/renderablerings.h +++ b/modules/space/rendering/renderablerings.h @@ -30,20 +30,15 @@ #include #include #include - -#include +#include #include +#include +#include namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { -namespace documentation { struct Documentation; } - class RenderableRings : public Renderable { public: explicit RenderableRings(const ghoul::Dictionary& dictionary); diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index f11ac7fca8..7ecd2a6c16 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -25,27 +25,27 @@ #include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include #include #include +#include +#include +#include +#include +#include #include -#include +#include #include -#include -#include #include -#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableStars"; diff --git a/modules/space/rendering/renderablestars.h b/modules/space/rendering/renderablestars.h index 8b6f67f81f..af44e687bb 100644 --- a/modules/space/rendering/renderablestars.h +++ b/modules/space/rendering/renderablestars.h @@ -28,26 +28,22 @@ #include #include -#include #include +#include #include +#include +#include #include #include #include #include #include -#include +#include namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { -namespace documentation { struct Documentation; } - class RenderableStars : public Renderable { public: explicit RenderableStars(const ghoul::Dictionary& dictionary); diff --git a/modules/space/rendering/renderabletravelspeed.cpp b/modules/space/rendering/renderabletravelspeed.cpp index 6ec09ddd69..7227090742 100644 --- a/modules/space/rendering/renderabletravelspeed.cpp +++ b/modules/space/rendering/renderabletravelspeed.cpp @@ -34,6 +34,11 @@ #include #include #include +#include +#include +#include +#include +#include #include namespace { diff --git a/modules/space/rendering/renderabletravelspeed.h b/modules/space/rendering/renderabletravelspeed.h index 89a3cd3725..421d85d58e 100644 --- a/modules/space/rendering/renderabletravelspeed.h +++ b/modules/space/rendering/renderabletravelspeed.h @@ -27,7 +27,8 @@ #include -#include +#include +#include #include #include #include @@ -36,8 +37,6 @@ namespace openspace { class SceneGraphNode; -namespace documentation { struct Documentation; } - class RenderableTravelSpeed : public Renderable { public: explicit RenderableTravelSpeed(const ghoul::Dictionary& dictionary); @@ -57,6 +56,7 @@ private: void calculateDirectionVector(); void updateVertexData(); void reinitiateTravel(); + UniformCache(lineColor, opacity) _uniformCache; properties::StringProperty _targetName; diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index 4d963ce1e0..64b85466fa 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -25,11 +25,10 @@ #include #include -#include #include #include #include -#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo SourceInfo = { diff --git a/modules/space/rotation/spicerotation.h b/modules/space/rotation/spicerotation.h index 2728c9089e..eb2554713d 100644 --- a/modules/space/rotation/spicerotation.h +++ b/modules/space/rotation/spicerotation.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class SpiceRotation : public Rotation { public: explicit SpiceRotation(const ghoul::Dictionary& dictionary); diff --git a/modules/space/spacemodule.cpp b/modules/space/spacemodule.cpp index ec5591d8e7..273d9ca661 100644 --- a/modules/space/spacemodule.cpp +++ b/modules/space/spacemodule.cpp @@ -41,14 +41,19 @@ #include #include #include -#include +#include +#include +#include #include -#include #include #include #include #include +#include +#include #include +#include +#include #include "spacemodule_lua.inl" diff --git a/modules/space/spacemodule_lua.inl b/modules/space/spacemodule_lua.inl index f0b9538790..be1fc64a6f 100644 --- a/modules/space/spacemodule_lua.inl +++ b/modules/space/spacemodule_lua.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include #include namespace { diff --git a/modules/space/timeframe/timeframekernel.cpp b/modules/space/timeframe/timeframekernel.cpp index 7b6d69ad25..4b12e485bb 100644 --- a/modules/space/timeframe/timeframekernel.cpp +++ b/modules/space/timeframe/timeframekernel.cpp @@ -24,10 +24,20 @@ #include +#include #include #include #include +#include +#include +#include #include "SpiceUsr.h" +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TimeFrameKernel"; @@ -424,7 +434,6 @@ bool TimeFrameKernel::initialize() { ); } - // Extract the SPK file/files if they were specified if (p.spk.has_value()) { std::vector kernels; diff --git a/modules/space/timeframe/timeframekernel.h b/modules/space/timeframe/timeframekernel.h index 0bbc04c9ed..f4c884befc 100644 --- a/modules/space/timeframe/timeframekernel.h +++ b/modules/space/timeframe/timeframekernel.h @@ -28,6 +28,7 @@ #include #include +#include namespace openspace { diff --git a/modules/space/translation/gptranslation.cpp b/modules/space/translation/gptranslation.cpp index a03b0dac0b..4d43dd3ea6 100644 --- a/modules/space/translation/gptranslation.cpp +++ b/modules/space/translation/gptranslation.cpp @@ -25,7 +25,10 @@ #include #include -#include +#include +#include +#include +#include #include #include diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index cf01698403..434af051bb 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -24,8 +24,8 @@ #include +#include #include -#include #include #include #include @@ -33,9 +33,17 @@ #include #include #include -#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "HorizonsTranslation"; diff --git a/modules/space/translation/horizonstranslation.h b/modules/space/translation/horizonstranslation.h index a0f755a57f..56079ace64 100644 --- a/modules/space/translation/horizonstranslation.h +++ b/modules/space/translation/horizonstranslation.h @@ -29,20 +29,18 @@ #include #include -#include #include -#include -#include +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - +class HorizonsFile; /** * The HorizonsTranslation is based on text files generated from NASA JPL HORIZONS Website - * (https://ssd.jpl.nasa.gov/horizons.cgi). The implementation supports both Vector - * and Observer as Horizons data table. + * (https://ssd.jpl.nasa.gov/horizons.cgi). The implementation supports both Vector and + * Observer as Horizons data table. * * In case of Vector table data the implementation expects a file with format: * TIME(JulianDayNumber = A.D. YYYY-MM-DD HH:MM:SS TDB) diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index ae4d4288ab..e843b72382 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -24,11 +24,18 @@ #include -#include +#include #include #include +#include #include +#include +#include +#include #include +#include +#include +#include namespace { struct RangeError final : public ghoul::RuntimeError { diff --git a/modules/space/translation/keplertranslation.h b/modules/space/translation/keplertranslation.h index 0c1177b97b..c12376bb65 100644 --- a/modules/space/translation/keplertranslation.h +++ b/modules/space/translation/keplertranslation.h @@ -28,10 +28,7 @@ #include #include -#include #include -#include -#include namespace openspace { @@ -58,10 +55,10 @@ public: ~KeplerTranslation() override = default; /** - * Method returning the translation vector at a given time. - * - * \param data Provides information from the engine about, for example, the time - */ + * Method returning the translation vector at a given time. + * + * \param data Provides information from the engine about, for example, the time + */ glm::dvec3 position(const UpdateData& data) const override; /** @@ -164,9 +161,9 @@ private: class KeplerCalculator { public: - KeplerCalculator(double eccentricity, double semiMajorAxis, - double inclination, double ascendingNode, double argumentOfPeriapsis, - double meanAnomalyAtEpoch, double orbitalPeriod, double epoch); + KeplerCalculator(double eccentricity, double semiMajorAxis, double inclination, + double ascendingNode, double argumentOfPeriapsis, double meanAnomalyAtEpoch, + double orbitalPeriod, double epoch); glm::dvec3 position(double time) const; diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 3ecd7d5815..15a24d3d31 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -25,14 +25,10 @@ #include #include -#include #include #include #include -#include -#include -#include -#include +#include #include #include #include diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp index 471ef64331..fcafd0fc7c 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.cpp @@ -26,17 +26,19 @@ #include #include -#include #include -#include #include #include #include #include -#include #include +#include +#include #include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo ActiveColorInfo = { diff --git a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h index 748838170c..12adab943c 100644 --- a/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h +++ b/modules/spacecraftinstruments/dashboard/dashboarditeminstruments.h @@ -27,8 +27,6 @@ #include -#include -#include #include namespace openspace { diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp index 1e49f32af6..d8faf928c5 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.cpp @@ -26,13 +26,16 @@ #include #include -#include #include #include #include #include #include #include +#include +#include +#include +#include namespace { struct VBOData { diff --git a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h index 7bd61247f1..cfd33d6745 100644 --- a/modules/spacecraftinstruments/rendering/renderablecrawlingline.h +++ b/modules/spacecraftinstruments/rendering/renderablecrawlingline.h @@ -29,11 +29,10 @@ #include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableCrawlingLine : public Renderable { public: explicit RenderableCrawlingLine(const ghoul::Dictionary& dictionary); diff --git a/modules/spacecraftinstruments/rendering/renderablefov.cpp b/modules/spacecraftinstruments/rendering/renderablefov.cpp index 0e8d614d5c..200d6c1215 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.cpp +++ b/modules/spacecraftinstruments/rendering/renderablefov.cpp @@ -27,15 +27,25 @@ #include #include #include -#include #include #include #include #include #include +#include #include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include namespace { constexpr int InterpolationSteps = 5; @@ -205,28 +215,48 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) , _alwaysDrawFov(AlwaysDrawFovInfo, false) , _colors({ properties::PropertyOwner({"Colors", "Colors"}), - { DefaultStartColorInfo, glm::vec3(0.4f), glm::vec3(0.f), glm::vec3(1.f) }, - { ColorDefaultEndInfo, glm::vec3(0.85f), glm::vec3(0.f), glm::vec3(1.f) }, - { ColorActiveInfo, glm::vec3(0.f, 1.f, 0.f), glm::vec3(0.f), glm::vec3(1.f) }, - { + properties::Vec3Property( + DefaultStartColorInfo, + glm::vec3(0.4f), + glm::vec3(0.f), + glm::vec3(1.f) + ), + properties::Vec3Property( + ColorDefaultEndInfo, + glm::vec3(0.85f), + glm::vec3(0.f), + glm::vec3(1.f) + ), + properties::Vec3Property( + ColorActiveInfo, + glm::vec3(0.f, 1.f, 0.f), + glm::vec3(0.f), + glm::vec3(1.f) + ), + properties::Vec3Property( ColorTargetInFovInfo, glm::vec3(0.f, 0.5f, 0.7f), glm::vec3(0.f), glm::vec3(1.f) - }, - { + ), + properties::Vec3Property( ColorIntersectionStartInfo, glm::vec3(1.f, 0.89f, 0.f), glm::vec3(0.f), glm::vec3(1.f) - }, - { + ), + properties::Vec3Property( ColorIntersectionEndInfo, 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) } + ), + properties::Vec3Property( + SquareColorInfo, + glm::vec3(0.85f), + glm::vec3(0.f), + glm::vec3(1.f) + ) }) { const Parameters p = codegen::bake(dictionary); diff --git a/modules/spacecraftinstruments/rendering/renderablefov.h b/modules/spacecraftinstruments/rendering/renderablefov.h index c84a5a1c6d..f3916b63ee 100644 --- a/modules/spacecraftinstruments/rendering/renderablefov.h +++ b/modules/spacecraftinstruments/rendering/renderablefov.h @@ -35,16 +35,11 @@ #include #include #include - -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +#include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableFov : public Renderable { public: explicit RenderableFov(const ghoul::Dictionary& dictionary); @@ -76,7 +71,6 @@ private: glm::dvec3 orthogonalProjection(const glm::dvec3& vecFov, double time, const std::string& target) const; - // properties properties::FloatProperty _lineWidth; properties::DoubleProperty _standOffDistance; properties::BoolProperty _alwaysDrawFov; diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index 4b02f6586e..894ebaf40c 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -24,19 +24,28 @@ #include +#include #include #include -#include #include #include #include +#include #include +#include #include #include #include #include #include +#include +#include +#include +#include #include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo PerformShadingInfo = { diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h index d363993b32..ec310d5c93 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.h +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.h @@ -29,25 +29,13 @@ #include #include -#include -#include -#include #include - -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl +#include namespace ghoul::modelgeometry { class ModelGeometry; } namespace openspace { -namespace documentation { struct Documentation; } - -struct RenderData; -struct UpdateData; - class RenderableModelProjection : public Renderable { public: explicit RenderableModelProjection(const ghoul::Dictionary& dictionary); diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp index 172c239eca..3cb8bb73be 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.cpp @@ -25,21 +25,28 @@ #include #include +#include #include #include #include #include #include -#include #include #include +#include #include #include #include +#include #include #include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderablePlaneProjection"; diff --git a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h index 0562e53f4e..ba776817cb 100644 --- a/modules/spacecraftinstruments/rendering/renderableplaneprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplaneprojection.h @@ -32,17 +32,10 @@ #include namespace ghoul::filesystem { class File; } -namespace ghoul::opengl { - class ProgramObject; - class Texture; -} // namespace ghoul::opengl namespace openspace { struct Image; -struct LinePoint; -struct RenderData; -struct UpdateData; class RenderablePlaneProjection : public Renderable { public: diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp index 77b288fa28..bde0b2b132 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp @@ -31,12 +31,19 @@ #include #include #include +#include #include #include #include +#include #include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view NoImageText = "No Image"; @@ -295,8 +302,6 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& addProperty(_segments); } -RenderablePlanetProjection::~RenderablePlanetProjection() {} - void RenderablePlanetProjection::initializeGL() { _programObject = SpacecraftInstrumentsModule::ProgramObjectManager.request( "ProjectiveProgram", diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h index e5f74d5836..4ff462932e 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.h +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.h @@ -28,25 +28,23 @@ #include #include +#include #include #include #include +#include +#include +#include #include +#include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - -struct Image; -class Sphere; - -namespace planetgeometry { class PlanetGeometry; } - class RenderablePlanetProjection : public Renderable { public: explicit RenderablePlanetProjection(const ghoul::Dictionary& dict); - ~RenderablePlanetProjection() override; void initializeGL() override; void deinitializeGL() override; diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp index 76115ff3fe..3900a802c1 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.cpp @@ -26,12 +26,16 @@ #include #include -#include #include #include #include #include #include +#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo NumberPointsInfo = { diff --git a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h index d8d8239da5..7d4dcd096a 100644 --- a/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h +++ b/modules/spacecraftinstruments/rendering/renderableshadowcylinder.h @@ -35,15 +35,8 @@ #include #include -namespace ghoul::opengl { class ProgramObject; } - namespace openspace { -namespace documentation { struct Documentation; } - -struct RenderData; -struct UpdateData; - class RenderableShadowCylinder : public Renderable { public: explicit RenderableShadowCylinder(const ghoul::Dictionary& dictionary); diff --git a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp index 20f6a3ef74..8706a92222 100644 --- a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp +++ b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.cpp @@ -31,11 +31,21 @@ #include #include #include +#include #include #include +#include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include namespace openspace { diff --git a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h index 0beaa98d36..fb05339303 100644 --- a/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h +++ b/modules/spacecraftinstruments/spacecraftinstrumentsmodule.h @@ -28,6 +28,7 @@ #include #include +#include namespace openspace { diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index 2d2579bf4c..4396f20888 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -24,17 +24,19 @@ #include -#include #include #include -#include #include #include -#include +#include #include +#include #include +#include #include #include +#include +#include namespace { double ephemerisTimeFromMissionElapsedTime(double met, double metReference) { diff --git a/modules/spacecraftinstruments/util/hongkangparser.h b/modules/spacecraftinstruments/util/hongkangparser.h index 066c101c48..b0a7550251 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.h +++ b/modules/spacecraftinstruments/util/hongkangparser.h @@ -29,6 +29,8 @@ #include +namespace ghoul { class Dictionary; } + namespace openspace { class HongKangParser : public SequenceParser { diff --git a/modules/spacecraftinstruments/util/image.h b/modules/spacecraftinstruments/util/image.h index 022f9aecbc..c8dcd077fd 100644 --- a/modules/spacecraftinstruments/util/image.h +++ b/modules/spacecraftinstruments/util/image.h @@ -26,7 +26,7 @@ #define __OPENSPACE_MODULE_SPACECRAFTINSTRUMENTS___IMAGE___H__ #include - +#include #include #include diff --git a/modules/spacecraftinstruments/util/imagesequencer.cpp b/modules/spacecraftinstruments/util/imagesequencer.cpp index 7e2e6b26bc..d0def6cdc9 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.cpp +++ b/modules/spacecraftinstruments/util/imagesequencer.cpp @@ -24,10 +24,15 @@ #include -#include -#include +#include #include #include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ImageSequencer"; diff --git a/modules/spacecraftinstruments/util/imagesequencer.h b/modules/spacecraftinstruments/util/imagesequencer.h index da221d2182..3edb33cb18 100644 --- a/modules/spacecraftinstruments/util/imagesequencer.h +++ b/modules/spacecraftinstruments/util/imagesequencer.h @@ -25,17 +25,20 @@ #ifndef __OPENSPACE_MODULE_SPACECRAFTINSTRUMENTS___IMAGESEQUENCER___H__ #define __OPENSPACE_MODULE_SPACECRAFTINSTRUMENTS___IMAGESEQUENCER___H__ -#include - +#include +#include +#include +#include #include +#include #include #include #include namespace openspace { -class Time; class SequenceParser; +class Time; /** * The ImageSequencer singleton function is to manage the timekeeping and distribution of diff --git a/modules/spacecraftinstruments/util/instrumentdecoder.cpp b/modules/spacecraftinstruments/util/instrumentdecoder.cpp index ac55244644..3786981ffb 100644 --- a/modules/spacecraftinstruments/util/instrumentdecoder.cpp +++ b/modules/spacecraftinstruments/util/instrumentdecoder.cpp @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp index 18077e9195..674f90edef 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp @@ -24,16 +24,21 @@ #include +#include +#include #include #include -#include +#include #include #include #include #include #include +#include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "InstrumentTimesParser"; diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.h b/modules/spacecraftinstruments/util/instrumenttimesparser.h index ac62db895b..a1c5ff884e 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.h +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.h @@ -30,6 +30,8 @@ #include #include +namespace ghoul { class Dictionary; } + namespace openspace { class InstrumentTimesParser : public SequenceParser { diff --git a/modules/spacecraftinstruments/util/labelparser.cpp b/modules/spacecraftinstruments/util/labelparser.cpp index e079547d55..5e7843ea0e 100644 --- a/modules/spacecraftinstruments/util/labelparser.cpp +++ b/modules/spacecraftinstruments/util/labelparser.cpp @@ -24,16 +24,19 @@ #include +#include +#include #include -#include +#include #include #include #include #include #include #include -#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "LabelParser"; diff --git a/modules/spacecraftinstruments/util/labelparser.h b/modules/spacecraftinstruments/util/labelparser.h index e59c3df7e5..aba93f5099 100644 --- a/modules/spacecraftinstruments/util/labelparser.h +++ b/modules/spacecraftinstruments/util/labelparser.h @@ -29,6 +29,8 @@ #include +namespace ghoul { class Dictionary; } + namespace openspace { class LabelParser : public SequenceParser { diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index 584dc35554..7cde2bf5a6 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -28,18 +28,25 @@ #include #include #include +#include #include -#include #include +#include #include #include +#include +#include +#include #include #include #include #include #include #include +#include #include +#include +#include namespace { constexpr std::string_view PlaceholderFile = "${DATA}/placeholder.png"; diff --git a/modules/spacecraftinstruments/util/projectioncomponent.h b/modules/spacecraftinstruments/util/projectioncomponent.h index c81a28902b..f0f485709f 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.h +++ b/modules/spacecraftinstruments/util/projectioncomponent.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include namespace ghoul { class Dictionary; } namespace ghoul::opengl { diff --git a/modules/spacecraftinstruments/util/scannerdecoder.cpp b/modules/spacecraftinstruments/util/scannerdecoder.cpp index 83ed3e9e41..f012460692 100644 --- a/modules/spacecraftinstruments/util/scannerdecoder.cpp +++ b/modules/spacecraftinstruments/util/scannerdecoder.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace openspace { diff --git a/modules/spacecraftinstruments/util/scannerdecoder.h b/modules/spacecraftinstruments/util/scannerdecoder.h index 65564c1321..115cba71c5 100644 --- a/modules/spacecraftinstruments/util/scannerdecoder.h +++ b/modules/spacecraftinstruments/util/scannerdecoder.h @@ -26,8 +26,6 @@ #define __OPENSPACE_MODULE_SPACECRAFTINSTRUMENTS___SCANNERDECODER___H__ #include -#include -#include namespace openspace { diff --git a/modules/spacecraftinstruments/util/sequenceparser.cpp b/modules/spacecraftinstruments/util/sequenceparser.cpp index 95176f19ef..105e886873 100644 --- a/modules/spacecraftinstruments/util/sequenceparser.cpp +++ b/modules/spacecraftinstruments/util/sequenceparser.cpp @@ -24,10 +24,6 @@ #include -#include -#include -#include - namespace openspace { std::map& SequenceParser::subsetMap() { diff --git a/modules/spacecraftinstruments/util/sequenceparser.h b/modules/spacecraftinstruments/util/sequenceparser.h index af4b54dc92..3237ae1551 100644 --- a/modules/spacecraftinstruments/util/sequenceparser.h +++ b/modules/spacecraftinstruments/util/sequenceparser.h @@ -31,6 +31,7 @@ #include #include #include +#include #include namespace openspace { diff --git a/modules/spout/renderableplanespout.cpp b/modules/spout/renderableplanespout.cpp index 77f95f68b7..5de85be83c 100644 --- a/modules/spout/renderableplanespout.cpp +++ b/modules/spout/renderableplanespout.cpp @@ -26,10 +26,11 @@ #include +#include #include -#include -#include -#include +#include +#include +#include namespace { // This `Renderable` type can be used to render a plane with a texture that is @@ -38,7 +39,6 @@ namespace { struct [[codegen::Dictionary(RenderablePlaneSpout)]] Parameters { }; #include "renderableplanespout_codegen.cpp" - } // namespace namespace openspace { diff --git a/modules/spout/renderableplanespout.h b/modules/spout/renderableplanespout.h index 34e212db68..8c979870e4 100644 --- a/modules/spout/renderableplanespout.h +++ b/modules/spout/renderableplanespout.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class RenderablePlaneSpout : public RenderablePlane { public: explicit RenderablePlaneSpout(const ghoul::Dictionary& dictionary); diff --git a/modules/spout/renderablespherespout.cpp b/modules/spout/renderablespherespout.cpp index 6c53a6c0e9..102c1478ba 100644 --- a/modules/spout/renderablespherespout.cpp +++ b/modules/spout/renderablespherespout.cpp @@ -26,10 +26,11 @@ #include +#include #include -#include -#include -#include +#include +#include +#include namespace { // This `Renderable` type can be used to render a sphere with a texture that is diff --git a/modules/spout/renderablespherespout.h b/modules/spout/renderablespherespout.h index dd2fd65862..5da9ba0ab0 100644 --- a/modules/spout/renderablespherespout.h +++ b/modules/spout/renderablespherespout.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class RenderableSphereSpout : public RenderableSphere { public: explicit RenderableSphereSpout(const ghoul::Dictionary& dictionary); diff --git a/modules/spout/screenspacespout.cpp b/modules/spout/screenspacespout.cpp index 97756adc4d..4424245764 100644 --- a/modules/spout/screenspacespout.cpp +++ b/modules/spout/screenspacespout.cpp @@ -27,9 +27,9 @@ #include #include -#include -#include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo NameInfo = { diff --git a/modules/spout/screenspacespout.h b/modules/spout/screenspacespout.h index ec158e7794..0dff84e024 100644 --- a/modules/spout/screenspacespout.h +++ b/modules/spout/screenspacespout.h @@ -33,8 +33,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceSpout : public ScreenSpaceRenderable { public: explicit ScreenSpaceSpout(const ghoul::Dictionary& dictionary); diff --git a/modules/spout/spoutmodule.cpp b/modules/spout/spoutmodule.cpp index b4b175f25e..310678c45c 100644 --- a/modules/spout/spoutmodule.cpp +++ b/modules/spout/spoutmodule.cpp @@ -27,9 +27,14 @@ #include #include #include +#include +#include +#include #include -#include #include +#include +#include +#include namespace openspace { diff --git a/modules/spout/spoutwrapper.cpp b/modules/spout/spoutwrapper.cpp index d47abeefff..f6a7b8c7ab 100644 --- a/modules/spout/spoutwrapper.cpp +++ b/modules/spout/spoutwrapper.cpp @@ -24,10 +24,17 @@ #include "modules/spout/spoutwrapper.h" +#include #include #include +#include +#include #include #include +#include +#include +#include + #define SPOUT_NO_GL_INCLUDE #include diff --git a/modules/spout/spoutwrapper.h b/modules/spout/spoutwrapper.h index c620420712..7cec9f6c04 100644 --- a/modules/spout/spoutwrapper.h +++ b/modules/spout/spoutwrapper.h @@ -25,18 +25,24 @@ #ifndef __OPENSPACE_MODULE_SPOUT___SPOUTWRAPPER___H__ #define __OPENSPACE_MODULE_SPOUT___SPOUTWRAPPER___H__ -#include #include #include #include +#include #include +#include +#include #include #include struct SPOUTLIBRARY; typedef SPOUTLIBRARY* SPOUTHANDLE; -namespace ghoul::opengl { class Texture; } +namespace ghoul { + namespace opengl { class Texture; } + class Dictionary; +} // namespace ghoul +namespace openspace::documentation { struct Documentation; } namespace openspace::spout { diff --git a/modules/statemachine/include/state.h b/modules/statemachine/include/state.h index 3c979e3756..1899b21423 100644 --- a/modules/statemachine/include/state.h +++ b/modules/statemachine/include/state.h @@ -25,9 +25,10 @@ #ifndef __OPENSPACE_MODULE_STATEMACHINE___STATE___H__ #define __OPENSPACE_MODULE_STATEMACHINE___STATE___H__ -#include #include +namespace ghoul { class Dictionary; } + namespace openspace { namespace documentation { struct Documentation; } diff --git a/modules/statemachine/include/statemachine.h b/modules/statemachine/include/statemachine.h index ca5bc94253..a840634e74 100644 --- a/modules/statemachine/include/statemachine.h +++ b/modules/statemachine/include/statemachine.h @@ -27,8 +27,12 @@ #include #include +#include +#include #include +namespace ghoul { class Dictionary; } + namespace openspace { namespace documentation { struct Documentation; } diff --git a/modules/statemachine/include/transition.h b/modules/statemachine/include/transition.h index aef4cf6dfe..f19e709b9e 100644 --- a/modules/statemachine/include/transition.h +++ b/modules/statemachine/include/transition.h @@ -25,9 +25,10 @@ #ifndef __OPENSPACE_MODULE_STATEMACHINE___TRANSITION___H__ #define __OPENSPACE_MODULE_STATEMACHINE___TRANSITION___H__ -#include #include +namespace ghoul { class Dictionary; } + namespace openspace { namespace documentation { struct Documentation; } diff --git a/modules/statemachine/src/state.cpp b/modules/statemachine/src/state.cpp index ce7c8eb694..a7b05ce22c 100644 --- a/modules/statemachine/src/state.cpp +++ b/modules/statemachine/src/state.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include namespace { struct [[codegen::Dictionary(State)]] Parameters { diff --git a/modules/statemachine/src/statemachine.cpp b/modules/statemachine/src/statemachine.cpp index 772b2bacda..72866703e0 100644 --- a/modules/statemachine/src/statemachine.cpp +++ b/modules/statemachine/src/statemachine.cpp @@ -27,8 +27,10 @@ #include #include #include +#include #include #include +#include namespace { constexpr std::string_view _loggerCat = "StateMachine"; diff --git a/modules/statemachine/src/transition.cpp b/modules/statemachine/src/transition.cpp index 9ab9eaad52..c41a02f954 100644 --- a/modules/statemachine/src/transition.cpp +++ b/modules/statemachine/src/transition.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include namespace { struct [[codegen::Dictionary(Transition)]] Parameters { diff --git a/modules/statemachine/statemachinemodule.cpp b/modules/statemachine/statemachinemodule.cpp index 0a782f1f93..3297373082 100644 --- a/modules/statemachine/statemachinemodule.cpp +++ b/modules/statemachine/statemachinemodule.cpp @@ -28,15 +28,15 @@ #include #include #include -#include -#include #include -#include #include +#include #include -#include -#include +#include +#include #include +#include +#include #include "statemachinemodule_lua.inl" @@ -48,7 +48,7 @@ namespace openspace { StateMachineModule::StateMachineModule() : OpenSpaceModule(Name) -{ } +{} void StateMachineModule::initializeStateMachine(const ghoul::Dictionary& states, const ghoul::Dictionary& transitions, diff --git a/modules/statemachine/statemachinemodule_lua.inl b/modules/statemachine/statemachinemodule_lua.inl index 660b94aab5..d4f9f08883 100644 --- a/modules/statemachine/statemachinemodule_lua.inl +++ b/modules/statemachine/statemachinemodule_lua.inl @@ -22,6 +22,11 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include +#include +#include + namespace { /** diff --git a/modules/sync/syncmodule.cpp b/modules/sync/syncmodule.cpp index 5e6bb89488..5c320e4261 100644 --- a/modules/sync/syncmodule.cpp +++ b/modules/sync/syncmodule.cpp @@ -27,22 +27,17 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include #include -#include -#include #include #include -#include #include +#include #include +#include +#include #include "syncmodule_lua.inl" diff --git a/modules/sync/syncmodule_lua.inl b/modules/sync/syncmodule_lua.inl index 565fdfdfc3..34dab66184 100644 --- a/modules/sync/syncmodule_lua.inl +++ b/modules/sync/syncmodule_lua.inl @@ -22,6 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include + namespace { /** diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index dfe72f5218..1c04b3abc6 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -25,15 +25,26 @@ #include #include -#include #include #include #include #include +#include #include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "HttpSynchronization"; diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index 32d9dd81a8..00cd0627a4 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -25,19 +25,28 @@ #include #include -#include #include #include #include #include #include -#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include #include -#include #include +#include +#include +#include #include +#include #include namespace { diff --git a/modules/sync/syncs/urlsynchronization.h b/modules/sync/syncs/urlsynchronization.h index b86310d699..b63a64bab4 100644 --- a/modules/sync/syncs/urlsynchronization.h +++ b/modules/sync/syncs/urlsynchronization.h @@ -27,9 +27,7 @@ #include -#include -#include -#include +#include #include #include diff --git a/modules/telemetry/include/general/anglemodetelemetry.h b/modules/telemetry/include/general/anglemodetelemetry.h index 566fa5c485..a62201f27f 100644 --- a/modules/telemetry/include/general/anglemodetelemetry.h +++ b/modules/telemetry/include/general/anglemodetelemetry.h @@ -31,6 +31,8 @@ namespace openspace { +class Camera; + class AngleModeTelemetry : public TelemetryBase { public: AngleModeTelemetry(const std::string& ip, int port); diff --git a/modules/telemetry/include/general/cameratelemetry.h b/modules/telemetry/include/general/cameratelemetry.h index ad38f30d15..00431c7c61 100644 --- a/modules/telemetry/include/general/cameratelemetry.h +++ b/modules/telemetry/include/general/cameratelemetry.h @@ -32,6 +32,8 @@ namespace openspace { +class Camera; + class CameraTelemetry : public TelemetryBase { public: CameraTelemetry(const std::string& ip, int port); diff --git a/modules/telemetry/include/general/focustelemetry.h b/modules/telemetry/include/general/focustelemetry.h index 4b2f235b45..91078e7040 100644 --- a/modules/telemetry/include/general/focustelemetry.h +++ b/modules/telemetry/include/general/focustelemetry.h @@ -27,10 +27,10 @@ #include -#include - namespace openspace { +class Camera; + class FocusTelemetry : public TelemetryBase { public: FocusTelemetry(const std::string& ip, int port); diff --git a/modules/telemetry/include/general/nodestelemetry.h b/modules/telemetry/include/general/nodestelemetry.h index 2989541254..c7c8877559 100644 --- a/modules/telemetry/include/general/nodestelemetry.h +++ b/modules/telemetry/include/general/nodestelemetry.h @@ -33,6 +33,8 @@ namespace openspace { +class Camera; + namespace scripting { struct LuaLibrary; } class NodesTelemetry : public TelemetryBase { diff --git a/modules/telemetry/include/general/timetelemetry.h b/modules/telemetry/include/general/timetelemetry.h index af549e92e0..43ca2bcede 100644 --- a/modules/telemetry/include/general/timetelemetry.h +++ b/modules/telemetry/include/general/timetelemetry.h @@ -32,6 +32,8 @@ namespace openspace { +class Camera; + class TimeTelemetry : public TelemetryBase { public: TimeTelemetry(const std::string& ip, int port); diff --git a/modules/telemetry/include/specific/planetscomparesonification.h b/modules/telemetry/include/specific/planetscomparesonification.h index ce28b28d77..007439c2e8 100644 --- a/modules/telemetry/include/specific/planetscomparesonification.h +++ b/modules/telemetry/include/specific/planetscomparesonification.h @@ -27,9 +27,12 @@ #include +#include #include #include +namespace osc { struct Blob; } + namespace openspace { class PlanetsCompareSonification : public TelemetryBase { diff --git a/modules/telemetry/include/specific/planetsoverviewsonification.h b/modules/telemetry/include/specific/planetsoverviewsonification.h index a43f11bc32..2ecf33d725 100644 --- a/modules/telemetry/include/specific/planetsoverviewsonification.h +++ b/modules/telemetry/include/specific/planetsoverviewsonification.h @@ -27,6 +27,10 @@ #include +#include + +namespace osc { struct Blob; } + namespace openspace { class PlanetsOverviewSonification : public TelemetryBase { diff --git a/modules/telemetry/include/specific/planetssonification.h b/modules/telemetry/include/specific/planetssonification.h index a861d1de40..4a0b2be6e8 100644 --- a/modules/telemetry/include/specific/planetssonification.h +++ b/modules/telemetry/include/specific/planetssonification.h @@ -28,8 +28,12 @@ #include #include +#include #include +namespace ghoul { class Dictionary; } +namespace osc { struct Blob; } + namespace openspace { namespace scripting { struct LuaLibrary; } diff --git a/modules/telemetry/include/telemetrybase.h b/modules/telemetry/include/telemetrybase.h index 999c2b5d14..6771e8d37d 100644 --- a/modules/telemetry/include/telemetrybase.h +++ b/modules/telemetry/include/telemetrybase.h @@ -27,12 +27,13 @@ #include -#include -#include #include namespace openspace { +class Camera; +class OpenSoundControlConnection; + class TelemetryBase : public properties::PropertyOwner { public: TelemetryBase(properties::PropertyOwner::PropertyOwnerInfo info, diff --git a/modules/telemetry/include/util.h b/modules/telemetry/include/util.h index 92f7ee9b3a..4d60306a57 100644 --- a/modules/telemetry/include/util.h +++ b/modules/telemetry/include/util.h @@ -26,180 +26,182 @@ #define __OPENSPACE_MODULE_TELEMETRY___UTIL___H__ #include -#include #include +#include +#include namespace openspace { + +class Camera; + /** -* Calculate the distance from the camera to the node with the given identifier, in the -* given distance unit. -* -* \param camera Pointer to the camera in the scene that the distance should be calculated -* from -* \param nodeIdentifier The identifier of the node that the distance should be calculated -* to -* \param unit The distance unit that the answer should be in, the default is meters -* -* \return The distance from the camera to the node with the given identifier in the given -* distance unit -*/ + * Calculate the distance from the camera to the node with the given identifier, in the + * given distance unit. + * + * \param camera Pointer to the camera in the scene that the distance should be calculated + * from + * \param nodeIdentifier The identifier of the node that the distance should be calculated + * to + * \param unit The distance unit that the answer should be in, the default is meters + * + * \return The distance from the camera to the node with the given identifier in the given + * distance unit + */ double calculateDistanceTo(const Camera* camera, const std::string& nodeIdentifier, DistanceUnit unit = DistanceUnit::Meter); /** -* Calculate the distance from the camera to the node with the given position, in the given -* distance unit. -* -* \param camera Pointer to the camera in the scene that the distance should be calculated -* from -* \param nodePosition The world position of the node that the distance should be -* calculated to -* \param unit The distance unit that the answer should be in, the default is meters -* -* \return The distance from the camera to the node with the given position in the given -* distance unit -*/ + * Calculate the distance from the camera to the node with the given position, in the given + * distance unit. + * + * \param camera Pointer to the camera in the scene that the distance should be calculated + * from + * \param nodePosition The world position of the node that the distance should be + * calculated to + * \param unit The distance unit that the answer should be in, the default is meters + * + * \return The distance from the camera to the node with the given position in the given + * distance unit + */ double calculateDistanceTo(const Camera* camera, glm::dvec3 nodePosition, DistanceUnit unit = DistanceUnit::Meter); /** -* Calculate the angle in radians from the camera to the node with the given identifier. -* -* \param camera Pointer to the camera in the scene that the angle should be calculated -* from -* \param nodeIdentifier The identifier of the node, that the angle should be calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The angle in radians from the camera to the node with the given identifier -*/ + * Calculate the angle in radians from the camera to the node with the given identifier. + * + * \param camera Pointer to the camera in the scene that the angle should be calculated + * from + * \param nodeIdentifier The identifier of the node, that the angle should be calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The angle in radians from the camera to the node with the given identifier + */ double calculateAngleTo(const Camera* camera, const std::string& nodeIdentifier, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the angle in radians from the camera to the node with the given position. -* -* \param camera Pointer to the camera in the scene that the angle should be calculated -* from -* \param nodePosition The position of the node, that the angle should be calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The angle in radians from the camera to the node with the given position -*/ + * Calculate the angle in radians from the camera to the node with the given position. + * + * \param camera Pointer to the camera in the scene that the angle should be calculated + * from + * \param nodePosition The position of the node, that the angle should be calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The angle in radians from the camera to the node with the given position + */ double calculateAngleTo(const Camera* camera, glm::dvec3 nodePosition, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the angle in radians from the first node (A) with the given identifier to the -* second node (B) with the given identifier. -* -* \param camera Pointer to the camera in the scene -* \param nodeIdentifierA The identifier of the first node (A) that the angle should be -* calculated from -* \param nodeIdentifierB The identifier of the second node (B) that the angle should be -* calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The angle in radians from the first node (A) with the given identifier to the -* second node (B) with the given identifier -*/ -double calculateAngleFromAToB(const Camera* camera, - const std::string& nodeIdentifierA, const std::string& nodeIdentifierB, + * Calculate the angle in radians from the first node (A) with the given identifier to the + * second node (B) with the given identifier. + * + * \param camera Pointer to the camera in the scene + * \param nodeIdentifierA The identifier of the first node (A) that the angle should be + * calculated from + * \param nodeIdentifierB The identifier of the second node (B) that the angle should be + * calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The angle in radians from the first node (A) with the given identifier to the + * second node (B) with the given identifier + */ +double calculateAngleFromAToB(const Camera* camera, const std::string& nodeIdentifierA, + const std::string& nodeIdentifierB, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the angle in radians from the first node (A) with the given position to the -* second node (B) with the given position. -* -* \param camera Pointer to the camera in the scene -* \param nodePositionA The position of the first node (A) that the angle should be -* calculated from -* \param nodePositionB The position of the second node (B) that the angle should be -* calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The angle in radians from the first node (A) with the given position to the -* second node (B) with the given position -*/ + * Calculate the angle in radians from the first node (A) with the given position to the + * second node (B) with the given position. + * + * \param camera Pointer to the camera in the scene + * \param nodePositionA The position of the first node (A) that the angle should be + * calculated from + * \param nodePositionB The position of the second node (B) that the angle should be + * calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The angle in radians from the first node (A) with the given position to the + * second node (B) with the given position + */ double calculateAngleFromAToB(const Camera* camera, glm::dvec3 nodePositionA, - glm::dvec3 nodePositionB, - TelemetryModule::AngleCalculationMode angleCalculationMode); + glm::dvec3 nodePositionB, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the elevation angle in radians from the camera to the node with the given -* identifier. -* -* \param camera Pointer to the camera in the scene that the elevation angle should be -* calculated from -* \param nodeIdentifier The identifier of the node that the elevation angle should be -* calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The elevation angle in radians from the camera to the node with the given -* identifier -*/ + * Calculate the elevation angle in radians from the camera to the node with the given + * identifier. + * + * \param camera Pointer to the camera in the scene that the elevation angle should be + * calculated from + * \param nodeIdentifier The identifier of the node that the elevation angle should be + * calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The elevation angle in radians from the camera to the node with the given + * identifier + */ double calculateElevationAngleTo(const Camera* camera, const std::string& nodeIdentifier, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the elevation angle in radians from the camera to the node with the given -* position. -* -* \param camera Pointer to the camera in the scene that the elevation angle should be -* calculated from -* \param nodePosition The position of the node that the elevation angle should be -* calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The elevation angle in radians from the camera to the node with the given -* position -*/ + * Calculate the elevation angle in radians from the camera to the node with the given + * position. + * + * \param camera Pointer to the camera in the scene that the elevation angle should be + * calculated from + * \param nodePosition The position of the node that the elevation angle should be + * calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The elevation angle in radians from the camera to the node with the given + * position + */ double calculateElevationAngleTo(const Camera* camera, glm::dvec3 nodePosition, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the elevation angle in radians from the first node (A) with the given -* identifier to the second node (B) with the given identifier. -* -* \param camera Pointer to the camera in the scene -* \param nodeIdentifierA The identifier of the first node (A) that the elevation angle -* should be calculated from -* \param nodeIdentifierB The identifier of the second node (B) that the elevation angle -* should be calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The elevation angle in radians from the first node (A) with the given identifier -* to the second node (B) with the given identifier -*/ + * Calculate the elevation angle in radians from the first node (A) with the given + * identifier to the second node (B) with the given identifier. + * + * \param camera Pointer to the camera in the scene + * \param nodeIdentifierA The identifier of the first node (A) that the elevation angle + * should be calculated from + * \param nodeIdentifierB The identifier of the second node (B) that the elevation angle + * should be calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The elevation angle in radians from the first node (A) with the given identifier + * to the second node (B) with the given identifier + */ double calculateElevationAngleFromAToB(const Camera* camera, const std::string& nodeIdentifierA, const std::string& nodeIdentifierB, TelemetryModule::AngleCalculationMode angleCalculationMode); /** -* Calculate the elevation angle in radians from the first node (A) with the given position -* to the second node (B) with the given position. -* -* \param camera Pointer to the camera in the scene -* \param nodePositionA The position of the first node (A) that the elevation angle should -* be calculated from -* \param nodePositionB The position of the second node (B) that the elevation angle should -* be calculated to -* \param angleCalculationMode The angle calculation mode to use. This determines which -* method to use when calculating the angle. -* -* \return The elevation angle in radians from the first node (A) with the given position -* to the second node (B) with the given position -*/ -double calculateElevationAngleFromAToB(const Camera* camera, - glm::dvec3 nodePositionA, glm::dvec3 nodePositionB, - TelemetryModule::AngleCalculationMode angleCalculationMode); + * Calculate the elevation angle in radians from the first node (A) with the given position + * to the second node (B) with the given position. + * + * \param camera Pointer to the camera in the scene + * \param nodePositionA The position of the first node (A) that the elevation angle should + * be calculated from + * \param nodePositionB The position of the second node (B) that the elevation angle should + * be calculated to + * \param angleCalculationMode The angle calculation mode to use. This determines which + * method to use when calculating the angle. + * + * \return The elevation angle in radians from the first node (A) with the given position + * to the second node (B) with the given position + */ +double calculateElevationAngleFromAToB(const Camera* camera, glm::dvec3 nodePositionA, + glm::dvec3 nodePositionB, TelemetryModule::AngleCalculationMode angleCalculationMode); } // namespace openspace diff --git a/modules/telemetry/src/general/anglemodetelemetry.cpp b/modules/telemetry/src/general/anglemodetelemetry.cpp index 1959d4172e..bb8d2e59ed 100644 --- a/modules/telemetry/src/general/anglemodetelemetry.cpp +++ b/modules/telemetry/src/general/anglemodetelemetry.cpp @@ -24,6 +24,7 @@ #include +#include #include #include #include diff --git a/modules/telemetry/src/general/cameratelemetry.cpp b/modules/telemetry/src/general/cameratelemetry.cpp index 409dcf8005..4102a878b4 100644 --- a/modules/telemetry/src/general/cameratelemetry.cpp +++ b/modules/telemetry/src/general/cameratelemetry.cpp @@ -24,9 +24,13 @@ #include +#include +#include #include #include #include +#include +#include namespace { // Indices for data items diff --git a/modules/telemetry/src/general/focustelemetry.cpp b/modules/telemetry/src/general/focustelemetry.cpp index 46a1115277..eae7af09fe 100644 --- a/modules/telemetry/src/general/focustelemetry.cpp +++ b/modules/telemetry/src/general/focustelemetry.cpp @@ -24,6 +24,7 @@ #include +#include #include #include #include diff --git a/modules/telemetry/src/general/nodestelemetry.cpp b/modules/telemetry/src/general/nodestelemetry.cpp index d7110a0b93..cc7126ea4d 100644 --- a/modules/telemetry/src/general/nodestelemetry.cpp +++ b/modules/telemetry/src/general/nodestelemetry.cpp @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -31,6 +32,11 @@ #include #include #include +#include +#include +#include +#include +#include #include "nodestelemetry_lua.inl" diff --git a/modules/telemetry/src/general/timetelemetry.cpp b/modules/telemetry/src/general/timetelemetry.cpp index 5e3b6ecb78..ecb9351ce1 100644 --- a/modules/telemetry/src/general/timetelemetry.cpp +++ b/modules/telemetry/src/general/timetelemetry.cpp @@ -24,9 +24,12 @@ #include +#include #include #include #include +#include +#include namespace { // Indices for data items diff --git a/modules/telemetry/src/specific/planetscomparesonification.cpp b/modules/telemetry/src/specific/planetscomparesonification.cpp index 9fb4c4ef3b..41a4fe653b 100644 --- a/modules/telemetry/src/specific/planetscomparesonification.cpp +++ b/modules/telemetry/src/specific/planetscomparesonification.cpp @@ -24,11 +24,16 @@ #include +#include #include -#include #include #include +#include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "PlanetsCompareSonification"; diff --git a/modules/telemetry/src/specific/planetsoverviewsonification.cpp b/modules/telemetry/src/specific/planetsoverviewsonification.cpp index 0cf23c17c9..df06451a7f 100644 --- a/modules/telemetry/src/specific/planetsoverviewsonification.cpp +++ b/modules/telemetry/src/specific/planetsoverviewsonification.cpp @@ -24,8 +24,11 @@ #include +#include #include #include +#include +#include namespace { // Indices for data items diff --git a/modules/telemetry/src/specific/planetssonification.cpp b/modules/telemetry/src/specific/planetssonification.cpp index 71e283da19..e5d879155e 100644 --- a/modules/telemetry/src/specific/planetssonification.cpp +++ b/modules/telemetry/src/specific/planetssonification.cpp @@ -24,7 +24,9 @@ #include +#include #include +#include #include #include #include @@ -33,6 +35,16 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "planetssonification_lua.inl" diff --git a/modules/telemetry/src/telemetrybase.cpp b/modules/telemetry/src/telemetrybase.cpp index 6090440669..e950953fdd 100644 --- a/modules/telemetry/src/telemetrybase.cpp +++ b/modules/telemetry/src/telemetrybase.cpp @@ -24,10 +24,7 @@ #include -#include -#include -#include -#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/modules/telemetry/src/util.cpp b/modules/telemetry/src/util.cpp index f1ed3383c5..bf53b5f5cd 100644 --- a/modules/telemetry/src/util.cpp +++ b/modules/telemetry/src/util.cpp @@ -24,12 +24,13 @@ #include -#include -#include +#include #include #include #include #include +#include +#include namespace { /** diff --git a/modules/telemetry/telemetrymodule.cpp b/modules/telemetry/telemetrymodule.cpp index 3b8e9cef76..f0da1e32aa 100644 --- a/modules/telemetry/telemetrymodule.cpp +++ b/modules/telemetry/telemetrymodule.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,11 @@ #include #include #include -#include +#include +#include +#include +#include +#include namespace { // The default Open Sound Control receiver is SuperCollider with these default values. diff --git a/modules/telemetry/telemetrymodule.h b/modules/telemetry/telemetrymodule.h index f96b6cc4ec..6a46b837b6 100644 --- a/modules/telemetry/telemetrymodule.h +++ b/modules/telemetry/telemetrymodule.h @@ -27,14 +27,14 @@ #include "openspace/util/openspacemodule.h" -#include #include #include #include #include -#include #include #include +#include +#include namespace openspace { diff --git a/modules/touch/include/directinputsolver.h b/modules/touch/include/directinputsolver.h index 615d36e770..52f437ee38 100644 --- a/modules/touch/include/directinputsolver.h +++ b/modules/touch/include/directinputsolver.h @@ -25,8 +25,9 @@ #ifndef __OPENSPACE_MODULE_TOUCH___DIRECTINPUT_SOLVER___H__ #define __OPENSPACE_MODULE_TOUCH___DIRECTINPUT_SOLVER___H__ -#include #include +#include +#include #include namespace openspace { diff --git a/modules/touch/include/touchinteraction.h b/modules/touch/include/touchinteraction.h index 52809fba9c..802a93ff83 100644 --- a/modules/touch/include/touchinteraction.h +++ b/modules/touch/include/touchinteraction.h @@ -28,24 +28,22 @@ #include #include -#include #include #include #include #include #include -#include #include +#include +#include #include #include -#include // #define TOUCH_DEBUG_PROPERTIES namespace openspace { class Camera; -class SceneGraphNode; // Class used for keeping track of the recent average frame time class FrameTimeAverage { @@ -64,8 +62,6 @@ private: class TouchInteraction : public properties::PropertyOwner { public: - TouchInteraction(); - enum class InteractionType { ROTATION = 0, PINCH, @@ -82,6 +78,8 @@ public: glm::dvec2 pan = glm::dvec2(0.0); }; + TouchInteraction(); + /** * Main function call: * 1. Checks if doubleTap occured diff --git a/modules/touch/include/touchmarker.h b/modules/touch/include/touchmarker.h index e5fac0123e..1453dcc2c8 100644 --- a/modules/touch/include/touchmarker.h +++ b/modules/touch/include/touchmarker.h @@ -25,18 +25,15 @@ #ifndef __OPENSPACE_MODULE_TOUCH___TOUCH_MARKER___H__ #define __OPENSPACE_MODULE_TOUCH___TOUCH_MARKER___H__ -#include #include -#include + #include #include #include #include -#include #include #include #include -#include namespace ghoul::opengl { class ProgramObject; } @@ -50,10 +47,10 @@ public: void initialize(); void deinitialize(); - void render(const std::vector& list); + void render(const std::vector& list); private: - void createVertexList(const std::vector& list); + void createVertexList(const std::vector& list); properties::BoolProperty _visible; properties::FloatProperty _radiusSize; diff --git a/modules/touch/include/tuioear.h b/modules/touch/include/tuioear.h index 16d8750bf6..27398c523d 100644 --- a/modules/touch/include/tuioear.h +++ b/modules/touch/include/tuioear.h @@ -33,8 +33,9 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif -#include -#include +#include +#include +#include #ifdef __clang__ #pragma clang diagnostic pop @@ -43,11 +44,15 @@ #endif #include -#include -#include #include #include +namespace TUIO { + class TuioBlob; + class TuioCursor; + class TuioObject; +} // namespace TUIO + namespace openspace { class TuioEar : public TUIO::TuioListener { diff --git a/modules/touch/include/win32_touch.h b/modules/touch/include/win32_touch.h index 7f488b1a75..cb8e759b2b 100644 --- a/modules/touch/include/win32_touch.h +++ b/modules/touch/include/win32_touch.h @@ -38,4 +38,5 @@ public: } // namespace openspace #endif // WIN32 + #endif // __OPENSPACE_MODULE_TOUCH___WIN32_TOUCH___H__ diff --git a/modules/touch/src/directinputsolver.cpp b/modules/touch/src/directinputsolver.cpp index d7e9d1755e..fd0e585641 100644 --- a/modules/touch/src/directinputsolver.cpp +++ b/modules/touch/src/directinputsolver.cpp @@ -24,8 +24,14 @@ #include +#include #include #include +#include +#include +#include +#include +#include namespace { // Used in the LM algorithm diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 9b41d364ea..55e519dde4 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -31,8 +31,18 @@ #include #include #include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef WIN32 #pragma warning (push) @@ -313,7 +323,10 @@ TouchInteraction::TouchInteraction() // projDiffLength/diffLength. , _enableDirectManipulation(EnableDirectManipulationInfo, true) , _directTouchDistanceThreshold(DirectManipulationThresholdInfo, 5.f, 0.f, 10.f) - , _pinchInputs({ TouchInput(0, 0, 0.f, 0.f, 0.0), TouchInput(0, 0, 0.f, 0.f, 0.0) }) + , _pinchInputs({ + TouchInputHolder(TouchInput(0, 0, 0.f, 0.f, 0.0)), + TouchInputHolder(TouchInput(0, 0, 0.f, 0.f, 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) } { diff --git a/modules/touch/src/touchmarker.cpp b/modules/touch/src/touchmarker.cpp index f9117fa801..e262ebb8f7 100644 --- a/modules/touch/src/touchmarker.cpp +++ b/modules/touch/src/touchmarker.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include namespace { diff --git a/modules/touch/src/tuioear.cpp b/modules/touch/src/tuioear.cpp index 150b2eaddc..6a13cfd1f1 100644 --- a/modules/touch/src/tuioear.cpp +++ b/modules/touch/src/tuioear.cpp @@ -24,12 +24,9 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include using namespace TUIO; diff --git a/modules/touch/src/win32_touch.cpp b/modules/touch/src/win32_touch.cpp index 74da61931f..61d2650263 100644 --- a/modules/touch/src/win32_touch.cpp +++ b/modules/touch/src/win32_touch.cpp @@ -28,14 +28,21 @@ #include #include -#include +#include +#include #include #include +#include #include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include // #define ENABLE_TUIOMESSAGES #define ENABLE_DIRECTMSG diff --git a/modules/touch/touchmodule.cpp b/modules/touch/touchmodule.cpp index c94666ccea..419664e0fd 100644 --- a/modules/touch/touchmodule.cpp +++ b/modules/touch/touchmodule.cpp @@ -26,14 +26,24 @@ #include #include +#include #include #include #include #include #include #include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include using namespace TUIO; diff --git a/modules/touch/touchmodule.h b/modules/touch/touchmodule.h index 4c76f80f5a..30257e669e 100644 --- a/modules/touch/touchmodule.h +++ b/modules/touch/touchmodule.h @@ -34,6 +34,7 @@ #include #include #include +#include namespace openspace { @@ -90,7 +91,7 @@ private: glm::ivec2 _webPositionCallback = glm::ivec2(0); #ifdef WIN32 std::unique_ptr _win32TouchHook; -#endif //WIN32 +#endif // WIN32 bool _tap = false; }; diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 5254bb1e51..b8c6b163d0 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -24,13 +24,14 @@ #include -#include #include #include -#include #include #include -#include +#include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo SizeInfo = { @@ -113,6 +114,10 @@ namespace { namespace openspace { +documentation::Documentation RenderableToyVolume::Documentation() { + return codegen::doc("toyvolume_renderabletoyvolume"); +} + RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _size(SizeInfo, glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) @@ -142,8 +147,6 @@ RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) _downScaleVolumeRendering = p.downscale.value_or(_downScaleVolumeRendering); } -RenderableToyVolume::~RenderableToyVolume() {} - void RenderableToyVolume::initializeGL() { glm::vec4 color = glm::vec4(glm::vec3(_color), opacity()); _raycaster = std::make_unique(std::move(color)); diff --git a/modules/toyvolume/rendering/renderabletoyvolume.h b/modules/toyvolume/rendering/renderabletoyvolume.h index d0571b86db..f6be9efd2e 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.h +++ b/modules/toyvolume/rendering/renderabletoyvolume.h @@ -27,19 +27,17 @@ #include +#include #include #include #include +#include namespace openspace { -class ToyVolumeRaycaster; -struct RenderData; - class RenderableToyVolume : public Renderable { public: explicit RenderableToyVolume(const ghoul::Dictionary& dictionary); - ~RenderableToyVolume() override; void initializeGL() override; void deinitializeGL() override; @@ -47,6 +45,8 @@ public: void render(const RenderData& data, RendererTasks& tasks) override; void update(const UpdateData& data) override; + static documentation::Documentation Documentation(); + private: properties::Vec3Property _size; properties::IntProperty _scalingExponent; diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.cpp b/modules/toyvolume/rendering/toyvolumeraycaster.cpp index 58ec72c94e..59815cca74 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.cpp +++ b/modules/toyvolume/rendering/toyvolumeraycaster.cpp @@ -24,15 +24,14 @@ #include -#include -#include #include #include +#include #include #include #include -#include -#include +#include +#include namespace { constexpr std::string_view GlslRaycastPath = diff --git a/modules/toyvolume/rendering/toyvolumeraycaster.h b/modules/toyvolume/rendering/toyvolumeraycaster.h index 9ffe3e867a..c76b2630ba 100644 --- a/modules/toyvolume/rendering/toyvolumeraycaster.h +++ b/modules/toyvolume/rendering/toyvolumeraycaster.h @@ -29,18 +29,10 @@ #include #include -#include - -namespace ghoul::opengl { - class Texture; - class ProgramObject; -} // namespace ghoul::opengl +#include namespace openspace { -struct RenderData; -struct RaycastData; - class ToyVolumeRaycaster : public VolumeRaycaster { public: explicit ToyVolumeRaycaster(glm::vec4 color); diff --git a/modules/toyvolume/toyvolumemodule.cpp b/modules/toyvolume/toyvolumemodule.cpp index f6d90fbdb0..3a6201698c 100644 --- a/modules/toyvolume/toyvolumemodule.cpp +++ b/modules/toyvolume/toyvolumemodule.cpp @@ -25,8 +25,11 @@ #include #include +#include +#include #include #include +#include #include namespace openspace { @@ -40,4 +43,10 @@ void ToyVolumeModule::internalInitialize(const ghoul::Dictionary&) { fRenderable->registerClass("RenderableToyVolume"); } +std::vector ToyVolumeModule::documentations() const { + return { + RenderableToyVolume::Documentation() + }; +} + } // namespace openspace diff --git a/modules/toyvolume/toyvolumemodule.h b/modules/toyvolume/toyvolumemodule.h index ba47b4894e..892c729f84 100644 --- a/modules/toyvolume/toyvolumemodule.h +++ b/modules/toyvolume/toyvolumemodule.h @@ -34,7 +34,9 @@ public: constexpr static const char* Name = "ToyVolume"; ToyVolumeModule(); + std::vector documentations() const override; +private: void internalInitialize(const ghoul::Dictionary&) override; }; diff --git a/modules/video/include/renderablevideoplane.h b/modules/video/include/renderablevideoplane.h index 6ff607da55..a1e2833cd9 100644 --- a/modules/video/include/renderablevideoplane.h +++ b/modules/video/include/renderablevideoplane.h @@ -28,11 +28,10 @@ #include #include +#include namespace openspace { -namespace documentation { struct Documentation; } - class RenderableVideoPlane : public RenderablePlane { public: explicit RenderableVideoPlane(const ghoul::Dictionary& dictionary); diff --git a/modules/video/include/renderablevideosphere.h b/modules/video/include/renderablevideosphere.h index c9da8642e6..1358ccbc40 100644 --- a/modules/video/include/renderablevideosphere.h +++ b/modules/video/include/renderablevideosphere.h @@ -31,8 +31,6 @@ namespace openspace { -namespace documentation { struct Documentation; } - class RenderableVideoSphere : public RenderableSphere { public: explicit RenderableVideoSphere(const ghoul::Dictionary& dictionary); diff --git a/modules/video/include/screenspacevideo.h b/modules/video/include/screenspacevideo.h index 3df6f5c025..9dfffc615c 100644 --- a/modules/video/include/screenspacevideo.h +++ b/modules/video/include/screenspacevideo.h @@ -28,14 +28,9 @@ #include #include -#include - -namespace ghoul::opengl { class Texture; } namespace openspace { -namespace documentation { struct Documentation; } - class ScreenSpaceVideo : public ScreenSpaceRenderable { public: explicit ScreenSpaceVideo(const ghoul::Dictionary& dictionary); diff --git a/modules/video/include/videoplayer.h b/modules/video/include/videoplayer.h index b53ef97dd4..f6c93eb7d4 100644 --- a/modules/video/include/videoplayer.h +++ b/modules/video/include/videoplayer.h @@ -28,20 +28,24 @@ #include #include -#include #include #include #include #include +#include #include -#include - -// libmpv #include -#include +#include +#include +#include +#include + +namespace ghoul { class Dictionary; } namespace openspace { +namespace documentation { struct Documentation; } + enum class PlaybackMode { MapToSimulationTime = 0, RealTimeLoop diff --git a/modules/video/include/videotileprovider.h b/modules/video/include/videotileprovider.h index 06303ea2e2..38a3cdc006 100644 --- a/modules/video/include/videotileprovider.h +++ b/modules/video/include/videotileprovider.h @@ -27,24 +27,17 @@ #include +#include +#include #include -#include -#include -#include -#include - -// libmpv -#include -#include - -namespace openspace { struct Documentation; } namespace openspace::globebrowsing { +struct ChunkTile; + class VideoTileProvider : public TileProvider { public: explicit VideoTileProvider(const ghoul::Dictionary& dictionary); - ~VideoTileProvider() override; void update() override final; void reset() override final; diff --git a/modules/video/src/renderablevideoplane.cpp b/modules/video/src/renderablevideoplane.cpp index 41253149ab..5e628fc95a 100644 --- a/modules/video/src/renderablevideoplane.cpp +++ b/modules/video/src/renderablevideoplane.cpp @@ -25,7 +25,10 @@ #include #include -#include +#include +#include +#include +#include namespace { // This `Renderable` creates a textured 3D plane where the texture is a video. diff --git a/modules/video/src/renderablevideosphere.cpp b/modules/video/src/renderablevideosphere.cpp index 0dd87e6340..d7878063b5 100644 --- a/modules/video/src/renderablevideosphere.cpp +++ b/modules/video/src/renderablevideosphere.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include namespace { // This `Renderable` creates a textured 3D sphere where the texture is a video. Per diff --git a/modules/video/src/screenspacevideo.cpp b/modules/video/src/screenspacevideo.cpp index 6c86638a55..22df7172f7 100644 --- a/modules/video/src/screenspacevideo.cpp +++ b/modules/video/src/screenspacevideo.cpp @@ -25,15 +25,9 @@ #include #include -#include -#include -#include -#include -#include +#include #include -#include #include -#include namespace { // This `ScreenSpaceRenderable` can be used to render a video in front of the camera. diff --git a/modules/video/src/videoplayer.cpp b/modules/video/src/videoplayer.cpp index f4c83fdc26..5e7675e63d 100644 --- a/modules/video/src/videoplayer.cpp +++ b/modules/video/src/videoplayer.cpp @@ -24,18 +24,26 @@ #include +#include #include -#include #include -#include #include #include #include #include #include -#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "VideoPlayer"; diff --git a/modules/video/src/videotileprovider.cpp b/modules/video/src/videotileprovider.cpp index 21e29bb654..95b3e6ca46 100644 --- a/modules/video/src/videotileprovider.cpp +++ b/modules/video/src/videotileprovider.cpp @@ -24,17 +24,14 @@ #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "VideoTileProvider"; @@ -72,8 +69,6 @@ VideoTileProvider::VideoTileProvider(const ghoul::Dictionary& dictionary) addPropertySubOwner(_videoPlayer); } -VideoTileProvider::~VideoTileProvider() {} - globebrowsing::Tile VideoTileProvider::tile(const globebrowsing::TileIndex& tileIndex) { ZoneScoped; diff --git a/modules/video/videomodule.cpp b/modules/video/videomodule.cpp index 47b457b2f7..e87ab42026 100644 --- a/modules/video/videomodule.cpp +++ b/modules/video/videomodule.cpp @@ -31,7 +31,11 @@ #include #include #include -#include +#include +#include +#include +#include +#include namespace openspace { diff --git a/modules/video/videomodule.h b/modules/video/videomodule.h index 3295877ce0..1024e12672 100644 --- a/modules/video/videomodule.h +++ b/modules/video/videomodule.h @@ -27,8 +27,6 @@ #include -#include - namespace openspace { class VideoModule : public OpenSpaceModule { diff --git a/modules/volume/envelope.cpp b/modules/volume/envelope.cpp index 247f59f68b..7c948a63d0 100644 --- a/modules/volume/envelope.cpp +++ b/modules/volume/envelope.cpp @@ -25,11 +25,10 @@ #include #include - +#include +#include #include -using json = nlohmann::json; - namespace openspace::volume { EnvelopePoint::EnvelopePoint(glm::vec3 c, float x, float y) @@ -186,8 +185,8 @@ std::string EnvelopePoint::hexadecimalFromVec3(const glm::vec3& vec) const { return ("#" + r + g + b); } -json Envelope::jsonPoints() const { - json j; +nlohmann::json Envelope::jsonPoints() const { + nlohmann::json j; for (size_t i = 0; i < _points.size(); i++) { j[i] = { { @@ -206,8 +205,8 @@ json Envelope::jsonPoints() const { return j; } -json Envelope::jsonEnvelope() const { - json j; +nlohmann::json Envelope::jsonEnvelope() const { + nlohmann::json j; j["points"] = jsonPoints(); return j; } diff --git a/modules/volume/envelope.h b/modules/volume/envelope.h index 3c4b32f4af..d8f0db7eef 100644 --- a/modules/volume/envelope.h +++ b/modules/volume/envelope.h @@ -27,6 +27,9 @@ #include #include +#include +#include +#include struct lua_State; diff --git a/modules/volume/linearlrucache.h b/modules/volume/linearlrucache.h index 854329857d..df8412cf7b 100644 --- a/modules/volume/linearlrucache.h +++ b/modules/volume/linearlrucache.h @@ -25,9 +25,9 @@ #ifndef __OPENSPACE_MODULE_VOLUME___LINEARLRUCACHE___H__ #define __OPENSPACE_MODULE_VOLUME___LINEARLRUCACHE___H__ -#include #include -#include +#include +#include namespace openspace::volume { diff --git a/modules/volume/linearlrucache.inl b/modules/volume/linearlrucache.inl index 4ac087c1a6..934b082f8a 100644 --- a/modules/volume/linearlrucache.inl +++ b/modules/volume/linearlrucache.inl @@ -64,7 +64,7 @@ ValueType& LinearLruCache::get(size_t key) { template void LinearLruCache::evict() { - _cache[_tracker.front()] = make_pair(nullptr, _tracker.end()); + _cache[_tracker.front()] = std::make_pair(nullptr, _tracker.end()); _tracker.pop_front(); } diff --git a/modules/volume/lrucache.h b/modules/volume/lrucache.h index 8111c00703..a6e08adcd8 100644 --- a/modules/volume/lrucache.h +++ b/modules/volume/lrucache.h @@ -25,9 +25,8 @@ #ifndef __OPENSPACE_MODULE_VOLUME___LRUCACHE___H__ #define __OPENSPACE_MODULE_VOLUME___LRUCACHE___H__ -#include #include -#include +#include namespace openspace::volume { @@ -49,6 +48,7 @@ public: private: void insert(const KeyType& key, const ValueType& value); + ContainerType< KeyType, std::pair::iterator> > _cache; diff --git a/modules/volume/rawvolume.inl b/modules/volume/rawvolume.inl index b88c2e7085..bc0768b55a 100644 --- a/modules/volume/rawvolume.inl +++ b/modules/volume/rawvolume.inl @@ -23,6 +23,7 @@ ****************************************************************************************/ #include +#include namespace openspace::volume { diff --git a/modules/volume/rawvolumemetadata.cpp b/modules/volume/rawvolumemetadata.cpp index 5c27460f85..5e074b8046 100644 --- a/modules/volume/rawvolumemetadata.cpp +++ b/modules/volume/rawvolumemetadata.cpp @@ -24,11 +24,11 @@ #include -#include #include #include #include #include +#include namespace { struct [[codegen::Dictionary(RawVolumeMetaData)]] Parameters { diff --git a/modules/volume/rawvolumemetadata.h b/modules/volume/rawvolumemetadata.h index 1a0af13b5e..ab4e50d23a 100644 --- a/modules/volume/rawvolumemetadata.h +++ b/modules/volume/rawvolumemetadata.h @@ -27,9 +27,10 @@ #include #include +#include -namespace openspace::documentation { struct Documentation; } namespace ghoul { class Dictionary; } +namespace openspace::documentation { struct Documentation; } namespace openspace::volume { diff --git a/modules/volume/rawvolumereader.h b/modules/volume/rawvolumereader.h index c2af207af8..f7c6810596 100644 --- a/modules/volume/rawvolumereader.h +++ b/modules/volume/rawvolumereader.h @@ -27,7 +27,7 @@ #include #include -#include +#include namespace openspace::volume { diff --git a/modules/volume/rawvolumewriter.h b/modules/volume/rawvolumewriter.h index 34c089097e..82463ce5c9 100644 --- a/modules/volume/rawvolumewriter.h +++ b/modules/volume/rawvolumewriter.h @@ -25,9 +25,9 @@ #ifndef __OPENSPACE_MODULE_VOLUME___RAWVOLUMEWRITER___H__ #define __OPENSPACE_MODULE_VOLUME___RAWVOLUMEWRITER___H__ +#include #include #include -#include namespace openspace::volume { @@ -38,11 +38,10 @@ class RawVolumeWriter { public: explicit RawVolumeWriter(std::filesystem::path path, size_t bufferSize = 1024); - void setPath(std::filesystem::path path); glm::uvec3 dimensions() const; void setDimensions(glm::uvec3 dimensions); void write(const std::function& fn, - const std::function& onProgress = [](float) {}); + const std::function& onProgress = [](float) {}); void write(const RawVolume& volume); size_t coordsToIndex(const glm::uvec3& coords) const; diff --git a/modules/volume/rawvolumewriter.inl b/modules/volume/rawvolumewriter.inl index 8a09a6a9df..f076565b89 100644 --- a/modules/volume/rawvolumewriter.inl +++ b/modules/volume/rawvolumewriter.inl @@ -26,7 +26,10 @@ #include #include #include +#include #include +#include +#include namespace openspace::volume { @@ -66,8 +69,8 @@ void RawVolumeWriter::write( const size_t size = static_cast(dims.x) * static_cast(dims.y) * static_cast(dims.z); - std::vector buffer(_bufferSize); - std::ofstream file(_path, std::ios::binary); + std::vector buffer = std::vector(_bufferSize); + std::ofstream file = std::ofstream(_path, std::ios::binary); int nChunks = static_cast(size / _bufferSize); if (size % _bufferSize > 0) { @@ -87,7 +90,6 @@ void RawVolumeWriter::write( ); onProgress(static_cast(c + 1) / nChunks); } - file.close(); } template diff --git a/modules/volume/rendering/basicvolumeraycaster.cpp b/modules/volume/rendering/basicvolumeraycaster.cpp index e0c66211eb..2cf88e5d0e 100644 --- a/modules/volume/rendering/basicvolumeraycaster.cpp +++ b/modules/volume/rendering/basicvolumeraycaster.cpp @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -35,7 +33,11 @@ #include #include #include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view GlslRaycast = "${MODULE_VOLUME}/shaders/raycast.glsl"; diff --git a/modules/volume/rendering/basicvolumeraycaster.h b/modules/volume/rendering/basicvolumeraycaster.h index 80e12645f4..361cccc01b 100644 --- a/modules/volume/rendering/basicvolumeraycaster.h +++ b/modules/volume/rendering/basicvolumeraycaster.h @@ -27,20 +27,13 @@ #include -#include #include +#include +#include -namespace ghoul::opengl { - class Texture; - class ProgramObject; - class TextureUnit; -} // namespace ghoul::opengl +namespace ghoul::opengl { class TextureUnit; } -namespace openspace { - struct RenderData; - struct RaycastData; - class TransferFunction; -} // namespace openspace +namespace openspace { class TransferFunction; } namespace openspace::volume { diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index 6c419ee8bb..53a4b90023 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -26,32 +26,34 @@ #include #include -#include #include +#include #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include +#include #include #include +#include +#include #include -#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "RenderableTimeVaryingVolume"; - const float SecondsInOneDay = 60 * 60 * 24; + constexpr float SecondsInOneDay = 60 * 60 * 24; constexpr openspace::properties::Property::PropertyInfo StepSizeInfo = { "StepSize", diff --git a/modules/volume/rendering/renderabletimevaryingvolume.h b/modules/volume/rendering/renderabletimevaryingvolume.h index 631de3a34d..ff64db5449 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.h +++ b/modules/volume/rendering/renderabletimevaryingvolume.h @@ -34,11 +34,10 @@ #include #include #include +#include +#include -namespace openspace { - class Histogram; - struct RenderData; -} // namespace openspace +namespace openspace { class Histogram; } namespace openspace::volume { diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 8ba0d38877..30cda6836a 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -24,6 +24,7 @@ #include +#include #include #include diff --git a/modules/volume/rendering/volumeclipplane.h b/modules/volume/rendering/volumeclipplane.h index a587077618..3a5f08d9f5 100644 --- a/modules/volume/rendering/volumeclipplane.h +++ b/modules/volume/rendering/volumeclipplane.h @@ -29,6 +29,7 @@ #include #include +#include namespace ghoul { class Dictionary; } diff --git a/modules/volume/rendering/volumeclipplanes.cpp b/modules/volume/rendering/volumeclipplanes.cpp index 14ad128458..157e4c31b6 100644 --- a/modules/volume/rendering/volumeclipplanes.cpp +++ b/modules/volume/rendering/volumeclipplanes.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace openspace::volume { diff --git a/modules/volume/rendering/volumeclipplanes.h b/modules/volume/rendering/volumeclipplanes.h index 1343c61251..917b51c705 100644 --- a/modules/volume/rendering/volumeclipplanes.h +++ b/modules/volume/rendering/volumeclipplanes.h @@ -29,14 +29,12 @@ #include #include -#include +#include namespace ghoul { class Dictionary; } namespace openspace::volume { -class VolumeClipPlane; - class VolumeClipPlanes : public properties::PropertyOwner { public: explicit VolumeClipPlanes(const ghoul::Dictionary& dictionary); diff --git a/modules/volume/tasks/generaterawvolumefromfiletask.cpp b/modules/volume/tasks/generaterawvolumefromfiletask.cpp index 4d0df23cbc..822710767f 100644 --- a/modules/volume/tasks/generaterawvolumefromfiletask.cpp +++ b/modules/volume/tasks/generaterawvolumefromfiletask.cpp @@ -27,17 +27,22 @@ #include #include #include +#include #include -#include +#include +#include #include -#include #include -#include #include #include +#include #include +#include #include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "GenerateRawVolumeFromFileTask"; diff --git a/modules/volume/tasks/generaterawvolumefromfiletask.h b/modules/volume/tasks/generaterawvolumefromfiletask.h index 4ec2c04199..7b82991610 100644 --- a/modules/volume/tasks/generaterawvolumefromfiletask.h +++ b/modules/volume/tasks/generaterawvolumefromfiletask.h @@ -29,7 +29,6 @@ #include #include -#include namespace openspace::volume { diff --git a/modules/volume/tasks/generaterawvolumetask.cpp b/modules/volume/tasks/generaterawvolumetask.cpp index 3d35b70aae..915ba834eb 100644 --- a/modules/volume/tasks/generaterawvolumetask.cpp +++ b/modules/volume/tasks/generaterawvolumetask.cpp @@ -27,19 +27,21 @@ #include #include #include -#include +#include +#include #include #include #include -#include #include -#include #include #include -#include #include -#include +#include +#include +#include +#include #include +#include namespace { struct [[codegen::Dictionary(GenerateRawVolumeTask)]] Parameters { diff --git a/modules/volume/tasks/generaterawvolumetask.h b/modules/volume/tasks/generaterawvolumetask.h index 4d06aef51a..1848e6de6c 100644 --- a/modules/volume/tasks/generaterawvolumetask.h +++ b/modules/volume/tasks/generaterawvolumetask.h @@ -29,7 +29,6 @@ #include #include -#include namespace openspace::volume { diff --git a/modules/volume/textureslicevolumereader.h b/modules/volume/textureslicevolumereader.h index 6a5691f46a..28d65d0365 100644 --- a/modules/volume/textureslicevolumereader.h +++ b/modules/volume/textureslicevolumereader.h @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace ghoul::opengl { class Texture; } diff --git a/modules/volume/textureslicevolumereader.inl b/modules/volume/textureslicevolumereader.inl index 0128d63505..f22c70660d 100644 --- a/modules/volume/textureslicevolumereader.inl +++ b/modules/volume/textureslicevolumereader.inl @@ -23,7 +23,9 @@ ****************************************************************************************/ #include +#include #include +#include namespace openspace::volume { diff --git a/modules/volume/transferfunction.cpp b/modules/volume/transferfunction.cpp index d7c21a05c6..fc0456ebd4 100644 --- a/modules/volume/transferfunction.cpp +++ b/modules/volume/transferfunction.cpp @@ -24,12 +24,20 @@ #include -#include #include #include +#include +#include +#include +#include #include +#include +#include +#include -using json = nlohmann::json; +namespace { + constexpr int Width = 1024; +} // namepsace namespace openspace::volume { @@ -38,7 +46,7 @@ TransferFunction::TransferFunction(const std::string& string) { } bool TransferFunction::setEnvelopesFromString(const std::string& s) { - const json j = json::parse(s); + const nlohmann::json j = nlohmann::json::parse(s); for (const nlohmann::json& it : j) { Envelope env; std::vector tmpVec; @@ -183,7 +191,7 @@ std::string TransferFunction::serializedToString() const { if (_envelopes.empty()) { return ""; } - json j; + nlohmann::json j; for (auto envIter = _envelopes.begin(); envIter != _envelopes.end(); envIter++) { j[std::distance(_envelopes.begin(), envIter)] = { envIter->jsonEnvelope() }; } @@ -195,11 +203,11 @@ bool TransferFunction::createTexture(ghoul::opengl::Texture& ptr) { return false; } - float* transferFunction = new float[_width * 4]; - std::memset(transferFunction, 0, _width * 4 * sizeof(float)); + float* transferFunction = new float[Width * 4]; + std::memset(transferFunction, 0, Width * 4 * sizeof(float)); - for (int i = 0; i < _width ; i++) { - const float position = static_cast(i) / static_cast(_width); + for (int i = 0; i < Width; i++) { + const float position = static_cast(i) / static_cast(Width); int count = 0; glm::vec4 rgbFromEnvelopes(0.f); float alpha = 0.f; diff --git a/modules/volume/transferfunction.h b/modules/volume/transferfunction.h index 983e55b2ed..93c54b573a 100644 --- a/modules/volume/transferfunction.h +++ b/modules/volume/transferfunction.h @@ -26,10 +26,14 @@ #define __OPENSPACE_MODULE_VOLUME___TRANSFERFUNCTION___H__ #include -#include +#include +#include -namespace ghoul { class Dictionary; } -namespace ghoul::opengl { class Texture; } +namespace ghoul { + namespace opengl { class Texture; } + class Dictionary; +} // namespace ghoul +struct lua_State; namespace openspace::volume { @@ -53,7 +57,6 @@ public: std::string serializedToString() const; private: - int _width = 1024; std::string _loadableFilePath; std::vector _envelopes; }; diff --git a/modules/volume/transferfunctionhandler.cpp b/modules/volume/transferfunctionhandler.cpp index 744b8c7b71..07552b29c6 100644 --- a/modules/volume/transferfunctionhandler.cpp +++ b/modules/volume/transferfunctionhandler.cpp @@ -25,8 +25,8 @@ #include #include -#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo TransferFunctionInfo = { diff --git a/modules/volume/transferfunctionhandler.h b/modules/volume/transferfunctionhandler.h index 9ff64741c3..a43b8ecf7c 100644 --- a/modules/volume/transferfunctionhandler.h +++ b/modules/volume/transferfunctionhandler.h @@ -30,13 +30,10 @@ #include #include #include +#include #include -#include -namespace openspace { - class Histogram; - class TransferFunction; -} // namespace openspace +namespace ghoul::opengl { class Texture; } namespace openspace::volume { diff --git a/modules/volume/transferfunctionproperty.cpp b/modules/volume/transferfunctionproperty.cpp index 276aee135a..a15236ed20 100644 --- a/modules/volume/transferfunctionproperty.cpp +++ b/modules/volume/transferfunctionproperty.cpp @@ -23,7 +23,9 @@ ****************************************************************************************/ #include -#include + +#include +#include namespace openspace::properties { diff --git a/modules/volume/volumegridtype.cpp b/modules/volume/volumegridtype.cpp index 557c422c89..53667ee65c 100644 --- a/modules/volume/volumegridtype.cpp +++ b/modules/volume/volumegridtype.cpp @@ -24,6 +24,9 @@ #include +#include +#include + namespace openspace::volume { VolumeGridType parseGridType(const std::string& gridType) { @@ -40,8 +43,8 @@ std::string gridTypeToString(VolumeGridType gridType) { switch (gridType) { case VolumeGridType::Cartesian: return "Cartesian"; case VolumeGridType::Spherical: return "Spherical"; + default: return "Unknown"; } - return "Unknown"; } } // namespace openspace::volume diff --git a/modules/volume/volumegridtype.h b/modules/volume/volumegridtype.h index a91f811ab7..df53a4f2aa 100644 --- a/modules/volume/volumegridtype.h +++ b/modules/volume/volumegridtype.h @@ -25,7 +25,6 @@ #ifndef __OPENSPACE_MODULE_VOLUME___VOLUMEGRIDTYPE___H__ #define __OPENSPACE_MODULE_VOLUME___VOLUMEGRIDTYPE___H__ -#include #include namespace openspace::volume { @@ -36,7 +35,7 @@ enum class VolumeGridType : int { }; VolumeGridType parseGridType(const std::string& gridType); -std::string gridTypeToString(VolumeGridType); +std::string gridTypeToString(VolumeGridType gridType); } // namespace openspace::volume diff --git a/modules/volume/volumemodule.cpp b/modules/volume/volumemodule.cpp index 40883dd571..b7a16458e0 100644 --- a/modules/volume/volumemodule.cpp +++ b/modules/volume/volumemodule.cpp @@ -29,9 +29,10 @@ #include #include #include -#include #include +#include #include +#include #include namespace openspace { diff --git a/modules/webbrowser/include/browserclient.h b/modules/webbrowser/include/browserclient.h index eb256bc185..3bec38fa83 100644 --- a/modules/webbrowser/include/browserclient.h +++ b/modules/webbrowser/include/browserclient.h @@ -38,8 +38,8 @@ namespace openspace { -class WebRenderHandler; class WebKeyboardHandler; +class WebRenderHandler; class BrowserClient : public CefClient { public: diff --git a/modules/webbrowser/include/browserinstance.h b/modules/webbrowser/include/browserinstance.h index c5a8ae5688..5cb79c78fd 100644 --- a/modules/webbrowser/include/browserinstance.h +++ b/modules/webbrowser/include/browserinstance.h @@ -25,6 +25,9 @@ #ifndef __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H__ #define __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H__ +#include +#include + #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4100) @@ -45,14 +48,11 @@ #pragma warning (pop) #endif // _MSC_VER -#include -#include - namespace openspace { class BrowserClient; -class WebRenderHandler; class WebKeyboardHandler; +class WebRenderHandler; class BrowserInstance { public: diff --git a/modules/webbrowser/include/cefhost.h b/modules/webbrowser/include/cefhost.h index 02560847bf..53fadadf95 100644 --- a/modules/webbrowser/include/cefhost.h +++ b/modules/webbrowser/include/cefhost.h @@ -25,22 +25,8 @@ #ifndef __OPENSPACE_MODULE_WEBBROWSER___CEF_HOST___H__ #define __OPENSPACE_MODULE_WEBBROWSER___CEF_HOST___H__ -#ifdef WIN32 -#pragma warning(push) -#pragma warning(disable : 4100) -#endif // WIN32 - -#include - -#ifdef WIN32 -#pragma warning(pop) -#endif // WIN32 #include -struct CefSettingsTraits; -template class CefStructBase; -using CefSettings = CefStructBase; - namespace openspace { class CefHost { diff --git a/modules/webbrowser/include/defaultbrowserlauncher.h b/modules/webbrowser/include/defaultbrowserlauncher.h index dfd99c47b7..6c14cb2adb 100644 --- a/modules/webbrowser/include/defaultbrowserlauncher.h +++ b/modules/webbrowser/include/defaultbrowserlauncher.h @@ -41,18 +41,12 @@ namespace openspace { class DefaultBrowserLauncher : public CefLifeSpanHandler, public CefRequestHandler { public: - bool OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, - const CefString& targetUrl, - const CefString& targetFrameName, - CefLifeSpanHandler::WindowOpenDisposition targetDisposition, - bool userGesture, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr& client, - CefBrowserSettings& settings, - CefRefPtr& extra_info, - bool* noJavascriptAccess) override; + bool OnBeforePopup(CefRefPtr browser, CefRefPtr frame, + const CefString& targetUrl, const CefString& targetFrameName, + CefLifeSpanHandler::WindowOpenDisposition targetDisposition, bool userGesture, + const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, + CefRefPtr& client, CefBrowserSettings& settings, + CefRefPtr& extra_info, bool* noJavascriptAccess) override; //bool OnOpenURLFromTab(CefRefPtr browser, CefRefPtr frame, // const CefString& target_url, diff --git a/modules/webbrowser/include/screenspacebrowser.h b/modules/webbrowser/include/screenspacebrowser.h index 4bdd1c9b45..21573357f6 100644 --- a/modules/webbrowser/include/screenspacebrowser.h +++ b/modules/webbrowser/include/screenspacebrowser.h @@ -27,10 +27,12 @@ #include +#include #include #include #include #include +#include #ifdef _MSC_VER #pragma warning (push) @@ -58,7 +60,6 @@ namespace openspace { class BrowserInstance; class ScreenSpaceRenderHandler; -class WebKeyboardHandler; class ScreenSpaceBrowser : public ScreenSpaceRenderable { public: @@ -101,6 +102,7 @@ private: bool _useAcceleratedRendering = false; bool _isUrlDirty = false; }; + } // namespace openspace #endif // __OPENSPACE_MODULE_WEBBROWSER___SCREEN_SPACE_BROWSER___H__ diff --git a/modules/webbrowser/include/webkeyboardhandler.h b/modules/webbrowser/include/webkeyboardhandler.h index 993eb81656..3d11ec3221 100644 --- a/modules/webbrowser/include/webkeyboardhandler.h +++ b/modules/webbrowser/include/webkeyboardhandler.h @@ -30,7 +30,6 @@ #pragma warning (disable : 4100) #endif // _MSC_VER - #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-parameter" diff --git a/modules/webbrowser/include/webrenderhandler.h b/modules/webbrowser/include/webrenderhandler.h index df4805353d..c81f4e8175 100644 --- a/modules/webbrowser/include/webrenderhandler.h +++ b/modules/webbrowser/include/webrenderhandler.h @@ -25,8 +25,9 @@ #ifndef __OPENSPACE_MODULE_WEBBROWSER__WEB_RENDER_HANDLER_H #define __OPENSPACE_MODULE_WEBBROWSER__WEB_RENDER_HANDLER_H -#include #include +#include +#include #ifdef _MSC_VER #pragma warning (push) @@ -37,7 +38,6 @@ #endif // _MSC_VER #include -#include #ifdef _MSC_VER #pragma warning (pop) @@ -45,8 +45,6 @@ //#pragma clang diagnostic pop #endif // _MSC_VER -#include - namespace openspace { class WebRenderHandler : public CefRenderHandler { @@ -55,12 +53,12 @@ public: WebRenderHandler(); - virtual void draw(void) = 0; + virtual void draw() = 0; virtual void render() = 0; void reshape(int, int); - void GetViewRect(CefRefPtr browser, CefRect &rect) override; + void GetViewRect(CefRefPtr browser, CefRect& rect) override; // Regular OnPaint method. Uses CPU allocation void OnPaint(CefRefPtr browser, PaintElementType type, @@ -90,9 +88,7 @@ private: glm::ivec2 _windowSize = glm::ivec2(0); glm::ivec2 _browserBufferSize = glm::ivec2(0); - /** - * RGBA buffer from browser - */ + /// RGBA buffer from browser std::vector _browserBuffer; bool _needsRepaint = true; bool _textureSizeIsDirty = true; diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index 56424c148e..3d7beec96f 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -30,13 +30,15 @@ #include #include #include -#include #include #include #include #include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "CEF BrowserInstance"; diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index d81e993c6e..597b555d1f 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -25,15 +25,33 @@ #include #include -#include +#include #include +#include #include -#include +#include +#include +#include #ifdef __APPLE__ #include #endif // __APPLE__ +#ifdef WIN32 +#pragma warning(push) +#pragma warning(disable : 4100) +#endif // WIN32 + +#include + +#ifdef WIN32 +#pragma warning(pop) +#endif // WIN32 + +struct CefSettingsTraits; +template class CefStructBase; +using CefSettings = CefStructBase; + namespace { constexpr std::string_view _loggerCat = "CefHost"; } // namespace diff --git a/modules/webbrowser/src/eventhandler.cpp b/modules/webbrowser/src/eventhandler.cpp index b92e7934c8..8c6b6a759d 100644 --- a/modules/webbrowser/src/eventhandler.cpp +++ b/modules/webbrowser/src/eventhandler.cpp @@ -33,6 +33,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#ifdef WIN32 +#include +#endif // WIN32 namespace { constexpr std::string_view _loggerCat = "WebBrowser:EventHandler"; diff --git a/modules/webbrowser/src/screenspacebrowser.cpp b/modules/webbrowser/src/screenspacebrowser.cpp index dffa1acf6a..bf080cb549 100644 --- a/modules/webbrowser/src/screenspacebrowser.cpp +++ b/modules/webbrowser/src/screenspacebrowser.cpp @@ -27,12 +27,12 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include namespace { diff --git a/modules/webbrowser/src/webrenderhandler.cpp b/modules/webbrowser/src/webrenderhandler.cpp index 5af5e4d656..ec16da1950 100644 --- a/modules/webbrowser/src/webrenderhandler.cpp +++ b/modules/webbrowser/src/webrenderhandler.cpp @@ -23,9 +23,12 @@ ****************************************************************************************/ #include + #include +#include #include -#include +#include +#include namespace openspace { diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index 0e507c3284..8dacf096c8 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -29,17 +29,19 @@ #include #include #include -#include #include -#include +#include #include -#include #include +#include #include +#include #include #include +#include #include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "WebBrowser"; diff --git a/modules/webbrowser/webbrowsermodule.h b/modules/webbrowser/webbrowsermodule.h index 342a50fcfa..40a58092d3 100644 --- a/modules/webbrowser/webbrowsermodule.h +++ b/modules/webbrowser/webbrowsermodule.h @@ -31,6 +31,7 @@ #include #include #include +#include namespace openspace { @@ -38,13 +39,6 @@ class BrowserInstance; class CefHost; class EventHandler; -namespace webbrowser { - extern std::chrono::microseconds interval; - extern std::chrono::time_point latestCall; - extern CefHost* cefHost; - void update(); -} // namespace webbrowser - class WebBrowserModule : public OpenSpaceModule { public: static constexpr const char* Name = "WebBrowser"; @@ -79,6 +73,13 @@ private: static inline bool _disableAcceleratedRendering = false; }; +namespace webbrowser { + extern std::chrono::microseconds interval; + extern std::chrono::time_point latestCall; + extern CefHost* cefHost; + void update(); +} // namespace webbrowser + } // namespace openspace #endif // __OPENSPACE_MODULE_WEBBROWSER___WEBBROWSERMODULE___H__ diff --git a/modules/webgui/webguimodule.cpp b/modules/webgui/webguimodule.cpp index 4ca1e6ad69..7004a3c5c3 100644 --- a/modules/webgui/webguimodule.cpp +++ b/modules/webgui/webguimodule.cpp @@ -24,17 +24,19 @@ #include +#include #include #include -#include #include #include #include #include #include #include +#include #include #include +#include #include #include diff --git a/modules/webgui/webguimodule.h b/modules/webgui/webguimodule.h index b7aae7690a..1f4cc3e882 100644 --- a/modules/webgui/webguimodule.h +++ b/modules/webgui/webguimodule.h @@ -32,8 +32,11 @@ #include #include #include +#include #include +#include #include +#include #include namespace openspace { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0687a2d792..c1a1e715a4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -85,6 +85,7 @@ set(OPENSPACE_SOURCE navigation/pathnavigator.cpp navigation/pathnavigator_lua.inl navigation/waypoint.cpp + network/messagestructures.cpp network/messagestructureshelper.cpp network/parallelconnection.cpp network/parallelpeer.cpp @@ -132,6 +133,7 @@ set(OPENSPACE_SOURCE rendering/dashboarditem.cpp rendering/dashboardtextitem.cpp rendering/framebufferrenderer.cpp + rendering/deferredcaster.cpp rendering/deferredcastermanager.cpp rendering/fadeable.cpp rendering/helper.cpp @@ -190,6 +192,7 @@ set(OPENSPACE_SOURCE util/sphere.cpp util/spicemanager.cpp util/spicemanager_lua.inl + util/syncable.cpp util/syncbuffer.cpp util/tstring.cpp util/histogram.cpp diff --git a/src/camera/camera.cpp b/src/camera/camera.cpp index 538b2d55d2..6126a2f56b 100644 --- a/src/camera/camera.cpp +++ b/src/camera/camera.cpp @@ -25,6 +25,9 @@ #include #include +#include +#include +#include namespace openspace { diff --git a/src/data/csvloader.cpp b/src/data/csvloader.cpp index 76a766aafa..f5b35792ed 100644 --- a/src/data/csvloader.cpp +++ b/src/data/csvloader.cpp @@ -26,9 +26,6 @@ #include #include -#include -#include -#include #include #include #include @@ -36,12 +33,15 @@ #include #include #include +#include #include -#include +#include #include #include #include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "DataLoader: CSV"; diff --git a/src/data/dataloader.cpp b/src/data/dataloader.cpp index 2d1592a00c..e0858def55 100644 --- a/src/data/dataloader.cpp +++ b/src/data/dataloader.cpp @@ -32,10 +32,23 @@ #include #include #include +#include #include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include +#include +#include +#include namespace { constexpr int8_t DataCacheFileVersion = 13; diff --git a/src/data/datamapping.cpp b/src/data/datamapping.cpp index 12e80728c0..9747ec41eb 100644 --- a/src/data/datamapping.cpp +++ b/src/data/datamapping.cpp @@ -25,11 +25,14 @@ #include #include +#include #include #include #include +#include +#include #include -#include +#include namespace { constexpr std::string_view _loggerCat = "RenderablePolygonCloud"; @@ -38,9 +41,7 @@ namespace { constexpr std::string_view DefaultY = "y"; constexpr std::string_view DefaultZ = "z"; - enum class PositionColumn { - X, Y, Z - }; + enum class PositionColumn { X, Y, Z }; bool checkPosColumnInternal(PositionColumn columnCase, const std::string& c, const std::optional& mapping, diff --git a/src/data/speckloader.cpp b/src/data/speckloader.cpp index f25516fd1e..07fdc06b60 100644 --- a/src/data/speckloader.cpp +++ b/src/data/speckloader.cpp @@ -24,14 +24,24 @@ #include +#include #include #include #include +#include #include +#include #include +#include +#include #include +#include +#include #include +#include #include +#include +#include namespace { bool startsWith(std::string lhs, std::string_view rhs) noexcept { diff --git a/src/documentation/core_registration.cpp b/src/documentation/core_registration.cpp index 24ba1ec1f6..0fc4c019e0 100644 --- a/src/documentation/core_registration.cpp +++ b/src/documentation/core_registration.cpp @@ -38,7 +38,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index 6ab68fb776..59f21e5626 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -25,12 +25,16 @@ #include #include +#include #include +#include #include #include #include +#include #include #include +#include namespace { diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 7c1edcd2ed..fde4b5c1e3 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -25,29 +25,48 @@ #include #include +#include #include #include #include #include +#include #include #include #include #include #include +#include +#include #include #include #include +#include #include +#include #include #include #include +#include #include #include #include #include #include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "DocumentationEngine"; diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index 3de9213361..e7e04b0cd1 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -24,8 +24,26 @@ #include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace openspace::documentation { @@ -136,7 +154,7 @@ TestResult IntVerifier::operator()(const ghoul::Dictionary& dict, // If we have a double value, we need to check if it is integer const double value = dict.value(key); double intPart = 0.0; - const bool isInt = modf(value, &intPart) == 0.0; + const bool isInt = std::modf(value, &intPart) == 0.0; if (isInt) { TestResult res; res.success = true; diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index 98165633c9..ac4513befe 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -25,27 +25,26 @@ #include #include +#include #include #include #include +#include #include -#include #include #include +#include #include #include #include #include -#include +#include #include -#include #include #include #include -#include #include #include -#include namespace { // We can't use ${SCRIPTS} here as that hasn't been defined by this point diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index 4674cbf760..f73bcf2db2 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -27,13 +27,20 @@ #include #include #include +#include #include #include #include +#include #include +#include +#include #include +#include #include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "DownloadManager"; diff --git a/src/engine/globals.cpp b/src/engine/globals.cpp index c8407caab1..f9c050a284 100644 --- a/src/engine/globals.cpp +++ b/src/engine/globals.cpp @@ -58,8 +58,9 @@ #include #include #include +#include #include -#include +#include #include #include diff --git a/src/engine/globalscallbacks.cpp b/src/engine/globalscallbacks.cpp index bbe0a8df53..2a41a8d9aa 100644 --- a/src/engine/globalscallbacks.cpp +++ b/src/engine/globalscallbacks.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace openspace::global::callback { diff --git a/src/engine/logfactory.cpp b/src/engine/logfactory.cpp index 4cf4494b0d..c02fa0ba58 100644 --- a/src/engine/logfactory.cpp +++ b/src/engine/logfactory.cpp @@ -26,11 +26,15 @@ #include #include +#include #include #include #include +#include #include +#include #include +#include namespace { constexpr std::string_view BootstrapPath = "${WEB}/common/bootstrap.min.css"; diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp index c943382198..e7e3112b76 100644 --- a/src/engine/moduleengine.cpp +++ b/src/engine/moduleengine.cpp @@ -28,9 +28,16 @@ #include #include #include +#include #include -#include +#include +#include +#include #include +#include +#include +#include +#include #include "moduleengine_lua.inl" diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 1b708175ec..fa9afb165c 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -27,9 +27,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -37,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -55,37 +59,64 @@ #include #include #include +#include #include #include #include +#include #include +#include +#include #include #include #include +#include #include -#include #include #include #include +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include #include #include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include +#include #include +#include #include #include +#include +#include +#include +#include +#include +#include #ifdef WIN32 #include diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 5d880c6dd5..57ecfd78b4 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -24,25 +24,18 @@ #include #include -#include -#include #include -#include -#include -#include #include #include -#include -#include #include #include -#include #include #include #include #include #include -#include +#include +#include namespace { diff --git a/src/engine/settings.cpp b/src/engine/settings.cpp index 6aeeb00c37..6cb98eff25 100644 --- a/src/engine/settings.cpp +++ b/src/engine/settings.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include #include namespace openspace { diff --git a/src/engine/syncengine.cpp b/src/engine/syncengine.cpp index 7ae604c202..a733de2d1b 100644 --- a/src/engine/syncengine.cpp +++ b/src/engine/syncengine.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace openspace { diff --git a/src/events/event.cpp b/src/events/event.cpp index 52f43fca94..21b67eb607 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -26,14 +26,16 @@ #include #include -#include #include #include #include #include -#include #include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "EventInfo"; diff --git a/src/events/eventengine.cpp b/src/events/eventengine.cpp index 2a309fdf2b..360b4e3f6f 100644 --- a/src/events/eventengine.cpp +++ b/src/events/eventengine.cpp @@ -26,7 +26,14 @@ #include #include +#include +#include #include +#include +#include +#include +#include +#include #include "eventengine_lua.inl" diff --git a/src/events/eventengine_lua.inl b/src/events/eventengine_lua.inl index 2a42914ae0..9b9e549721 100644 --- a/src/events/eventengine_lua.inl +++ b/src/events/eventengine_lua.inl @@ -22,7 +22,11 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include +#include +#include +#include +#include namespace { diff --git a/src/interaction/actionmanager.cpp b/src/interaction/actionmanager.cpp index 0a38a410fb..bba59dfbec 100644 --- a/src/interaction/actionmanager.cpp +++ b/src/interaction/actionmanager.cpp @@ -24,15 +24,22 @@ #include +#include #include #include #include +#include #include #include +#include #include +#include #include +#include #include -#include +#include +#include +#include #include "actionmanager_lua.inl" diff --git a/src/interaction/actionmanager_lua.inl b/src/interaction/actionmanager_lua.inl index 782cabbc21..4bf5a68e9a 100644 --- a/src/interaction/actionmanager_lua.inl +++ b/src/interaction/actionmanager_lua.inl @@ -22,8 +22,10 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include +#include +#include namespace { diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index dd1c6a5bdd..c0a34b42e1 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -29,7 +29,8 @@ #include #include #include -#include +#include +#include #include namespace { diff --git a/src/interaction/keybindingmanager.cpp b/src/interaction/keybindingmanager.cpp index b437c5d82f..dd3e12a4f0 100644 --- a/src/interaction/keybindingmanager.cpp +++ b/src/interaction/keybindingmanager.cpp @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include #include "keybindingmanager_lua.inl" diff --git a/src/interaction/keybindingmanager_lua.inl b/src/interaction/keybindingmanager_lua.inl index 77deee3321..c4b0a32589 100644 --- a/src/interaction/keybindingmanager_lua.inl +++ b/src/interaction/keybindingmanager_lua.inl @@ -22,7 +22,14 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include #include +#include +#include +#include +#include +#include +#include namespace { diff --git a/src/interaction/keyframerecordinghandler.cpp b/src/interaction/keyframerecordinghandler.cpp index 9ef0d345a9..e38b87b314 100644 --- a/src/interaction/keyframerecordinghandler.cpp +++ b/src/interaction/keyframerecordinghandler.cpp @@ -24,9 +24,25 @@ #include +#include +#include #include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "keyframerecordinghandler_lua.inl" diff --git a/src/interaction/keyframerecordinghandler_lua.inl b/src/interaction/keyframerecordinghandler_lua.inl index ee8207d581..a06385a22a 100644 --- a/src/interaction/keyframerecordinghandler_lua.inl +++ b/src/interaction/keyframerecordinghandler_lua.inl @@ -23,8 +23,8 @@ ****************************************************************************************/ #include -#include #include +#include namespace { diff --git a/src/interaction/mousecamerastates.cpp b/src/interaction/mousecamerastates.cpp index 8f8e0ffa1e..86e9338735 100644 --- a/src/interaction/mousecamerastates.cpp +++ b/src/interaction/mousecamerastates.cpp @@ -26,6 +26,10 @@ #include #include +#include +#include +#include +#include namespace { constexpr double SensitivityAdjustmentIncrease = 8.0; diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 9edd16aefe..96c3181c25 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -26,9 +26,24 @@ #include #include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include namespace { template struct overloaded : Ts... { using Ts::operator()...; }; diff --git a/src/interaction/sessionrecordinghandler.cpp b/src/interaction/sessionrecordinghandler.cpp index 4f6e9c7a5c..0141639b65 100644 --- a/src/interaction/sessionrecordinghandler.cpp +++ b/src/interaction/sessionrecordinghandler.cpp @@ -28,19 +28,44 @@ #include #include #include +#include #include +#include +#include #include +#include #include +#include +#include #include #include #include #include #include +#include #include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef WIN32 #include diff --git a/src/interaction/sessionrecordinghandler_lua.inl b/src/interaction/sessionrecordinghandler_lua.inl index 43a770e2da..518aac5780 100644 --- a/src/interaction/sessionrecordinghandler_lua.inl +++ b/src/interaction/sessionrecordinghandler_lua.inl @@ -22,7 +22,13 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include #include +#include +#include +#include +#include +#include namespace { diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index 60dc0130a0..bc1de89f7f 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -23,16 +23,13 @@ ****************************************************************************************/ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "ConvertRecFormatTask"; diff --git a/src/interaction/websocketcamerastates.cpp b/src/interaction/websocketcamerastates.cpp index a0c679120f..a1afdc4dbd 100644 --- a/src/interaction/websocketcamerastates.cpp +++ b/src/interaction/websocketcamerastates.cpp @@ -24,6 +24,7 @@ #include +#include #include #include diff --git a/src/mission/mission.cpp b/src/mission/mission.cpp index 307030c2da..a399bf86e5 100644 --- a/src/mission/mission.cpp +++ b/src/mission/mission.cpp @@ -24,13 +24,22 @@ #include - #include +#include #include #include #include +#include +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include namespace { struct [[codegen::Dictionary(MissionPhase)]] Parameters { diff --git a/src/mission/missionmanager.cpp b/src/mission/missionmanager.cpp index d107441528..280227f410 100644 --- a/src/mission/missionmanager.cpp +++ b/src/mission/missionmanager.cpp @@ -24,9 +24,14 @@ #include +#include #include #include +#include +#include #include +#include +#include #include "missionmanager_lua.inl" diff --git a/src/mission/missionmanager_lua.inl b/src/mission/missionmanager_lua.inl index 870682e302..7615ffbf37 100644 --- a/src/mission/missionmanager_lua.inl +++ b/src/mission/missionmanager_lua.inl @@ -22,8 +22,10 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include #include +#include +#include +#include // Load mission phases from file. [[codegen::luawrap]] void loadMission(ghoul::Dictionary mission) { diff --git a/src/navigation/keyframenavigator.cpp b/src/navigation/keyframenavigator.cpp index 86a2e2e796..ab96db4cb9 100644 --- a/src/navigation/keyframenavigator.cpp +++ b/src/navigation/keyframenavigator.cpp @@ -27,10 +27,14 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include namespace openspace::interaction { diff --git a/src/navigation/navigationhandler.cpp b/src/navigation/navigationhandler.cpp index 5c898bc5f9..bd25feb15a 100644 --- a/src/navigation/navigationhandler.cpp +++ b/src/navigation/navigationhandler.cpp @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -40,14 +40,27 @@ #include #include #include +#include #include #include #include -#include +#include +#include +#include +#include #include +#include #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "navigationhandler_lua.inl" diff --git a/src/navigation/navigationhandler_lua.inl b/src/navigation/navigationhandler_lua.inl index 9e2582b051..9b88cacf7e 100644 --- a/src/navigation/navigationhandler_lua.inl +++ b/src/navigation/navigationhandler_lua.inl @@ -22,8 +22,25 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { @@ -603,7 +620,7 @@ struct [[codegen::Dictionary(JoystickAxis)]] JoystickAxis { try { global::navigationHandler->orbitalNavigator().triggerIdleBehavior(choice); } - catch (ghoul::RuntimeError& e) { + catch (const ghoul::RuntimeError& e) { throw ghoul::lua::LuaError(e.message); } } @@ -626,8 +643,8 @@ struct [[codegen::Dictionary(JoystickAxis)]] JoystickAxis { [[codegen::luawrap]] double distanceToFocus() { using namespace openspace; - const SceneGraphNode * focus = global::navigationHandler->anchorNode(); - Camera * camera = global::navigationHandler->camera(); + const SceneGraphNode* focus = global::navigationHandler->anchorNode(); + Camera* camera = global::navigationHandler->camera(); return glm::distance(camera->positionVec3(), focus->worldPosition()); } diff --git a/src/navigation/navigationstate.cpp b/src/navigation/navigationstate.cpp index d29b369783..aca960fd2d 100644 --- a/src/navigation/navigationstate.cpp +++ b/src/navigation/navigationstate.cpp @@ -25,10 +25,16 @@ #include #include -#include +#include #include #include #include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "NavigationState"; diff --git a/src/navigation/orbitalnavigator.cpp b/src/navigation/orbitalnavigator.cpp index bc4a6457b3..a042ac9515 100644 --- a/src/navigation/orbitalnavigator.cpp +++ b/src/navigation/orbitalnavigator.cpp @@ -24,22 +24,34 @@ #include +#include #include #include #include +#include #include #include -#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include #include +#include #include -#include +#include #include +#include #include +#include +#include +#include #include #include "orbitalnavigator_lua.inl" diff --git a/src/navigation/orbitalnavigator_lua.inl b/src/navigation/orbitalnavigator_lua.inl index 69acf26899..f866bbd231 100644 --- a/src/navigation/orbitalnavigator_lua.inl +++ b/src/navigation/orbitalnavigator_lua.inl @@ -22,6 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include + namespace { /** diff --git a/src/navigation/path.cpp b/src/navigation/path.cpp index d93a765b45..d30d7d09ee 100644 --- a/src/navigation/path.cpp +++ b/src/navigation/path.cpp @@ -25,18 +25,34 @@ #include #include +#include #include #include -#include +#include #include #include #include +#include +#include #include #include #include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "Path"; diff --git a/src/navigation/pathcurve.cpp b/src/navigation/pathcurve.cpp index d0b97d7b76..385194ba99 100644 --- a/src/navigation/pathcurve.cpp +++ b/src/navigation/pathcurve.cpp @@ -27,7 +27,14 @@ #include #include #include +#include +#include #include +#include +#include +#include +#include +#include #include namespace { diff --git a/src/navigation/pathcurves/avoidcollisioncurve.cpp b/src/navigation/pathcurves/avoidcollisioncurve.cpp index f0eeb58512..4791706f30 100644 --- a/src/navigation/pathcurves/avoidcollisioncurve.cpp +++ b/src/navigation/pathcurves/avoidcollisioncurve.cpp @@ -26,13 +26,18 @@ #include #include +#include #include #include #include #include +#include #include #include #include +#include +#include +#include #include namespace { @@ -73,7 +78,7 @@ AvoidCollisionCurve::AvoidCollisionCurve(const Waypoint& start, const Waypoint& // Note that the factor 2.0 is arbitrarily chosen to look ok. // @TODO: (2022-02-27, emmbr) Should be unified to a "getting close to object sphere" // that can be used in multiple cases when creating paths more cleverly later on - const double closeToNodeThresholdFactor = glm::max( + const double closeToNodeThresholdFactor = std::max( CloseToNodeThresholdRadiusMultiplier, 2.0 * global::navigationHandler->pathNavigator().arrivalDistanceFactor() ); diff --git a/src/navigation/pathcurves/zoomoutoverviewcurve.cpp b/src/navigation/pathcurves/zoomoutoverviewcurve.cpp index 0a9dbbbcd4..4e7d698098 100644 --- a/src/navigation/pathcurves/zoomoutoverviewcurve.cpp +++ b/src/navigation/pathcurves/zoomoutoverviewcurve.cpp @@ -26,9 +26,10 @@ #include #include +#include #include #include -#include +#include #include namespace { diff --git a/src/navigation/pathnavigator.cpp b/src/navigation/pathnavigator.cpp index 1ed2ce0d0f..70ea2cf382 100644 --- a/src/navigation/pathnavigator.cpp +++ b/src/navigation/pathnavigator.cpp @@ -26,10 +26,13 @@ #include #include +#include #include #include +#include #include #include +#include #include #include #include @@ -39,7 +42,10 @@ #include #include #include -#include +#include +#include +#include +#include #include "pathnavigator_lua.inl" diff --git a/src/navigation/pathnavigator_lua.inl b/src/navigation/pathnavigator_lua.inl index b931699967..17c9a3beb1 100644 --- a/src/navigation/pathnavigator_lua.inl +++ b/src/navigation/pathnavigator_lua.inl @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include namespace { diff --git a/src/navigation/waypoint.cpp b/src/navigation/waypoint.cpp index 297cd39044..a4ac50a6e8 100644 --- a/src/navigation/waypoint.cpp +++ b/src/navigation/waypoint.cpp @@ -31,13 +31,74 @@ #include #include #include +#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "Waypoint"; constexpr float LengthEpsilon = 1e-5f; constexpr const char* SunIdentifier = "Sun"; + + // Compute a target position close to the specified target node, using knowledge of + // the start point and a desired distance from the node's center + glm::dvec3 computeGoodStepDirection(const openspace::SceneGraphNode* targetNode, + const openspace::interaction::Waypoint& startPoint) + { + using namespace openspace; + using namespace openspace::interaction; + + const glm::dvec3 nodePos = targetNode->worldPosition(); + const SceneGraphNode* sun = sceneGraphNode(SunIdentifier); + const SceneGraphNode* closeNode = PathNavigator::findNodeNearTarget(targetNode); + + // @TODO (2021-07-09, emmbr): Not nice to depend on a specific scene graph node, + // as it might not exist. Ideally, each SGN could know about their preferred + // direction to be viewed from (their "good side"), and then that could be queried + // and used instead. + if (closeNode) { + // If the node is close to another node in the scene, set the direction in a + // way that minimizes risk of collision + return glm::normalize(nodePos - closeNode->worldPosition()); + } + else if (!sun) { + // Can't compute position from Sun position, so just use any direction + return glm::dvec3(0.0, 0.0, 1.0); + } + else if (targetNode->identifier() == SunIdentifier) { + // Special case for when the target is the Sun, in which we want to avoid a + // zero vector. The Z axis is chosen to provide an overview of the solar + // system, and not stay in the orbital plane + return glm::dvec3(0.0, 0.0, 1.0); + } + else { + // Go to a point that is lit by the Sun, slightly offsett from sun direction + const glm::dvec3 sunPos = sun->worldPosition(); + + const glm::dvec3 prevPos = startPoint.position(); + const glm::dvec3 targetToPrev = prevPos - nodePos; + const glm::dvec3 targetToSun = sunPos - nodePos; + + // Check against zero vectors, as this will lead to nan-values from the + // cross product + if (glm::length(targetToSun) < LengthEpsilon || + glm::length(targetToPrev) < LengthEpsilon) + { + // Same situation as if sun does not exist. Any direction will do + return glm::dvec3(0.0, 0.0, 1.0); + } + + constexpr float defaultPositionOffsetAngle = -30.f; // degrees + constexpr float angle = glm::radians(defaultPositionOffsetAngle); + const glm::dvec3 axis = glm::normalize(glm::cross(targetToPrev, targetToSun)); + const glm::dquat offsetRotation = angleAxis(static_cast(angle), axis); + + return glm::normalize(offsetRotation * targetToSun); + } + } } // namespace namespace openspace::interaction { @@ -117,59 +178,6 @@ Waypoint waypointFromCamera() { return Waypoint{ pos, rot, node }; } -// Compute a target position close to the specified target node, using knowledge of -// the start point and a desired distance from the node's center -glm::dvec3 computeGoodStepDirection(const SceneGraphNode* targetNode, - const Waypoint& startPoint) -{ - const glm::dvec3 nodePos = targetNode->worldPosition(); - const SceneGraphNode* sun = sceneGraphNode(SunIdentifier); - const SceneGraphNode* closeNode = PathNavigator::findNodeNearTarget(targetNode); - - // @TODO (2021-07-09, emmbr): Not nice to depend on a specific scene graph node, - // as it might not exist. Ideally, each SGN could know about their preferred - // direction to be viewed from (their "good side"), and then that could be queried - // and used instead. - if (closeNode) { - // If the node is close to another node in the scene, set the direction in a way - // that minimizes risk of collision - return glm::normalize(nodePos - closeNode->worldPosition()); - } - else if (!sun) { - // Can't compute position from Sun position, so just use any direction. Z will do - return glm::dvec3(0.0, 0.0, 1.0); - } - else if (targetNode->identifier() == SunIdentifier) { - // Special case for when the target is the Sun, in which we want to avoid a zero - // vector. The Z axis is chosen to provide an overview of the solar system, and - // not stay in the orbital plane - return glm::dvec3(0.0, 0.0, 1.0); - } - else { - // Go to a point that is lit up by the sun, slightly offsetted from sun direction - const glm::dvec3 sunPos = sun->worldPosition(); - - const glm::dvec3 prevPos = startPoint.position(); - const glm::dvec3 targetToPrev = prevPos - nodePos; - const glm::dvec3 targetToSun = sunPos - nodePos; - - // Check against zero vectors, as this will lead to nan-values from cross product - if (glm::length(targetToSun) < LengthEpsilon || - glm::length(targetToPrev) < LengthEpsilon) - { - // Same situation as if sun does not exist. Any direction will do - return glm::dvec3(0.0, 0.0, 1.0); - } - - constexpr float defaultPositionOffsetAngle = -30.f; // degrees - constexpr float angle = glm::radians(defaultPositionOffsetAngle); - const glm::dvec3 axis = glm::normalize(glm::cross(targetToPrev, targetToSun)); - const glm::dquat offsetRotation = angleAxis(static_cast(angle), axis); - - return glm::normalize(offsetRotation * targetToSun); - } -} - Waypoint computeWaypointFromNodeInfo(const NodeCameraStateSpec& spec, const std::optional& startPoint, bool useLinear) diff --git a/src/network/messagestructures.cpp b/src/network/messagestructures.cpp new file mode 100644 index 0000000000..03e0cd5d7c --- /dev/null +++ b/src/network/messagestructures.cpp @@ -0,0 +1,431 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * Permission is hereby 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 + +namespace openspace::datamessagestructures { + +CameraKeyframe::CameraKeyframe(const std::vector& buffer) { + deserialize(buffer); +} + +CameraKeyframe::CameraKeyframe(glm::dvec3 pos, glm::dquat rot, std::string focusNode, + bool followNodeRot, float scale) + : _position(pos) + , _rotation(rot) + , _followNodeRotation(followNodeRot) + , _focusNode(focusNode) + , _scale(scale) +{} + +void CameraKeyframe::serialize(std::vector& buffer) const { + // Add position + buffer.insert( + buffer.end(), + reinterpret_cast(&_position), + reinterpret_cast(&_position) + sizeof(_position) + ); + + // Add orientation + buffer.insert( + buffer.end(), + reinterpret_cast(&_rotation), + reinterpret_cast(&_rotation) + sizeof(_rotation) + ); + + // Follow focus node rotation? + buffer.insert( + buffer.end(), + reinterpret_cast(&_followNodeRotation), + reinterpret_cast(&_followNodeRotation) + + sizeof(_followNodeRotation) + ); + + uint32_t nodeNameLength = static_cast(_focusNode.size()); + + // Add focus node + buffer.insert( + buffer.end(), + reinterpret_cast(&nodeNameLength), + reinterpret_cast(&nodeNameLength) + sizeof(uint32_t) + ); + buffer.insert( + buffer.end(), + _focusNode.data(), + _focusNode.data() + nodeNameLength + ); + + buffer.insert( + buffer.end(), + reinterpret_cast(&_scale), + reinterpret_cast(&_scale) + sizeof(_scale) + ); + + // Add timestamp + buffer.insert( + buffer.end(), + reinterpret_cast(&_timestamp), + reinterpret_cast(&_timestamp) + sizeof(_timestamp) + ); +} + +size_t CameraKeyframe::deserialize(const std::vector& buffer, size_t offset) { + int size = 0; + + // Position + size = sizeof(_position); + std::memcpy(glm::value_ptr(_position), buffer.data() + offset, size); + offset += size; + + // Orientation + size = sizeof(_rotation); + std::memcpy(glm::value_ptr(_rotation), buffer.data() + offset, size); + offset += size; + + // Follow focus node rotation? + size = sizeof(_followNodeRotation); + std::memcpy(&_followNodeRotation, buffer.data() + offset, size); + offset += size; + + // Focus node + int nodeNameLength; + size = sizeof(int); + std::memcpy(&nodeNameLength, buffer.data() + offset, size); + offset += size; + size = nodeNameLength; + _focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size); + offset += size; + + // Scale + size = sizeof(_scale); + std::memcpy(&_scale, buffer.data() + offset, size); + offset += size; + + // Timestamp + size = sizeof(_timestamp); + std::memcpy(&_timestamp, buffer.data() + offset, size); + offset += size; + + return offset; +} + +void CameraKeyframe::write(std::ostream& out) const { + 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( + reinterpret_cast(&_followNodeRotation), + sizeof(_followNodeRotation) + ); + + int nodeNameLength = static_cast(_focusNode.size()); + + // Write focus node + out.write(reinterpret_cast(&nodeNameLength), sizeof(nodeNameLength)); + out.write(_focusNode.c_str(), _focusNode.size()); + + // Write scale + out.write(reinterpret_cast(&_scale), sizeof(_scale)); + + // Write timestamp + out.write(reinterpret_cast(&_timestamp), sizeof(_timestamp)); +} + +void CameraKeyframe::write(std::stringstream& out) const { + // Add camera position + out << std::setprecision(std::numeric_limits::max_digits10); + out << _position.x << ' ' << _position.y << ' ' << _position.z << ' '; + // Add camera rotation + out << _rotation.x << ' ' + << _rotation.y << ' ' + << _rotation.z << ' ' + << _rotation.w << ' '; + out << std::scientific << _scale << ' '; + if (_followNodeRotation) { + out << "F "; + } + else { + out << "- "; + } + out << _focusNode; +} + +void CameraKeyframe::read(std::istream* in) { + // Read position + in->read(reinterpret_cast(&_position), sizeof(_position)); + + // Read orientation + in->read(reinterpret_cast(&_rotation), sizeof(_rotation)); + + // Read follow focus node rotation + unsigned char b; + in->read(reinterpret_cast(&b), sizeof(unsigned char)); + _followNodeRotation = (b == 1); + + // Read focus node + int nodeNameLength = static_cast(_focusNode.size()); + in->read(reinterpret_cast(&nodeNameLength), sizeof(nodeNameLength)); + std::vector temp(static_cast(nodeNameLength) + 1); + in->read(temp.data(), nodeNameLength); + + temp[nodeNameLength] = '\0'; + _focusNode = temp.data(); + + // Read scale + in->read(reinterpret_cast(&_scale), sizeof(_scale)); + + // Read timestamp + in->read(reinterpret_cast(&_timestamp), sizeof(_timestamp)); +} + +void CameraKeyframe::read(std::istringstream& iss) { + std::string rotationFollowing; + + iss >> _position.x + >> _position.y + >> _position.z + >> _rotation.x + >> _rotation.y + >> _rotation.z + >> _rotation.w + >> _scale + >> rotationFollowing + >> _focusNode; + _followNodeRotation = (rotationFollowing == "F"); +} + +TimeKeyframe::TimeKeyframe(const std::vector& buffer) { + deserialize(buffer); +} + +void TimeKeyframe::serialize(std::vector& buffer) const { + buffer.insert( + buffer.end(), + reinterpret_cast(this), + reinterpret_cast(this) + sizeof(TimeKeyframe) + ); +} + +size_t TimeKeyframe::deserialize(const std::vector& buffer, size_t offset) { + *this = *reinterpret_cast(buffer.data() + offset); + offset += sizeof(TimeKeyframe); + return offset; +} + +void TimeKeyframe::write(std::ostream* out) const { + out->write(reinterpret_cast(this), sizeof(TimeKeyframe)); +} + +void TimeKeyframe::write(std::stringstream& out) const { + out << ' ' << _dt; + if (_paused) { + out << " P"; + } + else { + out << " R"; + } + if (_requiresTimeJump) { + out << " J"; + } + else { + out << " -"; + } +} + +void TimeKeyframe::read(std::istream* in) { + in->read(reinterpret_cast(this), sizeof(TimeKeyframe)); +} + +void TimeKeyframe::read(std::istringstream& iss) { + std::string paused, jump; + + iss >> _dt + >> paused + >> jump; + _paused = (paused == "P"); + _requiresTimeJump = (jump == "J"); +} + +TimeTimeline::TimeTimeline(const std::vector& buffer) { + deserialize(buffer); +} + +void TimeTimeline::serialize(std::vector& buffer) const { + buffer.insert( + buffer.end(), + reinterpret_cast(&_clear), + reinterpret_cast(&_clear) + sizeof(bool) + ); + + int64_t nKeyframes = _keyframes.size(); + buffer.insert( + buffer.end(), + reinterpret_cast(&nKeyframes), + reinterpret_cast(&nKeyframes) + sizeof(int64_t) + ); + for (const TimeKeyframe& k : _keyframes) { + k.serialize(buffer); + } +} + +size_t TimeTimeline::deserialize(const std::vector& buffer, size_t offset) { + int size = 0; + + size = sizeof(_clear); + std::memcpy(&_clear, buffer.data() + offset, size); + offset += size; + + int64_t nKeyframes = _keyframes.size(); + size = sizeof(nKeyframes); + std::memcpy(&nKeyframes, buffer.data() + offset, size); + offset += size; + + _keyframes.resize(nKeyframes); + for (TimeKeyframe& k : _keyframes) { + offset = k.deserialize(buffer, offset); + } + return offset; +} + +void TimeTimeline::write(std::ostream* out) const { + out->write(reinterpret_cast(&_clear), sizeof(bool)); + + int64_t nKeyframes = _keyframes.size(); + out->write(reinterpret_cast(&nKeyframes), sizeof(int64_t)); + for (const TimeKeyframe& k : _keyframes) { + k.write(out); + } +} + +void TimeTimeline::read(std::istream* in) { + in->read(reinterpret_cast(&_clear), sizeof(bool)); + + int64_t nKeyframes = _keyframes.size(); + in->read(reinterpret_cast(&nKeyframes), sizeof(int64_t)); + for (TimeKeyframe& k : _keyframes) { + k.read(in); + } +} + +void ScriptMessage::serialize(std::vector& buffer) const { + uint32_t strLen = static_cast(_script.size()); + + const char* p = reinterpret_cast(&strLen); + buffer.insert(buffer.end(), p, p + sizeof(uint32_t)); + + buffer.insert(buffer.end(), _script.begin(), _script.end()); +} + +void ScriptMessage::deserialize(const std::vector& buffer) { + const char* p = buffer.data(); + const uint32_t len = *reinterpret_cast(p); + + if (buffer.size() != (sizeof(uint32_t) + len)) { + LERRORC( + "ParallelPeer", + std::format( + "Received buffer with wrong size. Expected {} got {}", + len, buffer.size() + ) + ); + return; + } + + // We can skip over the first uint32_t that encoded the length + _script.assign(buffer.begin() + sizeof(uint32_t), buffer.end()); +} + +void ScriptMessage::write(std::ostream* out) const { + out->write(_script.c_str(), _script.size()); +} + +void ScriptMessage::write(unsigned char* buf, size_t& idx, std::ofstream& file) const { + size_t strLen = _script.size(); + size_t writeSize_bytes = sizeof(size_t); + + unsigned char const* p = reinterpret_cast(&strLen); + memcpy((buf + idx), p, writeSize_bytes); + idx += static_cast(writeSize_bytes); + + memcpy((buf + idx), _script.c_str(), _script.size()); + idx += static_cast(strLen); + file.write(reinterpret_cast(buf), idx); + //Write directly to file because some scripts can be very long + file.write(_script.c_str(), _script.size()); +} + +void ScriptMessage::write(std::stringstream& ss) const { + unsigned int numLinesInScript = static_cast( + std::count(_script.begin(), _script.end(), '\n') + ); + ss << ' ' << (numLinesInScript + 1) << ' '; + ss << _script; +} + +void ScriptMessage::read(std::istream* in) { + uint32_t strLen = 0; + //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 ScriptMessage::read(std::istringstream& iss) { + int numScriptLines; + iss >> numScriptLines; + if (numScriptLines < 0) { + numScriptLines = 0; + } + std::string tmpReadbackScript; + _script.erase(); + for (int i = 0; i < numScriptLines; i++) { + ghoul::getline(iss, tmpReadbackScript); + size_t start = tmpReadbackScript.find_first_not_of(" "); + tmpReadbackScript = tmpReadbackScript.substr(start); + _script.append(tmpReadbackScript); + if (i < (numScriptLines - 1)) { + _script.append("\n"); + } + } +} + +} // namespace openspace::datamessagestructures diff --git a/src/network/messagestructureshelper.cpp b/src/network/messagestructureshelper.cpp index a01c4cb3c5..3a79ab6ecb 100644 --- a/src/network/messagestructureshelper.cpp +++ b/src/network/messagestructureshelper.cpp @@ -29,9 +29,11 @@ #include #include #include +#include #include #include #include +#include namespace openspace::datamessagestructures { diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index da33d434a2..ed073ef905 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "ParallelConnection"; diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index c8a8bf2b1d..39726b705b 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -32,13 +32,21 @@ #include #include #include +#include #include +#include #include #include +#include #include #include #include #include +#include +#include +#include +#include +#include #include "parallelpeer_lua.inl" @@ -164,7 +172,7 @@ void ParallelPeer::connect() { auto socket = std::make_unique( _address, - atoi(_port.value().c_str()) + std::atoi(_port.value().c_str()) ); socket->connect(); @@ -218,7 +226,7 @@ void ParallelPeer::sendAuthentication() { passwordSize + // password sizeof(uint16_t) + // host password length hostPasswordSize + // host password - sizeof(uint8_t) + // server name length + sizeof(uint8_t) + // server name length serverNameSize + // server name sizeof(uint8_t) + // name length nameLength; // name @@ -309,7 +317,6 @@ double ParallelPeer::convertTimestamp(double messageTimestamp) { return messageTimestamp + _initialTimeDiff + _bufferTime; } - double ParallelPeer::latencyStandardDeviation() const { double accumulatedLatencyDiffSquared = 0; double accumulatedLatencyDiff = 0; diff --git a/src/network/parallelpeer_lua.inl b/src/network/parallelpeer_lua.inl index d4a2a8c0b0..b78f028b84 100644 --- a/src/network/parallelpeer_lua.inl +++ b/src/network/parallelpeer_lua.inl @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include namespace { diff --git a/src/properties/matrix/dmat2property.cpp b/src/properties/matrix/dmat2property.cpp index 5ae02718ba..bbbcb60c3b 100644 --- a/src/properties/matrix/dmat2property.cpp +++ b/src/properties/matrix/dmat2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/matrix/dmat3property.cpp b/src/properties/matrix/dmat3property.cpp index 6cb874ebc4..5a42adaa7a 100644 --- a/src/properties/matrix/dmat3property.cpp +++ b/src/properties/matrix/dmat3property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/matrix/dmat4property.cpp b/src/properties/matrix/dmat4property.cpp index 03a1ab3720..b571343615 100644 --- a/src/properties/matrix/dmat4property.cpp +++ b/src/properties/matrix/dmat4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat2property.cpp b/src/properties/matrix/mat2property.cpp index ef1c476541..66770d958a 100644 --- a/src/properties/matrix/mat2property.cpp +++ b/src/properties/matrix/mat2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat3property.cpp b/src/properties/matrix/mat3property.cpp index 11383c15e7..24fbcf7ec5 100644 --- a/src/properties/matrix/mat3property.cpp +++ b/src/properties/matrix/mat3property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/matrix/mat4property.cpp b/src/properties/matrix/mat4property.cpp index 63bb4ae16a..7ed3a13c25 100644 --- a/src/properties/matrix/mat4property.cpp +++ b/src/properties/matrix/mat4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/misc/optionproperty.cpp b/src/properties/misc/optionproperty.cpp index f652a6646f..9d53311769 100644 --- a/src/properties/misc/optionproperty.cpp +++ b/src/properties/misc/optionproperty.cpp @@ -27,7 +27,6 @@ #include #include #include -#include namespace { constexpr std::string_view _loggerCat = "OptionProperty"; diff --git a/src/properties/misc/selectionproperty.cpp b/src/properties/misc/selectionproperty.cpp index 3472bb1afe..7804fd2f4e 100644 --- a/src/properties/misc/selectionproperty.cpp +++ b/src/properties/misc/selectionproperty.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace { constexpr std::string_view _loggerCat = "SelectionProperty"; diff --git a/src/properties/property.cpp b/src/properties/property.cpp index a2f1b9c1cb..2c5b699e64 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -25,11 +25,11 @@ #include #include +#include #include #include -#include -#include #include +#include namespace openspace::properties { diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 1b9f13f3d3..35867cfd32 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -31,10 +31,12 @@ #include #include #include -#include +#include #include +#include #include -#include +#include +#include namespace { constexpr std::string_view _loggerCat = "PropertyOwner"; diff --git a/src/properties/scalar/doubleproperty.cpp b/src/properties/scalar/doubleproperty.cpp index 55cfb79135..10ff4caa97 100644 --- a/src/properties/scalar/doubleproperty.cpp +++ b/src/properties/scalar/doubleproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/floatproperty.cpp b/src/properties/scalar/floatproperty.cpp index ee5f51dc21..dbf48bddaf 100644 --- a/src/properties/scalar/floatproperty.cpp +++ b/src/properties/scalar/floatproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/intproperty.cpp b/src/properties/scalar/intproperty.cpp index 1199d1e150..86f4da931e 100644 --- a/src/properties/scalar/intproperty.cpp +++ b/src/properties/scalar/intproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/longproperty.cpp b/src/properties/scalar/longproperty.cpp index 2db967a6d1..97a388dc2a 100644 --- a/src/properties/scalar/longproperty.cpp +++ b/src/properties/scalar/longproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/shortproperty.cpp b/src/properties/scalar/shortproperty.cpp index 2c370c14f9..e54afe79f4 100644 --- a/src/properties/scalar/shortproperty.cpp +++ b/src/properties/scalar/shortproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/uintproperty.cpp b/src/properties/scalar/uintproperty.cpp index b8bec87104..ef111adf3d 100644 --- a/src/properties/scalar/uintproperty.cpp +++ b/src/properties/scalar/uintproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/ulongproperty.cpp b/src/properties/scalar/ulongproperty.cpp index 8f26cf3f0f..42a52b8d0f 100644 --- a/src/properties/scalar/ulongproperty.cpp +++ b/src/properties/scalar/ulongproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/scalar/ushortproperty.cpp b/src/properties/scalar/ushortproperty.cpp index 25f4107ef4..4849f938dd 100644 --- a/src/properties/scalar/ushortproperty.cpp +++ b/src/properties/scalar/ushortproperty.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/dvec2property.cpp b/src/properties/vector/dvec2property.cpp index ef70c7ad58..6b383db8b2 100644 --- a/src/properties/vector/dvec2property.cpp +++ b/src/properties/vector/dvec2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/dvec3property.cpp b/src/properties/vector/dvec3property.cpp index 7659198529..eb96491be4 100644 --- a/src/properties/vector/dvec3property.cpp +++ b/src/properties/vector/dvec3property.cpp @@ -25,7 +25,6 @@ #include #include -#include namespace openspace::properties { diff --git a/src/properties/vector/dvec4property.cpp b/src/properties/vector/dvec4property.cpp index 2e97823072..287c4d7959 100644 --- a/src/properties/vector/dvec4property.cpp +++ b/src/properties/vector/dvec4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec2property.cpp b/src/properties/vector/ivec2property.cpp index 6c014b56aa..4ba64a895c 100644 --- a/src/properties/vector/ivec2property.cpp +++ b/src/properties/vector/ivec2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec3property.cpp b/src/properties/vector/ivec3property.cpp index 0acdf215e7..dfbd96af80 100644 --- a/src/properties/vector/ivec3property.cpp +++ b/src/properties/vector/ivec3property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/ivec4property.cpp b/src/properties/vector/ivec4property.cpp index ef2d6c5c75..214c9d620a 100644 --- a/src/properties/vector/ivec4property.cpp +++ b/src/properties/vector/ivec4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec2property.cpp b/src/properties/vector/uvec2property.cpp index c65f967715..f2f56bd665 100644 --- a/src/properties/vector/uvec2property.cpp +++ b/src/properties/vector/uvec2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec3property.cpp b/src/properties/vector/uvec3property.cpp index 02c4bc98fd..15bbbe3902 100644 --- a/src/properties/vector/uvec3property.cpp +++ b/src/properties/vector/uvec3property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/uvec4property.cpp b/src/properties/vector/uvec4property.cpp index 8d7f9b285a..70acb038f7 100644 --- a/src/properties/vector/uvec4property.cpp +++ b/src/properties/vector/uvec4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec2property.cpp b/src/properties/vector/vec2property.cpp index b2dc52ec36..8ba77d9d3d 100644 --- a/src/properties/vector/vec2property.cpp +++ b/src/properties/vector/vec2property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec3property.cpp b/src/properties/vector/vec3property.cpp index 1d4ced192c..348be4cd4f 100644 --- a/src/properties/vector/vec3property.cpp +++ b/src/properties/vector/vec3property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/properties/vector/vec4property.cpp b/src/properties/vector/vec4property.cpp index 50716424fd..1bfd2234f6 100644 --- a/src/properties/vector/vec4property.cpp +++ b/src/properties/vector/vec4property.cpp @@ -24,7 +24,6 @@ #include -#include #include namespace openspace::properties { diff --git a/src/query/query.cpp b/src/query/query.cpp index 6144197c3b..9f7cf9aa29 100644 --- a/src/query/query.cpp +++ b/src/query/query.cpp @@ -26,8 +26,11 @@ #include #include +#include +#include #include #include +#include namespace openspace { diff --git a/src/rendering/colormappingcomponent.cpp b/src/rendering/colormappingcomponent.cpp index c8ce3778bf..31a468330e 100644 --- a/src/rendering/colormappingcomponent.cpp +++ b/src/rendering/colormappingcomponent.cpp @@ -26,6 +26,11 @@ #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "ColorMapping"; diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index 6a56df0838..09061ef8f3 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -24,12 +24,13 @@ #include -#include #include #include #include #include #include +#include +#include #include "dashboard_lua.inl" diff --git a/src/rendering/dashboard_lua.inl b/src/rendering/dashboard_lua.inl index 59361808c5..7f7ff0f779 100644 --- a/src/rendering/dashboard_lua.inl +++ b/src/rendering/dashboard_lua.inl @@ -23,7 +23,12 @@ ****************************************************************************************/ #include +#include #include +#include +#include +#include +#include namespace { diff --git a/src/rendering/dashboarditem.cpp b/src/rendering/dashboarditem.cpp index 8b36ab6a94..928a84ccc8 100644 --- a/src/rendering/dashboarditem.cpp +++ b/src/rendering/dashboarditem.cpp @@ -26,8 +26,12 @@ #include #include +#include +#include #include #include +#include +#include namespace { constexpr std::string_view KeyType = "Type"; diff --git a/src/rendering/dashboardtextitem.cpp b/src/rendering/dashboardtextitem.cpp index a260987b32..089535c70e 100644 --- a/src/rendering/dashboardtextitem.cpp +++ b/src/rendering/dashboardtextitem.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include namespace { diff --git a/src/rendering/deferredcaster.cpp b/src/rendering/deferredcaster.cpp new file mode 100644 index 0000000000..ae9fc24a46 --- /dev/null +++ b/src/rendering/deferredcaster.cpp @@ -0,0 +1,37 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * Permission is hereby 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 { + +void Deferredcaster::preRaycast(const RenderData&, const DeferredcastData&, + ghoul::opengl::ProgramObject&) +{} + +void Deferredcaster::postRaycast(const RenderData&, const DeferredcastData&, + ghoul::opengl::ProgramObject&) +{} + +} // namespace openspace diff --git a/src/rendering/framebufferrenderer.cpp b/src/rendering/framebufferrenderer.cpp index 52cf0de035..77459188f4 100644 --- a/src/rendering/framebufferrenderer.cpp +++ b/src/rendering/framebufferrenderer.cpp @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -37,13 +39,19 @@ #include #include #include +#include #include #include #include #include #include #include +#include +#include +#include #include +#include +#include #include namespace { @@ -510,8 +518,8 @@ void FramebufferRenderer::updateDownscaleTextures() const { GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, - static_cast(glm::max(_resolution.x * cdf, 1.f)), - static_cast(glm::max(_resolution.y * cdf, 1.f)), + static_cast(std::max(_resolution.x * cdf, 1.f)), + static_cast(std::max(_resolution.y * cdf, 1.f)), 0, GL_DEPTH_COMPONENT, GL_FLOAT, diff --git a/src/rendering/helper.cpp b/src/rendering/helper.cpp index 3dbbfb4b9e..9de292522c 100644 --- a/src/rendering/helper.cpp +++ b/src/rendering/helper.cpp @@ -24,20 +24,22 @@ #include -#include #include #include #include #include -#include +#include #include #include #include #include +#include +#include +#include #include #include +#include #include -#include namespace { @@ -613,7 +615,7 @@ std::vector convert(std::vector v) { return result; } -Vertex computeCircleVertex(int i, int nSegments, float radius, +static Vertex computeCircleVertex(int i, int nSegments, float radius, const glm::vec4& color = glm::vec4(1.f)) { const float fsegments = static_cast(nSegments); @@ -712,10 +714,10 @@ VertexIndexListCombo createSphere(int nSegments, glm::vec3 radii, return { vertices, indices }; } -VertexIndexListCombo createConicalCylinder(unsigned int nSegments, - float bottomRadius, - float topRadius, - float height) +static VertexIndexListCombo createConicalCylinder(unsigned int nSegments, + float bottomRadius, + float topRadius, + float height) { // Create a ring for the top and bottom vertices (XY plane) std::vector bottomVertices = createRingXYZ(nSegments, bottomRadius); diff --git a/src/rendering/labelscomponent.cpp b/src/rendering/labelscomponent.cpp index 51a23b0cc2..041cb6a2c7 100644 --- a/src/rendering/labelscomponent.cpp +++ b/src/rendering/labelscomponent.cpp @@ -32,7 +32,9 @@ #include #include #include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "LabelsComponent"; diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index 0c3731b6fd..e1629fe034 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -37,14 +37,18 @@ #include #include #include +#include #include #include #include #include -#include +#include +#include +#include #include #include #include +#include namespace { constexpr float LoadingFontSize = 25.f; diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index beee7fc4cb..88381c0d78 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -35,12 +35,17 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include #include #include +#include namespace { constexpr std::string_view HistoryFile = "ConsoleHistory"; @@ -321,8 +326,8 @@ bool LuaConsole::keyboardCallback(Key key, KeyModifier modifier, KeyAction actio return false; } - const bool modifierShift = (modifier == KeyModifier::Shift); - const bool modifierControl = (modifier == KeyModifier::Control); + const bool modifierShift = hasKeyModifier(modifier, KeyModifier::Shift); + const bool modifierControl = hasKeyModifier(modifier, KeyModifier::Control); // Button left of 1 and above TAB (default) // Can be changed to any other key with the setCommandInputButton funciton diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 54413d0c2e..2a2df6b9d3 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -36,8 +35,14 @@ #include #include #include +#include +#include #include -#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view KeyType = "Type"; @@ -149,8 +154,6 @@ ghoul::mm_unique_ptr Renderable::createFromDictionary( return ghoul::mm_unique_ptr(result); } - - Renderable::Renderable(const ghoul::Dictionary& dictionary, RenderableSettings settings) : properties::PropertyOwner({ "Renderable" }) , _enabled(EnabledInfo, true) diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 73752625f7..039921f653 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -38,9 +39,11 @@ #include #include #include +#include #include -#include #include +#include +#include #include #include #include @@ -55,13 +58,24 @@ #include #include #include +#include #include +#include +#include +#include #include #include -#include #include +#include +#include +#include +#include +#include +#include +#include #include "renderengine_lua.inl" +#include namespace { constexpr std::string_view _loggerCat = "RenderEngine"; diff --git a/src/rendering/renderengine_lua.inl b/src/rendering/renderengine_lua.inl index 3662b2f69b..9cccfbc654 100644 --- a/src/rendering/renderengine_lua.inl +++ b/src/rendering/renderengine_lua.inl @@ -23,6 +23,9 @@ ****************************************************************************************/ #include +#include +#include +#include namespace { diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 094001fbc7..185c716aa7 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -35,12 +34,19 @@ #include #include #include +#include +#include #include #include #include #include +#include +#include #include #include +#include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/src/rendering/screenspacerenderableframebuffer.cpp b/src/rendering/screenspacerenderableframebuffer.cpp index e1295a082a..9cca414280 100644 --- a/src/rendering/screenspacerenderableframebuffer.cpp +++ b/src/rendering/screenspacerenderableframebuffer.cpp @@ -27,7 +27,11 @@ #include #include #include +#include +#include #include +#include +#include namespace { constexpr openspace::properties::Property::PropertyInfo SizeInfo = { diff --git a/src/rendering/screenspacerenderabletext.cpp b/src/rendering/screenspacerenderabletext.cpp index 9986ec9cf1..45ddea377a 100644 --- a/src/rendering/screenspacerenderabletext.cpp +++ b/src/rendering/screenspacerenderabletext.cpp @@ -25,13 +25,14 @@ #include #include -#include #include #include #include #include #include #include +#include +#include #include namespace { diff --git a/src/rendering/texturecomponent.cpp b/src/rendering/texturecomponent.cpp index 28a33bc450..b0d355acbc 100644 --- a/src/rendering/texturecomponent.cpp +++ b/src/rendering/texturecomponent.cpp @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TextureComponent"; diff --git a/src/rendering/transferfunction.cpp b/src/rendering/transferfunction.cpp index a872465cf1..db5862dc24 100644 --- a/src/rendering/transferfunction.cpp +++ b/src/rendering/transferfunction.cpp @@ -28,12 +28,17 @@ #include #include #include +#include #include #include +#include #include #include #include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TransferFunction"; diff --git a/src/scene/asset.cpp b/src/scene/asset.cpp index 6f2f107aaa..f815750685 100644 --- a/src/scene/asset.cpp +++ b/src/scene/asset.cpp @@ -29,12 +29,19 @@ #include #include #include +#include #include #include -#include +#include +#include +#include +#include #include #include #include +#include +#include +#include namespace openspace { diff --git a/src/scene/assetmanager.cpp b/src/scene/assetmanager.cpp index 7e1ffb5f9c..f5e9427d05 100644 --- a/src/scene/assetmanager.cpp +++ b/src/scene/assetmanager.cpp @@ -31,9 +31,17 @@ #include #include #include +#include #include +#include +#include +#include #include #include +#include +#include +#include +#include #include "assetmanager_lua.inl" diff --git a/src/scene/assetmanager_lua.inl b/src/scene/assetmanager_lua.inl index 734fde442f..b03260b798 100644 --- a/src/scene/assetmanager_lua.inl +++ b/src/scene/assetmanager_lua.inl @@ -24,6 +24,7 @@ #include #include +#include namespace { diff --git a/src/scene/lightsource.cpp b/src/scene/lightsource.cpp index e2d4fb036b..5638e1354d 100644 --- a/src/scene/lightsource.cpp +++ b/src/scene/lightsource.cpp @@ -25,14 +25,11 @@ #include #include -#include #include -#include -#include -#include #include #include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo EnabledInfo = { diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index 3a034ede25..8393f68bc0 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -32,13 +31,20 @@ #include #include #include +#include #include -#include #include +#include #include +#include #include +#include #include +#include +#include +#include #include +#include #include "profile_lua.inl" @@ -117,12 +123,12 @@ namespace { // Current version: // -void to_json(nlohmann::json& j, const Profile::Version& v) { +static void to_json(nlohmann::json& j, const Profile::Version& v) { j["major"] = v.major; j["minor"] = v.minor; } -void from_json(const nlohmann::json& j, Profile::Version& v) { +static void from_json(const nlohmann::json& j, Profile::Version& v) { checkValue(j, "major", &nlohmann::json::is_number, "version", false); checkValue(j, "minor", &nlohmann::json::is_number, "version", false); checkExtraKeys(j, "version", { "major", "minor" }); @@ -131,7 +137,7 @@ void from_json(const nlohmann::json& j, Profile::Version& v) { j["minor"].get_to(v.minor); } -void to_json(nlohmann::json& j, const Profile::Module& v) { +static void to_json(nlohmann::json& j, const Profile::Module& v) { j["name"] = v.name; if (v.loadedInstruction.has_value()) { j["loadedInstruction"] = *v.loadedInstruction; @@ -141,7 +147,7 @@ void to_json(nlohmann::json& j, const Profile::Module& v) { } } -void from_json(const nlohmann::json& j, Profile::Module& v) { +static void from_json(const nlohmann::json& j, Profile::Module& v) { checkValue(j, "name", &nlohmann::json::is_string, "module", false); checkValue(j, "loadedInstruction", &nlohmann::json::is_string, "module", true); checkValue(j, "notLoadedInstruction", &nlohmann::json::is_string, "module", true); @@ -156,7 +162,7 @@ void from_json(const nlohmann::json& j, Profile::Module& v) { } } -void to_json(nlohmann::json& j, const Profile::Meta& v) { +static void to_json(nlohmann::json& j, const Profile::Meta& v) { if (v.name.has_value()) { j["name"] = *v.name; } @@ -177,7 +183,7 @@ void to_json(nlohmann::json& j, const Profile::Meta& v) { } } -void from_json(const nlohmann::json& j, Profile::Meta& v) { +static void from_json(const nlohmann::json& j, Profile::Meta& v) { checkValue(j, "name", &nlohmann::json::is_string, "meta", true); checkValue(j, "version", &nlohmann::json::is_string, "meta", true); checkValue(j, "description", &nlohmann::json::is_string, "meta", true); @@ -210,7 +216,7 @@ void from_json(const nlohmann::json& j, Profile::Meta& v) { } } -void to_json(nlohmann::json& j, const Profile::Property::SetType& v) { +static void to_json(nlohmann::json& j, const Profile::Property::SetType& v) { j = [](Profile::Property::SetType t) { switch (t) { case Profile::Property::SetType::SetPropertyValue: @@ -223,7 +229,7 @@ void to_json(nlohmann::json& j, const Profile::Property::SetType& v) { }(v); } -void from_json(const nlohmann::json& j, Profile::Property::SetType& v) { +static void from_json(const nlohmann::json& j, Profile::Property::SetType& v) { const std::string value = j.get(); if (value == "setPropertyValue") { v = Profile::Property::SetType::SetPropertyValue; @@ -238,13 +244,13 @@ void from_json(const nlohmann::json& j, Profile::Property::SetType& v) { } } -void to_json(nlohmann::json& j, const Profile::Property& v) { +static void to_json(nlohmann::json& j, const Profile::Property& v) { j["type"] = v.setType; j["name"] = v.name; j["value"] = v.value; } -void from_json(const nlohmann::json& j, Profile::Property& v) { +static void from_json(const nlohmann::json& j, Profile::Property& v) { checkValue(j, "type", &nlohmann::json::is_string, "property", false); checkValue(j, "name", &nlohmann::json::is_string, "property", false); checkValue(j, "value", &nlohmann::json::is_string, "property", false); @@ -255,7 +261,7 @@ void from_json(const nlohmann::json& j, Profile::Property& v) { j["value"].get_to(v.value); } -void to_json(nlohmann::json& j, const Profile::Action& v) { +static void to_json(nlohmann::json& j, const Profile::Action& v) { j["identifier"] = v.identifier; j["documentation"] = v.documentation; j["name"] = v.name; @@ -264,7 +270,7 @@ void to_json(nlohmann::json& j, const Profile::Action& v) { j["script"] = v.script; } -void from_json(const nlohmann::json& j, Profile::Action& v) { +static void from_json(const nlohmann::json& j, Profile::Action& v) { checkValue(j, "identifier", &nlohmann::json::is_string, "action", false); checkValue(j, "documentation", &nlohmann::json::is_string, "action", false); checkValue(j, "name", &nlohmann::json::is_string, "action", false); @@ -285,12 +291,12 @@ void from_json(const nlohmann::json& j, Profile::Action& v) { j["script"].get_to(v.script); } -void to_json(nlohmann::json& j, const Profile::Keybinding& v) { +static void to_json(nlohmann::json& j, const Profile::Keybinding& v) { j["key"] = keyToString(v.key); j["action"] = v.action; } -void from_json(const nlohmann::json& j, Profile::Keybinding& v) { +static void from_json(const nlohmann::json& j, Profile::Keybinding& v) { checkValue(j, "key", &nlohmann::json::is_string, "keybinding", false); checkValue(j, "action", &nlohmann::json::is_string, "keybinding", false); checkExtraKeys(j, "keybinding", { "key", "action" }); @@ -299,7 +305,7 @@ void from_json(const nlohmann::json& j, Profile::Keybinding& v) { j["action"].get_to(v.action); } -void to_json(nlohmann::json& j, const Profile::Time::Type& v) { +static void to_json(nlohmann::json& j, const Profile::Time::Type& v) { j = [](Profile::Time::Type t) { switch (t) { case Profile::Time::Type::Absolute: return "absolute"; @@ -309,7 +315,7 @@ void to_json(nlohmann::json& j, const Profile::Time::Type& v) { }(v); } -void from_json(const nlohmann::json& j, Profile::Time::Type& v) { +static void from_json(const nlohmann::json& j, Profile::Time::Type& v) { const std::string value = j.get(); if (value == "absolute") { v = Profile::Time::Type::Absolute; @@ -324,13 +330,13 @@ void from_json(const nlohmann::json& j, Profile::Time::Type& v) { } } -void to_json(nlohmann::json& j, const Profile::Time& v) { +static void to_json(nlohmann::json& j, const Profile::Time& v) { j["type"] = v.type; j["value"] = v.value; j["is_paused"] = v.startPaused; } -void from_json(const nlohmann::json& j, Profile::Time& v) { +static void from_json(const nlohmann::json& j, Profile::Time& v) { checkValue(j, "type", &nlohmann::json::is_string, "time", false); checkValue(j, "value", &nlohmann::json::is_string, "time", false); checkValue(j, "is_paused", &nlohmann::json::is_boolean, "time", false); @@ -341,7 +347,7 @@ void from_json(const nlohmann::json& j, Profile::Time& v) { j["is_paused"].get_to(v.startPaused); } -void to_json(nlohmann::json& j, const Profile::CameraGoToNode& v) { +static void to_json(nlohmann::json& j, const Profile::CameraGoToNode& v) { j["type"] = Profile::CameraGoToNode::Type; j["anchor"] = v.anchor; if (v.height.has_value()) { @@ -349,7 +355,7 @@ void to_json(nlohmann::json& j, const Profile::CameraGoToNode& v) { } } -void from_json(const nlohmann::json& j, Profile::CameraGoToNode& v) { +static void from_json(const nlohmann::json& j, Profile::CameraGoToNode& v) { ghoul_assert( j.at("type").get() == Profile::CameraGoToNode::Type, "Wrong type for Camera" @@ -369,7 +375,7 @@ void from_json(const nlohmann::json& j, Profile::CameraGoToNode& v) { } } -void to_json(nlohmann::json& j, const Profile::CameraNavState& v) { +static void to_json(nlohmann::json& j, const Profile::CameraNavState& v) { j["type"] = Profile::CameraNavState::Type; j["anchor"] = v.anchor; if (v.aim.has_value()) { @@ -398,7 +404,7 @@ void to_json(nlohmann::json& j, const Profile::CameraNavState& v) { } } -void from_json(const nlohmann::json& j, Profile::CameraNavState& v) { +static void from_json(const nlohmann::json& j, Profile::CameraNavState& v) { ghoul_assert( j.at("type").get() == Profile::CameraNavState::Type, "Wrong type for Camera" @@ -455,7 +461,7 @@ void from_json(const nlohmann::json& j, Profile::CameraNavState& v) { } } -void to_json(nlohmann::json& j, const Profile::CameraGoToGeo& v) { +static void to_json(nlohmann::json& j, const Profile::CameraGoToGeo& v) { j["type"] = Profile::CameraGoToGeo::Type; j["anchor"] = v.anchor; j["latitude"] = v.latitude; @@ -465,7 +471,7 @@ void to_json(nlohmann::json& j, const Profile::CameraGoToGeo& v) { } } -void from_json(const nlohmann::json& j, Profile::CameraGoToGeo& v) { +static void from_json(const nlohmann::json& j, Profile::CameraGoToGeo& v) { ghoul_assert( j.at("type").get() == Profile::CameraGoToGeo::Type, "Wrong type for Camera" @@ -503,7 +509,7 @@ struct Keybinding { std::string script; }; -void from_json(const nlohmann::json& j, version10::Keybinding& v) { +static void from_json(const nlohmann::json& j, version10::Keybinding& v) { checkValue(j, "key", &nlohmann::json::is_string, "keybinding", false); checkValue(j, "documentation", &nlohmann::json::is_string, "keybinding", false); checkValue(j, "name", &nlohmann::json::is_string, "keybinding", false); @@ -556,7 +562,7 @@ void from_json(const nlohmann::json& j, version10::Keybinding& v) { j["script"].get_to(v.script); } -void convertVersion10to11(nlohmann::json& profile) { +static void convertVersion10to11(nlohmann::json& profile) { // Version 1.1 introduced actions and remove Lua function calling from keybindings profile["version"] = Profile::Version{ 1, 1 }; @@ -597,7 +603,7 @@ void convertVersion10to11(nlohmann::json& profile) { namespace version11 { -void convertVersion11to12(nlohmann::json& profile) { +static void convertVersion11to12(nlohmann::json& profile) { // Version 1.2 introduced a state whether the delta time starts out as paused profile["version"] = Profile::Version{ 1, 2 }; @@ -611,7 +617,7 @@ void convertVersion11to12(nlohmann::json& profile) { namespace version12 { -void convertVersion12to13(nlohmann::json& profile) { +static void convertVersion12to13(nlohmann::json& profile) { // Version 1.3 introduced to GoToNode camera initial position profile["version"] = Profile::Version{ 1, 3 }; } @@ -620,7 +626,7 @@ void convertVersion12to13(nlohmann::json& profile) { namespace version13 { -void convertVersion13to14(nlohmann::json& profile) { +static void convertVersion13to14(nlohmann::json& profile) { // Version 1.4 introduced the ui panel view profile["version"] = Profile::Version{ 1, 4 }; } diff --git a/src/scene/profile_lua.inl b/src/scene/profile_lua.inl index a2af7588f8..7cd36fb6fd 100644 --- a/src/scene/profile_lua.inl +++ b/src/scene/profile_lua.inl @@ -22,6 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include #include namespace { diff --git a/src/scene/rotation.cpp b/src/scene/rotation.cpp index 73a35da329..9d966e0d5b 100644 --- a/src/scene/rotation.cpp +++ b/src/scene/rotation.cpp @@ -25,13 +25,14 @@ #include #include -#include #include #include #include #include #include #include +#include +#include namespace { // A `Rotation` object describes a specific rotation for a scene graph node, which may diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index a280e711bb..5cbb5969b3 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -25,12 +25,13 @@ #include #include -#include #include #include #include #include #include +#include +#include namespace { struct [[codegen::Dictionary(Scale)]] Parameters { diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 13673c0fee..84033a1243 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -25,17 +25,35 @@ #include #include +#include #include +#include #include #include -#include +#include #include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include "scene_lua.inl" @@ -495,7 +513,7 @@ void Scene::render(const RenderData& data, RendererTasks& tasks) { ZoneScoped; ZoneText( renderBinToString(data.renderBinMask), - strlen(renderBinToString(data.renderBinMask)) + std::strlen(renderBinToString(data.renderBinMask)) ); for (SceneGraphNode* node : _topologicallySortedNodes) { diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index cc6fdcfe23..596d9ad689 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -27,12 +27,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -54,11 +56,18 @@ #include #include #include +#include #include #include #include +#include +#include +#include #include #include +#include +#include +#include namespace { @@ -231,7 +240,7 @@ bool checkUriMatchFromRegexResults(std::string_view uri, ) { const bool isGroupMode = !groupTag.empty(); - auto [parentUri, identifier, isLiteral] = regexResults; + auto& [parentUri, identifier, isLiteral] = regexResults; // Literal check if (isLiteral && uri != identifier) { diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 614fe5747a..ffe720baf6 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -27,20 +27,32 @@ #include #include #include +#include #include #include -#include #include #include #include #include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "SceneGraphNode"; diff --git a/src/scene/sceneinitializer.cpp b/src/scene/sceneinitializer.cpp index ba49a58c05..7bc097fe2f 100644 --- a/src/scene/sceneinitializer.cpp +++ b/src/scene/sceneinitializer.cpp @@ -29,6 +29,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace openspace { diff --git a/src/scene/timeframe.cpp b/src/scene/timeframe.cpp index 5d6968a335..c5ced4b180 100644 --- a/src/scene/timeframe.cpp +++ b/src/scene/timeframe.cpp @@ -25,10 +25,11 @@ #include #include -#include #include #include +#include #include +#include namespace { constexpr openspace::properties::Property::PropertyInfo IsInTimeFrameInfo = { diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index d579346ca4..c74fdec0c8 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -24,12 +24,18 @@ #include -#include +#include #include +#include #include #include #include #include +#include +#include +#include +#include +#include namespace { struct [[codegen::Dictionary(Translation)]] Parameters { diff --git a/src/scripting/lualibrary.cpp b/src/scripting/lualibrary.cpp index 89c9f7c2a1..3e92f65e7f 100644 --- a/src/scripting/lualibrary.cpp +++ b/src/scripting/lualibrary.cpp @@ -24,7 +24,10 @@ #include +#include #include +#include +#include namespace openspace::scripting { diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index ed06101537..2d3aa9f35b 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -32,12 +32,18 @@ #include #include #include +#include #include +#include #include +#include +#include #include -#include +#include #include #include +#include +#include #include "scriptengine_lua.inl" diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index 699823fd6a..31cb80e159 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -22,6 +22,10 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include +#include + namespace openspace::luascriptfunctions { int printInternal(ghoul::logging::LogLevel level, lua_State* L) { diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index 7c7540250c..7fe83cc455 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -25,10 +25,15 @@ #include #include -#include #include +#include #include #include +#include +#include +#include +#include +#include #include "scriptscheduler_lua.inl" diff --git a/src/scripting/systemcapabilitiesbinding_lua.inl b/src/scripting/systemcapabilitiesbinding_lua.inl index e0c9ef7007..1311e38a35 100644 --- a/src/scripting/systemcapabilitiesbinding_lua.inl +++ b/src/scripting/systemcapabilitiesbinding_lua.inl @@ -23,10 +23,15 @@ ****************************************************************************************/ #include +#include #include #include #include +#include #include +#include +#include +#include namespace { diff --git a/src/util/blockplaneintersectiongeometry.cpp b/src/util/blockplaneintersectiongeometry.cpp index de4d6a4728..a4bac67c4c 100644 --- a/src/util/blockplaneintersectiongeometry.cpp +++ b/src/util/blockplaneintersectiongeometry.cpp @@ -25,8 +25,10 @@ #include #include -#include #include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "BlockPlaneIntersectionGeometry"; diff --git a/src/util/boxgeometry.cpp b/src/util/boxgeometry.cpp index a5aa7e1824..2cd0057c77 100644 --- a/src/util/boxgeometry.cpp +++ b/src/util/boxgeometry.cpp @@ -24,7 +24,8 @@ #include -#include +#include +#include namespace openspace { diff --git a/src/util/collisionhelper.cpp b/src/util/collisionhelper.cpp index a2ac5a37fe..2fef716127 100644 --- a/src/util/collisionhelper.cpp +++ b/src/util/collisionhelper.cpp @@ -24,6 +24,9 @@ #include +#include +#include + namespace openspace::collision { // Source: http://paulbourke.net/geometry/circlesphere/raysphere.c diff --git a/src/util/coordinateconversion.cpp b/src/util/coordinateconversion.cpp index 28da012539..5679e22a7b 100644 --- a/src/util/coordinateconversion.cpp +++ b/src/util/coordinateconversion.cpp @@ -26,6 +26,10 @@ #include #include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "Coordinateconversion"; diff --git a/src/util/distanceconversion.cpp b/src/util/distanceconversion.cpp index a8e1250138..d4329edd74 100644 --- a/src/util/distanceconversion.cpp +++ b/src/util/distanceconversion.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace openspace { @@ -34,7 +35,7 @@ std::pair simplifyDistance(double meters, { constexpr double GraceFactor = 0.5; - const double metersVal = glm::abs(meters); + const double metersVal = std::abs(meters); if (metersVal == 0.0) { return { 0.0, forceSingularForm ? "meter" : "meters"}; diff --git a/src/util/downloadeventengine.cpp b/src/util/downloadeventengine.cpp index 45773f292b..1b2bc7d1ae 100644 --- a/src/util/downloadeventengine.cpp +++ b/src/util/downloadeventengine.cpp @@ -24,6 +24,8 @@ #include +#include + namespace openspace { int DownloadEventEngine::subscribe(Callback cb) { diff --git a/src/util/dynamicfilesequencedownloader.cpp b/src/util/dynamicfilesequencedownloader.cpp index 6a3915e386..3266c41821 100644 --- a/src/util/dynamicfilesequencedownloader.cpp +++ b/src/util/dynamicfilesequencedownloader.cpp @@ -28,8 +28,22 @@ #include #include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include namespace { constexpr std::string_view _loggerCat = "DynamicFileSequenceDownloader"; @@ -136,7 +150,7 @@ DynamicFileSequenceDownloader::DynamicFileSequenceDownloader(int dataID, requestAvailableFiles(httpDataRequest, _syncDir); } -void DynamicFileSequenceDownloader::deinitialize(bool cacheFiles) { +void DynamicFileSequenceDownloader::deinitialize(bool cacheFiles) const { const std::vector& currentlyDownloadingFiles = filesCurrentlyDownloading(); for (File* file : currentlyDownloadingFiles) { file->download->cancel(); diff --git a/src/util/ellipsoid.cpp b/src/util/ellipsoid.cpp index fa0cd9676c..d5416cbdb3 100644 --- a/src/util/ellipsoid.cpp +++ b/src/util/ellipsoid.cpp @@ -27,7 +27,9 @@ #include #include #include -#include +#include +#include +#include namespace { constexpr size_t MaxIterations = 8; diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index 2429640535..5c4b207ba9 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -24,8 +24,6 @@ #include -#include -#include #include #include #include @@ -36,6 +34,8 @@ #include #include #include +#include +#include namespace openspace { diff --git a/src/util/geodetic.cpp b/src/util/geodetic.cpp index 1ae39f4f1a..e7fa193ee8 100644 --- a/src/util/geodetic.cpp +++ b/src/util/geodetic.cpp @@ -27,9 +27,12 @@ #include #include #include +#include #include +#include #include #include +#include namespace openspace { diff --git a/src/util/histogram.cpp b/src/util/histogram.cpp index ec21445525..04ca696fda 100644 --- a/src/util/histogram.cpp +++ b/src/util/histogram.cpp @@ -26,7 +26,10 @@ #include #include +#include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "Histogram"; @@ -203,7 +206,7 @@ const float* Histogram::data() const { std::vector> Histogram::getDecimated(int) const { // Return a copy of _data decimated as in Ljung 2004 - return std::vector>(); + return std::vector>(); } void Histogram::normalize() { diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index 53a47585e4..7214bb07de 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -24,10 +24,13 @@ #include -#include #include +#include #include +#include #include +#include +#include namespace openspace { @@ -251,8 +254,6 @@ bool HttpDownload::teardown() { return true; } - - std::atomic_int HttpFileDownload::nCurrentFileHandles = 0; std::mutex HttpFileDownload::_directoryCreationMutex; diff --git a/src/util/json_helper.cpp b/src/util/json_helper.cpp index 3476a00dda..4d0b986fb4 100644 --- a/src/util/json_helper.cpp +++ b/src/util/json_helper.cpp @@ -24,7 +24,12 @@ #include +#include +#include +#include #include +#include +#include namespace openspace { diff --git a/src/util/openspacemodule.cpp b/src/util/openspacemodule.cpp index 1f92ae61d4..0b5d80b699 100644 --- a/src/util/openspacemodule.cpp +++ b/src/util/openspacemodule.cpp @@ -33,6 +33,8 @@ #include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "OpenSpaceModule"; diff --git a/src/util/planegeometry.cpp b/src/util/planegeometry.cpp index bc62e1ed89..56cdd2850e 100644 --- a/src/util/planegeometry.cpp +++ b/src/util/planegeometry.cpp @@ -24,7 +24,9 @@ #include -#include +#include +#include +#include namespace openspace { diff --git a/src/util/progressbar.cpp b/src/util/progressbar.cpp index 4251da9853..4c9d2aae99 100644 --- a/src/util/progressbar.cpp +++ b/src/util/progressbar.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace openspace { diff --git a/src/util/resourcesynchronization.cpp b/src/util/resourcesynchronization.cpp index ecf6b6e3da..6ac5a6f4be 100644 --- a/src/util/resourcesynchronization.cpp +++ b/src/util/resourcesynchronization.cpp @@ -24,11 +24,13 @@ #include -#include +#include #include +#include #include #include #include +#include namespace { struct [[codegen::Dictionary(ResourceSynchronization)]] Parameters { diff --git a/src/util/sphere.cpp b/src/util/sphere.cpp index 94b5c588a4..72e7803f36 100644 --- a/src/util/sphere.cpp +++ b/src/util/sphere.cpp @@ -25,11 +25,12 @@ #include #include -#include +#include #include +#include namespace { - constexpr std::string_view _loggerCat = "PowerScaledSphere"; + constexpr std::string_view _loggerCat = "Sphere"; } // namespace namespace openspace { diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 8a6e50e2af..71606eb710 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -28,10 +28,17 @@ #include #include #include +#include #include #include +#include +#include +#include #include #include +#include +#include +#include #include "spicemanager_lua.inl" @@ -60,6 +67,25 @@ namespace { default: throw ghoul::MissingCaseException(); } } + + + void getValueInternal(const std::string& body, const std::string& value, int size, + double* v) + { + ghoul_assert(!body.empty(), "Empty body"); + ghoul_assert(!value.empty(), "Empty value"); + ghoul_assert(v != nullptr, "Empty value pointer"); + + SpiceInt n = 0; + bodvrd_c(body.c_str(), value.c_str(), size, &n, v); + + if (failed_c()) { + openspace::throwSpiceError(std::format( + "Error getting value '{}' for body '{}'", value, body + )); + } + } + } // namespace namespace openspace { @@ -533,23 +559,6 @@ bool SpiceManager::hasFrameId(const std::string& frame) const { return id != 0; } -void getValueInternal(const std::string& body, const std::string& value, int size, - double* v) -{ - ghoul_assert(!body.empty(), "Empty body"); - ghoul_assert(!value.empty(), "Empty value"); - ghoul_assert(v != nullptr, "Empty value pointer"); - - SpiceInt n = 0; - bodvrd_c(body.c_str(), value.c_str(), size, &n, v); - - if (failed_c()) { - throwSpiceError( - std::format("Error getting value '{}' for body '{}'", value, body) - ); - } -} - void SpiceManager::getValue(const std::string& body, const std::string& value, double& v) const { diff --git a/src/util/spicemanager_lua.inl b/src/util/spicemanager_lua.inl index 18d044ee42..ede83808bf 100644 --- a/src/util/spicemanager_lua.inl +++ b/src/util/spicemanager_lua.inl @@ -22,9 +22,16 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include #include #include +#include +#include #include +#include +#include +#include +#include namespace { diff --git a/src/util/syncable.cpp b/src/util/syncable.cpp new file mode 100644 index 0000000000..b9b587dbc2 --- /dev/null +++ b/src/util/syncable.cpp @@ -0,0 +1,33 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * Permission is hereby 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 { + +void Syncable::preSync(bool) {} + +void Syncable::postSync(bool) {} + +} // namespace openspace diff --git a/src/util/syncbuffer.cpp b/src/util/syncbuffer.cpp index a4a012a487..f528e0440b 100644 --- a/src/util/syncbuffer.cpp +++ b/src/util/syncbuffer.cpp @@ -24,7 +24,11 @@ #include +#include #include +#include +#include +#include namespace openspace { @@ -45,13 +49,13 @@ void SyncBuffer::encode(const std::string& s) { } int32_t length = static_cast(s.size() * sizeof(char)); - memcpy( + std::memcpy( _dataStream.data() + _encodeOffset, reinterpret_cast(&length), sizeof(int32_t) ); _encodeOffset += sizeof(int32_t); - memcpy(_dataStream.data() + _encodeOffset, s.c_str(), length); + std::memcpy(_dataStream.data() + _encodeOffset, s.c_str(), length); _encodeOffset += length; } diff --git a/src/util/task.cpp b/src/util/task.cpp index 3c0d5e902c..8bd29f732f 100644 --- a/src/util/task.cpp +++ b/src/util/task.cpp @@ -25,10 +25,10 @@ #include #include -#include #include #include #include +#include namespace { diff --git a/src/util/taskloader.cpp b/src/util/taskloader.cpp index fb30a31977..32a5d87bdc 100644 --- a/src/util/taskloader.cpp +++ b/src/util/taskloader.cpp @@ -29,9 +29,13 @@ #include #include #include +#include #include +#include #include #include +#include +#include namespace { constexpr std::string_view _loggerCat = "TaskRunner"; diff --git a/src/util/threadpool.cpp b/src/util/threadpool.cpp index d8ccccfd7d..4defbf2ee9 100644 --- a/src/util/threadpool.cpp +++ b/src/util/threadpool.cpp @@ -24,29 +24,31 @@ #include +#include + namespace openspace { -Worker::Worker(ThreadPool& p) : pool(p) {} +Worker::Worker(ThreadPool& p) : _pool(p) {} void Worker::operator()() { std::function task; while (true) { { - std::unique_lock lock(pool.queue_mutex); + std::unique_lock lock(_pool._queueMutex); // look for a work item - while (!pool.stop && pool.tasks.empty()) { + while (!_pool._shouldStop && _pool._tasks.empty()) { // if there are none wait for notification - pool.condition.wait(lock); + _pool._condition.wait(lock); } - if (pool.stop) { // exit if the pool is stopped + if (_pool._shouldStop) { // exit if the pool is stopped return; } // get the task from the queue - task = pool.tasks.front(); - pool.tasks.pop_front(); + task = _pool._tasks.front(); + _pool._tasks.pop_front(); } // execute the task @@ -54,25 +56,25 @@ void Worker::operator()() { } } -ThreadPool::ThreadPool(size_t numThreads) : stop(false) { +ThreadPool::ThreadPool(size_t numThreads) { for (size_t i = 0; i < numThreads; i++) { - workers.emplace_back(Worker(*this)); + _workers.emplace_back(Worker(*this)); } } -ThreadPool::ThreadPool(const ThreadPool& toCopy) : ThreadPool(toCopy.workers.size()) {} +ThreadPool::ThreadPool(const ThreadPool& toCopy) : ThreadPool(toCopy._workers.size()) {} // the destructor joins all threads ThreadPool::~ThreadPool() { // stop all threads { - const std::unique_lock lock(queue_mutex); - stop = true; + const std::unique_lock lock(_queueMutex); + _shouldStop = true; } - condition.notify_all(); + _condition.notify_all(); // join them - for (std::thread& w : workers) { + for (std::thread& w : _workers) { w.join(); } } @@ -80,23 +82,23 @@ ThreadPool::~ThreadPool() { // add new work item to the pool void ThreadPool::enqueue(std::function f) { { - const std::unique_lock lock(queue_mutex); + const std::unique_lock lock(_queueMutex); // add the task - tasks.push_back(std::move(f)); + _tasks.push_back(std::move(f)); } // wake up one thread - condition.notify_one(); + _condition.notify_one(); } void ThreadPool::clearTasks() { - const std::unique_lock lock(queue_mutex); - tasks.clear(); + const std::unique_lock lock(_queueMutex); + _tasks.clear(); } bool ThreadPool::hasOutstandingTasks() const { - return !tasks.empty(); + return !_tasks.empty(); } } // namespace openspace diff --git a/src/util/time.cpp b/src/util/time.cpp index 9600ed863a..2a28d56fbf 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -25,18 +25,18 @@ #include #include -#include -#include #include #include #include #include -#include #include #include +#include #include #include +#include #include +#include #include #include diff --git a/src/util/time_lua.inl b/src/util/time_lua.inl index b8c705ccc8..8557b952fd 100644 --- a/src/util/time_lua.inl +++ b/src/util/time_lua.inl @@ -22,8 +22,18 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include +#include +#include #include +#include #include +#include +#include +#include +#include +#include +#include namespace { diff --git a/src/util/timeconversion.cpp b/src/util/timeconversion.cpp index 0e6c1ae35f..6078ab4d3f 100644 --- a/src/util/timeconversion.cpp +++ b/src/util/timeconversion.cpp @@ -24,11 +24,14 @@ #include +#include +#include + namespace { std::pair extractUnit(double seconds) { using namespace openspace; - const double secondsVal = glm::abs(seconds); + const double secondsVal = std::abs(seconds); if (secondsVal == 0.0) { return { 0.0, TimeUnit::Second }; diff --git a/src/util/timemanager.cpp b/src/util/timemanager.cpp index c0fa5ab847..f3d3b8743c 100644 --- a/src/util/timemanager.cpp +++ b/src/util/timemanager.cpp @@ -27,14 +27,27 @@ #include #include #include +#include #include #include #include +#include #include #include #include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "TimeManager"; diff --git a/src/util/timerange.cpp b/src/util/timerange.cpp index 27d9240b60..0035fed794 100644 --- a/src/util/timerange.cpp +++ b/src/util/timerange.cpp @@ -25,9 +25,9 @@ #include #include -#include #include #include +#include namespace { struct [[codegen::Dictionary(TimeRange)]] Parameters { diff --git a/src/util/touch.cpp b/src/util/touch.cpp index 2f2c5bd4e2..ed627ce286 100644 --- a/src/util/touch.cpp +++ b/src/util/touch.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace openspace { diff --git a/src/util/transformationmanager.cpp b/src/util/transformationmanager.cpp index f05b888f49..4f3a55210a 100644 --- a/src/util/transformationmanager.cpp +++ b/src/util/transformationmanager.cpp @@ -55,8 +55,8 @@ TransformationManager::TransformationManager() { ); #endif _kameleonFrames = { - "J2000", "GEI", "GEO", "MAG", "GSE", "GSM", "SM", "RTN", "GSEQ", //geocentric - "HEE", "HAE", "HEEQ" //heliocentric + "J2000", "GEI", "GEO", "MAG", "GSE", "GSM", "SM", "RTN", "GSEQ", // geocentric + "HEE", "HAE", "HEEQ" // heliocentric }; } @@ -110,9 +110,9 @@ glm::dmat3 TransformationManager::kameleonTransformationMatrix( out1.c0, out1.c1, out1.c2, out2.c0, out2.c1, out2.c2 ); -#else +#else // ^^^^ OPENSPACE_MODULE_KAMELEON_ENABLED // !OPENSPACE_MODULE_KAMELEON_ENABLED vvvv return glm::dmat3(0.0); -#endif +#endif // OPENSPACE_MODULE_KAMELEON_ENABLED } glm::dmat3 TransformationManager::frameTransformationMatrix( @@ -122,13 +122,13 @@ glm::dmat3 TransformationManager::frameTransformationMatrix( { #ifdef OPENSPACE_MODULE_KAMELEON_ENABLED auto fromit = _kameleonFrames.find(from); - auto toit = _kameleonFrames.find(to); + auto toit = _kameleonFrames.find(to); - bool fromKameleon = (fromit != _kameleonFrames.end()); - bool toKameleon = (toit != _kameleonFrames.end()); + bool fromKameleon = (fromit != _kameleonFrames.end()); + bool toKameleon = (toit != _kameleonFrames.end()); if (!fromKameleon && !toKameleon) { - return SpiceManager::ref().frameTransformationMatrix(from, to, ephemerisTime); + return SpiceManager::ref().frameTransformationMatrix(from, to, ephemerisTime); } if (fromKameleon && toKameleon) { @@ -162,12 +162,12 @@ glm::dmat3 TransformationManager::frameTransformationMatrix( return kameleonTransformation*spiceTransformation; } -#else +#else // ^^^^ OPENSPACE_MODULE_KAMELEON_ENABLED // !OPENSPACE_MODULE_KAMELEON_ENABLED vvvv LERRORC( "TransformationManager", "Can not transform dynamic frames without kameleon module enabled" ); -#endif +#endif // OPENSPACE_MODULE_KAMELEON_ENABLED return glm::dmat3(1.0); } diff --git a/src/util/tstring.cpp b/src/util/tstring.cpp index ef3ed28bd7..f8f9b01069 100644 --- a/src/util/tstring.cpp +++ b/src/util/tstring.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace openspace { diff --git a/src/util/universalhelpers.cpp b/src/util/universalhelpers.cpp index d52b2e0e7c..55f0bddbdf 100644 --- a/src/util/universalhelpers.cpp +++ b/src/util/universalhelpers.cpp @@ -24,6 +24,9 @@ #include +#include +#include + namespace openspace::helpers { double shiftAndScale(double t, double start, double end) { diff --git a/src/util/versionchecker.cpp b/src/util/versionchecker.cpp index 76777137bd..d61110ce80 100644 --- a/src/util/versionchecker.cpp +++ b/src/util/versionchecker.cpp @@ -34,6 +34,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace { constexpr std::string_view _loggerCat = "VersionChecker"; @@ -91,58 +96,61 @@ void VersionChecker::cancel() { if (_latestVersion.has_value()) { return true; } - if (_request) { - if (_request->hasSucceeded()) { - _request->wait(); - std::vector data = _request->downloadedData(); - const std::string versionString(data.begin(), data.end()); - std::istringstream versionData(versionString); - - std::string token; - ghoul::getline(versionData, token, '.'); - const int major = std::atoi(token.c_str()); - ghoul::getline(versionData, token, '.'); - const int minor = std::atoi(token.c_str()); - ghoul::getline(versionData, token, '.'); - const int patch = std::atoi(token.c_str()); - - _latestVersion = { major, minor, patch }; - _request = nullptr; - - SemanticVersion currentVersion{ - OPENSPACE_VERSION_MAJOR, - OPENSPACE_VERSION_MINOR, - OPENSPACE_VERSION_PATCH - }; - - if (currentVersion < _latestVersion) { - LINFO(std::format( - "Newer OpenSpace version {}.{}.{} is available. " - "Currently running {}.{}.{}", - _latestVersion->major, - _latestVersion->minor, - _latestVersion->patch, - currentVersion.major, - currentVersion.minor, - currentVersion.patch - )); - } - return true; - } - if (_request->hasFailed()) { - _request->cancel(); - _request->wait(); - std::vector data = _request->downloadedData(); - const std::string response = std::string(data.begin(), data.end()); - LWARNING(std::format( - "Failed to get OpenSpace version information from {}. Response: {}", - _request->url(), - response - )); - _request = nullptr; - return false; - } + if (!_request) { + return false; } + + if (_request->hasSucceeded()) { + _request->wait(); + std::vector data = _request->downloadedData(); + const std::string versionString(data.begin(), data.end()); + std::istringstream versionData(versionString); + + std::string token; + ghoul::getline(versionData, token, '.'); + const int major = std::atoi(token.c_str()); + ghoul::getline(versionData, token, '.'); + const int minor = std::atoi(token.c_str()); + ghoul::getline(versionData, token, '.'); + const int patch = std::atoi(token.c_str()); + + _latestVersion = { major, minor, patch }; + _request = nullptr; + + SemanticVersion currentVersion{ + OPENSPACE_VERSION_MAJOR, + OPENSPACE_VERSION_MINOR, + OPENSPACE_VERSION_PATCH + }; + + if (currentVersion < _latestVersion) { + LINFO(std::format( + "Newer OpenSpace version {}.{}.{} is available. " + "Currently running {}.{}.{}", + _latestVersion->major, + _latestVersion->minor, + _latestVersion->patch, + currentVersion.major, + currentVersion.minor, + currentVersion.patch + )); + } + return true; + } + + if (_request->hasFailed()) { + _request->cancel(); + _request->wait(); + std::vector data = _request->downloadedData(); + const std::string response = std::string(data.begin(), data.end()); + LWARNING(std::format( + "Failed to get OpenSpace version information from {}. Response: {}", + _request->url(), response + )); + _request = nullptr; + return false; + } + return false; } diff --git a/support/coding/codegen b/support/coding/codegen index fc88af99c9..2a78626025 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit fc88af99c94d344ea913de4dc4c01f82e8537ff5 +Subproject commit 2a78626025db89e211ec6dd60e02969751246531