Unverified Commit 4041bbb9 authored by Alexander Bock's avatar Alexander Bock Committed by GitHub
Browse files

Cleanup (#600)

 * General Code Cleanup
 * Add check for TABs to check_style_guide.py
 * Removing warnings
parent 12db1dd0
master content/2012EventProfile elumenati/spout-implementation elumenati/spoutImplementation feature/2012Fieldlines feature/WSA feature/apollo-missions feature/arrow-renderable feature/asset-helper feature/asset-meta-update-part2 feature/asset-require feature/atmosphere-stars-rendering feature/bufferTransferTestings feature/camera-control-during-path feature/camera-path-stability feature/cef-update feature/change-renderbin-runtime feature/cmake feature/codegen-lua feature/codegen-lua-jenkins feature/compile-times feature/direction-hint-renderable feature/downscaledATM feature/du-meshes-selection feature/fieldlines feature/gamma-correction feature/geojson feature/geojson-renderable feature/getting-started-tour feature/grid-labels feature/grids-update feature/gui-mouseinteraction-fix feature/horizons-framework feature/horizons-unit-tests feature/idle-behavior-updates feature/imageTestKeys2Actions feature/jenkins-codegen feature/jenkins-fix feature/jenkins-timeout feature/juice feature/jwst-pointing feature/jwst-trail-update feature/jwst-update feature/labels-rendering feature/location-measure feature/macos feature/mars-moons feature/mas-model feature/missions feature/model-opacity feature/molecule_rendering feature/mollwide-projection feature/multiple-endpoints feature/orientation-check feature/paper-atmosphere feature/properties-visibility feature/renderable-enabled-event feature/rover-visualization feature/satellites feature/saturn-shepherd-moons feature/science-on-the-sphere feature/sgct-framebuffer-fixes feature/sgct-gui feature/sgct-gui-editable feature/sgct-gui-jenkins feature/sgct-json feature/sgct-ui feature/side-by-side-removal feature/skybrowser feature/skybrowser-cleanup feature/skybrowser-drag-and-drop feature/skybrowser-reload feature/solarbrowsing feature/spacecraft-instruments feature/spaceweather-stream feature/spice-update feature/state-with-time feature/tileprovider-minlevel feature/tileproviders feature/tle-bodymass feature/touchEventListener feature/transparency-rendering-last feature/ubuntu2204 feature/unit-tests feature/updateTSP feature/userproperties feature/various-changes feature/video-on-globe feature/visual-testing feature/visual-testing-try2 feature/volume-fixes feature/warnings feature/wormhole feature/xbox-update hotfix/scaling integration/atm-paper-fixes-2 integration/moon-mars-show integration/paper-atmosphere issue/1043 issue/1161 issue/1279 issue/1366-2 issue/1479 issue/1559 issue/1607 issue/1666 issue/1707 issue/1751 issue/1814 issue/1827 issue/1842 issue/1845 issue/1851 issue/1905 issue/1908 issue/1910 issue/1911 issue/1964 issue/1989 issue/1995 issue/2029 issue/2055 issue/2093 issue/2111 issue/2118 issue/2121 issue/2127 issue/2133 issue/2137 issue/2194 issue/2207 issue/2209 issue/2212 issue/2236 issue/2259 issue/2261 issue/2266 issue/2269 issue/843 issue/888 issue/hdrModels jenkins/1 jenkins/2 jenkins/2286 jenkins/utah-test-1 project/2021-wisdome-installation project/climate project/exoplanet-explorer project/exoplanets-expert-tool project/lights-2020-installation project/spaceship-installation project/spvl rc/0.18.1 temp/skybrowser-animation-fixes-merge thesis/2017/mars-rover-visualization thesis/2018/data-loader thesis/2018/dsn thesis/2018/flightcontroller thesis/2018/mas-model thesis/2019/spaceDebris thesis/2019/spaceweather-stream thesis/2020/software-integration thesis/2020/sonification thesis/2021/airtraffic thesis/2021/fieldlines thesis/2021/multiuser-collab thesis/2021/multiuser-collab3 thesis/2021/skybrowser thesis/2022/climate thesis/2022/cosmic-view thesis/2022/fieldline-rendering thesis/2022/remote-streaming thesis/2022/software-integration thesis/2022/software-integration_dod thesis/2022/software-integration_receive-ra-dec thesis/2022/software-integration_refactor-simp thesis/2022/software-integration_velocity-support thesis/2022/streaming vislabs/release/2.1 research/atmospheres releases/v0.18.0 releases/v0.17.2 releases/v0.17.1 releases/v0.17.0 releases/v0.16.1 releases/v0.16.0 releases/v0.15.2 releases/v0.15.1 releases/v0.15.0 releases/v0.14.1 releases/v0.14.0 releases/v0.13.0 releases/v0.12.0 releases/beta/beta-9 releases/beta/beta-8 releases/beta/beta-7 releases/beta/beta-5 releases/beta/beta-4_2 releases/beta/beta-4 releases/beta/beta-3 releases/beta/beta-2 dev/fc-port-change beta/beta-4_2 beta/beta-4 beta/beta-3 beta/beta-2
No related merge requests found
Showing with 72 additions and 68 deletions
+72 -68
......@@ -62,7 +62,7 @@ int main(int argc, char** argv) {
);
std::stringstream defaultPassword;
defaultPassword << std::hex << std::setfill('0') << std::setw(6) <<
defaultPassword << std::hex << std::setfill('0') << std::setw(6) <<
(std::hash<size_t>{}(
std::chrono::system_clock::now().time_since_epoch().count()
) % 0xffffff);
......
Subproject commit fd1187437c59553f2dba74684b791220cbb8d7fc
Subproject commit f0e8a06c9a92a282d2c7197c9388db1301d797ce
Subproject commit 52e2943cd74bb8346db0411bf17ed3dab4245e03
Subproject commit 03a8cd877e540beb2e4762be6036cf895ee77647
......@@ -86,9 +86,10 @@ public:
/// The key that stores the factory documentation values
static constexpr const char* KeyFactoryDocumentation = "FactoryDocumentation";
/// The key that decides whether or not we should require incoming web socket connections
/// to authorize or not
static constexpr const char* KeyRequireSocketAuthentication = "RequireSocketAuthentication";
/// The key that decides whether or not we should require incoming web socket
/// connections to authorize or not
static constexpr const char* KeyRequireSocketAuthentication =
"RequireSocketAuthentication";
/// The key that stores the location of the asset file that is initially loaded
static constexpr const char* KeyConfigAsset = "Asset";
......
......@@ -206,7 +206,7 @@ struct TimeKeyframe {
// Timestamp
size = sizeof(_timestamp);
memcpy(&_timestamp, buffer.data() + offset, size);
offset += size;
// offset += size;
};
};
......
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2017 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___BINARYPROPERTY___H__
#define __OPENSPACE_CORE___BINARYPROPERTY___H__
......
......@@ -70,7 +70,7 @@ public:
void setInterpolationTarget(ghoul::any value) override;
void setLuaInterpolationTarget(lua_State* state) override;
void setStringInterpolationTarget(std::string value) override;
void interpolateValue(float t,
ghoul::EasingFunc<float> easingFunc = nullptr) override;
......
......@@ -388,10 +388,14 @@ void NumericalProperty<T>::setExponent(float exponent) {
template <typename T>
std::string NumericalProperty<T>::generateAdditionalJsonDescription() const {
std::string result = "{ ";
result += "\"" + MinimumValueKey + "\": " + luaToJson(std::to_string(_minimumValue)) + ",";
result += "\"" + MaximumValueKey + "\": " + luaToJson(std::to_string(_maximumValue)) + ",";
result += "\"" + SteppingValueKey + "\": " + luaToJson(std::to_string(_stepping)) + ",";
result += "\"" + ExponentValueKey + "\": " + luaToJson(std::to_string(_exponent));
result +=
"\"" + MinimumValueKey + "\": " + luaToJson(std::to_string(_minimumValue)) + ",";
result +=
"\"" + MaximumValueKey + "\": " + luaToJson(std::to_string(_maximumValue)) + ",";
result +=
"\"" + SteppingValueKey + "\": " + luaToJson(std::to_string(_stepping)) + ",";
result +=
"\"" + ExponentValueKey + "\": " + luaToJson(std::to_string(_exponent));
result += " }";
return result;
}
......
......@@ -396,8 +396,8 @@ public:
const ghoul::Dictionary& metaData() const;
/**
* Convert the Property into a string containing a JSON representation of the Property.
* Includes description of the object.
* Convert the Property into a string containing a JSON representation of the
* Property. Includes description of the object.
* @return the JSON string
*/
virtual std::string toJson() const;
......@@ -412,7 +412,7 @@ public:
virtual void setInterpolationTarget(ghoul::any value);
virtual void setLuaInterpolationTarget(lua_State* state);
virtual void setStringInterpolationTarget(std::string value);
virtual void interpolateValue(float t,
ghoul::EasingFunc<float> easingFunction = nullptr);
......
......@@ -83,8 +83,8 @@ public:
/**
* Sets the identifier for this PropertyOwner. If the PropertyOwner does not have an
* owner itself, the identifier must be globally unique. If the PropertyOwner has an
* owner, the identifier must be unique to the owner (including the owner's
* properties). No uniqueness check will be preformed here, but rather in the
* owner, the identifier must be unique to the owner (including the owner's
* properties). No uniqueness check will be preformed here, but rather in the
* PropertyOwner::addProperty and PropertyOwner::addPropertySubOwner methods).
*
* \param identifier The identifier of this PropertyOwner. It must not contain any
......@@ -102,7 +102,7 @@ public:
std::string identifier() const;
/**
* Sets the user-facing name of this PropertyOwner. This name does not have to be
* Sets the user-facing name of this PropertyOwner. This name does not have to be
* unique, but it is recommended to be.
*
* \param guiName The new user-facing name for this PropertyOwner
......
......@@ -101,7 +101,7 @@ public:
protected:
properties::BoolProperty _enabled;
properties::FloatProperty _opacity;
void registerUpdateRenderBinFromOpacity();
private:
......
......@@ -176,7 +176,7 @@ public:
* Adds an interpolation request for the passed \p prop that will run for
* \p durationSeconds seconds. Every time the #updateInterpolations method is called
* the Property will be notified that it has to update itself using the stored
* interpolation values. If an interpolation record already exists for the passed
* interpolation values. If an interpolation record already exists for the passed
* \p prop, the previous record will be overwritten and the remaining time of the old
* interpolation is ignored.
*
......@@ -186,7 +186,7 @@ public:
*
* \pre \p prop must not be \c nullptr
* \pre \p durationSeconds must be positive and not 0
* \post A new interpolation record exists for \p that is not expired
* \post A new interpolation record exists for \p that is not expired
*/
void addInterpolation(properties::Property* prop, float durationSeconds,
ghoul::EasingFunction easingFunction = ghoul::EasingFunction::Linear);
......
......@@ -23,16 +23,15 @@
****************************************************************************************/
#include <modules/atmosphere/atmospheremodule.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/assert.h>
#include <openspace/rendering/renderable.h>
#include <modules/atmosphere/rendering/renderableatmosphere.h>
#include <openspace/rendering/renderable.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/assert.h>
namespace openspace {
AtmosphereModule::AtmosphereModule() : OpenSpaceModule("Atmosphere") {}
AtmosphereModule::AtmosphereModule() : OpenSpaceModule(Name) {}
void AtmosphereModule::internalInitialize(const ghoul::Dictionary&) {
auto fRenderable = FactoryManager::ref().factory<Renderable>();
......
......@@ -26,12 +26,13 @@
#define __OPENSPACE_MODULE_ATMOSPHERE___ATMOSPHERE_MODULE___H__
#include <openspace/util/openspacemodule.h>
#include <openspace/properties/scalar/floatproperty.h>
namespace openspace {
class AtmosphereModule : public OpenSpaceModule {
public:
constexpr static const char* Name = "Atmosphere";
AtmosphereModule();
private:
......
......@@ -59,14 +59,8 @@
*/
#include <modules/atmosphere/rendering/atmospheredeferredcaster.h>
#include <modules/atmosphere/rendering/renderableatmosphere.h>
#include <ghoul/glm.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/textureunit.h>
#include <ghoul/opengl/programobject.h>
#include <ghoul/filesystem/filesystem.h>
#include <modules/atmosphere/rendering/renderableatmosphere.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/util/updatestructures.h>
......@@ -74,12 +68,17 @@
#include <openspace/rendering/renderable.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/rendering/renderer.h>
#include <ghoul/glm.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/textureunit.h>
#include <glm/gtx/string_cast.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtx/vector_angle.hpp>
#include <glm/gtc/quaternion.hpp>
#include <sstream>
#include <fstream>
......@@ -90,16 +89,16 @@
namespace {
const char* _loggerCat = "AtmosphereDeferredcaster";
const char* GlslDeferredcastPath =
constexpr const char* _loggerCat = "AtmosphereDeferredcaster";
constexpr const char* GlslDeferredcastPath =
"${MODULES}/atmosphere/shaders/atmosphere_deferred_fs.glsl";
const char* GlslDeferredcastFSPath =
constexpr const char* GlslDeferredcastFSPath =
"${MODULES}/atmosphere/shaders/atmosphere_deferred_fs.glsl";
const char* GlslDeferredcastVsPath =
constexpr const char* GlslDeferredcastVsPath =
"${MODULES}/atmosphere/shaders/atmosphere_deferred_vs.glsl";
const float ATM_EPS = 2.0;
const double KM_TO_M = 1000.0;
constexpr const float ATM_EPS = 2.f;
constexpr const float KM_TO_M = 1000.f;
} // namespace
namespace openspace {
......
......@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
......
......@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
......
......@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
......
......@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
......
......@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2016 *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment