From b50b52d3516d5c1bfdd6ccd34e5cd408dfb59357 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 8 Nov 2017 10:35:39 -0600 Subject: [PATCH] Cleanup for coding style Add strict mode to check_style_guide script --- apps/Launcher/mainwindow.cpp | 27 +- apps/Launcher/mainwindow.h | 6 +- apps/Launcher/syncwidget.cpp | 16 +- apps/Launcher/syncwidget.h | 2 +- apps/OpenSpace/main.cpp | 66 +++-- apps/TimelineView/controlwidget.cpp | 1 - apps/TimelineView/mainwindow.cpp | 4 +- apps/TimelineView/mainwindow.h | 2 +- apps/TimelineView/timelinewidget.cpp | 4 +- ext/ghoul | 2 +- .../openspace/documentation/documentation.h | 2 +- .../documentation/documentationgenerator.h | 11 +- .../openspace/engine/configurationmanager.h | 2 +- include/openspace/engine/moduleengine.h | 6 +- include/openspace/engine/openspaceengine.h | 32 +-- include/openspace/engine/settingsengine.h | 4 +- include/openspace/engine/syncengine.h | 2 +- .../engine/wrapper/sgctwindowwrapper.h | 6 +- .../openspace/engine/wrapper/windowwrapper.h | 26 +- include/openspace/interaction/controller.h | 2 +- include/openspace/interaction/interpolator.h | 2 +- .../openspace/interaction/keybindingmanager.h | 4 +- include/openspace/interaction/mousestate.h | 2 +- .../openspace/interaction/navigationhandler.h | 2 +- .../openspace/interaction/orbitalnavigator.h | 6 +- include/openspace/mission/mission.h | 2 +- include/openspace/network/messagestructures.h | 40 +-- .../openspace/network/parallelconnection.h | 9 +- .../performance/performancemanager.h | 14 +- .../performance/performancemeasurement.h | 4 +- .../properties/numericalproperty.inl | 2 +- include/openspace/properties/property.h | 6 +- include/openspace/properties/propertyowner.h | 13 +- .../properties/scalar/boolproperty.h | 2 +- .../properties/scalar/charproperty.h | 2 +- .../properties/scalar/doubleproperty.h | 2 +- .../properties/scalar/floatproperty.h | 2 +- .../openspace/properties/scalar/intproperty.h | 2 +- .../properties/scalar/longdoubleproperty.h | 2 +- .../properties/scalar/longlongproperty.h | 2 +- .../properties/scalar/longproperty.h | 2 +- .../properties/scalar/shortproperty.h | 2 +- .../properties/scalar/signedcharproperty.h | 2 +- .../properties/scalar/ucharproperty.h | 2 +- .../properties/scalar/uintproperty.h | 2 +- .../properties/scalar/ulonglongproperty.h | 2 +- .../properties/scalar/ulongproperty.h | 2 +- .../properties/scalar/ushortproperty.h | 2 +- .../properties/scalar/wcharproperty.h | 2 +- .../openspace/properties/selectionproperty.h | 2 +- include/openspace/rendering/abufferrenderer.h | 11 +- .../openspace/rendering/framebufferrenderer.h | 6 +- include/openspace/rendering/renderable.h | 6 +- include/openspace/rendering/renderengine.h | 14 +- include/openspace/rendering/renderer.h | 6 +- .../rendering/screenspacerenderable.h | 8 +- include/openspace/rendering/volume.h | 4 +- include/openspace/rendering/volumeraycaster.h | 5 +- include/openspace/scene/scene.h | 2 +- include/openspace/scene/scenegraphnode.h | 4 +- include/openspace/scene/scenelicense.h | 10 +- include/openspace/scene/scenelicensewriter.h | 2 +- include/openspace/scripting/scriptengine.h | 20 +- include/openspace/scripting/scriptscheduler.h | 10 +- include/openspace/util/boxgeometry.h | 2 +- include/openspace/util/camera.h | 2 +- include/openspace/util/factorymanager.h | 8 +- include/openspace/util/factorymanager.inl | 2 +- include/openspace/util/gpudata.h | 16 +- include/openspace/util/keys.h | 8 +- include/openspace/util/mouse.h | 2 +- include/openspace/util/openspacemodule.h | 10 +- include/openspace/util/powerscaledscalar.h | 9 +- include/openspace/util/screenlog.h | 16 +- include/openspace/util/spicemanager.h | 84 +++---- include/openspace/util/task.h | 2 +- include/openspace/util/time.h | 9 +- include/openspace/util/timerange.h | 4 +- modules/base/rendering/modelgeometry.cpp | 4 +- modules/base/rendering/modelgeometry.h | 4 +- modules/base/rendering/multimodelgeometry.cpp | 2 +- modules/base/rendering/renderablemodel.cpp | 2 +- modules/base/rendering/renderableplane.cpp | 5 +- modules/base/rendering/renderablesphere.cpp | 6 +- modules/base/rendering/renderabletrail.cpp | 4 +- modules/base/rendering/renderabletrail.h | 2 +- .../base/rendering/renderabletrailorbit.cpp | 2 +- modules/base/rendering/renderabletrailorbit.h | 4 +- .../rendering/renderabletrailtrajectory.cpp | 8 +- .../rendering/renderabletrailtrajectory.h | 2 +- .../base/rendering/screenspaceframebuffer.cpp | 4 +- .../base/rendering/screenspaceframebuffer.h | 2 +- .../base/rendering/screenspaceimagelocal.h | 4 +- .../base/rendering/screenspaceimageonline.h | 4 +- modules/base/rendering/wavefrontgeometry.cpp | 1 - modules/base/rotation/luarotation.cpp | 2 +- modules/base/rotation/luarotation.h | 4 +- modules/base/rotation/staticrotation.h | 6 +- modules/base/scale/luascale.cpp | 2 +- modules/base/scale/luascale.h | 4 +- modules/base/scale/staticscale.cpp | 2 +- modules/base/scale/staticscale.h | 6 +- modules/base/translation/luatranslation.cpp | 2 +- modules/base/translation/luatranslation.h | 4 +- modules/base/translation/statictranslation.h | 4 +- modules/debugging/debuggingmodule.h | 2 +- modules/debugging/rendering/debugrenderer.cpp | 8 +- modules/debugging/rendering/debugrenderer.h | 6 +- .../rendering/renderabledebugplane.cpp | 12 +- .../rendering/renderablebillboardscloud.cpp | 87 ++++--- .../rendering/renderablebillboardscloud.h | 6 +- .../rendering/renderabledumeshes.cpp | 26 +- .../rendering/renderabledumeshes.h | 7 +- .../rendering/renderableplanescloud.cpp | 82 +++--- .../rendering/renderableplanescloud.h | 13 +- .../rendering/renderablepoints.cpp | 40 ++- .../rendering/renderablepoints.h | 4 +- modules/fieldlines/fieldlinesmodule.h | 2 +- .../rendering/renderablefieldlines.cpp | 34 ++- .../rendering/renderablefieldlines.h | 2 +- modules/galaxy/galaxymodule.cpp | 2 +- modules/galaxy/rendering/galaxyraycaster.cpp | 38 ++- modules/galaxy/rendering/renderablegalaxy.cpp | 27 +- modules/galaxy/rendering/renderablegalaxy.h | 4 +- .../galaxy/tasks/milkywayconversiontask.cpp | 12 +- .../tasks/milkywaypointsconversiontask.h | 2 +- modules/globebrowsing/cache/lrucache.h | 4 +- modules/globebrowsing/cache/lrucache.inl | 2 +- .../cache/memoryawaretilecache.cpp | 12 +- .../cache/memoryawaretilecache.h | 2 +- .../globebrowsing/cache/texturecontainer.cpp | 7 +- .../globebrowsing/cache/texturecontainer.h | 4 +- modules/globebrowsing/chunk/chunk.cpp | 10 +- modules/globebrowsing/chunk/chunk.h | 4 +- .../availabletiledataevaluator.cpp | 4 +- .../chunklevelevaluator/chunklevelevaluator.h | 2 +- .../chunklevelevaluator/distanceevaluator.cpp | 8 +- .../projectedareaevaluator.cpp | 10 +- .../projectedareaevaluator.h | 2 +- modules/globebrowsing/chunk/chunknode.cpp | 2 +- .../chunk/culling/frustumculler.cpp | 4 +- .../chunk/culling/horizonculler.cpp | 8 +- modules/globebrowsing/geometry/angle.h | 2 +- modules/globebrowsing/geometry/ellipsoid.cpp | 7 +- modules/globebrowsing/geometry/ellipsoid.h | 4 +- modules/globebrowsing/geometry/geodetic2.h | 2 +- .../globebrowsing/geometry/geodeticpatch.cpp | 7 +- modules/globebrowsing/globebrowsingmodule.cpp | 43 ++-- modules/globebrowsing/globebrowsingmodule.h | 1 - .../globebrowsing/globebrowsingmodule_lua.inl | 15 +- .../globebrowsing/globes/chunkedlodglobe.cpp | 25 +- .../globebrowsing/globes/chunkedlodglobe.h | 10 +- modules/globebrowsing/globes/pointglobe.cpp | 20 +- modules/globebrowsing/globes/pointglobe.h | 2 +- .../globebrowsing/globes/renderableglobe.cpp | 14 +- .../globebrowsing/globes/renderableglobe.h | 8 +- modules/globebrowsing/meshes/grid.h | 10 +- modules/globebrowsing/meshes/trianglesoup.h | 2 +- .../globebrowsing/other/distanceswitch.cpp | 2 +- modules/globebrowsing/other/lruthreadpool.h | 2 +- modules/globebrowsing/other/lruthreadpool.inl | 2 +- modules/globebrowsing/other/pixelbuffer.h | 4 +- .../other/pixelbuffercontainer.h | 4 +- .../other/pixelbuffercontainer.inl | 4 +- .../other/prioritizingconcurrentjobmanager.h | 2 +- modules/globebrowsing/other/statscollector.h | 2 +- .../globebrowsing/rendering/chunkrenderer.cpp | 32 ++- .../globebrowsing/rendering/gpu/gpulayer.cpp | 4 +- .../globebrowsing/rendering/gpu/gpulayer.h | 2 +- .../rendering/gpu/gpulayergroup.cpp | 2 +- .../rendering/gpu/gpulayermanager.cpp | 2 +- .../rendering/gpu/gputiledepthtransform.h | 2 +- .../globebrowsing/rendering/layer/layer.cpp | 2 +- modules/globebrowsing/rendering/layer/layer.h | 8 +- .../rendering/layer/layeradjustment.cpp | 2 +- .../rendering/layer/layeradjustment.h | 2 +- .../rendering/layer/layermanager.cpp | 4 +- .../rendering/layer/layermanager.h | 2 +- .../rendering/layer/layerrendersettings.cpp | 2 +- .../rendering/layer/layerrendersettings.h | 2 +- .../rendering/layershadermanager.cpp | 8 +- .../rendering/layershadermanager.h | 7 +- .../tile/asynctiledataprovider.cpp | 10 +- .../tile/asynctiledataprovider.h | 4 +- modules/globebrowsing/tile/pixelregion.cpp | 4 +- modules/globebrowsing/tile/pixelregion.h | 6 +- modules/globebrowsing/tile/rawtile.h | 4 +- .../gdalrawtiledatareader.cpp | 6 +- .../rawtiledatareader/gdalrawtiledatareader.h | 4 +- .../tile/rawtiledatareader/gdalwrapper.cpp | 2 +- .../tile/rawtiledatareader/gdalwrapper.h | 4 +- .../tile/rawtiledatareader/iodescription.cpp | 2 +- .../tile/rawtiledatareader/iodescription.h | 4 +- .../rawtiledatareader/rawtiledatareader.cpp | 32 +-- .../rawtiledatareader/rawtiledatareader.h | 9 +- .../simplerawtiledatareader.cpp | 2 +- modules/globebrowsing/tile/tile.h | 2 +- modules/globebrowsing/tile/tileindex.cpp | 22 +- modules/globebrowsing/tile/tileindex.h | 6 +- modules/globebrowsing/tile/tileloadjob.h | 2 +- .../tile/tileprovider/defaulttileprovider.cpp | 4 +- .../tile/tileprovider/defaulttileprovider.h | 6 +- .../presentationslideprovider.cpp | 118 --------- .../tileprovider/projectiontileprovider.h | 20 +- .../tile/tileprovider/singleimageprovider.cpp | 4 +- .../sizereferencetileprovider.cpp | 2 +- .../tileprovider/sizereferencetileprovider.h | 2 +- .../tileprovider/temporaltileprovider.cpp | 16 +- .../tile/tileprovider/temporaltileprovider.h | 12 +- .../tile/tileprovider/texttileprovider.cpp | 8 +- .../tile/tileprovider/texttileprovider.h | 6 +- .../tile/tileprovider/tileindextileprovider.h | 4 +- .../tile/tileprovider/tileprovider.cpp | 8 +- .../tile/tileprovider/tileprovider.h | 7 +- .../tile/tileprovider/tileproviderbyindex.cpp | 18 +- .../tile/tileprovider/tileproviderbylevel.cpp | 12 +- modules/globebrowsing/tile/tileselector.cpp | 2 +- modules/globebrowsing/tile/tileselector.h | 2 +- modules/imgui/imguimodule.cpp | 24 +- modules/imgui/imguimodule.h | 2 +- modules/imgui/include/guicomponent.h | 2 +- modules/imgui/src/gui.cpp | 6 +- modules/imgui/src/guiiswacomponent.cpp | 4 +- modules/imgui/src/guimissioncomponent.cpp | 4 +- modules/imgui/src/guiperformancecomponent.cpp | 24 +- modules/imgui/src/guispacetimecomponent.cpp | 3 +- modules/imgui/src/guitimecomponent.cpp | 2 +- modules/imgui/src/renderproperties.cpp | 20 +- modules/iswa/iswamodule.cpp | 2 +- modules/iswa/iswamodule.h | 2 +- modules/iswa/rendering/datacygnet.cpp | 8 +- modules/iswa/rendering/dataplane.cpp | 2 +- modules/iswa/rendering/iswabasegroup.cpp | 2 +- modules/iswa/rendering/iswacygnet.cpp | 17 +- modules/iswa/rendering/iswacygnet.h | 2 +- modules/iswa/rendering/iswadatagroup.cpp | 2 +- modules/iswa/rendering/iswakameleongroup.cpp | 2 +- modules/iswa/rendering/iswakameleongroup.h | 2 +- modules/iswa/rendering/kameleonplane.cpp | 14 +- modules/iswa/rendering/kameleonplane.h | 2 +- modules/iswa/rendering/screenspacecygnet.cpp | 4 +- modules/iswa/rendering/textureplane.cpp | 2 +- modules/iswa/rendering/textureplane.h | 2 +- modules/iswa/util/dataprocessor.cpp | 10 +- modules/iswa/util/dataprocessorjson.cpp | 2 +- modules/iswa/util/dataprocessorjson.h | 2 +- modules/iswa/util/dataprocessorkameleon.cpp | 4 +- modules/iswa/util/dataprocessortext.cpp | 9 +- modules/iswa/util/iswamanager.cpp | 18 +- modules/iswa/util/iswamanager.h | 7 +- modules/iswa/util/iswamanager_lua.inl | 38 +-- modules/kameleon/include/kameleonwrapper.h | 4 +- modules/kameleon/src/kameleonwrapper.cpp | 92 ++++--- .../kameleonvolume/kameleonvolumereader.cpp | 2 +- .../rendering/renderablekameleonvolume.cpp | 24 +- .../rendering/renderablekameleonvolume.h | 2 +- .../tasks/kameleondocumentationtask.h | 2 +- .../tasks/kameleonmetadatatojsontask.h | 2 +- .../tasks/kameleonvolumetorawtask.cpp | 6 +- .../tasks/kameleonvolumetorawtask.h | 4 +- .../multiresvolume/rendering/atlasmanager.cpp | 11 +- .../rendering/errorhistogrammanager.cpp | 2 +- .../rendering/localtfbrickselector.h | 3 +- .../rendering/multiresvolumeraycaster.cpp | 34 +-- .../rendering/renderablemultiresvolume.cpp | 5 - .../rendering/renderablemultiresvolume.h | 4 +- .../rendering/simpletfbrickselector.cpp | 2 +- .../rendering/tfbrickselector.h | 3 +- .../rendering/renderableconstellationbounds.h | 4 +- modules/space/rendering/renderableplanet.cpp | 14 +- modules/space/rendering/renderableplanet.h | 6 +- modules/space/rendering/renderablerings.cpp | 15 +- modules/space/rendering/renderablestars.cpp | 14 +- modules/space/rotation/spicerotation.cpp | 4 +- modules/space/rotation/spicerotation.h | 6 +- .../space/translation/keplertranslation.cpp | 28 +-- modules/space/translation/keplertranslation.h | 22 +- .../space/translation/spicetranslation.cpp | 6 +- modules/space/translation/spicetranslation.h | 6 +- modules/space/translation/tletranslation.cpp | 117 +++++---- modules/space/translation/tletranslation.h | 6 +- .../rendering/renderablecrawlingline.cpp | 4 +- .../rendering/renderablecrawlingline.h | 2 +- .../rendering/renderablefov.cpp | 23 +- .../rendering/renderablefov.h | 6 +- .../rendering/renderablemodelprojection.cpp | 18 +- .../rendering/renderablemodelprojection.h | 2 +- .../rendering/renderableplaneprojection.cpp | 10 +- .../rendering/renderableplaneprojection.h | 4 +- .../rendering/renderableplanetprojection.cpp | 6 +- .../rendering/renderableplanetprojection.h | 2 +- .../rendering/renderableshadowcylinder.cpp | 8 +- .../rendering/renderableshadowcylinder.h | 2 +- .../spacecraftinstrumentsmodule.h | 2 +- .../spacecraftinstruments/util/decoder.cpp | 4 +- .../util/hongkangparser.cpp | 8 +- .../util/imagesequencer.cpp | 16 +- .../util/imagesequencer.h | 2 +- .../util/instrumentdecoder.cpp | 3 +- .../util/instrumentdecoder.h | 4 +- .../util/instrumenttimesparser.cpp | 12 +- .../util/labelparser.cpp | 8 +- .../spacecraftinstruments/util/labelparser.h | 2 +- .../util/projectioncomponent.cpp | 8 +- .../util/projectioncomponent.h | 2 +- .../util/scannerdecoder.cpp | 2 +- .../util/scannerdecoder.h | 4 +- .../util/targetdecoder.h | 4 +- modules/touch/include/touchinteraction.h | 2 +- modules/touch/include/touchmarker.h | 3 +- modules/touch/include/tuioear.h | 7 +- modules/touch/src/touchinteraction.cpp | 11 +- modules/touch/src/touchmarker.cpp | 4 +- modules/touch/src/tuioear.cpp | 2 +- modules/touch/touchmodule.cpp | 2 +- .../rendering/renderabletoyvolume.cpp | 12 +- .../toyvolume/rendering/renderabletoyvolume.h | 6 +- .../rendering/toyvolumeraycaster.cpp | 30 +-- modules/volume/linearlrucache.h | 2 +- modules/volume/lrucache.h | 3 +- modules/volume/rawvolumewriter.h | 4 +- modules/volume/rawvolumewriter.inl | 4 +- .../volume/rendering/basicvolumeraycaster.cpp | 44 ++-- .../rendering/renderabletimevaryingvolume.cpp | 13 +- .../rendering/renderabletimevaryingvolume.h | 2 +- modules/volume/textureslicevolumereader.inl | 8 +- modules/volume/volumesampler.inl | 6 +- modules/volume/volumeutils.cpp | 12 +- src/documentation/core_registration.cpp | 2 +- src/documentation/documentation.cpp | 4 +- src/documentation/documentationgenerator.cpp | 18 +- src/engine/configurationmanager.cpp | 20 +- src/engine/downloadmanager.cpp | 42 ++-- src/engine/logfactory.cpp | 2 +- src/engine/moduleengine.cpp | 4 +- src/engine/moduleengine_lua.inl | 2 +- src/engine/openspaceengine.cpp | 89 ++++--- src/engine/openspaceengine_lua.inl | 2 +- src/engine/wrapper/sgctwindowwrapper.cpp | 8 +- src/engine/wrapper/windowwrapper.cpp | 9 +- src/interaction/keybindingmanager.cpp | 4 +- src/interaction/keybindingmanager_lua.inl | 2 +- src/interaction/keyframenavigator.cpp | 2 +- src/interaction/luaconsole.cpp | 9 +- src/interaction/mousestate.cpp | 2 +- src/interaction/navigationhandler.cpp | 6 +- src/mission/mission.cpp | 4 +- src/network/networkengine.cpp | 4 +- src/network/parallelconnection.cpp | 175 +++++++------ src/openspace.cpp | 2 +- src/performance/performancemanager.cpp | 51 ++-- src/properties/optionproperty.cpp | 2 +- src/properties/propertyowner.cpp | 30 +-- src/query/query.cpp | 2 +- src/rendering/abufferrenderer.cpp | 10 +- src/rendering/framebufferrenderer.cpp | 6 +- src/rendering/renderengine.cpp | 29 +-- src/rendering/renderengine_lua.inl | 8 +- src/rendering/screenspacerenderable.cpp | 14 +- src/scene/rotation.cpp | 6 +- src/scene/scene.cpp | 19 +- src/scene/scene_lua.inl | 25 +- src/scene/scenegraphnode.cpp | 8 +- src/scene/scenelicense.cpp | 4 +- src/scene/scenelicensewriter.cpp | 5 +- src/scene/sceneloader.cpp | 16 +- src/scene/translation.cpp | 2 +- src/scripting/scriptengine.cpp | 34 +-- src/scripting/scriptscheduler.cpp | 26 +- src/scripting/scriptscheduler_lua.inl | 2 +- src/scripting/systemcapabilitiesbinding.cpp | 53 ++-- src/util/blockplaneintersectiongeometry.cpp | 7 +- src/util/boxgeometry.cpp | 8 +- src/util/camera.cpp | 6 +- src/util/factorymanager.cpp | 4 +- src/util/histogram.cpp | 4 +- src/util/keys.cpp | 8 +- src/util/openspacemodule.cpp | 6 +- src/util/powerscaledsphere.cpp | 4 +- src/util/screenlog.cpp | 6 +- src/util/spicemanager.cpp | 235 ++++++++---------- src/util/task.cpp | 2 +- src/util/threadpool.cpp | 4 +- src/util/time.cpp | 2 +- src/util/timemanager.cpp | 6 +- src/util/timerange.cpp | 2 +- support/coding/check_style_guide.py | 35 ++- 387 files changed, 1907 insertions(+), 2132 deletions(-) delete mode 100644 modules/globebrowsing/tile/tileprovider/presentationslideprovider.cpp diff --git a/apps/Launcher/mainwindow.cpp b/apps/Launcher/mainwindow.cpp index 46d6ea595b..59e50a1547 100644 --- a/apps/Launcher/mainwindow.cpp +++ b/apps/Launcher/mainwindow.cpp @@ -84,10 +84,10 @@ MainWindow::MainWindow() setObjectName("MainWindow"); setFixedSize(WindowSize); //setContentsMargins(0, 0, 0, 0); - + QGridLayout* layout = new QGridLayout; layout->setContentsMargins(0, 0, 0, 0); - + QLabel* image = new QLabel; //image->setContentsMargins(0, 0, 0, 0); image->setObjectName("Image"); @@ -95,7 +95,6 @@ MainWindow::MainWindow() image->setPixmap(p); layout->addWidget(image, 0, 0, 1, 2); - _informationWidget = new QTextEdit(this); _informationWidget->setReadOnly(true); //_informationWidget->setEnabled(false); @@ -107,7 +106,7 @@ MainWindow::MainWindow() QWidget* container = new QWidget; { QGridLayout* innerLayout = new QGridLayout; - + //QLabel* shortcutLabel = new QLabel("Keyboard Shortcuts:"); //innerLayout->addWidget(shortcutLabel, 0, 0); //QPushButton* shortcutButton = new QPushButton("Open..."); @@ -122,47 +121,47 @@ MainWindow::MainWindow() innerLayout->addWidget(configurationSelectionLabel, 2, 0); _configurations = new QComboBox; innerLayout->addWidget(_configurations, 2, 1); - + QLabel* sceneSelectionLabel = new QLabel("Scenes:"); innerLayout->addWidget(sceneSelectionLabel, 3, 0); _scenes = new QComboBox; innerLayout->addWidget(_scenes, 3, 1); - + container->setLayout(innerLayout); } layout->addWidget(container, 1, 1); - + container = new QWidget; { QBoxLayout* innerLayout = new QHBoxLayout; - + QPushButton* cancelButton = new QPushButton("Exit"); QObject::connect( cancelButton, SIGNAL(clicked(bool)), QApplication::instance(), SLOT(quit()) ); innerLayout->addWidget(cancelButton); - + QPushButton* syncButton = new QPushButton("Sync"); QObject::connect( syncButton, SIGNAL(clicked(bool)), this, SLOT(syncButtonPressed()) ); innerLayout->addWidget(syncButton); - + QPushButton* startButton = new QPushButton("Start"); QObject::connect( startButton, SIGNAL(clicked(bool)), this, SLOT(startButtonPressed()) ); innerLayout->addWidget(startButton); - + container->setLayout(innerLayout); } layout->addWidget(container, 2, 1); - + setLayout(layout); - + initialize(); } @@ -244,7 +243,7 @@ void MainWindow::initialize() { // Get the news information QNetworkRequest request; request.setUrl(QUrl(NewsURL)); - + _newsReply = _networkManager.get(request); QObject::connect(_newsReply, SIGNAL(finished()), this, SLOT(newsReadyRead()) diff --git a/apps/Launcher/mainwindow.h b/apps/Launcher/mainwindow.h index 9c1e56449c..54436e09b0 100644 --- a/apps/Launcher/mainwindow.h +++ b/apps/Launcher/mainwindow.h @@ -53,7 +53,7 @@ private slots: void shortcutButtonPressed(); void syncButtonPressed(); void startButtonPressed(); - + void newsNetworkError(); void newsReadyRead(); @@ -64,7 +64,7 @@ private: void configureLogging(); QNetworkReply* _newsReply; - + QTextEdit* _informationWidget; QComboBox* _configurations; @@ -72,7 +72,7 @@ private: QComboBox* _scenes; QMap _sceneFiles; - + ShortcutWidget* _shortcutWidget; SyncWidget* _syncWidget; diff --git a/apps/Launcher/syncwidget.cpp b/apps/Launcher/syncwidget.cpp index b02351e3e8..df65188357 100644 --- a/apps/Launcher/syncwidget.cpp +++ b/apps/Launcher/syncwidget.cpp @@ -281,7 +281,7 @@ void SyncWidget::handleDirectFiles() { void SyncWidget::handleFileRequest() { LDEBUG("File Requests"); - + for (const FileRequest& f : _fileRequests) { LDEBUG(f.identifier.toStdString() << " (" << f.version << ") -> " << f.destination.toStdString()); @@ -405,18 +405,18 @@ void SyncWidget::syncButtonPressed() { for (int i = 1; i <= modules.size(); ++i) { std::string module = modules.value(std::to_string(i)); std::string shortModule = module; - + std::string::size_type pos = module.find_last_of(FileSys.PathSeparator); if (pos != std::string::npos) { shortModule = module.substr(pos+1); } - + QString m = QString::fromStdString(module); - + QString dataFile = sceneDir.absoluteFilePath( QString::fromStdString(module) + "/" + QString::fromStdString(shortModule) + ".data" ); - + if (QFileInfo(dataFile).exists()) { modulesList.append({ QString::fromStdString(module), @@ -427,13 +427,13 @@ void SyncWidget::syncButtonPressed() { else { QDir metaModuleDir = sceneDir; metaModuleDir.cd(QString::fromStdString(module)); - + QDirIterator it(metaModuleDir.absolutePath(), QStringList() << "*.data", QDir::Files, QDirIterator::Subdirectories); while (it.hasNext()) { QString v = it.next(); QDir d(v); d.cdUp(); - + modulesList.append({ d.dirName(), v, @@ -533,7 +533,7 @@ void SyncWidget::syncButtonPressed() { continue; } std::string file = d.value(FileKey); - + std::string dest; if (d.hasKeyAndValue(DestinationKey)) dest = d.value(DestinationKey); diff --git a/apps/Launcher/syncwidget.h b/apps/Launcher/syncwidget.h index 028c15e326..ec7eb88adb 100644 --- a/apps/Launcher/syncwidget.h +++ b/apps/Launcher/syncwidget.h @@ -52,7 +52,7 @@ Q_OBJECT public: SyncWidget(QWidget* parent, Qt::WindowFlags f = 0); ~SyncWidget(); - + void setSceneFiles(QMap sceneFiles); private slots: diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 3bc0f706c2..d5dc91c1b4 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -66,7 +66,7 @@ #define DEVELOPER_MODE namespace { - + const char* _loggerCat = "main"; sgct::Engine* SgctEngine; @@ -79,7 +79,6 @@ LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) { SYSTEMTIME stLocalTime; GetLocalTime(&stLocalTime); - LFATAL("Printing Stack Trace that lead to the crash:"); std::vector stackTrace = ghoul::stackTrace(); for (const std::string& s : stackTrace) { @@ -139,7 +138,7 @@ LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) { } #endif // WIN32 - + #ifdef OPENVR_SUPPORT sgct::SGCTWindow* FirstOpenVRWindow = nullptr; #endif @@ -172,7 +171,6 @@ std::vector SpoutWindows; #endif // OPENSPACE_HAS_SPOUT - std::pair supportedOpenGLVersion() { // Just create a window in order to retrieve the available OpenGL version before we // create the real window @@ -188,9 +186,9 @@ std::pair supportedOpenGLVersion() { glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); #endif - + glfwWindowHint(GLFW_VISIBLE, GL_FALSE); - + // By creating an offscreen window, the user will not know that we created this window GLFWwindow* offscreen = glfwCreateWindow(128, 128, "", nullptr, nullptr); glfwMakeContextCurrent(offscreen); @@ -203,7 +201,7 @@ std::pair supportedOpenGLVersion() { // And get rid of the window again glfwDestroyWindow(offscreen); glfwWindowHint(GLFW_VISIBLE, GL_TRUE); - + return { major, minor }; } @@ -217,14 +215,14 @@ void mainInitFunc() { LDEBUG("Initializing OpenGL in OpenSpace Engine started"); OsEng.initializeGL(); LDEBUG("Initializing OpenGL in OpenSpace Engine finished"); - + // Find if we have at least one OpenVR window // Save reference to first OpenVR window, which is the one we will copy to the HMD. for (size_t i = 0; i < SgctEngine->getNumberOfWindows(); ++i) { if (SgctEngine->getWindowPtr(i)->checkIfTagExists(OpenVRTag)) { #ifdef OPENVR_SUPPORT FirstOpenVRWindow = SgctEngine->getWindowPtr(i); - + // If we have an OpenVRWindow, initialize OpenVR. sgct::SGCTOpenVR::initialize( SgctEngine->getNearClippingPlane(), SgctEngine->getFarClippingPlane() @@ -305,7 +303,7 @@ void mainInitFunc() { LWARNING( "Spout was requested, but OpenSpace was compiled without Spout support." ); - + #endif // OPENSPACE_HAS_SPOUT } LTRACE("main::mainInitFunc(end)"); @@ -480,7 +478,7 @@ void mainLogCallback(const char* msg) { int main_main(int argc, char** argv) { std::pair glVersion = supportedOpenGLVersion(); - + // Create the OpenSpace engine and get arguments for the SGCT engine // @CLEANUP: Replace the return valua with throwing an exception --abock std::vector sgctArguments; @@ -491,37 +489,37 @@ int main_main(int argc, char** argv) { sgctArguments, requestQuit ); - + if (requestQuit) { return EXIT_SUCCESS; } - + LINFO("Detected OpenGL version: " << glVersion.first << "." << glVersion.second); - + // Create sgct engine c arguments int newArgc = static_cast(sgctArguments.size()); - + char** newArgv = new char*[newArgc]; for (int i = 0; i < newArgc; ++i) { newArgv[i] = const_cast(sgctArguments.at(i).c_str()); } - + // Need to set this before the creation of the sgct::Engine sgct::MessageHandler::instance()->setLogToConsole(false); sgct::MessageHandler::instance()->setShowTime(false); sgct::MessageHandler::instance()->setLogToCallback(true); sgct::MessageHandler::instance()->setLogCallback(mainLogCallback); - + #ifdef __APPLE__ glfwWindowHint(GLFW_STENCIL_BITS, 8); #endif - + LDEBUG("Creating SGCT Engine"); SgctEngine = new sgct::Engine(newArgc, newArgv); - + // Deallocate sgct c arguments delete[] newArgv; - + // Bind functions SgctEngine->setInitOGLFunction(mainInitFunc); SgctEngine->setPreSyncFunction(mainPreSyncFunc); @@ -534,17 +532,17 @@ int main_main(int argc, char** argv) { SgctEngine->setMouseScrollCallbackFunction(mainMouseScrollCallback); SgctEngine->setExternalControlCallback(mainExternalControlCallback); SgctEngine->setCharCallbackFunction(mainCharCallback); - + // Disable the immediate exit of the application when the ESC key is pressed SgctEngine->setExitKey(SGCT_KEY_UNKNOWN); - + sgct::MessageHandler::instance()->setNotifyLevel(sgct::MessageHandler::NOTIFY_ALL); - + // Set encode and decode functions // NOTE: starts synchronizing before init functions sgct::SharedData::instance()->setEncodeFunction(mainEncodeFun); sgct::SharedData::instance()->setDecodeFunction(mainDecodeFun); - + // Try to open a window LDEBUG("Initialize SGCT Engine"); std::map, sgct::Engine::RunMode> versionMapping = { @@ -561,17 +559,17 @@ int main_main(int argc, char** argv) { versionMapping.find(glVersion) != versionMapping.end(), "Unknown OpenGL version. Missing statement in version mapping map" ); - + auto cleanup = [&](){ OsEng.deinitialize(); - + // Clear function bindings to avoid crash after destroying the OpenSpace Engine sgct::MessageHandler::instance()->setLogToCallback(false); sgct::MessageHandler::instance()->setLogCallback(nullptr); - + LDEBUG("Destroying OpenSpaceEngine"); openspace::OpenSpaceEngine::destroy(); - + LDEBUG("Destroying SGCT Engine"); delete SgctEngine; @@ -594,26 +592,26 @@ int main_main(int argc, char** argv) { } #endif // OPENSPACE_HAS_SPOUT }; - + bool initSuccess = SgctEngine->init(versionMapping[glVersion]); - + if (!initSuccess) { LFATAL("Initializing failed"); cleanup(); return EXIT_FAILURE; } - + // Main loop LDEBUG("Starting rendering loop"); SgctEngine->render(); LDEBUG("Ending rendering loop"); - + cleanup(); - + // Exit program exit(EXIT_SUCCESS); } - + } // namespace int main(int argc, char** argv) { diff --git a/apps/TimelineView/controlwidget.cpp b/apps/TimelineView/controlwidget.cpp index 010e00a9cd..a4f501d830 100644 --- a/apps/TimelineView/controlwidget.cpp +++ b/apps/TimelineView/controlwidget.cpp @@ -177,7 +177,6 @@ ControlWidget::ControlWidget(QWidget* parent) _setDelta->setObjectName("background"); layout->addWidget(_setDelta, 4, 0, 1, 2); - QWidget* controlContainer = new QWidget; controlContainer->setObjectName("background"); diff --git a/apps/TimelineView/mainwindow.cpp b/apps/TimelineView/mainwindow.cpp index 088f4f3a95..b227633515 100644 --- a/apps/TimelineView/mainwindow.cpp +++ b/apps/TimelineView/mainwindow.cpp @@ -228,7 +228,7 @@ void MainWindow::readTcpData() { fullyConnected(); continuousData.clear(); break; - + default: qDebug() << QString(data); } @@ -309,7 +309,7 @@ QByteArray MainWindow::handlePlaybook(QByteArray data) { image.beginningString = readFromBuffer(buffer, currentReadLocation); image.endingString = readFromBuffer(buffer, currentReadLocation); - + uint8_t targetId = readFromBuffer(buffer, currentReadLocation); uint16_t instrumentId = readFromBuffer(buffer, currentReadLocation); image.target = targetMap[targetId]; diff --git a/apps/TimelineView/mainwindow.h b/apps/TimelineView/mainwindow.h index 5bb3774885..70a0f06cc4 100644 --- a/apps/TimelineView/mainwindow.h +++ b/apps/TimelineView/mainwindow.h @@ -65,7 +65,7 @@ private: ControlWidget* _timeControlWidget; InformationWidget* _informationWidget; TimelineWidget* _timelineWidget; - + QTcpSocket* _socket; bool _isConnected = false; diff --git a/apps/TimelineView/timelinewidget.cpp b/apps/TimelineView/timelinewidget.cpp index 1003a82d24..b4014b12bf 100644 --- a/apps/TimelineView/timelinewidget.cpp +++ b/apps/TimelineView/timelinewidget.cpp @@ -35,7 +35,7 @@ namespace { static const int LegendHeight = 105; static const int TimeWidth = 200; - + static const int TextOffset = 5; QMap InstrumentColors = { @@ -127,7 +127,7 @@ void TimelineWidget::setData(std::vector images, std::map namespace openspace { - + /* * This abstract class is used for instances when another class has the ability to * generate a Handlebar generated documentation file that contains valuable information @@ -51,7 +51,7 @@ public: std::string name; ///< The name of the Handlebar template defined in \m filename std::string filename; ///< The filename referenced in the \m name }; - + /** * The constructor that is used to set the member variables later used in the * writeDocumentation method. @@ -72,7 +72,7 @@ public: /// Default constructor virtual ~DocumentationGenerator() = default; - + /** * Create the documentation into the provided filename. Any existing file will be * silently overwritten. This method will call the generateJson method that can be @@ -81,7 +81,7 @@ public: * \param filename The filename in which the documentation is written */ void writeDocumentation(const std::string& filename); - + protected: /** * This abstract method is used by concrete subclasses to provide the actual data that @@ -92,14 +92,13 @@ protected: * DocumentationGenerator constructor */ virtual std::string generateJson() const = 0; - + private: const std::string _name; const std::string _jsonName; const std::vector _handlebarTemplates; const std::string _javascriptFile; }; - /** * This function takes a \p text and escapes all necessary characters () that JSON diff --git a/include/openspace/engine/configurationmanager.h b/include/openspace/engine/configurationmanager.h index 69a83bb6a8..d13734aee8 100644 --- a/include/openspace/engine/configurationmanager.h +++ b/include/openspace/engine/configurationmanager.h @@ -168,7 +168,7 @@ public: * \throw ghoul::RuntimeError If the configuration could not be found */ static std::string findConfiguration(const std::string& filename); - + /** * Load the provided configuration file (\p filename) into this Dictionary. All paths * that are specified in the configuration file will automatically be registered in diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h index f7c18d2b16..22b15f142f 100644 --- a/include/openspace/engine/moduleengine.h +++ b/include/openspace/engine/moduleengine.h @@ -57,7 +57,7 @@ public: * name */ void initialize(); - + /** * Deinitializes all of the contained OpenSpaceModule%s by calling the * OpenSpaceModule::deinitialize methods. @@ -73,14 +73,14 @@ public: * \pre \p module must not be nullptr */ void registerModule(std::unique_ptr module); - + /** * Returns a list of all registered OpenSpaceModule%s that have been registered with * this ModuleEngine. All returned OpenSpaceModule%s are guaranteed to be initialized. * \return A list of all registered OpenSpaceModule%s */ std::vector modules() const; - + /** * Get the module subclass with given template argument. Requires the module subclass * to have the public static member variable name which must be equal to diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 28bb568b37..8aa395f08e 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -98,10 +98,10 @@ public: void decode(); void scheduleLoadScene(std::string scenePath); - + void writeDocumentation(); void toggleShutdownMode(); - + void runPostInitializationScripts(const std::string& sceneDescription); // Guaranteed to return a valid pointer @@ -123,7 +123,7 @@ public: scripting::ScriptScheduler& scriptScheduler(); VirtualPropertyManager& virtualPropertyManager(); - + // This method is only to be called from Modules enum class CallbackOption { Initialize = 0, // Callback for the end of the initialization @@ -135,14 +135,14 @@ public: Render, // Callback for the end of the render function PostDraw // Callback for the end of the post-draw function }; - + // Registers a callback for a specific CallbackOption void registerModuleCallback(CallbackOption option, std::function function); - + // Registers a callback that is called when a new keyboard event is received void registerModuleKeyboardCallback( std::function function); - + // Registers a callback that is called when a new character event is received void registerModuleCharCallback( std::function function); @@ -150,16 +150,16 @@ public: // Registers a callback that is called when a new mouse button is received void registerModuleMouseButtonCallback( std::function function); - + // Registers a callback that is called when a new mouse movement is received void registerModuleMousePositionCallback( std::function function); - + // Registers a callback that is called when a scroll wheel change is received void registerModuleMouseScrollWheelCallback( std::function function ); - + /** * Returns the Lua library that contains all Lua functions available to affect the * application. @@ -175,7 +175,7 @@ private: void loadFonts(); void runPreInitializationScripts(const std::string& sceneDescription); void configureLogging(); - + // Components std::unique_ptr _configurationManager; std::unique_ptr _sceneManager; @@ -204,30 +204,30 @@ private: properties::StringProperty versionString; properties::StringProperty sourceControlInformation; } _versionInformation; - + bool _scheduledSceneSwitch; std::string _scenePath; struct { std::vector> initialize; std::vector> deinitialize; - + std::vector> initializeGL; std::vector> deinitializeGL; - + std::vector> preSync; std::vector> postSyncPreDraw; std::vector> render; std::vector> postDraw; - + std::vector> keyboard; std::vector> character; - + std::vector> mouseButton; std::vector> mousePosition; std::vector> mouseScrollWheel; } _moduleCallbacks; - + // Structure that is responsible for the delayed shutdown of the application struct { // Whether the application is currently in shutdown mode (i.e. counting down the diff --git a/include/openspace/engine/settingsengine.h b/include/openspace/engine/settingsengine.h index 4c90b10832..e5bd295995 100644 --- a/include/openspace/engine/settingsengine.h +++ b/include/openspace/engine/settingsengine.h @@ -34,7 +34,7 @@ #include namespace openspace { - + class OpenSpaceModule; class SettingsEngine : public properties::PropertyOwner { @@ -42,7 +42,7 @@ public: SettingsEngine(); void initialize(); - + void setModules(const std::vector& modules); private: diff --git a/include/openspace/engine/syncengine.h b/include/openspace/engine/syncengine.h index 8d2c92711e..a23dc78c22 100644 --- a/include/openspace/engine/syncengine.h +++ b/include/openspace/engine/syncengine.h @@ -71,7 +71,7 @@ public: * Invokes the postsync method of all added Syncables */ void postSynchronization(IsMaster isMaster); - + /** * Add a Syncable to be synchronized over the SGCT cluster. * \pre syncable must not be nullptr diff --git a/include/openspace/engine/wrapper/sgctwindowwrapper.h b/include/openspace/engine/wrapper/sgctwindowwrapper.h index d106ce400d..8f7d5d8107 100644 --- a/include/openspace/engine/wrapper/sgctwindowwrapper.h +++ b/include/openspace/engine/wrapper/sgctwindowwrapper.h @@ -64,14 +64,14 @@ public: bool isMaster() const override; bool isUsingSwapGroups() const override; bool isSwapGroupMaster() const override; - + glm::mat4 viewProjectionMatrix() const override; glm::mat4 modelMatrix() const override; void setNearFarClippingPlane(float near, float far) override; void setEyeSeparationDistance(float distance) override; - + glm::ivec4 viewportPixelCoordinates() const override; - + bool isExternalControlConnected() const override; void sendMessageToExternalControl(const std::vector& message) const override; diff --git a/include/openspace/engine/wrapper/windowwrapper.h b/include/openspace/engine/wrapper/windowwrapper.h index 23713c50de..2498addbfd 100644 --- a/include/openspace/engine/wrapper/windowwrapper.h +++ b/include/openspace/engine/wrapper/windowwrapper.h @@ -76,7 +76,7 @@ public: * disables it */ virtual void setSynchronization(bool enabled); - + /** * This method clears all the rendering windows with the specified \p clearColor. In * most OpenGL cases, this will end up with one or mode glClear calls. @@ -84,7 +84,7 @@ public: * \param clearColor The color with which to clear all windows */ virtual void clearAllWindows(const glm::vec4& clearColor); - + /** * Returns whether the current window has been resized recently. On default, this * method always returns false. @@ -119,7 +119,7 @@ public: * \return The location of the mouse cursor in pixel screen coordinates */ virtual glm::vec2 mousePosition() const; - + /** * Returns a bitmask of the status of all available mouse buttons. Bit i * is 1 if mouse button i is pressed down; @@ -129,28 +129,28 @@ public: * \return A bitmask showing the status of all mouse buttons (up to \p maxNumber) */ virtual uint32_t mouseButtons(int maxNumber = 8) const; - + /** * Returns the size of the currently active window in pixel coordinates. On default, * this method returns a window size of 0,0. * \return The size of the currently active window in pixel coordinates */ virtual glm::ivec2 currentWindowSize() const; - + /** * Returns the resolution of the currently active window in pixel coordinates. On * default, this method returns the same size as #currentWindowSize. * \return The resolution of the currently active window in pixel coordinates */ virtual glm::ivec2 currentWindowResolution() const; - + /** * Returns the resolution of the currently active framebuffer in pixel coordinates. * On default, this method returns the same size as #currentWindowSize. * \return The resolution of the currently active window in pixel coordinates */ virtual glm::ivec2 currentDrawBufferResolution() const; - + /** * Returns the DPI scaling factor for the current window. This is normally 1 on all * regular monitors and 2 on Retina screens. @@ -187,7 +187,7 @@ public: * \return Whether the current rendering window is GUI-only */ virtual bool isGuiWindow() const; - + /** * Returns true if this application is the master for a clustered * environment. @@ -218,7 +218,7 @@ public: * \return The currently employed model matrix */ virtual glm::mat4 modelMatrix() const; - + /** * Sets the near and far clipping planes of the rendering window. This method defaults * to a no-op. @@ -226,7 +226,7 @@ public: * \param far The far clipping plane */ virtual void setNearFarClippingPlane(float near, float far); - + /** * Sets the stereo eye separation distance for the render engine. * \param distance The distance between eyes for stereo rendering. @@ -241,7 +241,7 @@ public: * \return The location and size of the current viewport */ virtual glm::ivec4 viewportPixelCoordinates() const; - + /** * Returns true if there is an external control connected, i.e., an * application that can receive control commands. On default, this method will return @@ -249,13 +249,13 @@ public: * \return If there is an external control connected */ virtual bool isExternalControlConnected() const; - + /** * Sends a \p message to an external control. This method defaults to a no-op. * \param message The message to be sent */ virtual void sendMessageToExternalControl(const std::vector& message) const; - + /** * Returns true if the rendering is a single viewport with an single * window; false otherwise. On default, this method returns diff --git a/include/openspace/interaction/controller.h b/include/openspace/interaction/controller.h index 41076f09b1..6c837d4315 100644 --- a/include/openspace/interaction/controller.h +++ b/include/openspace/interaction/controller.h @@ -39,7 +39,7 @@ public: Controller() : _handler(nullptr) {} - + void setHandler(NavigationHandler* handler); protected: diff --git a/include/openspace/interaction/interpolator.h b/include/openspace/interaction/interpolator.h index 625b9f2b0d..810b0650ed 100644 --- a/include/openspace/interaction/interpolator.h +++ b/include/openspace/interaction/interpolator.h @@ -44,7 +44,7 @@ public: void setTransferFunction(std::function transferFunction); void setInterpolationTime(float interpolationTime); void step(); - + float deltaTimeScaled() const; T value() const; bool isInterpolating() const; diff --git a/include/openspace/interaction/keybindingmanager.h b/include/openspace/interaction/keybindingmanager.h index 8d66788195..8682fecc6a 100644 --- a/include/openspace/interaction/keybindingmanager.h +++ b/include/openspace/interaction/keybindingmanager.h @@ -42,7 +42,7 @@ class KeyBindingManager : public DocumentationGenerator { public: KeyBindingManager(); ~KeyBindingManager() = default; - + void resetKeyBindings(); void bindKeyLocal( @@ -72,7 +72,7 @@ private: Synchronized synchronization; std::string documentation; }; - + std::string generateJson() const override; std::multimap _keyLua; diff --git a/include/openspace/interaction/mousestate.h b/include/openspace/interaction/mousestate.h index 40b619f036..7db9a94d53 100644 --- a/include/openspace/interaction/mousestate.h +++ b/include/openspace/interaction/mousestate.h @@ -36,7 +36,7 @@ struct MouseState { MouseState(double scaleFactor); void setFriction(double friction); void setVelocityScaleFactor(double scaleFactor); - + glm::dvec2 previousPosition; DelayedVariable velocity; }; diff --git a/include/openspace/interaction/navigationhandler.h b/include/openspace/interaction/navigationhandler.h index 03aad77069..6e8d4fad76 100644 --- a/include/openspace/interaction/navigationhandler.h +++ b/include/openspace/interaction/navigationhandler.h @@ -58,7 +58,7 @@ public: void resetCameraDirection(); void setCameraStateFromDictionary(const ghoul::Dictionary& cameraDict); - + void updateCamera(double deltaTime); // Accessors diff --git a/include/openspace/interaction/orbitalnavigator.h b/include/openspace/interaction/orbitalnavigator.h index 7faf0b77b4..8a99f752e6 100644 --- a/include/openspace/interaction/orbitalnavigator.h +++ b/include/openspace/interaction/orbitalnavigator.h @@ -89,7 +89,7 @@ private: SceneGraphNode* _focusNode = nullptr; glm::dvec3 _previousFocusNodePosition; glm::dquat _previousFocusNodeRotation; - + Interpolator _rotateToFocusNodeInterpolator; Interpolator _followRotationInterpolator; @@ -117,14 +117,14 @@ private: */ glm::dquat rotateLocally(double deltaTime, const glm::dquat& localCameraRotation) const; - + /** * Interpolates the local rotation towards a 0 rotation. * \returns a modified local rotation interpolated towards 0. */ glm::dquat interpolateLocalRotation(double deltaTime, const glm::dquat& localCameraRotation); - + /** * Translates the horizontal direction. If far from the focus object, this will * result in an orbital rotation around the object. This function does not affect the diff --git a/include/openspace/mission/mission.h b/include/openspace/mission/mission.h index 03e19d1ff6..a7036bfb44 100644 --- a/include/openspace/mission/mission.h +++ b/include/openspace/mission/mission.h @@ -114,7 +114,7 @@ protected: * \pre maxDepth must not be negative */ void phaseTrace(double time, Trace& trace, int maxDepth) const; - + /// The name of the MissionPhase std::string _name; /// The description of the MissionPhase diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index e200630526..eb3c9eea09 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -51,14 +51,14 @@ struct CameraKeyframe { std::string _focusNode; double _timestamp; - + void serialize(std::vector &buffer){ // 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)); @@ -71,11 +71,11 @@ struct CameraKeyframe { // Add timestamp buffer.insert(buffer.end(), reinterpret_cast(&_timestamp), reinterpret_cast(&_timestamp) + sizeof(_timestamp)); }; - + void deserialize(const std::vector &buffer){ int offset = 0; int size = 0; - + // Position size = sizeof(_position); memcpy(&_position, buffer.data() + offset, size); @@ -99,13 +99,13 @@ struct CameraKeyframe { size = nodeNameLength; _focusNode = std::string(buffer.data() + offset, buffer.data() + offset + size); offset += size; - + // Timestamp size = sizeof(_timestamp); memcpy(&_timestamp, buffer.data() + offset, size); }; }; - + struct TimeKeyframe { TimeKeyframe() {} TimeKeyframe(const std::vector &buffer) { @@ -117,43 +117,43 @@ struct TimeKeyframe { bool _paused; bool _requiresTimeJump; double _timestamp; - + void serialize(std::vector &buffer){ // Add current time buffer.insert(buffer.end(), reinterpret_cast(&_time), reinterpret_cast(&_time) + sizeof(_time)); - + // Add delta time buffer.insert(buffer.end(), reinterpret_cast(&_dt), reinterpret_cast(&_dt) + sizeof(_dt)); - + // Add whether time is paused or not buffer.insert(buffer.end(), reinterpret_cast(&_paused), reinterpret_cast(&_paused) + sizeof(_paused)); - + // Add whether a time jump is necessary (recompute paths etc) buffer.insert(buffer.end(), reinterpret_cast(&_requiresTimeJump), reinterpret_cast(&_requiresTimeJump) + sizeof(_requiresTimeJump)); // Add timestamp buffer.insert(buffer.end(), reinterpret_cast(&_timestamp), reinterpret_cast(&_timestamp) + sizeof(_timestamp)); }; - + void deserialize(const std::vector &buffer){ int offset = 0; int size = 0; - + // Current time size = sizeof(_time); memcpy(&_time, buffer.data() + offset, size); offset += size; - + // Delta time size = sizeof(_dt); memcpy(&_dt, buffer.data() + offset, size); offset += size; - + // Is time paused? size = sizeof(_paused); memcpy(&_paused, buffer.data() + offset, size); offset += sizeof(_paused); - + // Is a time jump required? size = sizeof(_requiresTimeJump); memcpy(&_requiresTimeJump, buffer.data() + offset, size); @@ -165,7 +165,7 @@ struct TimeKeyframe { offset += size; }; }; - + struct ScriptMessage { ScriptMessage() {} ScriptMessage(const std::vector &buffer) { @@ -173,16 +173,16 @@ struct ScriptMessage { } std::string _script; - + void serialize(std::vector &buffer){ buffer.insert(buffer.end(), _script.begin(), _script.end()); }; - + void deserialize(const std::vector &buffer){ _script.assign(buffer.begin(), buffer.end()); }; }; - + } // namespace openspace::messagestructures #endif // __OPENSPACE_CORE___MESSAGESTRUCTURES___H__ diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 14b58f9579..47cd5a7663 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -125,8 +125,7 @@ class ParallelConnection : public properties::PropertyOwner { int nConnections(); std::shared_ptr> connectionEvent(); - - + private: //@TODO change this into the ghoul hasher for client AND server uint32_t hash(const std::string &val); @@ -171,7 +170,7 @@ private: double _lastTimeKeyframeTimestamp; double _lastCameraKeyframeTimestamp; - + _SOCKET _clientSocket; std::atomic _isConnected; @@ -186,14 +185,14 @@ private: std::condition_variable _disconnectCondition; std::mutex _disconnectMutex; - + std::condition_variable _sendCondition; std::deque _sendBuffer; std::mutex _sendBufferMutex; std::deque _receiveBuffer; std::mutex _receiveBufferMutex; - + std::atomic _timeJumped; std::mutex _latencyMutex; std::deque _latencyDiffs; diff --git a/include/openspace/performance/performancemanager.h b/include/openspace/performance/performancemanager.h index 6b12dfa914..890657363c 100644 --- a/include/openspace/performance/performancemanager.h +++ b/include/openspace/performance/performancemanager.h @@ -43,19 +43,19 @@ class PerformanceManager { public: static void createGlobalSharedMemory(); static void destroyGlobalSharedMemory(); - + PerformanceManager(std::string loggingDirectory = "${BASE_PATH}", std::string prefix = "PM-"); - + ~PerformanceManager(); void resetPerformanceMeasurements(); - + bool isMeasuringPerformance() const; void storeIndividualPerformanceMeasurement(std::string identifier, long long nanoseconds); void storeScenePerformanceMeasurements(const std::vector& sceneNodes); - + void outputLogs(); void writeData(std::ofstream& out, const std::vector& data); @@ -83,13 +83,13 @@ private: std::string _prefix; std::string _suffix; std::string _ext; - + std::map individualPerformanceLocations; - + std::unique_ptr _performanceMemory; size_t _tick; - + void tick(); bool createLogDir(); }; diff --git a/include/openspace/performance/performancemeasurement.h b/include/openspace/performance/performancemeasurement.h index 58d90650e2..7815492e51 100644 --- a/include/openspace/performance/performancemeasurement.h +++ b/include/openspace/performance/performancemeasurement.h @@ -46,7 +46,7 @@ private: std::chrono::high_resolution_clock::time_point _startTime; }; - + #define __MERGE(a,b) a##b #define __LABEL(a) __MERGE(unique_name_, a) @@ -57,7 +57,7 @@ private: (name), \ OsEng.renderEngine().performanceManager() \ ) - + } // namespace openspace::performance #endif // __OPENSPACE_CORE___PERFORMANCEMEASUREMENT___H__ diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 51ce94f827..39a4ea2cf9 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -232,7 +232,7 @@ const std::string NumericalProperty::SteppingValueKey = "SteppingValue"; // Delegating constructors are necessary; automatic template deduction cannot // deduce template argument for 'U' if 'default' methods are used as default values in // a single constructor - + template NumericalProperty::NumericalProperty(Property::PropertyInfo info) : NumericalProperty( diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 62e0fbf15d..83301f87d1 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -148,7 +148,7 @@ public: * \return The type that is requested by this Property's Property::set method */ virtual const std::type_info& type() const; - + /** * This method encodes the encapsulated value of this Property at the top of the Lua * stack. The specific details of this serialization is up to the property developer @@ -237,7 +237,7 @@ public: * \return The unique identifier of this Property */ const std::string& identifier() const; - + /** * Returns the fully qualified name for this Property that uniquely identifies this * Property within OpenSpace. It consists of the identifier preceded by @@ -260,7 +260,7 @@ public: * \param owner The new PropertyOwner for this Property */ void setPropertyOwner(PropertyOwner* owner); - + /** * Returns the human-readable GUI name for this Property that has been set in the * constructor. This method returns the same value as accessing the metaData object diff --git a/include/openspace/properties/propertyowner.h b/include/openspace/properties/propertyowner.h index 061a77d8fe..c0f8bc8914 100644 --- a/include/openspace/properties/propertyowner.h +++ b/include/openspace/properties/propertyowner.h @@ -56,7 +56,7 @@ public: std::string name; std::string description = ""; }; - + /// The constructor initializing the PropertyOwner's name to "" PropertyOwner(PropertyOwnerInfo info); @@ -85,7 +85,6 @@ public: void setDescription(std::string description); std::string description() const; - /** * Returns a list of all Propertys directly owned by this PropertyOwner. This list not @@ -123,7 +122,7 @@ public: * false otherwise. */ bool hasProperty(const std::string& URI) const; - + void setPropertyOwner(PropertyOwner* owner) { _owner = owner; } PropertyOwner* owner() const { return _owner; } @@ -171,7 +170,7 @@ public: * groupID */ std::string propertyGroupName(const std::string& groupID) const; - + /** * Assigns the Property prop to this PropertyOwner. This method will * check if the name of the Property is unique amongst Propertys and sub-owners in @@ -180,10 +179,10 @@ public: * \param prop The Property whose ownership is changed. */ void addProperty(Property* prop); - + /// \see Property::addProperty(Property*) void addProperty(Property& prop); - + /** * Adds the provided PropertyOwner to the list of sub-owners for this PropertyOwner. * This means that the name of the owner has to be unique amonst the @@ -206,7 +205,7 @@ public: /// \see PropertyOwner::removeProperty(Property*) void removeProperty(Property& prop); - + /** * Removes the sub-owner from this PropertyOwner. * \param owner The PropertyOwner that should be removed diff --git a/include/openspace/properties/scalar/boolproperty.h b/include/openspace/properties/scalar/boolproperty.h index bb5a6bae41..ee74bbfcf8 100644 --- a/include/openspace/properties/scalar/boolproperty.h +++ b/include/openspace/properties/scalar/boolproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class BoolProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type bool. diff --git a/include/openspace/properties/scalar/charproperty.h b/include/openspace/properties/scalar/charproperty.h index 0622c0bb00..3151c53ebe 100644 --- a/include/openspace/properties/scalar/charproperty.h +++ b/include/openspace/properties/scalar/charproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class CharProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type char. diff --git a/include/openspace/properties/scalar/doubleproperty.h b/include/openspace/properties/scalar/doubleproperty.h index 594e220ccb..0ef4ed259c 100644 --- a/include/openspace/properties/scalar/doubleproperty.h +++ b/include/openspace/properties/scalar/doubleproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class DoubleProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type double. diff --git a/include/openspace/properties/scalar/floatproperty.h b/include/openspace/properties/scalar/floatproperty.h index 0d8233ddfe..bf7957d4f0 100644 --- a/include/openspace/properties/scalar/floatproperty.h +++ b/include/openspace/properties/scalar/floatproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class FloatProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type float. diff --git a/include/openspace/properties/scalar/intproperty.h b/include/openspace/properties/scalar/intproperty.h index ac5a0fc639..b0fbdd9acb 100644 --- a/include/openspace/properties/scalar/intproperty.h +++ b/include/openspace/properties/scalar/intproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class IntProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type int. diff --git a/include/openspace/properties/scalar/longdoubleproperty.h b/include/openspace/properties/scalar/longdoubleproperty.h index 01ee6e5a2e..f02ac8f44f 100644 --- a/include/openspace/properties/scalar/longdoubleproperty.h +++ b/include/openspace/properties/scalar/longdoubleproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class LongDoubleProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type long double. diff --git a/include/openspace/properties/scalar/longlongproperty.h b/include/openspace/properties/scalar/longlongproperty.h index 151a54f8d8..d8f86f3351 100644 --- a/include/openspace/properties/scalar/longlongproperty.h +++ b/include/openspace/properties/scalar/longlongproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class LongLongProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type long long. diff --git a/include/openspace/properties/scalar/longproperty.h b/include/openspace/properties/scalar/longproperty.h index 2d76d51e3d..85576f258c 100644 --- a/include/openspace/properties/scalar/longproperty.h +++ b/include/openspace/properties/scalar/longproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class LongProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type long. diff --git a/include/openspace/properties/scalar/shortproperty.h b/include/openspace/properties/scalar/shortproperty.h index 8969e4805e..90cb81af0c 100644 --- a/include/openspace/properties/scalar/shortproperty.h +++ b/include/openspace/properties/scalar/shortproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class ShortProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type short. diff --git a/include/openspace/properties/scalar/signedcharproperty.h b/include/openspace/properties/scalar/signedcharproperty.h index d32f8b5a5c..fae4a5e2ed 100644 --- a/include/openspace/properties/scalar/signedcharproperty.h +++ b/include/openspace/properties/scalar/signedcharproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class SignedCharProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type signed char. diff --git a/include/openspace/properties/scalar/ucharproperty.h b/include/openspace/properties/scalar/ucharproperty.h index 8b0affc8e2..04f799179a 100644 --- a/include/openspace/properties/scalar/ucharproperty.h +++ b/include/openspace/properties/scalar/ucharproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class UCharProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type unsigned char. diff --git a/include/openspace/properties/scalar/uintproperty.h b/include/openspace/properties/scalar/uintproperty.h index d206a179cc..bb3b346a40 100644 --- a/include/openspace/properties/scalar/uintproperty.h +++ b/include/openspace/properties/scalar/uintproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class UIntProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type unsigned int. diff --git a/include/openspace/properties/scalar/ulonglongproperty.h b/include/openspace/properties/scalar/ulonglongproperty.h index f0290bc806..b0b36b5eb3 100644 --- a/include/openspace/properties/scalar/ulonglongproperty.h +++ b/include/openspace/properties/scalar/ulonglongproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class ULongLongProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type unsigned long long. diff --git a/include/openspace/properties/scalar/ulongproperty.h b/include/openspace/properties/scalar/ulongproperty.h index 81f6c437e2..8372f62938 100644 --- a/include/openspace/properties/scalar/ulongproperty.h +++ b/include/openspace/properties/scalar/ulongproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class ULongProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type unsigned long. diff --git a/include/openspace/properties/scalar/ushortproperty.h b/include/openspace/properties/scalar/ushortproperty.h index 6892cad6f2..10fac45e29 100644 --- a/include/openspace/properties/scalar/ushortproperty.h +++ b/include/openspace/properties/scalar/ushortproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class UShortProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type unsigned short. diff --git a/include/openspace/properties/scalar/wcharproperty.h b/include/openspace/properties/scalar/wcharproperty.h index dccaaa6ed6..d9b2ca546a 100644 --- a/include/openspace/properties/scalar/wcharproperty.h +++ b/include/openspace/properties/scalar/wcharproperty.h @@ -32,7 +32,7 @@ * @{ * \addtogroup properties * @{ - + * \class WCharProperty * This class is a concrete implementation of openspace::properties::TemplateProperty with * the type wchar_t. diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 26603c8569..f60d7b5217 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -39,7 +39,7 @@ public: }; SelectionProperty(Property::PropertyInfo info); - + void addOption(Option option); void removeOptions(); const std::vector