From b584f0197e1528159f631bb3fa61a7729a6ac87c Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 21 Jul 2017 16:31:58 -0400 Subject: [PATCH 01/20] Add description to Propertys --- .../openspace/properties/numericalproperty.h | 12 +++--- .../properties/numericalproperty.inl | 24 ++++++----- include/openspace/properties/optionproperty.h | 5 ++- include/openspace/properties/property.h | 25 ++++++----- .../openspace/properties/selectionproperty.h | 1 + .../openspace/properties/templateproperty.h | 12 +++--- .../openspace/properties/templateproperty.inl | 21 +++++----- .../openspace/properties/triggerproperty.h | 2 +- modules/base/rendering/renderablemodel.cpp | 8 ++-- modules/base/rendering/renderableplane.cpp | 6 +-- modules/base/rendering/renderablesphere.cpp | 10 ++--- modules/base/rendering/renderabletrail.cpp | 11 ++--- .../base/rendering/renderabletrailorbit.cpp | 4 +- .../rendering/renderabletrailtrajectory.cpp | 9 ++-- .../base/rendering/screenspaceframebuffer.cpp | 2 +- modules/base/rotation/staticrotation.cpp | 2 +- modules/base/scale/staticscale.cpp | 2 +- .../base/translation/statictranslation.cpp | 1 + .../rendering/renderabledebugplane.cpp | 6 +-- .../rendering/renderablefieldlines.cpp | 9 ++-- modules/galaxy/rendering/renderablegalaxy.cpp | 12 +++--- .../cache/memoryawaretilecache.cpp | 12 +++--- modules/globebrowsing/globes/pointglobe.cpp | 2 + .../globebrowsing/globes/renderableglobe.cpp | 42 +++++++++---------- .../globebrowsing/rendering/layer/layer.cpp | 7 +++- .../rendering/layer/layeradjustment.cpp | 3 ++ .../rendering/layer/layerrendersettings.cpp | 12 +++--- .../tile/rawtiledatareader/gdalwrapper.cpp | 4 +- .../tile/tileprovider/defaulttileprovider.cpp | 8 ++-- modules/iswa/rendering/datacygnet.cpp | 14 +++---- modules/iswa/rendering/iswabasegroup.cpp | 6 +-- modules/iswa/rendering/iswacygnet.cpp | 4 +- modules/iswa/rendering/iswadatagroup.cpp | 14 +++---- modules/iswa/rendering/iswakameleongroup.cpp | 10 ++--- modules/iswa/rendering/kameleonplane.cpp | 6 +-- .../rendering/renderablekameleonvolume.cpp | 24 +++++------ .../rendering/renderablemultiresvolume.cpp | 32 +++++++------- .../newhorizons/rendering/renderablefov.cpp | 13 ++++-- .../rendering/renderablemodelprojection.cpp | 6 +-- .../rendering/renderableplanetprojection.cpp | 12 +++--- .../rendering/renderableshadowcylinder.cpp | 6 +-- .../newhorizons/util/projectioncomponent.cpp | 10 ++--- modules/onscreengui/src/gui.cpp | 2 +- modules/onscreengui/src/guicomponent.cpp | 2 +- .../src/guiperformancecomponent.cpp | 8 ++-- modules/onscreengui/src/renderproperties.cpp | 10 ++++- .../renderableconstellationbounds.cpp | 4 +- modules/space/rendering/renderableplanet.cpp | 10 ++--- modules/space/rendering/renderablerings.cpp | 10 ++--- modules/space/rendering/renderablestars.cpp | 11 ++--- .../space/rendering/simplespheregeometry.cpp | 3 +- .../space/translation/keplertranslation.cpp | 14 ++++--- .../space/translation/spicetranslation.cpp | 7 ++-- modules/space/translation/spicetranslation.h | 1 - modules/touch/src/touchinteraction.cpp | 19 ++++++++- modules/touch/src/touchmarker.cpp | 9 ++-- .../rendering/renderabletoyvolume.cpp | 12 +++--- modules/volume/rendering/volumeclipplane.cpp | 2 + modules/volume/rendering/volumeclipplanes.cpp | 2 +- src/engine/openspaceengine_lua.inl | 42 +++++++++++++++---- src/engine/settingsengine.cpp | 10 ++--- src/engine/wrapper/sgctwindowwrapper.cpp | 4 +- src/interaction/luaconsole.cpp | 11 +++-- src/interaction/navigationhandler.cpp | 2 +- src/interaction/orbitalnavigator.cpp | 14 +++---- src/network/parallelconnection.cpp | 16 +++---- src/properties/optionproperty.cpp | 9 ++-- src/properties/property.cpp | 8 +++- src/properties/selectionproperty.cpp | 5 ++- src/properties/triggerproperty.cpp | 4 +- src/rendering/renderable.cpp | 4 +- src/rendering/renderengine.cpp | 20 +++++---- src/rendering/screenspacerenderable.cpp | 14 ++++--- 73 files changed, 409 insertions(+), 311 deletions(-) diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index 45633abb89..601d70c94d 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -33,14 +33,16 @@ template class NumericalProperty : public TemplateProperty { public: NumericalProperty(std::string identifier, std::string guiName, + std::string description, Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, T value, + NumericalProperty(std::string identifier, std::string guiName, + std::string description, T value, Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, T value, - T minimumValue, T maximumValue, + NumericalProperty(std::string identifier, std::string guiName, + std::string description, T value, T minimumValue, T maximumValue, Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, T value, - T minimumValue, T maximumValue, T steppingValue, + NumericalProperty(std::string identifier, std::string guiName, + std::string description, T value, T minimumValue, T maximumValue, T steppingValue, Property::Visibility visibility = Property::Visibility::User); bool getLuaValue(lua_State* state) const override; diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 0263286b8c..9d1a7a4573 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -233,9 +233,10 @@ const std::string NumericalProperty::SteppingValueKey = "SteppingValue"; template NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, + std::string description, Property::Visibility visibility) : NumericalProperty( - std::move(identifier), std::move(guiName), + std::move(identifier), std::move(guiName), std::move(description), PropertyDelegate>::template defaultValue(), PropertyDelegate>::template defaultMinimumValue(), PropertyDelegate>::template defaultMaximumValue(), @@ -246,10 +247,10 @@ NumericalProperty::NumericalProperty(std::string identifier, std::string guiN template NumericalProperty::NumericalProperty(std::string identifier, - std::string guiName, T value, + std::string guiName, std::string desc, T value, Property::Visibility visibility) : NumericalProperty( - std::move(identifier), std::move(guiName), std::move(value), + std::move(identifier), std::move(guiName), std::move(desc), std::move(value), PropertyDelegate>::template defaultMinimumValue(), PropertyDelegate>::template defaultMaximumValue(), PropertyDelegate>::template defaultSteppingValue(), @@ -259,23 +260,24 @@ NumericalProperty::NumericalProperty(std::string identifier, template NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, - T value, T minimumValue, T maximumValue, - Property::Visibility visibility) + std::string description, T value, T minimumValue, + T maximumValue, Property::Visibility visibility) : NumericalProperty( - std::move(identifier) , std::move(guiName), std::move(value), - std::move(minimumValue), std::move(maximumValue), + std::move(identifier), std::move(guiName), std::move(description), + std::move(value), std::move(minimumValue), std::move(maximumValue), PropertyDelegate>::template defaultSteppingValue(), visibility ) {} template -NumericalProperty::NumericalProperty(std::string identifier, - std::string guiName, T value, +NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, + std::string description, T value, T minimumValue, T maximumValue, T steppingValue, Property::Visibility visibility) - : TemplateProperty(std::move(identifier), std::move(guiName), std::move(value), - visibility) + : TemplateProperty( + std::move(identifier), std::move(guiName), std::move(description), + std::move(value), visibility) , _minimumValue(std::move(minimumValue)) , _maximumValue(std::move(maximumValue)) , _stepping(std::move(steppingValue)) diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index c5a292f665..444819ae0a 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -60,7 +60,7 @@ public: * \param identifier A unique identifier for this property * \param guiName The GUI name that should be used to represent this property */ - OptionProperty(std::string identifier, std::string guiName, + OptionProperty(std::string identifier, std::string guiName, std::string description, Property::Visibility visibility = Property::Visibility::User); /** @@ -70,7 +70,8 @@ public: * \param guiName The GUI name that should be used to represent this property * \param displayType Optional DisplayType for GUI (default RADIO) */ - OptionProperty(std::string identifier, std::string guiName, DisplayType displayType, + OptionProperty(std::string identifier, std::string guiName, std::string description, + DisplayType displayType, Property::Visibility visibility = Property::Visibility::User); /** diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index eb5ecc3b52..d58a9fbf94 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -85,15 +85,17 @@ public: * The constructor for the property. The identifier needs to be unique * for each PropertyOwner. The guiName will be stored in the metaData * to be accessed by the GUI elements using the guiName key. The default - * visibility settings is true, whereas the default read-only state is + * visibility settings is Visibility::All, whereas the default read-only state is * false. * \param identifier A unique identifier for this property. It has to be unique to the * PropertyOwner and cannot contain any .s * \param guiName The human-readable GUI name for this Property + * \param description The human-readable description for this Property + * \param visibility The visibility of the Property for user interfaces * \pre \p identifier must not be empty * \pre \p guiName must not be empty */ - Property(std::string identifier, std::string guiName, + Property(std::string identifier, std::string guiName, std::string description, Visibility visibility = Visibility::All); /** @@ -258,18 +260,12 @@ public: std::string guiName() const; /** - * Returns the description for this Property that contains all necessary information - * required for creating a GUI representation. The format of the description is a - * valid Lua table, i.e., it is surrounded by a pair of { and - * } with key,value pairs between. Each value can either be a number, a - * string, a bool, or another table. The general values set by this base function - * are: Identifier, Name, Type. All other - * values are specific to the type and are added in a specific subclass, which require - * the subclass to call this method first. - * \return The descriptive text for the Property that can be used for constructing a - * GUI representation + * This function returns a user-facing description of the Property which can be + * displayed in the user interface to inform the user what this Property does and how + * it affects the rendering. + * \return The description of this Property */ - virtual std::string description() const; + std::string description() const; /** * Sets the identifier of the group that this Property belongs to. Property groups can @@ -407,6 +403,9 @@ protected: /// The identifier for this Property std::string _identifier; + /// The user-facing description of this Property + std::string _description; + /// The Dictionary containing all meta data necessary for external applications ghoul::Dictionary _metaData; diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 1a7d58ed73..d14414fdc5 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -39,6 +39,7 @@ public: }; SelectionProperty(std::string identifier, std::string guiName, + std::string description, Property::Visibility visibility = Property::Visibility::User); void addOption(Option option); diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index 4eea529a0d..6f99a57353 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -51,7 +51,7 @@ namespace openspace::properties { template class TemplateProperty : public Property { public: - typedef T ValueType; + using ValueType = T; /** * The constructor initializing the TemplateProperty with the provided @@ -62,15 +62,17 @@ public: * \param identifier The identifier that is used for this TemplateProperty * \param guiName The human-readable GUI name for this TemplateProperty */ - TemplateProperty(std::string identifier, std::string guiName, - Property::Visibility visibility = Visibility::User); + //TemplateProperty(std::string identifier, std::string guiName, + // Property::Visibility visibility = Visibility::User); /** * The constructor initializing the TemplateProperty with the provided * identifier, human-readable guiName and provided * value. */ - TemplateProperty(std::string identifier, std::string guiName, T value, + TemplateProperty(std::string identifier, std::string guiName, + std::string description, + T value = PropertyDelegate>::template defaultValue(), Property::Visibility visibility = Visibility::User); /** @@ -159,7 +161,7 @@ public: /** * The assignment operator allows the TemplateProperty's value to be set without using - * the TemplateProperty::set method. It will be done internally by thos method and it + * the TemplateProperty::set method. It will be done internally by this method and it * allows assignments such as prop = T(1). * \param val The value that should be set. */ diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index 3f6201736d..bc927ab974 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -147,20 +147,21 @@ namespace openspace::properties { // deduce template argument for 'U' if 'default' methods are used as default values in // a single constructor -template -TemplateProperty::TemplateProperty(std::string identifier, std::string guiName, - Property::Visibility visibility) - : TemplateProperty( - std::move(identifier), std::move(guiName), - PropertyDelegate>::template defaultValue(), - visibility) -{ -} +//template +//TemplateProperty::TemplateProperty(std::string identifier, std::string guiName, +// Property::Visibility visibility) +// : TemplateProperty( +// std::move(identifier), std::move(guiName), +// PropertyDelegate>::template defaultValue(), +// visibility) +//{ +//} template TemplateProperty::TemplateProperty(std::string identifier, std::string guiName, + std::string desc, T value, Property::Visibility visibility) - : Property(std::move(identifier), std::move(guiName), visibility) + : Property(std::move(identifier), std::move(guiName), std::move(desc), visibility) , _value(std::move(value)) {} diff --git a/include/openspace/properties/triggerproperty.h b/include/openspace/properties/triggerproperty.h index 0040949cad..5bc707f667 100644 --- a/include/openspace/properties/triggerproperty.h +++ b/include/openspace/properties/triggerproperty.h @@ -41,7 +41,7 @@ public: * \param identifier The unique identifier used for this Property * \param guiName The human-readable name of this Property */ - TriggerProperty(std::string identifier, std::string guiName, + TriggerProperty(std::string identifier, std::string guiName, std::string description, Property::Visibility visibility = Property::Visibility::User); /** diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 306fbfa497..b0b84493cf 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -95,10 +95,10 @@ documentation::Documentation RenderableModel::Documentation() { RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _geometry(nullptr) - , _colorTexturePath("colorTexture", "Color Texture") - , _performFade("performFading", "Perform Fading", false) - , _performShading("performShading", "Perform Shading", true) - , _fading("fading", "Fade", 0) + , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation + , _performFade("performFading", "Perform Fading", "", false) // @TODO Missing documentation + , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation + , _fading("fading", "Fade", "", 0) // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _modelTransform(1.0) diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 75aef3b932..0156a679e2 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -87,9 +87,9 @@ documentation::Documentation RenderablePlane::Documentation() { RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture") - , _billboard("billboard", "Billboard", false) - , _size("size", "Size", 10, 0, std::pow(10, 25)) + , _texturePath("texture", "Texture", "") // @TODO Missing documentation + , _billboard("billboard", "Billboard", "", false) // @TODO Missing documentation + , _size("size", "Size", "", 10, 0, std::pow(10, 25)) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _blendMode(BlendMode::Normal) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 79959887bf..2b2cfb38b1 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -92,11 +92,11 @@ documentation::Documentation RenderableSphere::Documentation() { RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture") - , _orientation("orientation", "Orientation") - , _size("size", "Size", 1.f, 0.f, std::pow(10.f, 45)) - , _segments("segments", "Segments", 8, 4, 100) - , _transparency("transparency", "Transparency", 1.f, 0.f, 1.f) + , _texturePath("texture", "Texture", "") // @TODO Missing documentation + , _orientation("orientation", "Orientation", "") // @TODO Missing documentation + , _size("size", "Size", "", 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation + , _segments("segments", "Segments", "", 8, 4, 100) // @TODO Missing documentation + , _transparency("transparency", "Transparency", "", 1.f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _sphere(nullptr) diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 1825e32376..68686c0bed 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -133,14 +133,15 @@ documentation::Documentation RenderableTrail::Documentation() { RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineColor("lineColor", "Color", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) - , _useLineFade("useLineFade", "Use Line Fade", true) - , _lineFade("lineFade", "Line Fade", 1.f, 0.f, 20.f) - , _lineWidth("lineWidth", "Line Width", 2.f, 1.f, 20.f) - , _pointSize("pointSize", "Point Size", 1, 1, 64) + , _lineColor("lineColor", "Color", "", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation + , _useLineFade("useLineFade", "Use Line Fade", "", true) // @TODO Missing documentation + , _lineFade("lineFade", "Line Fade", "", 1.f, 0.f, 20.f) // @TODO Missing documentation + , _lineWidth("lineWidth", "Line Width", "", 2.f, 1.f, 20.f) // @TODO Missing documentation + , _pointSize("pointSize", "Point Size", "", 1, 1, 64) // @TODO Missing documentation , _renderingModes( "renderingMode", "Rendering Mode", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) { diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index c8ebaa048d..450e6243f3 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -134,8 +134,8 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _period("period", "Period in days", 0.0, 0.0, 1e9) - , _resolution("resolution", "Number of Samples along Orbit", 10000, 1, 1000000) + , _period("period", "Period in days", "", 0.0, 0.0, 1e9) // @TODO Missing documentation + , _resolution("resolution", "Number of Samples along Orbit", "", 10000, 1, 1000000) // @TODO Missing documentation , _needsFullSweep(true) , _indexBufferDirty(true) , _previousTime(0) diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 1969e9a58c..28fa60e344 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -125,15 +125,16 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _startTime("startTime", "Start Time") - , _endTime("endTime", "End Time") - , _sampleInterval("sampleInterval", "Sample Interval", 2.0, 2.0, 1e6) + , _startTime("startTime", "Start Time", "") // @TODO Missing documentation + , _endTime("endTime", "End Time", "") // @TODO Missing documentation + , _sampleInterval("sampleInterval", "Sample Interval", "", 2.0, 2.0, 1e6) // @TODO Missing documentation , _timeStampSubsamplingFactor( "subSample", "Time Stamp Subsampling Factor", + "", // @TODO Missing documentation 1, 1, 1000000000 ) - , _renderFullTrail("renderFullTrail", "Render Full Trail", false) + , _renderFullTrail("renderFullTrail", "Render Full Trail", "", false) // @TODO Missing documentation , _needsFullSweep(true) , _subsamplingIsDirty(true) { diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index 26f1118543..0fe8ad1f6d 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -48,7 +48,7 @@ documentation::Documentation ScreenSpaceFramebuffer::Documentation() { ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) - , _size("size", "Size", glm::vec4(0), glm::vec4(0), glm::vec4(2000)) + , _size("size", "Size", "", glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation , _framebuffer(nullptr) { documentation::testSpecificationAndThrow( diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index eb7c5815c8..7b852c3f8d 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -61,7 +61,7 @@ documentation::Documentation StaticRotation::Documentation() { } StaticRotation::StaticRotation() - : _rotationMatrix("rotation", "Rotation", glm::dmat3(1.0)) + : _rotationMatrix("rotation", "Rotation", "", glm::dmat3(1.0)) // @TODO Missing documentation {} StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index 16de25b4a9..97f13ad5f8 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -49,7 +49,7 @@ documentation::Documentation StaticScale::Documentation() { } StaticScale::StaticScale() - : _scaleValue("scale", "Scale", 1.0, 1.0, 1000.0) + : _scaleValue("scale", "Scale", "", 1.0, 1.0, 1000.0) // @TODO Missing documentation { addProperty(_scaleValue); } diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 3af71ff175..e21b57954c 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -62,6 +62,7 @@ StaticTranslation::StaticTranslation() : _position( "position", "Position", + "", // @TODO Missing documentation glm::dvec3(0.0), glm::dvec3(-std::numeric_limits::max()), glm::dvec3(std::numeric_limits::max()) diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index 1cc77421d2..c64bff0c02 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -47,9 +47,9 @@ namespace openspace { RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texture("texture", "Texture", -1, -1, 255) - , _billboard("billboard", "Billboard", false) - , _size("size", "Size", 10.f, 0.f, std::pow(10.f, 25.f)) + , _texture("texture", "Texture", "", -1, -1, 255) // @TODO Missing documentation + , _billboard("billboard", "Billboard", "", false) // @TODO Missing documentation + , _size("size", "Size", "", 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation , _origin(Origin::Center) , _shader(nullptr) , _quad(0) diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 0240dc897e..d4087966dd 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -76,17 +76,18 @@ namespace openspace { RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize("stepSize", "Fieldline Step Size", defaultFieldlineStepSize, 0.f, 10.f) - , _classification("classification", "Fieldline Classification", true) + , _stepSize("stepSize", "Fieldline Step Size", "", defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation + , _classification("classification", "Fieldline Classification", "", true) // @TODO Missing documentation , _fieldlineColor( "fieldlineColor", "Fieldline Color", + "", // @TODO Missing documentation defaultFieldlineColor, glm::vec4(0.f), glm::vec4(1.f) ) - , _seedPointSource("source", "SeedPoint Source") - , _seedPointSourceFile("sourceFile", "SeedPoint File") + , _seedPointSource("source", "SeedPoint Source", "") // @TODO Missing documentation + , _seedPointSourceFile("sourceFile", "SeedPoint File", "") // @TODO Missing documentation , _program(nullptr) , _seedPointsAreDirty(true) , _fieldLinesAreDirty(true) diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 9146885392..9859630ce2 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -57,12 +57,12 @@ namespace openspace { RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize("stepSize", "Step Size", 0.012, 0.0005, 0.05) - , _pointStepSize("pointStepSize", "Point Step Size", 0.01, 0.01, 0.1) - , _translation("translation", "Translation", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) - , _rotation("rotation", "Euler rotation", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) - , _enabledPointsRatio("nEnabledPointsRatio", "Enabled points", 0.2, 0, 1) { - + , _stepSize("stepSize", "Step Size", "", 0.012, 0.0005, 0.05) // @TODO Missing documentation + , _pointStepSize("pointStepSize", "Point Step Size", "", 0.01, 0.01, 0.1) // @TODO Missing documentation + , _translation("translation", "Translation", "", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation + , _rotation("rotation", "Euler rotation", "", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation + , _enabledPointsRatio("nEnabledPointsRatio", "Enabled points", "", 0.2, 0, 1) // @TODO Missing documentation +{ float stepSize; glm::vec3 scaling, translation, rotation; glm::vec4 color; diff --git a/modules/globebrowsing/cache/memoryawaretilecache.cpp b/modules/globebrowsing/cache/memoryawaretilecache.cpp index b507e4f35f..ffb57ec918 100644 --- a/modules/globebrowsing/cache/memoryawaretilecache.cpp +++ b/modules/globebrowsing/cache/memoryawaretilecache.cpp @@ -45,26 +45,26 @@ MemoryAwareTileCache::MemoryAwareTileCache() : PropertyOwner("TileCache") , _numTextureBytesAllocatedOnCPU(0) , _cpuAllocatedTileData( - "cpuAllocatedTileData", "CPU allocated tile data (MB)", + "cpuAllocatedTileData", "CPU allocated tile data (MB)", "", // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _gpuAllocatedTileData( - "gpuAllocatedTileData", "GPU allocated tile data (MB)", + "gpuAllocatedTileData", "GPU allocated tile data (MB)", "", // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _tileCacheSize( - "tileCacheSize", "Tile cache size", + "tileCacheSize", "Tile cache size", "", // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB - , _applyTileCacheSize("applyTileCacheSize", "Apply tile cache size") - , _clearTileCache("clearTileCache", "Clear tile cache") - , _usePbo("usePbo", "Use PBO", false) + , _applyTileCacheSize("applyTileCacheSize", "Apply tile cache size", "") // @TODO Missing documentation + , _clearTileCache("clearTileCache", "Clear tile cache", "") // @TODO Missing documentation + , _usePbo("usePbo", "Use PBO", "", false) // @TODO Missing documentation { createDefaultTextureContainers(); diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index c81f4ec215..65a3037269 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -40,11 +40,13 @@ PointGlobe::PointGlobe(const RenderableGlobe& owner) , _intensityClamp( "intensityClamp", "Intensity clamp", + "", // @TODO Missing documentation 1, 0, 1 ) , _lightIntensity( "lightIntensity", "Light intensity", + "", // @TODO Missing documentation 1, 0, 50 ) { diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index 281d5b253a..4ee80cfa88 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -42,29 +42,29 @@ namespace openspace::globebrowsing { RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) : _debugProperties({ - BoolProperty("saveOrThrowCamera", "save or throw camera", false), - BoolProperty("showChunkEdges", "show chunk edges", false), - BoolProperty("showChunkBounds", "show chunk bounds", false), - BoolProperty("showChunkAABB", "show chunk AABB", false), - BoolProperty("showHeightResolution", "show height resolution", false), - BoolProperty("showHeightIntensities", "show height intensities", false), - BoolProperty("performFrustumCulling", "perform frustum culling", true), - BoolProperty("performHorizonCulling", "perform horizon culling", true), - BoolProperty("levelByProjectedAreaElseDistance", "level by projected area (else distance)", true), - BoolProperty("resetTileProviders", "reset tile providers", false), - BoolProperty("toggleEnabledEveryFrame", "toggle enabled every frame", false), - BoolProperty("collectStats", "collect stats", false), - BoolProperty("limitLevelByAvailableData", "Limit level by available data", true), - IntProperty("modelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", 10, 1, 22) + BoolProperty("saveOrThrowCamera", "save or throw camera", "", false), // @TODO Missing documentation + BoolProperty("showChunkEdges", "show chunk edges", "", false), // @TODO Missing documentation + BoolProperty("showChunkBounds", "show chunk bounds", "", false), // @TODO Missing documentation + BoolProperty("showChunkAABB", "show chunk AABB", "", false), // @TODO Missing documentation + BoolProperty("showHeightResolution", "show height resolution", "", false), // @TODO Missing documentation + BoolProperty("showHeightIntensities", "show height intensities", "", false), // @TODO Missing documentation + BoolProperty("performFrustumCulling", "perform frustum culling", "", true), // @TODO Missing documentation + BoolProperty("performHorizonCulling", "perform horizon culling", "", true), // @TODO Missing documentation + BoolProperty("levelByProjectedAreaElseDistance", "level by projected area (else distance)", "", true), // @TODO Missing documentation + BoolProperty("resetTileProviders", "reset tile providers", "", false), // @TODO Missing documentation + BoolProperty("toggleEnabledEveryFrame", "toggle enabled every frame", "", false), // @TODO Missing documentation + BoolProperty("collectStats", "collect stats", "", false), // @TODO Missing documentation + BoolProperty("limitLevelByAvailableData", "Limit level by available data", "", true), // @TODO Missing documentation + IntProperty("modelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "", 10, 1, 22) // @TODO Missing documentation }) , _generalProperties({ - BoolProperty("enabled", "Enabled", true), - BoolProperty("performShading", "perform shading", true), - BoolProperty("atmosphere", "atmosphere", false), - BoolProperty("useAccurateNormals", "useAccurateNormals", false), - FloatProperty("lodScaleFactor", "lodScaleFactor",10.0f, 1.0f, 50.0f), - FloatProperty("cameraMinHeight", "cameraMinHeight", 100.0f, 0.0f, 1000.0f), - FloatProperty("orenNayarRoughness", "orenNayarRoughness", 0.0f, 0.0f, 1.0f) + BoolProperty("enabled", "Enabled", "", true), // @TODO Missing documentation + BoolProperty("performShading", "perform shading", "", true), // @TODO Missing documentation + BoolProperty("atmosphere", "atmosphere", "", false), // @TODO Missing documentation + BoolProperty("useAccurateNormals", "useAccurateNormals", "", false), // @TODO Missing documentation + FloatProperty("lodScaleFactor", "lodScaleFactor", "", 10.0f, 1.0f, 50.0f), // @TODO Missing documentation + FloatProperty("cameraMinHeight", "cameraMinHeight", "", 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation + FloatProperty("orenNayarRoughness", "orenNayarRoughness", "", 0.0f, 0.0f, 1.0f) // @TODO Missing documentation }) , _debugPropertyOwner("Debug") { diff --git a/modules/globebrowsing/rendering/layer/layer.cpp b/modules/globebrowsing/rendering/layer/layer.cpp index 2cc362463d..dbf4239580 100644 --- a/modules/globebrowsing/rendering/layer/layer.cpp +++ b/modules/globebrowsing/rendering/layer/layer.cpp @@ -44,20 +44,23 @@ Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict) , _typeOption( "type", "Type", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _blendModeOption( "blendMode", "Blend Mode", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _enabled(properties::BoolProperty("enabled", "Enabled", false)) - , _reset("reset", "Reset") + , _enabled(properties::BoolProperty("enabled", "Enabled", "", false)) // @TODO Missing documentation + , _reset("reset", "Reset", "") // @TODO Missing documentation , _tileProvider(nullptr) , _otherTypesProperties{ properties::Vec3Property ( "color", "Color", + "", // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f)) diff --git a/modules/globebrowsing/rendering/layer/layeradjustment.cpp b/modules/globebrowsing/rendering/layer/layeradjustment.cpp index bae061c736..b763c21a4b 100644 --- a/modules/globebrowsing/rendering/layer/layeradjustment.cpp +++ b/modules/globebrowsing/rendering/layer/layeradjustment.cpp @@ -37,6 +37,7 @@ LayerAdjustment::LayerAdjustment() , chromaKeyColor( "chromaKeyColor", "Chroma key color", + "", // @TODO Missing documentation glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(1.f) @@ -44,6 +45,7 @@ LayerAdjustment::LayerAdjustment() , chromaKeyTolerance( "chromaKeyTolerance", "Chroma key tolerance", + "", // @TODO Missing documentation 0, 0, 1 @@ -51,6 +53,7 @@ LayerAdjustment::LayerAdjustment() , _typeOption( "type", "Type", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _onChangeCallback([](){}) diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index 15e11c7615..a3e2e9fd3a 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -36,12 +36,12 @@ namespace openspace::globebrowsing { LayerRenderSettings::LayerRenderSettings() : properties::PropertyOwner("Settings") - , setDefault("setDefault", "Set Default") - , opacity(properties::FloatProperty("opacity", "Opacity", 1.f, 0.f, 1.f)) - , gamma(properties::FloatProperty("gamma", "Gamma", 1, 0, 5)) - , multiplier(properties::FloatProperty("multiplier", "Multiplier", 1.f, 0.f, 20.f)) - , offset(properties::FloatProperty("offset", "Offset", 0.f, -10000.f, 10000.f)) - , valueBlending(properties::FloatProperty("valueBlending", "Value Blending", + , setDefault("setDefault", "Set Default", "") // @TODO Missing documentation + , opacity(properties::FloatProperty("opacity", "Opacity", "", 1.f, 0.f, 1.f)) // @TODO Missing documentation + , gamma(properties::FloatProperty("gamma", "Gamma", "", 1, 0, 5))// @TODO Missing documentation + , multiplier(properties::FloatProperty("multiplier", "Multiplier", "", 1.f, 0.f, 20.f))// @TODO Missing documentation + , offset(properties::FloatProperty("offset", "Offset", "", 0.f, -10000.f, 10000.f))// @TODO Missing documentation + , valueBlending(properties::FloatProperty("valueBlending", "Value Blending", "", // @TODO Missing documentation 1.f, 0.f, 1.f)) , useValueBlending(false) { diff --git a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp index 0e09f07d9d..c19215f1db 100644 --- a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp +++ b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp @@ -88,9 +88,9 @@ bool GdalWrapper::logGdalErrors() const { GdalWrapper::GdalWrapper(size_t maximumCacheSize, size_t maximumMaximumCacheSize) : PropertyOwner("GdalWrapper") - , _logGdalErrors("logGdalErrors", "Log GDAL errors", true) + , _logGdalErrors("logGdalErrors", "Log GDAL errors", "", true) // @TODO Missing documentation , _gdalMaximumCacheSize ( - "gdalMaximumCacheSize", "GDAL maximum cache size", + "gdalMaximumCacheSize", "GDAL maximum cache size", "", // @TODO Missing documentation maximumCacheSize / (1024 * 1024), // Default 0, // Minimum: No caching maximumMaximumCacheSize / (1024 * 1024), // Maximum diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index f41906c331..2386deef2f 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -55,8 +55,8 @@ namespace openspace::globebrowsing::tileprovider { DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) : TileProvider(dictionary) - , _filePath("filePath", "File Path", "") - , _tilePixelSize("tilePixelSize", "Tile Pixel Size", 32, 32, 1024) + , _filePath("filePath", "File Path", "", "") // @TODO Missing documentation + , _tilePixelSize("tilePixelSize", "Tile Pixel Size", "", 32, 32, 1024) // @TODO Missing documentation , _preCacheLevel(0) { _tileCache = OsEng.moduleEngine().module()->tileCache(); @@ -108,8 +108,8 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) DefaultTileProvider::DefaultTileProvider( std::shared_ptr tileReader) : _asyncTextureDataProvider(tileReader) - , _filePath("filePath", "File Path", "") - , _tilePixelSize("tilePixelSize", "Tile Pixel Size", 32, 32, 1024) + , _filePath("filePath", "File Path", "", "") // @TODO Missing documentation + , _tilePixelSize("tilePixelSize", "Tile Pixel Size", "", 32, 32, 1024) // @TODO Missing documentation { } DefaultTileProvider::~DefaultTileProvider() diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 9fe3a51652..65fc8f928f 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -41,13 +41,13 @@ namespace openspace { DataCygnet::DataCygnet(const ghoul::Dictionary& dictionary) : IswaCygnet(dictionary) , _dataProcessor(nullptr) - , _dataOptions("dataOptions", "Data Options") - , _useLog("useLog","Use Logarithm", false) - , _useHistogram("useHistogram", "Auto Contrast", false) - , _autoFilter("autoFilter", "Auto Filter", true) - , _normValues("normValues", "Normalize Values", glm::vec2(1.0,1.0), glm::vec2(0), glm::vec2(5.0)) - , _backgroundValues("backgroundValues", "Background Values", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) - , _transferFunctionsFile("transferfunctions", "Transfer Functions", "${SCENE}/iswa/tfs/default.tf") + , _dataOptions("dataOptions", "Data Options", "") // @TODO Missing documentation + , _useLog("useLog","Use Logarithm", "", false) // @TODO Missing documentation + , _useHistogram("useHistogram", "Auto Contrast", "", false) // @TODO Missing documentation + , _autoFilter("autoFilter", "Auto Filter", "", true) // @TODO Missing documentation + , _normValues("normValues", "Normalize Values", "", glm::vec2(1.0,1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues("backgroundValues", "Background Values", "", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile("transferfunctions", "Transfer Functions", "", "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation //FOR TESTING , _numOfBenchmarks(0) , _avgBenchmarkTime(0.0f) diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 7053a39e1c..84b4dbf0d1 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -44,9 +44,9 @@ namespace openspace { IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) : properties::PropertyOwner(std::move(name)) - , _enabled("enabled", "Enabled", true) - , _alpha("alpha", "Alpha", 0.9f, 0.0f, 1.0f) - , _delete("delete", "Delete") + , _enabled("enabled", "Enabled", "", true) // @TODO Missing documentation + , _alpha("alpha", "Alpha", "", 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete("delete", "Delete", "") // @TODO Missing documentation , _registered(false) , _type(type) , _dataProcessor(nullptr) diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index 0b3985b3ac..2e39253013 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -41,8 +41,8 @@ namespace openspace { IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _delete("delete", "Delete") - , _alpha("alpha", "Alpha", 0.9f, 0.0f, 1.0f) + , _delete("delete", "Delete", "") // @TODO Missing documentation + , _alpha("alpha", "Alpha", "", 0.9f, 0.0f, 1.0f) // @TODO Missing documentation , _shader(nullptr) , _group(nullptr) , _textureDirty(false) diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index b6e1113d3b..8546e0221c 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -43,13 +43,13 @@ namespace { namespace openspace{ IswaDataGroup::IswaDataGroup(std::string name, std::string type) : IswaBaseGroup(name, type) - , _useLog("useLog","Use Logarithm", false) - , _useHistogram("useHistogram", "Auto Contrast", false) - , _autoFilter("autoFilter", "Auto Filter", true) - , _normValues("normValues", "Normalize Values", glm::vec2(1.0,1.0), glm::vec2(0), glm::vec2(5.0)) - , _backgroundValues("backgroundValues", "Background Values", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) - , _transferFunctionsFile("transferfunctions", "Transfer Functions", "${SCENE}/iswa/tfs/default.tf") - , _dataOptions("dataOptions", "Data Options") + , _useLog("useLog","Use Logarithm", "", false) // @TODO Missing documentation + , _useHistogram("useHistogram", "Auto Contrast", "", false) // @TODO Missing documentation + , _autoFilter("autoFilter", "Auto Filter", "", true) // @TODO Missing documentation + , _normValues("normValues", "Normalize Values", "", glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues("backgroundValues", "Background Values", "", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile("transferfunctions", "Transfer Functions", "${SCENE}/iswa/tfs/default.tf", "") // @TODO Missing documentation + , _dataOptions("dataOptions", "Data Options", "") // @TODO Missing documentation { addProperty(_useLog); addProperty(_useHistogram); diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index f51fb2135a..3030cb1e90 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -42,11 +42,11 @@ namespace { namespace openspace{ IswaKameleonGroup::IswaKameleonGroup(std::string name, std::string type) - :IswaDataGroup(name, type) - ,_resolution("resolution", "Resolution%", 100.0f, 10.0f, 200.0f) - ,_fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints") - ,_fieldlineIndexFile("") - ,_kameleonPath("") + : IswaDataGroup(name, type) + , _resolution("resolution", "Resolution%", "", 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints", "") // @TODO Missing documentation + , _fieldlineIndexFile("") + , _kameleonPath("") { addProperty(_resolution); addProperty(_fieldlines); diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index 97c361cb01..db7ce81888 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -39,9 +39,9 @@ namespace openspace { KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) : DataCygnet(dictionary) - , _fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints") - , _resolution("resolution", "Resolution%", 100.0f, 10.0f, 200.0f) - , _slice("slice", "Slice", 0.0, 0.0, 1.0) + , _fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints", "") // @TODO Missing documentation + , _resolution("resolution", "Resolution%", "", 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _slice("slice", "Slice", "", 0.0, 0.0, 1.0) // @TODO Missing documentation { addProperty(_resolution); addProperty(_slice); diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index d47fb495e1..cce9d4a2c6 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -64,24 +64,24 @@ namespace openspace { RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _dimensions("dimensions", "Dimensions") - , _variable("variable", "Variable") - , _lowerDomainBound("lowerDomainBound", "Lower Domain Bound") - , _upperDomainBound("upperDomainBound", "Upper Domain Bound") - , _domainScale("domainScale", "Domain scale") + , _dimensions("dimensions", "Dimensions", "") // @TODO Missing documentation + , _variable("variable", "Variable", "") // @TODO Missing documentation + , _lowerDomainBound("lowerDomainBound", "Lower Domain Bound", "") // @TODO Missing documentation + , _upperDomainBound("upperDomainBound", "Upper Domain Bound", "") // @TODO Missing documentation + , _domainScale("domainScale", "Domain scale", "") // @TODO Missing documentation , _autoDomainBounds(false) - , _lowerValueBound("lowerValueBound", "Lower Value Bound", 0.f, 0.f, 1.f) - , _upperValueBound("upperValueBound", "Upper Value Bound", 1.f, 0.01f, 1.f) + , _lowerValueBound("lowerValueBound", "Lower Value Bound", "", 0.f, 0.f, 1.f) // @TODO Missing documentation + , _upperValueBound("upperValueBound", "Upper Value Bound", "", 1.f, 0.01f, 1.f) // @TODO Missing documentation , _autoValueBounds(false) - , _gridType("gridType", "Grid Type", properties::OptionProperty::DisplayType::Dropdown) + , _gridType("gridType", "Grid Type", "", properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation , _autoGridType(false) , _clipPlanes(nullptr) - , _stepSize("stepSize", "Step Size", 0.02f, 0.01f, 1.f) - , _sourcePath("sourcePath", "Source Path") - , _transferFunctionPath("transferFunctionPath", "Transfer Function Path") + , _stepSize("stepSize", "Step Size", "", 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _sourcePath("sourcePath", "Source Path", "") // @TODO Missing documentation + , _transferFunctionPath("transferFunctionPath", "Transfer Function Path", "") // @TODO Missing documentation , _raycaster(nullptr) , _transferFunction(nullptr) - , _cache("cache", "Cache") + , _cache("cache", "Cache", "") // @TODO Missing documentation { glm::vec3 dimensions; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 6d1cceca5b..be9514e5db 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -95,20 +95,20 @@ RenderableMultiresVolume::RenderableMultiresVolume (const ghoul::Dictionary& dic , _errorHistogramManager(nullptr) , _histogramManager(nullptr) , _localErrorHistogramManager(nullptr) - , _stepSizeCoefficient("stepSizeCoefficient", "Stepsize Coefficient", 1.f, 0.01f, 10.f) - , _currentTime("currentTime", "Current Time", 0, 0, 0) - , _memoryBudget("memoryBudget", "Memory Budget", 0, 0, 0) - , _streamingBudget("streamingBudget", "Streaming Budget", 0, 0, 0) - , _useGlobalTime("useGlobalTime", "Global Time", false) - , _loop("loop", "Loop", false) - , _selectorName("selector", "Brick Selector") + , _stepSizeCoefficient("stepSizeCoefficient", "Stepsize Coefficient", "", 1.f, 0.01f, 10.f) // @TODO Missing documentation + , _currentTime("currentTime", "Current Time", "", 0, 0, 0) // @TODO Missing documentation + , _memoryBudget("memoryBudget", "Memory Budget", "", 0, 0, 0) // @TODO Missing documentation + , _streamingBudget("streamingBudget", "Streaming Budget", "", 0, 0, 0) // @TODO Missing documentation + , _useGlobalTime("useGlobalTime", "Global Time", "", false) // @TODO Missing documentation + , _loop("loop", "Loop", "", false) // @TODO Missing documentation + , _selectorName("selector", "Brick Selector", "") // @TODO Missing documentation , _gatheringStats(false) - , _statsToFile("printStats", "Print Stats", false) - , _statsToFileName("printStatsFileName", "Stats Filename") - , _scalingExponent("scalingExponent", "Scaling Exponent", 1, -10, 20) - , _scaling("scaling", "Scaling", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) - , _translation("translation", "Translation", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) - , _rotation("rotation", "Euler rotation", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) + , _statsToFile("printStats", "Print Stats", "", false) // @TODO Missing documentation + , _statsToFileName("printStatsFileName", "Stats Filename", "") // @TODO Missing documentation + , _scalingExponent("scalingExponent", "Scaling Exponent", "", 1, -10, 20) // @TODO Missing documentation + , _scaling("scaling", "Scaling", "", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation("translation", "Translation", "", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation("rotation", "Euler rotation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation { std::string name; //bool success = dictionary.getValue(constants::scenegraphnode::keyName, name); @@ -349,9 +349,9 @@ bool RenderableMultiresVolume::initialize() { unsigned int maxInitialBudget = 2048; int initialBudget = std::min(maxInitialBudget, maxNumBricks); - _currentTime = properties::IntProperty("currentTime", "Current Time", 0, 0, _tsp->header().numTimesteps_ - 1); - _memoryBudget = properties::IntProperty("memoryBudget", "Memory Budget", initialBudget, 0, maxNumBricks); - _streamingBudget = properties::IntProperty("streamingBudget", "Streaming Budget", initialBudget, 0, maxNumBricks); + _currentTime = properties::IntProperty("currentTime", "Current Time", "", 0, 0, _tsp->header().numTimesteps_ - 1); // @TODO Missing documentation + _memoryBudget = properties::IntProperty("memoryBudget", "Memory Budget", "", initialBudget, 0, maxNumBricks); // @TODO Missing documentation + _streamingBudget = properties::IntProperty("streamingBudget", "Streaming Budget", "", initialBudget, 0, maxNumBricks); // @TODO Missing documentation addProperty(_currentTime); addProperty(_memoryBudget); addProperty(_streamingBudget); diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index a56b153f38..325f4c0569 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -129,45 +129,52 @@ documentation::Documentation RenderableFov::Documentation() { RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineWidth("lineWidth", "Line Width", 1.f, 1.f, 20.f) - , _drawSolid("solidDraw", "Draw as Quads", false) - , _standOffDistance("standOffDistance", "Standoff Distance", 0.9999, 0.99, 1.0, 0.000001) + , _lineWidth("lineWidth", "Line Width", "", 1.f, 1.f, 20.f) // @TODO Missing documentation + , _drawSolid("solidDraw", "Draw as Quads", "", false) // @TODO Missing documentation + , _standOffDistance("standOffDistance", "Standoff Distance", "", 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation , _programObject(nullptr) , _drawFOV(false) , _colors({ { "colors.defaultStart", "Start of default color", + "", // @TODO Missing documentation glm::vec4(0.4f) }, { "colors.defaultEnd", "End of default color", + "", // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) }, { "colors.active", "Active Color", + "", // @TODO Missing documentation glm::vec4(0.f, 1.f, 0.f, 1.f) }, { "colors.targetInFieldOfView", "Target-in-field-of-view Color", + "", // @TODO Missing documentation glm::vec4(0.f, 0.5f, 0.7f, 1.f) }, { "colors.intersectionStart", "Start of the intersection", + "", // @TODO Missing documentation glm::vec4(1.f, 0.89f, 0.f, 1.f) }, { "colors.intersectionEnd", "End of the intersection", + "", // @TODO Missing documentation glm::vec4(1.f, 0.29f, 0.f, 1.f) }, { "colors.square", "Orthogonal Square", + "", // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) } }) diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index bf85249810..34440944a3 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -104,13 +104,13 @@ documentation::Documentation RenderableModelProjection::Documentation() { RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("colorTexture", "Color Texture") - , _rotation("rotation", "Rotation", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) + , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation + , _rotation("rotation", "Rotation", "", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _geometry(nullptr) - , _performShading("performShading", "Perform Shading", true) + , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index f2b649d472..1caed1166a 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -121,16 +121,16 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("planetTexture", "RGB Texture") - , _heightMapTexturePath("heightMap", "Heightmap Texture") - , _rotation("rotation", "Rotation", 0, 0, 360) + , _colorTexturePath("planetTexture", "RGB Texture", "") // @TODO Missing documentation + , _heightMapTexturePath("heightMap", "Heightmap Texture", "") // @TODO Missing documentation + , _rotation("rotation", "Rotation", "", 0, 0, 360) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _heightMapTexture(nullptr) - , _shiftMeridianBy180("shiftMeiridian", "Shift Meridian by 180 deg", false) - , _heightExaggeration("heightExaggeration", "Height Exaggeration", 1.f, 0.f, 100.f) - , _debugProjectionTextureRotation("debug.projectionTextureRotation", "Projection Texture Rotation", 0.f, 0.f, 360.f) + , _shiftMeridianBy180("shiftMeiridian", "Shift Meridian by 180 deg", "", false) // @TODO Missing documentation + , _heightExaggeration("heightExaggeration", "Height Exaggeration", "", 1.f, 0.f, 100.f) // @TODO Missing documentation + , _debugProjectionTextureRotation("debug.projectionTextureRotation", "Projection Texture Rotation", "", 0.f, 0.f, 360.f) // @TODO Missing documentation , _capture(false) { documentation::testSpecificationAndThrow( diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index 9ab8c44c52..39c641a258 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -46,9 +46,9 @@ namespace openspace { RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _numberOfPoints("amountOfPoints", "Points", 190, 1, 300) - , _shadowLength("shadowLength", "Shadow Length", 0.1f, 0.0f, 0.5f) - , _shadowColor("shadowColor", "Shadow Color", + , _numberOfPoints("amountOfPoints", "Points", "", 190, 1, 300) // @TODO Missing documentation + , _shadowLength("shadowLength", "Shadow Length", "", 0.1f, 0.0f, 0.5f) // @TODO Missing documentation + , _shadowColor("shadowColor", "Shadow Color", "", // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.25f), glm::vec4(0.f), glm::vec4(1.f)) , _shader(nullptr) , _vao(0) diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index 5e00eb3052..d67c2307df 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -168,11 +168,11 @@ documentation::Documentation ProjectionComponent::Documentation() { ProjectionComponent::ProjectionComponent() : properties::PropertyOwner("ProjectionComponent") - , _performProjection("performProjection", "Perform Projections", true) - , _clearAllProjections("clearAllProjections", "Clear Projections", false) - , _projectionFading("projectionFading", "Projection Fading", 1.f, 0.f, 1.f) - , _textureSize("textureSize", "Texture Size", ivec2(16), ivec2(16), ivec2(32768)) - , _applyTextureSize("applyTextureSize", "Apply Texture Size") + , _performProjection("performProjection", "Perform Projections", "", true) // @TODO Missing documentation + , _clearAllProjections("clearAllProjections", "Clear Projections", "", false) // @TODO Missing documentation + , _projectionFading("projectionFading", "Projection Fading", "", 1.f, 0.f, 1.f) // @TODO Missing documentation + , _textureSize("textureSize", "Texture Size", "", ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation + , _applyTextureSize("applyTextureSize", "Apply Texture Size", "") // @TODO Missing documentation , _textureSizeDirty(false) , _projectionTexture(nullptr) { diff --git a/modules/onscreengui/src/gui.cpp b/modules/onscreengui/src/gui.cpp index ba1d041e94..30c6dc5804 100644 --- a/modules/onscreengui/src/gui.cpp +++ b/modules/onscreengui/src/gui.cpp @@ -41,7 +41,7 @@ #include "gui_lua.inl" -//#define SHOW_IMGUI_HELPERS +#define SHOW_IMGUI_HELPERS namespace { diff --git a/modules/onscreengui/src/guicomponent.cpp b/modules/onscreengui/src/guicomponent.cpp index d4bdb0c14a..3a3e845015 100644 --- a/modules/onscreengui/src/guicomponent.cpp +++ b/modules/onscreengui/src/guicomponent.cpp @@ -28,7 +28,7 @@ namespace openspace::gui { GuiComponent::GuiComponent(std::string name) : properties::PropertyOwner(std::move(name)) - , _isEnabled("enabled", "Is Enabled", false) + , _isEnabled("enabled", "Is Enabled", "", false) // @TODO Missing documentation { addProperty(_isEnabled); } diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index 3eaccb9877..dfe7ce7986 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -55,10 +55,10 @@ namespace openspace::gui { GuiPerformanceComponent::GuiPerformanceComponent() : GuiComponent("PerformanceComponent") - , _sortingSelection("sortingSelection", "Sorting", -1, -1, 6) - , _sceneGraphIsEnabled("showSceneGraph", "Show Scene Graph Measurements", false) - , _functionsIsEnabled("showFunctions", "Show Function Measurements", false) - , _outputLogs("outputLogs", "Output Logs", false) + , _sortingSelection("sortingSelection", "Sorting", "", -1, -1, 6) // @TODO Missing documentation + , _sceneGraphIsEnabled("showSceneGraph", "Show Scene Graph Measurements", "", false) // @TODO Missing documentation + , _functionsIsEnabled("showFunctions", "Show Function Measurements", "", false) // @TODO Missing documentation + , _outputLogs("outputLogs", "Output Logs", "", false) // @TODO Missing documentation { addProperty(_sortingSelection); diff --git a/modules/onscreengui/src/renderproperties.cpp b/modules/onscreengui/src/renderproperties.cpp index 221e92b3f2..c676e1f922 100644 --- a/modules/onscreengui/src/renderproperties.cpp +++ b/modules/onscreengui/src/renderproperties.cpp @@ -42,7 +42,15 @@ using namespace properties; void renderTooltip(Property* prop) { if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(prop->fullyQualifiedIdentifier().c_str()); + ImGui::BeginTooltip(); + if (!prop->description().empty()) { + ImGui::TextWrapped(prop->description().c_str()); + ImGui::Spacing(); + } + ImGui::Text( + (std::string("Identifier: ") + prop->fullyQualifiedIdentifier()).c_str() + ); + ImGui::EndTooltip(); } } diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 0566ded92d..1ce2c7d462 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -90,8 +90,8 @@ RenderableConstellationBounds::RenderableConstellationBounds( : Renderable(dictionary) , _vertexFilename("") , _constellationFilename("") - , _distance("distance", "Distance to the celestial Sphere", 15.f, 0.f, 30.f) - , _constellationSelection("constellationSelection", "Constellation Selection") + , _distance("distance", "Distance to the celestial Sphere", "", 15.f, 0.f, 30.f) // @TODO Missing documentation + , _constellationSelection("constellationSelection", "Constellation Selection", "") // @TODO Missing documentation , _vao(0) , _vbo(0) { diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 9a82bf2881..2239026e3d 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -121,15 +121,15 @@ documentation::Documentation RenderablePlanet::Documentation() { RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("colorTexture", "Color Texture") - , _nightTexturePath("nightTexture", "Night Texture") - , _heightMapTexturePath("heightMap", "Heightmap Texture") + , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation + , _nightTexturePath("nightTexture", "Night Texture", "") // @TODO Missing documentation + , _heightMapTexturePath("heightMap", "Heightmap Texture", "") // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _nightTexture(nullptr) - , _heightExaggeration("heightExaggeration", "Height Exaggeration", 1.f, 0.f, 10.f) + , _heightExaggeration("heightExaggeration", "Height Exaggeration", "", 1.f, 0.f, 10.f) // @TODO Missing documentation , _geometry(nullptr) - , _performShading("performShading", "Perform Shading", true) + , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation , _alpha(1.f) , _planetRadius(0.f) , _hasNightTexture(false) diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index b6074a622f..7a5ab1f73e 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -85,11 +85,11 @@ documentation::Documentation RenderableRings::Documentation() { RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture") - , _size("size", "Size", 1.f, 0.f, std::pow(1.f, 25.f)) - , _offset("offset", "Offset", glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) - , _nightFactor("nightFactor", "Night Factor", 0.33f, 0.f, 1.f) - , _transparency("transparency", "Transparency", 0.15f, 0.f, 1.f) + , _texturePath("texture", "Texture", "") // @TODO Missing documentation + , _size("size", "Size", "", 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation + , _offset("offset", "Offset", "", glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation + , _nightFactor("nightFactor", "Night Factor", "", 0.33f, 0.f, 1.f) // @TODO Missing documentation + , _transparency("transparency", "Transparency", "", 0.15f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _textureFile(nullptr) diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index dc09f38c6a..ecfcf0bb09 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -125,21 +125,22 @@ documentation::Documentation RenderableStars::Documentation() { RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _pointSpreadFunctionTexturePath("psfTexture", "Point Spread Function Texture") + , _pointSpreadFunctionTexturePath("psfTexture", "Point Spread Function Texture", "") // @TODO Missing documentation , _pointSpreadFunctionTexture(nullptr) , _pointSpreadFunctionTextureIsDirty(true) - , _colorTexturePath("colorTexture", "ColorBV Texture") + , _colorTexturePath("colorTexture", "ColorBV Texture", "") // @TODO Missing documentation , _colorTexture(nullptr) , _colorTextureIsDirty(true) , _colorOption( "colorOption", "Color Option", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _dataIsDirty(true) - , _alphaValue("alphaValue", "Transparency", 1.f, 0.f, 1.f) - , _scaleFactor("scaleFactor", "Scale Factor", 1.f, 0.f, 10.f) - , _minBillboardSize("minBillboardSize", "Min Billboard Size", 1.f, 1.f, 100.f) + , _alphaValue("alphaValue", "Transparency", "", 1.f, 0.f, 1.f) // @TODO Missing documentation + , _scaleFactor("scaleFactor", "Scale Factor", "", 1.f, 0.f, 10.f) // @TODO Missing documentation + , _minBillboardSize("minBillboardSize", "Min Billboard Size", "", 1.f, 1.f, 100.f) // @TODO Missing documentation , _program(nullptr) , _speckFile("") , _nValuesPerStar(0) diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 5335c544e9..0ff0e03a12 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -41,10 +41,11 @@ SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) , _radius( "radius", "Radius", + "", // @TODO Missing documentation glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(std::pow(10.f, 20.f), std::pow(10.f, 20.f), std::pow(10.f, 20.f))) - , _segments("segments", "Segments", 20, 1, 5000) + , _segments("segments", "Segments", "", 20, 1, 5000) // @TODO Missing documentation , _sphere(nullptr) { float sphereRadius = 0.f; diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index 5c845c62a3..340352f193 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -142,12 +142,13 @@ documentation::Documentation KeplerTranslation::Documentation() { KeplerTranslation::KeplerTranslation() : Translation() - , _eccentricity("eccentricity", "Eccentricity", 0.0, 0.0, 1.0) - , _semiMajorAxis("semimajorAxis", "Semi-major axis", 0.0, 0.0, 1e6) - , _inclination("inclination", "Inclination", 0.0, 0.0, 360.0) + , _eccentricity("eccentricity", "Eccentricity", "", 0.0, 0.0, 1.0) // @TODO Missing documentation + , _semiMajorAxis("semimajorAxis", "Semi-major axis", "", 0.0, 0.0, 1e6) // @TODO Missing documentation + , _inclination("inclination", "Inclination", "", 0.0, 0.0, 360.0) // @TODO Missing documentation , _ascendingNode( "ascendingNode", "Right ascension of ascending Node", + "", // @TODO Missing documentation 0.0, 0.0, 360.0 @@ -155,13 +156,14 @@ KeplerTranslation::KeplerTranslation() , _argumentOfPeriapsis( "argumentOfPeriapsis", "Argument of Periapsis", + "", // @TODO Missing documentation 0.0, 0.0, 360.0 ) - , _meanAnomalyAtEpoch("meanAnomalyAtEpoch", "Mean anomaly at epoch", 0.0, 0.0, 360.0) - , _epoch("epoch", "Epoch", 0.0, 0.0, 1e9) - , _period("period", "Orbit period", 0.0, 0.0, 1e6) + , _meanAnomalyAtEpoch("meanAnomalyAtEpoch", "Mean anomaly at epoch", "", 0.0, 0.0, 360.0) // @TODO Missing documentation + , _epoch("epoch", "Epoch", "", 0.0, 0.0, 1e9) // @TODO Missing documentation + , _period("period", "Orbit period", "", 0.0, 0.0, 1e6) // @TODO Missing documentation , _orbitPlaneDirty(true) { auto update = [this]() { diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index f4924f4341..3171c2c6c3 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -99,10 +99,9 @@ documentation::Documentation SpiceTranslation::Documentation() { } SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) - : _target("target", "Target", "") - , _origin("origin", "Origin", "") - , _frame("frame", "Reference Frame", DefaultReferenceFrame) - , _kernelsLoadedSuccessfully(true) + : _target("target", "Target", "longlong test asdkl;asd;klas\nasdklasdkl;asl;d") // @TODO Missing documentation + , _origin("origin", "Origin", "") // @TODO Missing documentation + , _frame("frame", "Reference Frame", "", DefaultReferenceFrame) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/space/translation/spicetranslation.h b/modules/space/translation/spicetranslation.h index 539cabe0d4..9be65fc52d 100644 --- a/modules/space/translation/spicetranslation.h +++ b/modules/space/translation/spicetranslation.h @@ -45,7 +45,6 @@ private: properties::StringProperty _frame; glm::dvec3 _position; - bool _kernelsLoadedSuccessfully; }; } // namespace openspace diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index d604dbb122..6b3a5ece08 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -74,26 +74,30 @@ namespace openspace { TouchInteraction::TouchInteraction() : properties::PropertyOwner("TouchInteraction") - , _origin("origin", "Origin", "") + , _origin("origin", "Origin", "") // @TODO Missing documentation , _unitTest( "Click to take a unit test", "Take a unit test saving the LM data into file", + "", // @TODO Missing documentation false ) , _touchActive( "TouchEvents", "True if we have a touch event", + "", // @TODO Missing documentation false, properties::Property::Visibility::Hidden ) , _reset( "Default Values", "Reset all properties to default", + "", // @TODO Missing documentation false ) , _maxTapTime( "Max Tap Time", "Max tap delay (in ms) for double tap", + "", // @TODO Missing documentation 300, 10, 1000 @@ -101,6 +105,7 @@ TouchInteraction::TouchInteraction() , _deceleratesPerSecond( "Decelerates per second", "Number of times velocity is decelerated per second", + "", // @TODO Missing documentation 240, 60, 300 @@ -108,6 +113,7 @@ TouchInteraction::TouchInteraction() , _touchScreenSize( "TouchScreenSize", "Touch Screen size in inches", + "", // @TODO Missing documentation 55.0f, 5.5f, 150.0f @@ -115,6 +121,7 @@ TouchInteraction::TouchInteraction() , _tapZoomFactor( "Tap zoom factor", "Scaling distance travelled on tap", + "", // @TODO Missing documentation 0.2f, 0.f, 0.5f @@ -122,6 +129,7 @@ TouchInteraction::TouchInteraction() , _nodeRadiusThreshold( "Activate direct-manipulation", "Radius a planet has to have to activate direct-manipulation", + "", // @TODO Missing documentation 0.2f, 0.0f, 1.0f @@ -129,6 +137,7 @@ TouchInteraction::TouchInteraction() , _rollAngleThreshold( "Interpret roll", "Threshold for min angle for roll interpret", + "", // @TODO Missing documentation 0.025f, 0.f, 0.05f @@ -136,6 +145,7 @@ TouchInteraction::TouchInteraction() , _orbitSpeedThreshold( "Activate orbit spinning", "Threshold to activate orbit spinning in direct-manipulation", + "", // @TODO Missing documentation 0.005f, 0.f, 0.01f @@ -143,6 +153,7 @@ TouchInteraction::TouchInteraction() , _spinSensitivity( "Sensitivity of spinning", "Sensitivity of spinning in direct-manipulation", + "", // @TODO Missing documentation 1.f, 0.f, 2.f @@ -150,6 +161,7 @@ TouchInteraction::TouchInteraction() , _inputStillThreshold( "Input still", "Threshold for interpreting input as still", + "", // @TODO Missing documentation 0.0005f, 0.f, 0.001f @@ -157,6 +169,7 @@ TouchInteraction::TouchInteraction() , _centroidStillThreshold( "Centroid stationary", "Threshold for stationary centroid", + "", // @TODO Missing documentation 0.0018f, 0.f, 0.01f @@ -164,6 +177,7 @@ TouchInteraction::TouchInteraction() , _interpretPan( "Pan delta distance", "Delta distance between fingers allowed for interpreting pan interaction", + "", // @TODO Missing documentation 0.015f, 0.f, 0.1f @@ -171,6 +185,7 @@ TouchInteraction::TouchInteraction() , _slerpTime( "Time to slerp", "Time to slerp in seconds to new orientation with new node picking", + "", // @TODO Missing documentation 3.f, 0.f, 5.f @@ -178,6 +193,7 @@ TouchInteraction::TouchInteraction() , _guiButton( "GUI Button", "GUI button size in pixels", + "", // @TODO Missing documentation glm::ivec2(32, 64), glm::ivec2(8, 16), glm::ivec2(128, 256) @@ -185,6 +201,7 @@ TouchInteraction::TouchInteraction() , _friction( "Friction", "Friction for different interactions (orbit, zoom, roll, pan)", + "", // @TODO Missing documentation glm::vec4(0.01f, 0.025f, 0.02f, 0.02f), glm::vec4(0.f), glm::vec4(0.2f) diff --git a/modules/touch/src/touchmarker.cpp b/modules/touch/src/touchmarker.cpp index a16c4da2fc..f94018117e 100644 --- a/modules/touch/src/touchmarker.cpp +++ b/modules/touch/src/touchmarker.cpp @@ -39,13 +39,14 @@ namespace openspace { TouchMarker::TouchMarker() : properties::PropertyOwner("TouchMarker") - , _visible("TouchMarkers visible", "Toggle visibility of markers", true) - , _radiusSize("Marker size", "Marker radius", 30.f, 0.f, 100.f) - , _transparency("Transparency of marker", "Marker transparency", 0.8f, 0.f, 1.f) - , _thickness("Thickness of marker", "Marker thickness", 2.f, 0.f, 4.f) + , _visible("TouchMarkers visible", "Toggle visibility of markers", "", true) // @TODO Missing documentation + , _radiusSize("Marker size", "Marker radius", "", 30.f, 0.f, 100.f) // @TODO Missing documentation + , _transparency("Transparency of marker", "Marker transparency", "", 0.8f, 0.f, 1.f) // @TODO Missing documentation + , _thickness("Thickness of marker", "Marker thickness", "", 2.f, 0.f, 4.f) // @TODO Missing documentation , _color( "MarkerColor", "Marker color", + "", // @TODO Missing documentation glm::vec3(204.f / 255.f, 51.f / 255.f, 51.f / 255.f), glm::vec3(0.f), glm::vec3(1.f) diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 774acea8aa..1a8f223f6d 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -37,12 +37,12 @@ namespace openspace { RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _scalingExponent("scalingExponent", "Scaling Exponent", 1, -10, 20) - , _stepSize("stepSize", "Step Size", 0.02f, 0.01f, 1.f) - , _scaling("scaling", "Scaling", glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) - , _translation("translation", "Translation", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) - , _rotation("rotation", "Euler rotation", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) - , _color("color", "Color", glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) + , _scalingExponent("scalingExponent", "Scaling Exponent", "", 1, -10, 20) + , _stepSize("stepSize", "Step Size", "", 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _scaling("scaling", "Scaling", "", glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation("translation", "Translation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation("rotation", "Euler rotation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) // @TODO Missing documentation + , _color("color", "Color", "", glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) // @TODO Missing documentation { float stepSize; int scalingExponent; diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 7209551e08..6498eb0dbe 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -33,6 +33,7 @@ VolumeClipPlane::VolumeClipPlane(const ghoul::Dictionary& dictionary) : _normal( "normal", "Normal", + "", // @TODO Missing documentation glm::vec3(1.f, 0.f, 0.f), glm::vec3(-1.f), glm::vec3(1.f) @@ -40,6 +41,7 @@ VolumeClipPlane::VolumeClipPlane(const ghoul::Dictionary& dictionary) , _offsets( "offsets", "Offsets", + "", // @TODO Missing documentation glm::vec2(-2.f, 0.f), glm::vec2(-2.f, 0.f), glm::vec2(2.f, 1.f) diff --git a/modules/volume/rendering/volumeclipplanes.cpp b/modules/volume/rendering/volumeclipplanes.cpp index f08f983cf9..5d1a9e8d74 100644 --- a/modules/volume/rendering/volumeclipplanes.cpp +++ b/modules/volume/rendering/volumeclipplanes.cpp @@ -30,7 +30,7 @@ namespace openspace { VolumeClipPlanes::VolumeClipPlanes(const ghoul::Dictionary& dictionary) - : _nClipPlanes("nClipPlanes", "Number of clip planes", 0, 0, 10) + : _nClipPlanes("nClipPlanes", "Number of clip planes", "", 0, 0, 10) // @TODO Missing documentation { std::vector keys = dictionary.keys(); for (const std::string& key : keys) { diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index cd2695a65b..a5dda2323c 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -65,35 +65,59 @@ int writeDocumentation(lua_State* L) { */ int addVirtualProperty(lua_State* L) { const int nArguments = lua_gettop(L); - if (nArguments != 6) { - return luaL_error(L, "Expected %i arguments, got %i", 6, nArguments); + if (nArguments != 7) { + return luaL_error(L, "Expected %i arguments, got %i", 7, nArguments); } - const std::string type = lua_tostring(L, -6); - const std::string name = lua_tostring(L, -5); - const std::string identifier = lua_tostring(L, -4); + const std::string type = lua_tostring(L, -7); + const std::string name = lua_tostring(L, -6); + const std::string identifier = lua_tostring(L, -5); + const std::string description = lua_tostring(L, -4); std::unique_ptr prop; if (type == "BoolProperty") { bool v = lua_toboolean(L, -3); - prop = std::make_unique(identifier, name, v); + prop = std::make_unique( + identifier, + name, + description, + v + ); } else if (type == "IntProperty") { int v = static_cast(lua_tonumber(L, -3)); int min = static_cast(lua_tonumber(L, -2)); int max = static_cast(lua_tonumber(L, -1)); - prop = std::make_unique(identifier, name, v, min, max); + prop = std::make_unique( + identifier, + name, + description, + v, + min, + max + ); } else if (type == "FloatProperty") { float v = static_cast(lua_tonumber(L, -3)); float min = static_cast(lua_tonumber(L, -2)); float max = static_cast(lua_tonumber(L, -1)); - prop = std::make_unique(identifier, name, v, min, max); + prop = std::make_unique( + identifier, + name, + description, + v, + min, + max + ); } else if (type == "TriggerProperty") { - prop = std::make_unique(identifier, name); + prop = std::make_unique( + identifier, + name, + description + ); } else { return luaL_error(L, "Unknown property type '%s'", type.c_str()); diff --git a/src/engine/settingsengine.cpp b/src/engine/settingsengine.cpp index 999ac1d61e..a4da6d755d 100644 --- a/src/engine/settingsengine.cpp +++ b/src/engine/settingsengine.cpp @@ -42,11 +42,11 @@ namespace openspace { SettingsEngine::SettingsEngine() : properties::PropertyOwner("Global Properties") - , _scenes("scenes", "Scene", properties::OptionProperty::DisplayType::Dropdown) - , _busyWaitForDecode("busyWaitForDecode", "Busy Wait for decode", false) - , _logSGCTOutOfOrderErrors("logSGCTOutOfOrderErrors", "Log SGCT out-of-order", false) - , _useDoubleBuffering("useDoubleBuffering", "Use double buffering", false) - , _spiceUseExceptions("enableSpiceExceptions", "Enable Spice Exceptions", false) + , _scenes("scenes", "Scene", "", properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _busyWaitForDecode("busyWaitForDecode", "Busy Wait for decode", "", false) // @TODO Missing documentation + , _logSGCTOutOfOrderErrors("logSGCTOutOfOrderErrors", "Log SGCT out-of-order", "", false) // @TODO Missing documentation + , _useDoubleBuffering("useDoubleBuffering", "Use double buffering", "", false) // @TODO Missing documentation + , _spiceUseExceptions("enableSpiceExceptions", "Enable Spice Exceptions", "", false) // @TODO Missing documentation { _spiceUseExceptions.onChange([this] { SpiceManager::ref().setExceptionHandling( diff --git a/src/engine/wrapper/sgctwindowwrapper.cpp b/src/engine/wrapper/sgctwindowwrapper.cpp index c772b7863f..758e7bbf9f 100644 --- a/src/engine/wrapper/sgctwindowwrapper.cpp +++ b/src/engine/wrapper/sgctwindowwrapper.cpp @@ -36,8 +36,8 @@ namespace { namespace openspace { SGCTWindowWrapper::SGCTWindowWrapper() - : _eyeSeparation("eyeSeparation", "Eye Separation", 0.f, 0.f, 10.f) - , _showStatsGraph("showStatsGraph", "Show Stats Graph", false) + : _eyeSeparation("eyeSeparation", "Eye Separation", "", 0.f, 0.f, 10.f) // @TODO Missing documentation + , _showStatsGraph("showStatsGraph", "Show Stats Graph", "", false) // @TODO Missing documentation { _showStatsGraph.onChange([this](){ sgct::Engine::instance()->setStatsGraphVisibility(_showStatsGraph); diff --git a/src/interaction/luaconsole.cpp b/src/interaction/luaconsole.cpp index b0b7401f9e..57c5ff7030 100644 --- a/src/interaction/luaconsole.cpp +++ b/src/interaction/luaconsole.cpp @@ -75,11 +75,12 @@ namespace openspace { LuaConsole::LuaConsole() : properties::PropertyOwner("LuaConsole") - , _isVisible("isVisible", "Is Visible", false) - , _remoteScripting("remoteScripting", "Remote scripting", false) + , _isVisible("isVisible", "Is Visible", "", false) // @TODO Missing documentation + , _remoteScripting("remoteScripting", "Remote scripting", "", false) // @TODO Missing documentation , _backgroundColor( "backgroundColor", "Background Color", + "", // @TODO Missing documentation glm::vec4(21.f / 255.f, 23.f / 255.f, 28.f / 255.f, 0.8f), glm::vec4(0.f), glm::vec4(1.f) @@ -87,6 +88,7 @@ LuaConsole::LuaConsole() , _highlightColor( "highlightColor", "Highlight Color", + "", // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.f), glm::vec4(0.f), glm::vec4(1.f) @@ -94,6 +96,7 @@ LuaConsole::LuaConsole() , _separatorColor( "separatorColor", "Separator Color", + "", // @TODO Missing documentation glm::vec4(0.4f, 0.4f, 0.4f, 0.f), glm::vec4(0.f), glm::vec4(1.f) @@ -101,6 +104,7 @@ LuaConsole::LuaConsole() , _entryTextColor( "entryTextColor", "Entry Text Color", + "", // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f) @@ -108,11 +112,12 @@ LuaConsole::LuaConsole() , _historyTextColor( "historyTextColor", "History Text Color", + "", // @TODO Missing documentation glm::vec4(1.0f, 1.0f, 1.0f, 0.65f), glm::vec4(0.f), glm::vec4(1.f) ) - , _historyLength("historyLength", "History Length", 13, 0, 100) + , _historyLength("historyLength", "History Length", "", 13, 0, 100) // @TODO Missing documentation , _inputPosition(0) , _activeCommand(0) , _autoCompleteInfo({NoAutoComplete, false, ""}) diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 61bd162335..b7fc5bdcde 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -55,7 +55,7 @@ namespace openspace::interaction { NavigationHandler::NavigationHandler() : properties::PropertyOwner("NavigationHandler") , _origin("origin", "Origin", "") - , _useKeyFrameInteraction("useKeyFrameInteraction", "Use keyframe interaction", false) + , _useKeyFrameInteraction("useKeyFrameInteraction", "Use keyframe interaction", "", false) // @TODO Missing documentation { _origin.onChange([this]() { SceneGraphNode* node = sceneGraphNode(_origin.value()); diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index cd9683da69..e1c5fc45c2 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -41,15 +41,15 @@ namespace openspace::interaction { OrbitalNavigator::OrbitalNavigator() : properties::PropertyOwner("OrbitalNavigator") - , _rotationalFriction("rotationalFriction", "Rotational friction", true) - , _horizontalFriction("horizontalFriction", "Horizontal friction", true) - , _verticalFriction("verticalFriction", "Vertical friction", true) + , _rotationalFriction("rotationalFriction", "Rotational friction", "", true) // @TODO Missing documentation + , _horizontalFriction("horizontalFriction", "Horizontal friction", "", true) // @TODO Missing documentation + , _verticalFriction("verticalFriction", "Vertical friction", "", true) // @TODO Missing documentation , _followFocusNodeRotationDistance("followFocusNodeRotationDistance", - "Follow focus node rotation distance", 2.0f, 0.0f, 10.f) + "Follow focus node rotation distance", "", 2.0f, 0.0f, 10.f) // @TODO Missing documentation , _minimumAllowedDistance("minimumAllowedDistance", - "Minimum allowed distance", 10.0f, 0.0f, 10000.f) - , _sensitivity("sensitivity", "Sensitivity", 20.0f, 1.0f, 50.f) - , _motionLag("motionLag", "Motion lag", 0.5f, 0.f, 1.f) + "Minimum allowed distance", "", 10.0f, 0.0f, 10000.f) // @TODO Missing documentation + , _sensitivity("sensitivity", "Sensitivity", "", 20.0f, 1.0f, 50.f) // @TODO Missing documentation + , _motionLag("motionLag", "Motion lag", "", 0.5f, 0.f, 1.f) // @TODO Missing documentation , _mouseStates(_sensitivity * pow(10.0,-4), 1 / (_motionLag + 0.0000001)) { auto smoothStep = diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 71c8f603ad..99f3c7b05c 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -87,15 +87,16 @@ namespace openspace { ParallelConnection::ParallelConnection() : properties::PropertyOwner("ParallelConnection") - , _password("password", "Password") - , _hostPassword("hostPassword", "Host Password") - , _port("port", "Port", "20501") - , _address("address", "Address", "localhost") - , _name("name", "Connection name", "Anonymous") - , _bufferTime("bufferTime", "Buffer Time", 1, 0.5, 10) + , _password("password", "Password", "") // @TODO Missing documentation + , _hostPassword("hostPassword", "Host Password", "") // @TODO Missing documentation + , _port("port", "Port", "20501", "") // @TODO Missing documentation + , _address("address", "Address", "localhost", "") // @TODO Missing documentation + , _name("name", "Connection name", "Anonymous", "") // @TODO Missing documentation + , _bufferTime("bufferTime", "Buffer Time", "", 1, 0.5, 10) // @TODO Missing documentation , _timeKeyframeInterval( "timeKeyframeInterval", "Time keyframe interval", + "", // @TODO Missing documentation 0.1f, 0.f, 1.f @@ -103,11 +104,12 @@ ParallelConnection::ParallelConnection() , _cameraKeyframeInterval( "cameraKeyframeInterval", "Camera Keyframe interval", + "", // @TODO Missing documentation 0.1f, 0.f, 1.f ) - , _timeTolerance("timeTolerance", "Time tolerance", 1.f, 0.5f, 5.f) + , _timeTolerance("timeTolerance", "Time tolerance", "", 1.f, 0.5f, 5.f) // @TODO Missing documentation , _lastTimeKeyframeTimestamp(0) , _lastCameraKeyframeTimestamp(0) , _clientSocket(INVALID_SOCKET) diff --git a/src/properties/optionproperty.cpp b/src/properties/optionproperty.cpp index 70b3e37434..a28aad52c6 100644 --- a/src/properties/optionproperty.cpp +++ b/src/properties/optionproperty.cpp @@ -33,14 +33,15 @@ namespace openspace::properties { const std::string OptionProperty::OptionsKey = "Options"; OptionProperty::OptionProperty(std::string identifier, std::string guiName, - Property::Visibility visibility) - : IntProperty(std::move(identifier), std::move(guiName), visibility) + std::string desc, Property::Visibility visibility) + : IntProperty(std::move(identifier), std::move(guiName), std::move(desc), visibility) , _displayType(DisplayType::Radio) {} OptionProperty::OptionProperty(std::string identifier, std::string guiName, - DisplayType displayType, Property::Visibility visibility) - : IntProperty(std::move(identifier), std::move(guiName), visibility) + std::string desc, DisplayType displayType, + Property::Visibility visibility) + : IntProperty(std::move(identifier), std::move(guiName), std::move(desc), visibility) , _displayType(displayType) {} diff --git a/src/properties/property.cpp b/src/properties/property.cpp index e071ee503b..218387611f 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -52,9 +52,11 @@ const char* Property::NameKey = "Name"; const char* Property::TypeKey = "Type"; const char* Property::MetaDataKey = "MetaData"; -Property::Property(std::string identifier, std::string guiName, Visibility visibility) +Property::Property(std::string identifier, std::string guiName, std::string description, + Visibility visibility) : _owner(nullptr) , _identifier(std::move(identifier)) + , _description(std::move(description)) , _currentHandleValue(0) { ghoul_assert(!_identifier.empty(), "Identifier must not be empty"); @@ -118,7 +120,7 @@ std::string Property::guiName() const { } std::string Property::description() const { - return "return {" + generateBaseDescription() + "}"; + return _description; } void Property::setGroupIdentifier(std::string groupId) { @@ -209,6 +211,8 @@ void Property::notifyListener() { } } +// This was used in the old version of Property::Description but was never used. Is this +// still useful? ---abock std::string Property::generateBaseDescription() const { return std::string(TypeKey) + " = \"" + className() + "\", " + diff --git a/src/properties/selectionproperty.cpp b/src/properties/selectionproperty.cpp index 88452dcd16..d2ddf9de79 100644 --- a/src/properties/selectionproperty.cpp +++ b/src/properties/selectionproperty.cpp @@ -37,9 +37,10 @@ namespace openspace::properties { const std::string SelectionProperty::OptionsKey = "Options"; SelectionProperty::SelectionProperty(std::string identifier, std::string guiName, + std::string desc, Property::Visibility visibility) - : TemplateProperty(std::move(identifier), std::move(guiName), std::vector(), - visibility) + : TemplateProperty(std::move(identifier), std::move(guiName), std::move(desc), + std::vector(), visibility) {} void SelectionProperty::addOption(Option option) { diff --git a/src/properties/triggerproperty.cpp b/src/properties/triggerproperty.cpp index 5e543e8f29..5a1c0f1396 100644 --- a/src/properties/triggerproperty.cpp +++ b/src/properties/triggerproperty.cpp @@ -27,8 +27,8 @@ namespace openspace::properties { TriggerProperty::TriggerProperty(std::string identifier, std::string guiName, - Property::Visibility visibility) - : Property(std::move(identifier), std::move(guiName), visibility) + std::string desc, Property::Visibility visibility) + : Property(std::move(identifier), std::move(guiName), std::move(desc), visibility) {} std::string TriggerProperty::className() const { diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 548ffc7e23..b1e67d53db 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -93,7 +93,7 @@ std::unique_ptr Renderable::createFromDictionary( Renderable::Renderable() : properties::PropertyOwner("renderable") - , _enabled("enabled", "Is Enabled", true) + , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") @@ -102,7 +102,7 @@ Renderable::Renderable() Renderable::Renderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("renderable") - , _enabled("enabled", "Is Enabled", true) + , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 902dec515b..9c1f7da5f8 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -100,7 +100,7 @@ RenderEngine::RenderEngine() , _camera(nullptr) , _scene(nullptr) , _raycasterManager(nullptr) - , _performanceMeasurements("performanceMeasurements", "Performance Measurements") + , _performanceMeasurements("performanceMeasurements", "Performance Measurements", "") // @TODO Missing documentation , _performanceManager(nullptr) , _renderer(nullptr) , _rendererImplementation(RendererImplementation::Invalid) @@ -108,26 +108,28 @@ RenderEngine::RenderEngine() , _frametimeType( "frametimeType", "Type of the frametime display", + "", // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _showDate("showDate", "Show Date Information", true) - , _showInfo("showInfo", "Show Render Information", true) - , _showLog("showLog", "Show the OnScreen log", true) - , _takeScreenshot("takeScreenshot", "Take Screenshot") + , _showDate("showDate", "Show Date Information", "", true) // @TODO Missing documentation + , _showInfo("showInfo", "Show Render Information", "", true) // @TODO Missing documentation + , _showLog("showLog", "Show the OnScreen log", "", true) // @TODO Missing documentation + , _takeScreenshot("takeScreenshot", "Take Screenshot", "" ) // @TODO Missing documentation , _shouldTakeScreenshot(false) - , _applyWarping("applyWarpingScreenshot", "Apply Warping to Screenshots", false) - , _showFrameNumber("showFrameNumber", "Show Frame Number", false) - , _disableMasterRendering("disableMasterRendering", "Disable Master Rendering", false) + , _applyWarping("applyWarpingScreenshot", "Apply Warping to Screenshots", "", false) // @TODO Missing documentation + , _showFrameNumber("showFrameNumber", "Show Frame Number", "", false) // @TODO Missing documentation + , _disableMasterRendering("disableMasterRendering", "Disable Master Rendering", "", false) // @TODO Missing documentation , _disableSceneTranslationOnMaster( "disableSceneTranslationOnMaster", "Disable Scene Translation on Master", + "", // @TODO Missing documentation false ) , _globalBlackOutFactor(1.f) , _fadeDuration(2.f) , _currentFadeTime(0.f) , _fadeDirection(0) - , _nAaSamples("nAaSamples", "Number of Antialiasing samples", 8, 1, 16) + , _nAaSamples("nAaSamples", "Number of Antialiasing samples", "", 8, 1, 16) // @TODO Missing documentation , _frameNumber(0) { _performanceMeasurements.onChange([this](){ diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 860c066325..98cac7b3a6 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -98,11 +98,12 @@ std::unique_ptr ScreenSpaceRenderable::createFromDictiona ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("") - , _enabled("enabled", "Is Enabled", true) - , _useFlatScreen("flatScreen", "Flat Screen", true) + , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation + , _useFlatScreen("flatScreen", "Flat Screen", "", true) // @TODO Missing documentation , _euclideanPosition( "euclideanPosition", "Euclidean coordinates", + "", // @TODO Missing documentation glm::vec2(0.f), glm::vec2(-4.f), glm::vec2(4.f) @@ -110,14 +111,15 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary , _sphericalPosition( "sphericalPosition", "Spherical coordinates", + "", // @TODO Missing documentation glm::vec2(0.f, static_cast(M_PI_2)), glm::vec2(-static_cast(M_PI)), glm::vec2(static_cast(M_PI)) ) - , _depth("depth", "Depth", 0.f, 0.f, 1.f) - , _scale("scale", "Scale", 0.25f, 0.f, 2.f) - , _alpha("alpha", "Alpha", 1.f, 0.f, 1.f) - , _delete("delete", "Delete") + , _depth("depth", "Depth", "", 0.f, 0.f, 1.f) // @TODO Missing documentation + , _scale("scale", "Scale", "", 0.25f, 0.f, 2.f) // @TODO Missing documentation + , _alpha("alpha", "Alpha", "", 1.f, 0.f, 1.f) // @TODO Missing documentation + , _delete("delete", "Delete", "") // @TODO Missing documentation , _quad(0) , _vertexPositionBuffer(0) , _texture(nullptr) From 04bac9293be3ca323eee5a55607a713f9d1f1823 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 22 Jul 2017 17:36:03 -0400 Subject: [PATCH 02/20] Encapsulate identifier, guiName, and description into a PropertyInfo struct --- .../openspace/properties/numericalproperty.h | 19 ++--- .../properties/numericalproperty.inl | 38 ++++------ include/openspace/properties/optionproperty.h | 21 +++--- include/openspace/properties/property.h | 45 +++++++++--- .../openspace/properties/selectionproperty.h | 6 +- .../openspace/properties/templateproperty.h | 23 ++---- .../openspace/properties/templateproperty.inl | 6 +- .../openspace/properties/triggerproperty.h | 9 ++- modules/base/rendering/renderablemodel.cpp | 8 +- modules/base/rendering/renderableplane.cpp | 6 +- modules/base/rendering/renderablesphere.cpp | 10 +-- modules/base/rendering/renderabletrail.cpp | 14 ++-- .../base/rendering/renderabletrailorbit.cpp | 4 +- .../rendering/renderabletrailtrajectory.cpp | 12 ++- .../base/rendering/screenspaceframebuffer.cpp | 2 +- modules/base/rendering/screenspaceimage.cpp | 2 +- modules/base/rotation/staticrotation.cpp | 2 +- modules/base/scale/staticscale.cpp | 2 +- .../base/translation/statictranslation.cpp | 4 +- .../rendering/renderabledebugplane.cpp | 6 +- .../rendering/renderablefieldlines.cpp | 12 ++- modules/galaxy/rendering/renderablegalaxy.cpp | 10 +-- .../cache/memoryawaretilecache.cpp | 12 +-- modules/globebrowsing/globes/pointglobe.cpp | 8 +- .../globebrowsing/globes/renderableglobe.cpp | 42 +++++------ .../globebrowsing/rendering/layer/layer.cpp | 19 ++--- .../rendering/layer/layeradjustment.cpp | 12 +-- .../rendering/layer/layergroup.cpp | 2 +- .../rendering/layer/layerrendersettings.cpp | 12 +-- .../tile/rawtiledatareader/gdalwrapper.cpp | 4 +- .../tile/tileprovider/defaulttileprovider.cpp | 13 ++-- .../tile/tileprovider/singleimageprovider.cpp | 4 +- .../tileprovider/temporaltileprovider.cpp | 2 +- modules/iswa/rendering/datacygnet.cpp | 14 ++-- modules/iswa/rendering/iswabasegroup.cpp | 6 +- modules/iswa/rendering/iswacygnet.cpp | 4 +- modules/iswa/rendering/iswadatagroup.cpp | 14 ++-- modules/iswa/rendering/iswakameleongroup.cpp | 4 +- modules/iswa/rendering/kameleonplane.cpp | 6 +- .../rendering/renderablekameleonvolume.cpp | 24 +++--- .../rendering/renderablemultiresvolume.cpp | 32 ++++---- .../newhorizons/rendering/renderablefov.cpp | 34 +++------ .../rendering/renderablemodelprojection.cpp | 6 +- .../rendering/renderableplanetprojection.cpp | 12 +-- .../rendering/renderableshadowcylinder.cpp | 6 +- .../newhorizons/util/projectioncomponent.cpp | 10 +-- modules/onscreengui/src/guicomponent.cpp | 2 +- .../src/guiperformancecomponent.cpp | 8 +- .../renderableconstellationbounds.cpp | 4 +- modules/space/rendering/renderableplanet.cpp | 10 +-- modules/space/rendering/renderablerings.cpp | 10 +-- modules/space/rendering/renderablestars.cpp | 14 ++-- .../space/rendering/simplespheregeometry.cpp | 6 +- modules/space/rotation/spicerotation.cpp | 4 +- .../space/translation/keplertranslation.cpp | 20 ++--- .../space/translation/spicetranslation.cpp | 6 +- modules/touch/src/touchinteraction.cpp | 73 +++++-------------- modules/touch/src/touchmarker.cpp | 12 ++- .../rendering/renderabletoyvolume.cpp | 12 +-- modules/volume/rendering/volumeclipplane.cpp | 8 +- modules/volume/rendering/volumeclipplanes.cpp | 2 +- src/engine/openspaceengine_lua.inl | 16 +--- src/engine/settingsengine.cpp | 10 +-- src/engine/wrapper/sgctwindowwrapper.cpp | 4 +- src/interaction/luaconsole.cpp | 26 ++----- src/interaction/navigationhandler.cpp | 4 +- src/interaction/orbitalnavigator.cpp | 21 +++--- src/network/parallelconnection.cpp | 22 +++--- src/properties/optionproperty.cpp | 11 +-- src/properties/property.cpp | 27 ++++--- src/properties/selectionproperty.cpp | 7 +- src/properties/triggerproperty.cpp | 5 +- src/rendering/renderable.cpp | 4 +- src/rendering/renderengine.cpp | 26 +++---- src/rendering/screenspacerenderable.cpp | 20 ++--- src/scene/scene_lua.inl | 4 +- 76 files changed, 422 insertions(+), 539 deletions(-) diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index 601d70c94d..cac67dea48 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -32,18 +32,13 @@ namespace openspace::properties { template class NumericalProperty : public TemplateProperty { public: - NumericalProperty(std::string identifier, std::string guiName, - std::string description, - Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, - std::string description, T value, - Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, - std::string description, T value, T minimumValue, T maximumValue, - Property::Visibility visibility = Property::Visibility::User); - NumericalProperty(std::string identifier, std::string guiName, - std::string description, T value, T minimumValue, T maximumValue, T steppingValue, - Property::Visibility visibility = Property::Visibility::User); + using Property::PropertyInfo; + + NumericalProperty(PropertyInfo info); + NumericalProperty(PropertyInfo info, T value); + NumericalProperty(PropertyInfo info, T value, T minimumValue, T maximumValue); + NumericalProperty(PropertyInfo info, T value, T minimumValue, T maximumValue, + T steppingValue); bool getLuaValue(lua_State* state) const override; bool setLuaValue(lua_State* state) override; diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 9d1a7a4573..7e83b15fa3 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -232,52 +232,40 @@ const std::string NumericalProperty::SteppingValueKey = "SteppingValue"; // a single constructor template -NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, - std::string description, - Property::Visibility visibility) +NumericalProperty::NumericalProperty(PropertyInfo info) : NumericalProperty( - std::move(identifier), std::move(guiName), std::move(description), + std::move(info), PropertyDelegate>::template defaultValue(), PropertyDelegate>::template defaultMinimumValue(), PropertyDelegate>::template defaultMaximumValue(), - PropertyDelegate>::template defaultSteppingValue(), - visibility + PropertyDelegate>::template defaultSteppingValue() ) {} template -NumericalProperty::NumericalProperty(std::string identifier, - std::string guiName, std::string desc, T value, - Property::Visibility visibility) +NumericalProperty::NumericalProperty(PropertyInfo info, T value) : NumericalProperty( - std::move(identifier), std::move(guiName), std::move(desc), std::move(value), + std::move(info), PropertyDelegate>::template defaultMinimumValue(), PropertyDelegate>::template defaultMaximumValue(), - PropertyDelegate>::template defaultSteppingValue(), - visibility + PropertyDelegate>::template defaultSteppingValue() ) {} template -NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, - std::string description, T value, T minimumValue, - T maximumValue, Property::Visibility visibility) +NumericalProperty::NumericalProperty(PropertyInfo info, T value, T minimumValue, + T maximumValue) : NumericalProperty( - std::move(identifier), std::move(guiName), std::move(description), + std::move(info), std::move(value), std::move(minimumValue), std::move(maximumValue), - PropertyDelegate>::template defaultSteppingValue(), - visibility + PropertyDelegate>::template defaultSteppingValue() ) {} template -NumericalProperty::NumericalProperty(std::string identifier, std::string guiName, - std::string description, T value, - T minimumValue, T maximumValue, T steppingValue, - Property::Visibility visibility) - : TemplateProperty( - std::move(identifier), std::move(guiName), std::move(description), - std::move(value), visibility) +NumericalProperty::NumericalProperty(PropertyInfo info, T value, + T minimumValue, T maximumValue, T steppingValue) + : TemplateProperty(std::move(info), std::move(value)) , _minimumValue(std::move(minimumValue)) , _maximumValue(std::move(maximumValue)) , _stepping(std::move(steppingValue)) diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index 444819ae0a..e2e40f33dc 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -40,6 +40,8 @@ namespace openspace::properties { */ class OptionProperty : public IntProperty { public: + using Property::PropertyInfo; + /** * The struct storing a single option consisting of an integer value and * a string description. @@ -57,22 +59,23 @@ public: /** * The constructor delegating the identifier and the guiName * to its super class. - * \param identifier A unique identifier for this property - * \param guiName The GUI name that should be used to represent this property + * \param info The PropertyInfo structure that contains all the required static + * information for initializing this Property. + * \pre \p info.identifier must not be empty + * \pre \p info.guiName must not be empty */ - OptionProperty(std::string identifier, std::string guiName, std::string description, - Property::Visibility visibility = Property::Visibility::User); + OptionProperty(PropertyInfo info); /** * The constructor delegating the identifier and the guiName * to its super class. - * \param identifier A unique identifier for this property - * \param guiName The GUI name that should be used to represent this property + * \param info The PropertyInfo structure that contains all the required static + * information for initializing this Property. * \param displayType Optional DisplayType for GUI (default RADIO) + * \pre \p info.identifier must not be empty + * \pre \p info.guiName must not be empty */ - OptionProperty(std::string identifier, std::string guiName, std::string description, - DisplayType displayType, - Property::Visibility visibility = Property::Visibility::User); + OptionProperty(PropertyInfo info, DisplayType displayType); /** * Returns the name of the class for reflection purposes. diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index d58a9fbf94..48d5288056 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -63,9 +63,9 @@ class PropertyOwner; class Property { public: /** - * The visibility classes for Property%s. The classes are strictly ordered as - * All > Developer > User > Hidden - */ + * The visibility classes for Property%s. The classes are strictly ordered as + * All > Developer > User > Hidden + */ enum class Visibility { All = 3, ///< Visible for all types, no matter what Hidden = 2, ///< Never visible @@ -73,6 +73,21 @@ public: User = 0 ///< Visible in User mode }; + /** + * This structure is passed to the constructor of a Property and contains the unique + * identifier, a GUI name and descriptive text that are both user facing. + */ + struct PropertyInfo { + /// The unique identifier that is part of the fully qualified URI of this Property + std::string identifier; + /// The name that is displayed in the user interface + std::string guiName; + /// The user facing description of this Property + std::string description; + /// Determins the visibility of this Property in the user interface + Visibility visibility = Visibility::All; + }; + /// An OnChangeHandle is returned by the onChange method to uniquely identify an /// onChange callback using OnChangeHandle = uint32_t; @@ -87,16 +102,12 @@ public: * to be accessed by the GUI elements using the guiName key. The default * visibility settings is Visibility::All, whereas the default read-only state is * false. - * \param identifier A unique identifier for this property. It has to be unique to the - * PropertyOwner and cannot contain any .s - * \param guiName The human-readable GUI name for this Property - * \param description The human-readable description for this Property - * \param visibility The visibility of the Property for user interfaces - * \pre \p identifier must not be empty - * \pre \p guiName must not be empty + * \param info The PropertyInfo structure that contains all the required static + * information for initializing this Property. + * \pre \p info.identifier must not be empty + * \pre \p info.guiName must not be empty */ - Property(std::string identifier, std::string guiName, std::string description, - Visibility visibility = Visibility::All); + Property(PropertyInfo info); /** * The destructor taking care of deallocating all unused memory. This method will not @@ -403,6 +414,9 @@ protected: /// The identifier for this Property std::string _identifier; + /// The GUI user-facing name of this Property + std::string _guiName; + /// The user-facing description of this Property std::string _description; @@ -414,6 +428,13 @@ protected: private: OnChangeHandle _currentHandleValue; + +#ifdef _DEBUG + // These identifiers can be used for debugging. Each Property is assigned one unique + // identifier. + static uint64_t Identifier; + uint64_t _id; +#endif }; } // namespace openspace::properties diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index d14414fdc5..3e036a90ce 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -33,14 +33,14 @@ namespace openspace::properties { class SelectionProperty : public TemplateProperty> { public: + using Property::PropertyInfo; + struct Option { int value; std::string description; }; - SelectionProperty(std::string identifier, std::string guiName, - std::string description, - Property::Visibility visibility = Property::Visibility::User); + SelectionProperty(PropertyInfo info); void addOption(Option option); void removeOptions(); diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index 6f99a57353..1d6d253346 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -51,29 +51,20 @@ namespace openspace::properties { template class TemplateProperty : public Property { public: + using Property::PropertyInfo; using ValueType = T; - /** - * The constructor initializing the TemplateProperty with the provided - * identifier and human-readable guiName. The default value - * for the stored type T is retrieved using the PropertyDelegate's - * PropertyDelegate::defaultValue method, which must be specialized for new types or - * a compile-error will occur. - * \param identifier The identifier that is used for this TemplateProperty - * \param guiName The human-readable GUI name for this TemplateProperty - */ - //TemplateProperty(std::string identifier, std::string guiName, - // Property::Visibility visibility = Visibility::User); - /** * The constructor initializing the TemplateProperty with the provided * identifier, human-readable guiName and provided * value. + * \param info The PropertyInfo structure that contains all the required static + * information for initializing this Property. + * \pre \p info.identifier must not be empty + * \pre \p info.guiName must not be empty */ - TemplateProperty(std::string identifier, std::string guiName, - std::string description, - T value = PropertyDelegate>::template defaultValue(), - Property::Visibility visibility = Visibility::User); + TemplateProperty(PropertyInfo info, + T value = PropertyDelegate>::template defaultValue()); /** * Returns the class name for this TemplateProperty. The default implementation makes diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index bc927ab974..7581324390 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -158,10 +158,8 @@ namespace openspace::properties { //} template -TemplateProperty::TemplateProperty(std::string identifier, std::string guiName, - std::string desc, - T value, Property::Visibility visibility) - : Property(std::move(identifier), std::move(guiName), std::move(desc), visibility) +TemplateProperty::TemplateProperty(PropertyInfo info, T value) + : Property(std::move(info)) , _value(std::move(value)) {} diff --git a/include/openspace/properties/triggerproperty.h b/include/openspace/properties/triggerproperty.h index 5bc707f667..29e30f5ff6 100644 --- a/include/openspace/properties/triggerproperty.h +++ b/include/openspace/properties/triggerproperty.h @@ -38,11 +38,12 @@ public: /** * Initializes the TriggerProperty by delegating the identifier and * guiName to the Property constructor. - * \param identifier The unique identifier used for this Property - * \param guiName The human-readable name of this Property + * \param info The PropertyInfo structure that contains all the required static + * information for initializing this Property. + * \pre \p info.identifier must not be empty + * \pre \p info.guiName must not be empty */ - TriggerProperty(std::string identifier, std::string guiName, std::string description, - Property::Visibility visibility = Property::Visibility::User); + TriggerProperty(PropertyInfo info); /** * Returns the class name TriggerProperty. diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index b0b84493cf..78525ba9e0 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -95,10 +95,10 @@ documentation::Documentation RenderableModel::Documentation() { RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _geometry(nullptr) - , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation - , _performFade("performFading", "Perform Fading", "", false) // @TODO Missing documentation - , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation - , _fading("fading", "Fade", "", 0) // @TODO Missing documentation + , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _performFade({ "performFading", "Perform Fading", "" }, false) // @TODO Missing documentation + , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _fading({ "fading", "Fade", "" }, 0) // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _modelTransform(1.0) diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 0156a679e2..dddf149ec3 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -87,9 +87,9 @@ documentation::Documentation RenderablePlane::Documentation() { RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture", "") // @TODO Missing documentation - , _billboard("billboard", "Billboard", "", false) // @TODO Missing documentation - , _size("size", "Size", "", 10, 0, std::pow(10, 25)) // @TODO Missing documentation + , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation + , _billboard({ "billboard", "Billboard", "" }, false) // @TODO Missing documentation + , _size({ "size", "Size", "" }, 10, 0, std::pow(10, 25)) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _blendMode(BlendMode::Normal) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 2b2cfb38b1..5120bc4715 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -92,11 +92,11 @@ documentation::Documentation RenderableSphere::Documentation() { RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture", "") // @TODO Missing documentation - , _orientation("orientation", "Orientation", "") // @TODO Missing documentation - , _size("size", "Size", "", 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation - , _segments("segments", "Segments", "", 8, 4, 100) // @TODO Missing documentation - , _transparency("transparency", "Transparency", "", 1.f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation + , _orientation({ "orientation", "Orientation", "" }) // @TODO Missing documentation + , _size({ "size", "Size", "" }, 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation + , _segments({ "segments", "Segments", "" }, 8, 4, 100) // @TODO Missing documentation + , _transparency({ "transparency", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _sphere(nullptr) diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 68686c0bed..c7a61525c3 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -133,15 +133,13 @@ documentation::Documentation RenderableTrail::Documentation() { RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineColor("lineColor", "Color", "", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation - , _useLineFade("useLineFade", "Use Line Fade", "", true) // @TODO Missing documentation - , _lineFade("lineFade", "Line Fade", "", 1.f, 0.f, 20.f) // @TODO Missing documentation - , _lineWidth("lineWidth", "Line Width", "", 2.f, 1.f, 20.f) // @TODO Missing documentation - , _pointSize("pointSize", "Point Size", "", 1, 1, 64) // @TODO Missing documentation + , _lineColor({ "lineColor", "Color", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation + , _useLineFade({ "useLineFade", "Use Line Fade", "" }, true) // @TODO Missing documentation + , _lineFade({ "lineFade", "Line Fade", "" }, 1.f, 0.f, 20.f) // @TODO Missing documentation + , _lineWidth({ "lineWidth", "Line Width", "" }, 2.f, 1.f, 20.f) // @TODO Missing documentation + , _pointSize({ "pointSize", "Point Size", "" }, 1, 1, 64) // @TODO Missing documentation , _renderingModes( - "renderingMode", - "Rendering Mode", - "", // @TODO Missing documentation + { "renderingMode", "Rendering Mode", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) { diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index 450e6243f3..45574e82b4 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -134,8 +134,8 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _period("period", "Period in days", "", 0.0, 0.0, 1e9) // @TODO Missing documentation - , _resolution("resolution", "Number of Samples along Orbit", "", 10000, 1, 1000000) // @TODO Missing documentation + , _period({ "period", "Period in days", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation + , _resolution({ "resolution", "Number of Samples along Orbit", "" }, 10000, 1, 1000000) // @TODO Missing documentation , _needsFullSweep(true) , _indexBufferDirty(true) , _previousTime(0) diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 28fa60e344..e60c562640 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -125,16 +125,14 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _startTime("startTime", "Start Time", "") // @TODO Missing documentation - , _endTime("endTime", "End Time", "") // @TODO Missing documentation - , _sampleInterval("sampleInterval", "Sample Interval", "", 2.0, 2.0, 1e6) // @TODO Missing documentation + , _startTime({ "startTime", "Start Time", "" }) // @TODO Missing documentation + , _endTime({ "endTime", "End Time", "" }) // @TODO Missing documentation + , _sampleInterval({ "sampleInterval", "Sample Interval", "" }, 2.0, 2.0, 1e6) // @TODO Missing documentation , _timeStampSubsamplingFactor( - "subSample", - "Time Stamp Subsampling Factor", - "", // @TODO Missing documentation + { "subSample", "Time Stamp Subsampling Factor", "" }, // @TODO Missing documentation 1, 1, 1000000000 ) - , _renderFullTrail("renderFullTrail", "Render Full Trail", "", false) // @TODO Missing documentation + , _renderFullTrail({ "renderFullTrail", "Render Full Trail", "" }, false) // @TODO Missing documentation , _needsFullSweep(true) , _subsamplingIsDirty(true) { diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index 0fe8ad1f6d..7c3ec87af5 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -48,7 +48,7 @@ documentation::Documentation ScreenSpaceFramebuffer::Documentation() { ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) - , _size("size", "Size", "", glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation + , _size({ "size", "Size", "" }, glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation , _framebuffer(nullptr) { documentation::testSpecificationAndThrow( diff --git a/modules/base/rendering/screenspaceimage.cpp b/modules/base/rendering/screenspaceimage.cpp index 7d81e60faa..f2222559c6 100644 --- a/modules/base/rendering/screenspaceimage.cpp +++ b/modules/base/rendering/screenspaceimage.cpp @@ -70,7 +70,7 @@ ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) , _downloadImage(false) , _textureIsDirty(false) - , _texturePath("texturePath", "Texture path", "") + , _texturePath({ "texturePath", "Texture path", "" }) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 7b852c3f8d..ce78292788 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -61,7 +61,7 @@ documentation::Documentation StaticRotation::Documentation() { } StaticRotation::StaticRotation() - : _rotationMatrix("rotation", "Rotation", "", glm::dmat3(1.0)) // @TODO Missing documentation + : _rotationMatrix({ "rotation", "Rotation", "" }, glm::dmat3(1.0)) // @TODO Missing documentation {} StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index 97f13ad5f8..dd4807a23f 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -49,7 +49,7 @@ documentation::Documentation StaticScale::Documentation() { } StaticScale::StaticScale() - : _scaleValue("scale", "Scale", "", 1.0, 1.0, 1000.0) // @TODO Missing documentation + : _scaleValue({ "scale", "Scale", "" }, 1.0, 1.0, 1000.0) // @TODO Missing documentation { addProperty(_scaleValue); } diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index e21b57954c..ec126458bf 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -60,9 +60,7 @@ documentation::Documentation StaticTranslation::Documentation() { StaticTranslation::StaticTranslation() : _position( - "position", - "Position", - "", // @TODO Missing documentation + { "position", "Position", "" }, // @TODO Missing documentation glm::dvec3(0.0), glm::dvec3(-std::numeric_limits::max()), glm::dvec3(std::numeric_limits::max()) diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index c64bff0c02..2d900914e5 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -47,9 +47,9 @@ namespace openspace { RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texture("texture", "Texture", "", -1, -1, 255) // @TODO Missing documentation - , _billboard("billboard", "Billboard", "", false) // @TODO Missing documentation - , _size("size", "Size", "", 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation + , _texture({ "texture", "Texture", "" }, -1, -1, 255) // @TODO Missing documentation + , _billboard({ "billboard", "Billboard", "" }, false) // @TODO Missing documentation + , _size({ "size", "Size", "" }, 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation , _origin(Origin::Center) , _shader(nullptr) , _quad(0) diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index d4087966dd..79aaec4c14 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -76,18 +76,16 @@ namespace openspace { RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize("stepSize", "Fieldline Step Size", "", defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation - , _classification("classification", "Fieldline Classification", "", true) // @TODO Missing documentation + , _stepSize({ "stepSize", "Fieldline Step Size", "" }, defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation + , _classification({ "classification", "Fieldline Classification", "" }, true) // @TODO Missing documentation , _fieldlineColor( - "fieldlineColor", - "Fieldline Color", - "", // @TODO Missing documentation + { "fieldlineColor", "Fieldline Color", "" }, // @TODO Missing documentation defaultFieldlineColor, glm::vec4(0.f), glm::vec4(1.f) ) - , _seedPointSource("source", "SeedPoint Source", "") // @TODO Missing documentation - , _seedPointSourceFile("sourceFile", "SeedPoint File", "") // @TODO Missing documentation + , _seedPointSource({ "source", "SeedPoint Source", "" }) // @TODO Missing documentation + , _seedPointSourceFile({ "sourceFile", "SeedPoint File", "" }) // @TODO Missing documentation , _program(nullptr) , _seedPointsAreDirty(true) , _fieldLinesAreDirty(true) diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 9859630ce2..8e8db6b69c 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -57,11 +57,11 @@ namespace openspace { RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize("stepSize", "Step Size", "", 0.012, 0.0005, 0.05) // @TODO Missing documentation - , _pointStepSize("pointStepSize", "Point Step Size", "", 0.01, 0.01, 0.1) // @TODO Missing documentation - , _translation("translation", "Translation", "", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation - , _rotation("rotation", "Euler rotation", "", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation - , _enabledPointsRatio("nEnabledPointsRatio", "Enabled points", "", 0.2, 0, 1) // @TODO Missing documentation + , _stepSize({ "stepSize", "Step Size", "" }, 0.012, 0.0005, 0.05) // @TODO Missing documentation + , _pointStepSize({ "pointStepSize", "Point Step Size", "" }, 0.01, 0.01, 0.1) // @TODO Missing documentation + , _translation({ "translation", "Translation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation + , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation + , _enabledPointsRatio({ "nEnabledPointsRatio", "Enabled points", "" }, 0.2, 0, 1) // @TODO Missing documentation { float stepSize; glm::vec3 scaling, translation, rotation; diff --git a/modules/globebrowsing/cache/memoryawaretilecache.cpp b/modules/globebrowsing/cache/memoryawaretilecache.cpp index ffb57ec918..30d232b58d 100644 --- a/modules/globebrowsing/cache/memoryawaretilecache.cpp +++ b/modules/globebrowsing/cache/memoryawaretilecache.cpp @@ -45,26 +45,26 @@ MemoryAwareTileCache::MemoryAwareTileCache() : PropertyOwner("TileCache") , _numTextureBytesAllocatedOnCPU(0) , _cpuAllocatedTileData( - "cpuAllocatedTileData", "CPU allocated tile data (MB)", "", // @TODO Missing documentation + { "cpuAllocatedTileData", "CPU allocated tile data (MB)", "" }, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _gpuAllocatedTileData( - "gpuAllocatedTileData", "GPU allocated tile data (MB)", "", // @TODO Missing documentation + { "gpuAllocatedTileData", "GPU allocated tile data (MB)", ""}, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _tileCacheSize( - "tileCacheSize", "Tile cache size", "", // @TODO Missing documentation + { "tileCacheSize", "Tile cache size", ""}, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB - , _applyTileCacheSize("applyTileCacheSize", "Apply tile cache size", "") // @TODO Missing documentation - , _clearTileCache("clearTileCache", "Clear tile cache", "") // @TODO Missing documentation - , _usePbo("usePbo", "Use PBO", "", false) // @TODO Missing documentation + , _applyTileCacheSize({ "applyTileCacheSize", "Apply tile cache size", "" }) // @TODO Missing documentation + , _clearTileCache({ "clearTileCache", "Clear tile cache", "" }) // @TODO Missing documentation + , _usePbo({ "usePbo", "Use PBO", "" }, false) // @TODO Missing documentation { createDefaultTextureContainers(); diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index 65a3037269..55381f1506 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -38,15 +38,11 @@ namespace openspace::globebrowsing { PointGlobe::PointGlobe(const RenderableGlobe& owner) : _owner(owner) , _intensityClamp( - "intensityClamp", - "Intensity clamp", - "", // @TODO Missing documentation + { "intensityClamp", "Intensity clamp", ""}, // @TODO Missing documentation 1, 0, 1 ) , _lightIntensity( - "lightIntensity", - "Light intensity", - "", // @TODO Missing documentation + { "lightIntensity", "Light intensity", ""}, // @TODO Missing documentation 1, 0, 50 ) { diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index 4ee80cfa88..cae5f33f7a 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -42,29 +42,29 @@ namespace openspace::globebrowsing { RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) : _debugProperties({ - BoolProperty("saveOrThrowCamera", "save or throw camera", "", false), // @TODO Missing documentation - BoolProperty("showChunkEdges", "show chunk edges", "", false), // @TODO Missing documentation - BoolProperty("showChunkBounds", "show chunk bounds", "", false), // @TODO Missing documentation - BoolProperty("showChunkAABB", "show chunk AABB", "", false), // @TODO Missing documentation - BoolProperty("showHeightResolution", "show height resolution", "", false), // @TODO Missing documentation - BoolProperty("showHeightIntensities", "show height intensities", "", false), // @TODO Missing documentation - BoolProperty("performFrustumCulling", "perform frustum culling", "", true), // @TODO Missing documentation - BoolProperty("performHorizonCulling", "perform horizon culling", "", true), // @TODO Missing documentation - BoolProperty("levelByProjectedAreaElseDistance", "level by projected area (else distance)", "", true), // @TODO Missing documentation - BoolProperty("resetTileProviders", "reset tile providers", "", false), // @TODO Missing documentation - BoolProperty("toggleEnabledEveryFrame", "toggle enabled every frame", "", false), // @TODO Missing documentation - BoolProperty("collectStats", "collect stats", "", false), // @TODO Missing documentation - BoolProperty("limitLevelByAvailableData", "Limit level by available data", "", true), // @TODO Missing documentation - IntProperty("modelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "", 10, 1, 22) // @TODO Missing documentation + BoolProperty({ "saveOrThrowCamera", "save or throw camera", "" }, false), // @TODO Missing documentation + BoolProperty({ "showChunkEdges", "show chunk edges", "" }, false), // @TODO Missing documentation + BoolProperty({ "showChunkBounds", "show chunk bounds", "" }, false), // @TODO Missing documentation + BoolProperty({ "showChunkAABB", "show chunk AABB", "" }, false), // @TODO Missing documentation + BoolProperty({ "showHeightResolution", "show height resolution", "" }, false), // @TODO Missing documentation + BoolProperty({ "showHeightIntensities", "show height intensities", "" }, false), // @TODO Missing documentation + BoolProperty({ "performFrustumCulling", "perform frustum culling", "" }, true), // @TODO Missing documentation + BoolProperty({ "performHorizonCulling", "perform horizon culling", "" }, true), // @TODO Missing documentation + BoolProperty({ "levelByProjectedAreaElseDistance", "level by projected area (else distance)", "" }, true), // @TODO Missing documentation + BoolProperty({ "resetTileProviders", "reset tile providers", "" }, false), // @TODO Missing documentation + BoolProperty({ "toggleEnabledEveryFrame", "toggle enabled every frame", "" }, false), // @TODO Missing documentation + BoolProperty({ "collectStats", "collect stats", "" }, false), // @TODO Missing documentation + BoolProperty({ "limitLevelByAvailableData", "Limit level by available data", "" }, true), // @TODO Missing documentation + IntProperty({ "modelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "" }, 10, 1, 22) // @TODO Missing documentation }) , _generalProperties({ - BoolProperty("enabled", "Enabled", "", true), // @TODO Missing documentation - BoolProperty("performShading", "perform shading", "", true), // @TODO Missing documentation - BoolProperty("atmosphere", "atmosphere", "", false), // @TODO Missing documentation - BoolProperty("useAccurateNormals", "useAccurateNormals", "", false), // @TODO Missing documentation - FloatProperty("lodScaleFactor", "lodScaleFactor", "", 10.0f, 1.0f, 50.0f), // @TODO Missing documentation - FloatProperty("cameraMinHeight", "cameraMinHeight", "", 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation - FloatProperty("orenNayarRoughness", "orenNayarRoughness", "", 0.0f, 0.0f, 1.0f) // @TODO Missing documentation + BoolProperty({ "enabled", "Enabled", "" }, true), // @TODO Missing documentation + BoolProperty({ "performShading", "perform shading", "" }, true), // @TODO Missing documentation + BoolProperty({ "atmosphere", "atmosphere", "" }, false), // @TODO Missing documentation + BoolProperty({ "useAccurateNormals", "useAccurateNormals", "" }, false), // @TODO Missing documentation + FloatProperty({ "lodScaleFactor", "lodScaleFactor", "" }, 10.0f, 1.0f, 50.0f), // @TODO Missing documentation + FloatProperty({ "cameraMinHeight", "cameraMinHeight", "" }, 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation + FloatProperty({ "orenNayarRoughness", "orenNayarRoughness", "" }, 0.0f, 0.0f, 1.0f) // @TODO Missing documentation }) , _debugPropertyOwner("Debug") { diff --git a/modules/globebrowsing/rendering/layer/layer.cpp b/modules/globebrowsing/rendering/layer/layer.cpp index dbf4239580..b3ead7fcaa 100644 --- a/modules/globebrowsing/rendering/layer/layer.cpp +++ b/modules/globebrowsing/rendering/layer/layer.cpp @@ -42,28 +42,23 @@ namespace { Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict) : properties::PropertyOwner(layerDict.value(keyName)) , _typeOption( - "type", - "Type", - "", // @TODO Missing documentation + { "type", "Type", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _blendModeOption( - "blendMode", - "Blend Mode", - "", // @TODO Missing documentation + { "blendMode", "Blend Mode", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _enabled(properties::BoolProperty("enabled", "Enabled", "", false)) // @TODO Missing documentation - , _reset("reset", "Reset", "") // @TODO Missing documentation + , _enabled({ "enabled", "Enabled", "" }, false) // @TODO Missing documentation + , _reset({ "reset", "Reset", "" }) // @TODO Missing documentation , _tileProvider(nullptr) , _otherTypesProperties{ properties::Vec3Property ( - "color", - "Color", - "", // @TODO Missing documentation + { "color", "Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), - glm::vec4(1.f)) + glm::vec4(1.f) + ) } , _layerGroupId(id) { diff --git a/modules/globebrowsing/rendering/layer/layeradjustment.cpp b/modules/globebrowsing/rendering/layer/layeradjustment.cpp index b763c21a4b..6711f4bb51 100644 --- a/modules/globebrowsing/rendering/layer/layeradjustment.cpp +++ b/modules/globebrowsing/rendering/layer/layeradjustment.cpp @@ -35,25 +35,19 @@ namespace openspace::globebrowsing { LayerAdjustment::LayerAdjustment() : properties::PropertyOwner("adjustment") , chromaKeyColor( - "chromaKeyColor", - "Chroma key color", - "", // @TODO Missing documentation + { "chromaKeyColor", "Chroma key color", "" }, // @TODO Missing documentation glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(1.f) ) , chromaKeyTolerance( - "chromaKeyTolerance", - "Chroma key tolerance", - "", // @TODO Missing documentation + { "chromaKeyTolerance", "Chroma key tolerance", "" }, // @TODO Missing documentation 0, 0, 1 ) , _typeOption( - "type", - "Type", - "", // @TODO Missing documentation + { "type", "Type", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _onChangeCallback([](){}) diff --git a/modules/globebrowsing/rendering/layer/layergroup.cpp b/modules/globebrowsing/rendering/layer/layergroup.cpp index cb97b32217..4b915ed6da 100644 --- a/modules/globebrowsing/rendering/layer/layergroup.cpp +++ b/modules/globebrowsing/rendering/layer/layergroup.cpp @@ -35,7 +35,7 @@ namespace openspace::globebrowsing { LayerGroup::LayerGroup(layergroupid::GroupID id) : properties::PropertyOwner(std::move(layergroupid::LAYER_GROUP_NAMES[id])) , _groupId(id) - , _levelBlendingEnabled("blendTileLevels", "blend tile levels", false) + , _levelBlendingEnabled({ "blendTileLevels", "blend tile levels", "" }, false) // @TODO Missing documentation { addProperty(_levelBlendingEnabled); } diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index a3e2e9fd3a..12736a7806 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -36,12 +36,12 @@ namespace openspace::globebrowsing { LayerRenderSettings::LayerRenderSettings() : properties::PropertyOwner("Settings") - , setDefault("setDefault", "Set Default", "") // @TODO Missing documentation - , opacity(properties::FloatProperty("opacity", "Opacity", "", 1.f, 0.f, 1.f)) // @TODO Missing documentation - , gamma(properties::FloatProperty("gamma", "Gamma", "", 1, 0, 5))// @TODO Missing documentation - , multiplier(properties::FloatProperty("multiplier", "Multiplier", "", 1.f, 0.f, 20.f))// @TODO Missing documentation - , offset(properties::FloatProperty("offset", "Offset", "", 0.f, -10000.f, 10000.f))// @TODO Missing documentation - , valueBlending(properties::FloatProperty("valueBlending", "Value Blending", "", // @TODO Missing documentation + , setDefault({ "setDefault", "Set Default", "" }) // @TODO Missing documentation + , opacity(properties::FloatProperty({ "opacity", "Opacity", "" }, 1.f, 0.f, 1.f)) // @TODO Missing documentation + , gamma(properties::FloatProperty({ "gamma", "Gamma", "" }, 1, 0, 5))// @TODO Missing documentation + , multiplier(properties::FloatProperty({ "multiplier", "Multiplier", "" }, 1.f, 0.f, 20.f))// @TODO Missing documentation + , offset(properties::FloatProperty({ "offset", "Offset", "" }, 0.f, -10000.f, 10000.f))// @TODO Missing documentation + , valueBlending(properties::FloatProperty({ "valueBlending", "Value Blending", "" }, // @TODO Missing documentation 1.f, 0.f, 1.f)) , useValueBlending(false) { diff --git a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp index c19215f1db..4d45166380 100644 --- a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp +++ b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp @@ -88,9 +88,9 @@ bool GdalWrapper::logGdalErrors() const { GdalWrapper::GdalWrapper(size_t maximumCacheSize, size_t maximumMaximumCacheSize) : PropertyOwner("GdalWrapper") - , _logGdalErrors("logGdalErrors", "Log GDAL errors", "", true) // @TODO Missing documentation + , _logGdalErrors({ "logGdalErrors", "Log GDAL errors", "" }, true) // @TODO Missing documentation , _gdalMaximumCacheSize ( - "gdalMaximumCacheSize", "GDAL maximum cache size", "", // @TODO Missing documentation + { "gdalMaximumCacheSize", "GDAL maximum cache size", "" }, // @TODO Missing documentation maximumCacheSize / (1024 * 1024), // Default 0, // Minimum: No caching maximumMaximumCacheSize / (1024 * 1024), // Maximum diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index 2386deef2f..db888fd9e7 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -55,8 +55,8 @@ namespace openspace::globebrowsing::tileprovider { DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) : TileProvider(dictionary) - , _filePath("filePath", "File Path", "", "") // @TODO Missing documentation - , _tilePixelSize("tilePixelSize", "Tile Pixel Size", "", 32, 32, 1024) // @TODO Missing documentation + , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation + , _tilePixelSize({ "tilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation , _preCacheLevel(0) { _tileCache = OsEng.moduleEngine().module()->tileCache(); @@ -108,12 +108,11 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) DefaultTileProvider::DefaultTileProvider( std::shared_ptr tileReader) : _asyncTextureDataProvider(tileReader) - , _filePath("filePath", "File Path", "", "") // @TODO Missing documentation - , _tilePixelSize("tilePixelSize", "Tile Pixel Size", "", 32, 32, 1024) // @TODO Missing documentation -{ } + , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation + , _tilePixelSize({ "tilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation +{} -DefaultTileProvider::~DefaultTileProvider() -{ } +DefaultTileProvider::~DefaultTileProvider() {} void DefaultTileProvider::update() { if (_asyncTextureDataProvider) { diff --git a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp index acbbfbdbb0..10d52fb0ab 100644 --- a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp @@ -36,7 +36,7 @@ namespace openspace::globebrowsing::tileprovider { SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath("filePath", "File Path", "") + , _filePath({ "filePath", "File Path", "" }) // @TODO Missing documentation { // Required input std::string filePath; @@ -50,7 +50,7 @@ SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) SingleImageProvider::SingleImageProvider(const std::string& imagePath) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath("filePath", "File Path", imagePath) + , _filePath({ "filePath", "File Path", "" }, imagePath) // @TODO Missing documentation { reset(); } diff --git a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp index c0086553cc..eeeea69dc3 100644 --- a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp @@ -56,7 +56,7 @@ const char* TemporalTileProvider::TemporalXMLTags::TIME_FORMAT = "OpenSpaceTimeI TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) : _initDict(dictionary) - , _filePath("filePath", "File Path", "") + , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation , _successfulInitialization(false) { std::string filePath; diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 65fc8f928f..8c3945e7e8 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -41,13 +41,13 @@ namespace openspace { DataCygnet::DataCygnet(const ghoul::Dictionary& dictionary) : IswaCygnet(dictionary) , _dataProcessor(nullptr) - , _dataOptions("dataOptions", "Data Options", "") // @TODO Missing documentation - , _useLog("useLog","Use Logarithm", "", false) // @TODO Missing documentation - , _useHistogram("useHistogram", "Auto Contrast", "", false) // @TODO Missing documentation - , _autoFilter("autoFilter", "Auto Filter", "", true) // @TODO Missing documentation - , _normValues("normValues", "Normalize Values", "", glm::vec2(1.0,1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues("backgroundValues", "Background Values", "", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile("transferfunctions", "Transfer Functions", "", "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation + , _dataOptions({ "dataOptions", "Data Options", "" }) // @TODO Missing documentation + , _useLog({ "useLog","Use Logarithm", "" }, false) // @TODO Missing documentation + , _useHistogram({ "useHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation + , _autoFilter({ "autoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation + , _normValues({ "normValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues({ "backgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile({ "transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation //FOR TESTING , _numOfBenchmarks(0) , _avgBenchmarkTime(0.0f) diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 84b4dbf0d1..52c02a29a5 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -44,9 +44,9 @@ namespace openspace { IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) : properties::PropertyOwner(std::move(name)) - , _enabled("enabled", "Enabled", "", true) // @TODO Missing documentation - , _alpha("alpha", "Alpha", "", 0.9f, 0.0f, 1.0f) // @TODO Missing documentation - , _delete("delete", "Delete", "") // @TODO Missing documentation + , _enabled({ "enabled", "Enabled", "" }, true) // @TODO Missing documentation + , _alpha({ "alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation , _registered(false) , _type(type) , _dataProcessor(nullptr) diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index 2e39253013..7004ac220b 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -41,8 +41,8 @@ namespace openspace { IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _delete("delete", "Delete", "") // @TODO Missing documentation - , _alpha("alpha", "Alpha", "", 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation + , _alpha({ "alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation , _shader(nullptr) , _group(nullptr) , _textureDirty(false) diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index 8546e0221c..3ce6401508 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -43,13 +43,13 @@ namespace { namespace openspace{ IswaDataGroup::IswaDataGroup(std::string name, std::string type) : IswaBaseGroup(name, type) - , _useLog("useLog","Use Logarithm", "", false) // @TODO Missing documentation - , _useHistogram("useHistogram", "Auto Contrast", "", false) // @TODO Missing documentation - , _autoFilter("autoFilter", "Auto Filter", "", true) // @TODO Missing documentation - , _normValues("normValues", "Normalize Values", "", glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues("backgroundValues", "Background Values", "", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile("transferfunctions", "Transfer Functions", "${SCENE}/iswa/tfs/default.tf", "") // @TODO Missing documentation - , _dataOptions("dataOptions", "Data Options", "") // @TODO Missing documentation + , _useLog({ "useLog","Use Logarithm", "" }, false) // @TODO Missing documentation + , _useHistogram({ "useHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation + , _autoFilter({ "autoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation + , _normValues({ "normValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues({ "backgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile({ "transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation + , _dataOptions({ "dataOptions", "Data Options", "" }) // @TODO Missing documentation { addProperty(_useLog); addProperty(_useHistogram); diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index 3030cb1e90..a29a76bb9a 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -43,8 +43,8 @@ namespace { namespace openspace{ IswaKameleonGroup::IswaKameleonGroup(std::string name, std::string type) : IswaDataGroup(name, type) - , _resolution("resolution", "Resolution%", "", 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints", "") // @TODO Missing documentation + , _resolution({ "resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _fieldlines({ "fieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation , _fieldlineIndexFile("") , _kameleonPath("") { diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index db7ce81888..3008e61619 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -39,9 +39,9 @@ namespace openspace { KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) : DataCygnet(dictionary) - , _fieldlines("fieldlineSeedsIndexFile", "Fieldline Seedpoints", "") // @TODO Missing documentation - , _resolution("resolution", "Resolution%", "", 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _slice("slice", "Slice", "", 0.0, 0.0, 1.0) // @TODO Missing documentation + , _fieldlines({ "fieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation + , _resolution({ "resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _slice({ "slice", "Slice", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation { addProperty(_resolution); addProperty(_slice); diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index cce9d4a2c6..c8735878c9 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -64,24 +64,24 @@ namespace openspace { RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _dimensions("dimensions", "Dimensions", "") // @TODO Missing documentation - , _variable("variable", "Variable", "") // @TODO Missing documentation - , _lowerDomainBound("lowerDomainBound", "Lower Domain Bound", "") // @TODO Missing documentation - , _upperDomainBound("upperDomainBound", "Upper Domain Bound", "") // @TODO Missing documentation - , _domainScale("domainScale", "Domain scale", "") // @TODO Missing documentation + , _dimensions({ "dimensions", "Dimensions", "" }) // @TODO Missing documentation + , _variable({ "variable", "Variable", "" }) // @TODO Missing documentation + , _lowerDomainBound({ "lowerDomainBound", "Lower Domain Bound", "" }) // @TODO Missing documentation + , _upperDomainBound({ "upperDomainBound", "Upper Domain Bound", "" }) // @TODO Missing documentation + , _domainScale({ "domainScale", "Domain scale", "" }) // @TODO Missing documentation , _autoDomainBounds(false) - , _lowerValueBound("lowerValueBound", "Lower Value Bound", "", 0.f, 0.f, 1.f) // @TODO Missing documentation - , _upperValueBound("upperValueBound", "Upper Value Bound", "", 1.f, 0.01f, 1.f) // @TODO Missing documentation + , _lowerValueBound({ "lowerValueBound", "Lower Value Bound", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation + , _upperValueBound({ "upperValueBound", "Upper Value Bound", "" }, 1.f, 0.01f, 1.f) // @TODO Missing documentation , _autoValueBounds(false) - , _gridType("gridType", "Grid Type", "", properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _gridType({ "gridType", "Grid Type", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation , _autoGridType(false) , _clipPlanes(nullptr) - , _stepSize("stepSize", "Step Size", "", 0.02f, 0.01f, 1.f) // @TODO Missing documentation - , _sourcePath("sourcePath", "Source Path", "") // @TODO Missing documentation - , _transferFunctionPath("transferFunctionPath", "Transfer Function Path", "") // @TODO Missing documentation + , _stepSize({ "stepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _sourcePath({ "sourcePath", "Source Path", "" }) // @TODO Missing documentation + , _transferFunctionPath({ "transferFunctionPath", "Transfer Function Path", "" }) // @TODO Missing documentation , _raycaster(nullptr) , _transferFunction(nullptr) - , _cache("cache", "Cache", "") // @TODO Missing documentation + , _cache({ "cache", "Cache", "" }) // @TODO Missing documentation { glm::vec3 dimensions; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index be9514e5db..7f3910268d 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -95,20 +95,20 @@ RenderableMultiresVolume::RenderableMultiresVolume (const ghoul::Dictionary& dic , _errorHistogramManager(nullptr) , _histogramManager(nullptr) , _localErrorHistogramManager(nullptr) - , _stepSizeCoefficient("stepSizeCoefficient", "Stepsize Coefficient", "", 1.f, 0.01f, 10.f) // @TODO Missing documentation - , _currentTime("currentTime", "Current Time", "", 0, 0, 0) // @TODO Missing documentation - , _memoryBudget("memoryBudget", "Memory Budget", "", 0, 0, 0) // @TODO Missing documentation - , _streamingBudget("streamingBudget", "Streaming Budget", "", 0, 0, 0) // @TODO Missing documentation - , _useGlobalTime("useGlobalTime", "Global Time", "", false) // @TODO Missing documentation - , _loop("loop", "Loop", "", false) // @TODO Missing documentation - , _selectorName("selector", "Brick Selector", "") // @TODO Missing documentation + , _stepSizeCoefficient({ "stepSizeCoefficient", "Stepsize Coefficient", "" }, 1.f, 0.01f, 10.f) // @TODO Missing documentation + , _currentTime({ "currentTime", "Current Time", "" }, 0, 0, 0) // @TODO Missing documentation + , _memoryBudget({ "memoryBudget", "Memory Budget", "" }, 0, 0, 0) // @TODO Missing documentation + , _streamingBudget({ "streamingBudget", "Streaming Budget", "" }, 0, 0, 0) // @TODO Missing documentation + , _useGlobalTime({ "useGlobalTime", "Global Time", "" }, false) // @TODO Missing documentation + , _loop({ "loop", "Loop", "" }, false) // @TODO Missing documentation + , _selectorName({ "selector", "Brick Selector", "" }) // @TODO Missing documentation , _gatheringStats(false) - , _statsToFile("printStats", "Print Stats", "", false) // @TODO Missing documentation - , _statsToFileName("printStatsFileName", "Stats Filename", "") // @TODO Missing documentation - , _scalingExponent("scalingExponent", "Scaling Exponent", "", 1, -10, 20) // @TODO Missing documentation - , _scaling("scaling", "Scaling", "", glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _translation("translation", "Translation", "", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _rotation("rotation", "Euler rotation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation + , _statsToFile({ "printStats", "Print Stats", "" }, false) // @TODO Missing documentation + , _statsToFileName({ "printStatsFileName", "Stats Filename", "" }) // @TODO Missing documentation + , _scalingExponent({ "scalingExponent", "Scaling Exponent", "" }, 1, -10, 20) // @TODO Missing documentation + , _scaling({ "scaling", "Scaling", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation({ "translation", "Translation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation { std::string name; //bool success = dictionary.getValue(constants::scenegraphnode::keyName, name); @@ -349,9 +349,9 @@ bool RenderableMultiresVolume::initialize() { unsigned int maxInitialBudget = 2048; int initialBudget = std::min(maxInitialBudget, maxNumBricks); - _currentTime = properties::IntProperty("currentTime", "Current Time", "", 0, 0, _tsp->header().numTimesteps_ - 1); // @TODO Missing documentation - _memoryBudget = properties::IntProperty("memoryBudget", "Memory Budget", "", initialBudget, 0, maxNumBricks); // @TODO Missing documentation - _streamingBudget = properties::IntProperty("streamingBudget", "Streaming Budget", "", initialBudget, 0, maxNumBricks); // @TODO Missing documentation + _currentTime = properties::IntProperty({ "currentTime", "Current Time", "" }, 0, 0, _tsp->header().numTimesteps_ - 1); // @TODO Missing documentation + _memoryBudget = properties::IntProperty({ "memoryBudget", "Memory Budget", "" }, initialBudget, 0, maxNumBricks); // @TODO Missing documentation + _streamingBudget = properties::IntProperty({ "streamingBudget", "Streaming Budget", "" }, initialBudget, 0, maxNumBricks); // @TODO Missing documentation addProperty(_currentTime); addProperty(_memoryBudget); addProperty(_streamingBudget); diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index 325f4c0569..9d1b569fa3 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -129,52 +129,38 @@ documentation::Documentation RenderableFov::Documentation() { RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineWidth("lineWidth", "Line Width", "", 1.f, 1.f, 20.f) // @TODO Missing documentation - , _drawSolid("solidDraw", "Draw as Quads", "", false) // @TODO Missing documentation - , _standOffDistance("standOffDistance", "Standoff Distance", "", 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation + , _lineWidth({ "lineWidth", "Line Width", "" }, 1.f, 1.f, 20.f) // @TODO Missing documentation + , _drawSolid({ "solidDraw", "Draw as Quads", "" }, false) // @TODO Missing documentation + , _standOffDistance({ "standOffDistance", "Standoff Distance", "" }, 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation , _programObject(nullptr) , _drawFOV(false) , _colors({ { - "colors.defaultStart", - "Start of default color", - "", // @TODO Missing documentation + { "colors.defaultStart", "Start of default color", "" }, // @TODO Missing documentation glm::vec4(0.4f) }, { - "colors.defaultEnd", - "End of default color", - "", // @TODO Missing documentation + { "colors.defaultEnd", "End of default color", "" }, // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) }, { - "colors.active", - "Active Color", - "", // @TODO Missing documentation + { "colors.active", "Active Color", "" }, // @TODO Missing documentation glm::vec4(0.f, 1.f, 0.f, 1.f) }, { - "colors.targetInFieldOfView", - "Target-in-field-of-view Color", - "", // @TODO Missing documentation + { "colors.targetInFieldOfView", "Target-in-field-of-view Color", "" }, // @TODO Missing documentation glm::vec4(0.f, 0.5f, 0.7f, 1.f) }, { - "colors.intersectionStart", - "Start of the intersection", - "", // @TODO Missing documentation + { "colors.intersectionStart", "Start of the intersection", "" }, // @TODO Missing documentation glm::vec4(1.f, 0.89f, 0.f, 1.f) }, { - "colors.intersectionEnd", - "End of the intersection", - "", // @TODO Missing documentation + { "colors.intersectionEnd", "End of the intersection", "" }, // @TODO Missing documentation glm::vec4(1.f, 0.29f, 0.f, 1.f) }, { - "colors.square", - "Orthogonal Square", - "", // @TODO Missing documentation + { "colors.square", "Orthogonal Square", "" }, // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) } }) diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 34440944a3..73953bd118 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -104,13 +104,13 @@ documentation::Documentation RenderableModelProjection::Documentation() { RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation - , _rotation("rotation", "Rotation", "", glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation + , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _rotation({ "rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _geometry(nullptr) - , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation + , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index 1caed1166a..67922bcde2 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -121,16 +121,16 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("planetTexture", "RGB Texture", "") // @TODO Missing documentation - , _heightMapTexturePath("heightMap", "Heightmap Texture", "") // @TODO Missing documentation - , _rotation("rotation", "Rotation", "", 0, 0, 360) // @TODO Missing documentation + , _colorTexturePath({ "planetTexture", "RGB Texture", "" }) // @TODO Missing documentation + , _heightMapTexturePath({ "heightMap", "Heightmap Texture", "" }) // @TODO Missing documentation + , _rotation({ "rotation", "Rotation", "" }, 0, 0, 360) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _heightMapTexture(nullptr) - , _shiftMeridianBy180("shiftMeiridian", "Shift Meridian by 180 deg", "", false) // @TODO Missing documentation - , _heightExaggeration("heightExaggeration", "Height Exaggeration", "", 1.f, 0.f, 100.f) // @TODO Missing documentation - , _debugProjectionTextureRotation("debug.projectionTextureRotation", "Projection Texture Rotation", "", 0.f, 0.f, 360.f) // @TODO Missing documentation + , _shiftMeridianBy180({ "shiftMeiridian", "Shift Meridian by 180 deg", "" }, false) // @TODO Missing documentation + , _heightExaggeration({ "heightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 100.f) // @TODO Missing documentation + , _debugProjectionTextureRotation({ "debug.projectionTextureRotation", "Projection Texture Rotation", "" }, 0.f, 0.f, 360.f) // @TODO Missing documentation , _capture(false) { documentation::testSpecificationAndThrow( diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index 39c641a258..c4555346fb 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -46,9 +46,9 @@ namespace openspace { RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _numberOfPoints("amountOfPoints", "Points", "", 190, 1, 300) // @TODO Missing documentation - , _shadowLength("shadowLength", "Shadow Length", "", 0.1f, 0.0f, 0.5f) // @TODO Missing documentation - , _shadowColor("shadowColor", "Shadow Color", "", // @TODO Missing documentation + , _numberOfPoints({ "amountOfPoints", "Points", "" }, 190, 1, 300) // @TODO Missing documentation + , _shadowLength({ "shadowLength", "Shadow Length", "" }, 0.1f, 0.0f, 0.5f) // @TODO Missing documentation + , _shadowColor({ "shadowColor", "Shadow Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.25f), glm::vec4(0.f), glm::vec4(1.f)) , _shader(nullptr) , _vao(0) diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index d67c2307df..d58ba518a0 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -168,11 +168,11 @@ documentation::Documentation ProjectionComponent::Documentation() { ProjectionComponent::ProjectionComponent() : properties::PropertyOwner("ProjectionComponent") - , _performProjection("performProjection", "Perform Projections", "", true) // @TODO Missing documentation - , _clearAllProjections("clearAllProjections", "Clear Projections", "", false) // @TODO Missing documentation - , _projectionFading("projectionFading", "Projection Fading", "", 1.f, 0.f, 1.f) // @TODO Missing documentation - , _textureSize("textureSize", "Texture Size", "", ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation - , _applyTextureSize("applyTextureSize", "Apply Texture Size", "") // @TODO Missing documentation + , _performProjection({ "performProjection", "Perform Projections", "" }, true) // @TODO Missing documentation + , _clearAllProjections({ "clearAllProjections", "Clear Projections", "" }, false) // @TODO Missing documentation + , _projectionFading({ "projectionFading", "Projection Fading", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _textureSize({ "textureSize", "Texture Size", "" }, ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation + , _applyTextureSize({ "applyTextureSize", "Apply Texture Size", "" }) // @TODO Missing documentation , _textureSizeDirty(false) , _projectionTexture(nullptr) { diff --git a/modules/onscreengui/src/guicomponent.cpp b/modules/onscreengui/src/guicomponent.cpp index 3a3e845015..e2bcbd2afb 100644 --- a/modules/onscreengui/src/guicomponent.cpp +++ b/modules/onscreengui/src/guicomponent.cpp @@ -28,7 +28,7 @@ namespace openspace::gui { GuiComponent::GuiComponent(std::string name) : properties::PropertyOwner(std::move(name)) - , _isEnabled("enabled", "Is Enabled", "", false) // @TODO Missing documentation + , _isEnabled({ "enabled", "Is Enabled", "" }, false) // @TODO Missing documentation { addProperty(_isEnabled); } diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index dfe7ce7986..19d4d357b0 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -55,10 +55,10 @@ namespace openspace::gui { GuiPerformanceComponent::GuiPerformanceComponent() : GuiComponent("PerformanceComponent") - , _sortingSelection("sortingSelection", "Sorting", "", -1, -1, 6) // @TODO Missing documentation - , _sceneGraphIsEnabled("showSceneGraph", "Show Scene Graph Measurements", "", false) // @TODO Missing documentation - , _functionsIsEnabled("showFunctions", "Show Function Measurements", "", false) // @TODO Missing documentation - , _outputLogs("outputLogs", "Output Logs", "", false) // @TODO Missing documentation + , _sortingSelection({ "sortingSelection", "Sorting", "" }, -1, -1, 6) // @TODO Missing documentation + , _sceneGraphIsEnabled({ "showSceneGraph", "Show Scene Graph Measurements", "" }, false) // @TODO Missing documentation + , _functionsIsEnabled({ "showFunctions", "Show Function Measurements", "" }, false) // @TODO Missing documentation + , _outputLogs({ "outputLogs", "Output Logs", "" }, false) // @TODO Missing documentation { addProperty(_sortingSelection); diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 1ce2c7d462..75f01a9827 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -90,8 +90,8 @@ RenderableConstellationBounds::RenderableConstellationBounds( : Renderable(dictionary) , _vertexFilename("") , _constellationFilename("") - , _distance("distance", "Distance to the celestial Sphere", "", 15.f, 0.f, 30.f) // @TODO Missing documentation - , _constellationSelection("constellationSelection", "Constellation Selection", "") // @TODO Missing documentation + , _distance({ "distance", "Distance to the celestial Sphere", "" }, 15.f, 0.f, 30.f) // @TODO Missing documentation + , _constellationSelection({ "constellationSelection", "Constellation Selection", "" }) // @TODO Missing documentation , _vao(0) , _vbo(0) { diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 2239026e3d..11eb07bc2c 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -121,15 +121,15 @@ documentation::Documentation RenderablePlanet::Documentation() { RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath("colorTexture", "Color Texture", "") // @TODO Missing documentation - , _nightTexturePath("nightTexture", "Night Texture", "") // @TODO Missing documentation - , _heightMapTexturePath("heightMap", "Heightmap Texture", "") // @TODO Missing documentation + , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _nightTexturePath({ "nightTexture", "Night Texture", "" }) // @TODO Missing documentation + , _heightMapTexturePath({ "heightMap", "Heightmap Texture", "" }) // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _nightTexture(nullptr) - , _heightExaggeration("heightExaggeration", "Height Exaggeration", "", 1.f, 0.f, 10.f) // @TODO Missing documentation + , _heightExaggeration({ "heightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation , _geometry(nullptr) - , _performShading("performShading", "Perform Shading", "", true) // @TODO Missing documentation + , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation , _alpha(1.f) , _planetRadius(0.f) , _hasNightTexture(false) diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 7a5ab1f73e..1e9bc0b33c 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -85,11 +85,11 @@ documentation::Documentation RenderableRings::Documentation() { RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath("texture", "Texture", "") // @TODO Missing documentation - , _size("size", "Size", "", 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation - , _offset("offset", "Offset", "", glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation - , _nightFactor("nightFactor", "Night Factor", "", 0.33f, 0.f, 1.f) // @TODO Missing documentation - , _transparency("transparency", "Transparency", "", 0.15f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation + , _size({ "size", "Size", "" }, 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation + , _offset({ "offset", "Offset", "" }, glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation + , _nightFactor({ "nightFactor", "Night Factor", "" }, 0.33f, 0.f, 1.f) // @TODO Missing documentation + , _transparency({ "transparency", "Transparency", "" }, 0.15f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _textureFile(nullptr) diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index ecfcf0bb09..ebdd77e719 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -125,22 +125,20 @@ documentation::Documentation RenderableStars::Documentation() { RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _pointSpreadFunctionTexturePath("psfTexture", "Point Spread Function Texture", "") // @TODO Missing documentation + , _pointSpreadFunctionTexturePath({ "psfTexture", "Point Spread Function Texture", "" }) // @TODO Missing documentation , _pointSpreadFunctionTexture(nullptr) , _pointSpreadFunctionTextureIsDirty(true) - , _colorTexturePath("colorTexture", "ColorBV Texture", "") // @TODO Missing documentation + , _colorTexturePath({ "colorTexture", "ColorBV Texture", "" }) // @TODO Missing documentation , _colorTexture(nullptr) , _colorTextureIsDirty(true) , _colorOption( - "colorOption", - "Color Option", - "", // @TODO Missing documentation + { "colorOption", "Color Option", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _dataIsDirty(true) - , _alphaValue("alphaValue", "Transparency", "", 1.f, 0.f, 1.f) // @TODO Missing documentation - , _scaleFactor("scaleFactor", "Scale Factor", "", 1.f, 0.f, 10.f) // @TODO Missing documentation - , _minBillboardSize("minBillboardSize", "Min Billboard Size", "", 1.f, 1.f, 100.f) // @TODO Missing documentation + , _alphaValue({ "alphaValue", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _scaleFactor({ "scaleFactor", "Scale Factor", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation + , _minBillboardSize({ "minBillboardSize", "Min Billboard Size", "" }, 1.f, 1.f, 100.f) // @TODO Missing documentation , _program(nullptr) , _speckFile("") , _nValuesPerStar(0) diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 0ff0e03a12..f090b76b7f 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -39,13 +39,11 @@ namespace openspace::planetgeometry { SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) : PlanetGeometry() , _radius( - "radius", - "Radius", - "", // @TODO Missing documentation + { "radius", "Radius", "" }, // @TODO Missing documentation glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(std::pow(10.f, 20.f), std::pow(10.f, 20.f), std::pow(10.f, 20.f))) - , _segments("segments", "Segments", "", 20, 1, 5000) // @TODO Missing documentation + , _segments({ "segments", "Segments", "" }, 20, 1, 5000) // @TODO Missing documentation , _sphere(nullptr) { float sphereRadius = 0.f; diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index bc8cfcce52..ed7cf6826b 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -83,8 +83,8 @@ documentation::Documentation SpiceRotation::Documentation() { } SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) - : _sourceFrame("source", "Source", "") - , _destinationFrame("destination", "Destination", "") + : _sourceFrame({ "source", "Source", "" }) // @TODO Missing documentation + , _destinationFrame({ "destination", "Destination", "" }) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index 340352f193..60fb8432bc 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -142,28 +142,24 @@ documentation::Documentation KeplerTranslation::Documentation() { KeplerTranslation::KeplerTranslation() : Translation() - , _eccentricity("eccentricity", "Eccentricity", "", 0.0, 0.0, 1.0) // @TODO Missing documentation - , _semiMajorAxis("semimajorAxis", "Semi-major axis", "", 0.0, 0.0, 1e6) // @TODO Missing documentation - , _inclination("inclination", "Inclination", "", 0.0, 0.0, 360.0) // @TODO Missing documentation + , _eccentricity({ "eccentricity", "Eccentricity", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation + , _semiMajorAxis({ "semimajorAxis", "Semi-major axis", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation + , _inclination({ "inclination", "Inclination", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation , _ascendingNode( - "ascendingNode", - "Right ascension of ascending Node", - "", // @TODO Missing documentation + { "ascendingNode", "Right ascension of ascending Node", "" }, // @TODO Missing documentation 0.0, 0.0, 360.0 ) , _argumentOfPeriapsis( - "argumentOfPeriapsis", - "Argument of Periapsis", - "", // @TODO Missing documentation + { "argumentOfPeriapsis", "Argument of Periapsis", "" }, // @TODO Missing documentation 0.0, 0.0, 360.0 ) - , _meanAnomalyAtEpoch("meanAnomalyAtEpoch", "Mean anomaly at epoch", "", 0.0, 0.0, 360.0) // @TODO Missing documentation - , _epoch("epoch", "Epoch", "", 0.0, 0.0, 1e9) // @TODO Missing documentation - , _period("period", "Orbit period", "", 0.0, 0.0, 1e6) // @TODO Missing documentation + , _meanAnomalyAtEpoch({ "meanAnomalyAtEpoch", "Mean anomaly at epoch", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation + , _epoch({ "epoch", "Epoch", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation + , _period({ "period", "Orbit period", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation , _orbitPlaneDirty(true) { auto update = [this]() { diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 3171c2c6c3..54e928b484 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -99,9 +99,9 @@ documentation::Documentation SpiceTranslation::Documentation() { } SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) - : _target("target", "Target", "longlong test asdkl;asd;klas\nasdklasdkl;asl;d") // @TODO Missing documentation - , _origin("origin", "Origin", "") // @TODO Missing documentation - , _frame("frame", "Reference Frame", "", DefaultReferenceFrame) // @TODO Missing documentation + : _target({ "target", "Target", "" }) // @TODO Missing documentation + , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation + , _frame({ "frame", "Reference Frame", "" }, DefaultReferenceFrame) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 6b3a5ece08..72c6617d80 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -74,134 +74,99 @@ namespace openspace { TouchInteraction::TouchInteraction() : properties::PropertyOwner("TouchInteraction") - , _origin("origin", "Origin", "") // @TODO Missing documentation + , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation , _unitTest( - "Click to take a unit test", - "Take a unit test saving the LM data into file", - "", // @TODO Missing documentation + { "Click to take a unit test", "Take a unit test saving the LM data into file", "" }, // @TODO Missing documentation false ) , _touchActive( - "TouchEvents", - "True if we have a touch event", - "", // @TODO Missing documentation - false, - properties::Property::Visibility::Hidden + { "TouchEvents", "True if we have a touch event", "", properties::Property::Visibility::Hidden }, // @TODO Missing documentation + false ) , _reset( - "Default Values", - "Reset all properties to default", - "", // @TODO Missing documentation + { "Default Values", "Reset all properties to default", "" }, // @TODO Missing documentation false ) , _maxTapTime( - "Max Tap Time", - "Max tap delay (in ms) for double tap", - "", // @TODO Missing documentation + { "Max Tap Time", "Max tap delay (in ms) for double tap", "" }, // @TODO Missing documentation 300, 10, 1000 ) , _deceleratesPerSecond( - "Decelerates per second", - "Number of times velocity is decelerated per second", - "", // @TODO Missing documentation + { "Decelerates per second", "Number of times velocity is decelerated per second", "" }, // @TODO Missing documentation 240, 60, 300 ) , _touchScreenSize( - "TouchScreenSize", - "Touch Screen size in inches", - "", // @TODO Missing documentation + { "TouchScreenSize", "Touch Screen size in inches", "" }, // @TODO Missing documentation 55.0f, 5.5f, 150.0f ) , _tapZoomFactor( - "Tap zoom factor", - "Scaling distance travelled on tap", - "", // @TODO Missing documentation + { "Tap zoom factor", "Scaling distance travelled on tap", "" }, // @TODO Missing documentation 0.2f, 0.f, 0.5f ) , _nodeRadiusThreshold( - "Activate direct-manipulation", - "Radius a planet has to have to activate direct-manipulation", - "", // @TODO Missing documentation + { "Activate direct-manipulation", "Radius a planet has to have to activate direct-manipulation", "" }, // @TODO Missing documentation 0.2f, 0.0f, 1.0f ) , _rollAngleThreshold( - "Interpret roll", - "Threshold for min angle for roll interpret", - "", // @TODO Missing documentation + { "Interpret roll", "Threshold for min angle for roll interpret", "" }, // @TODO Missing documentation 0.025f, 0.f, 0.05f ) , _orbitSpeedThreshold( - "Activate orbit spinning", - "Threshold to activate orbit spinning in direct-manipulation", - "", // @TODO Missing documentation + { "Activate orbit spinning", "Threshold to activate orbit spinning in direct-manipulation", "" }, // @TODO Missing documentation 0.005f, 0.f, 0.01f ) , _spinSensitivity( - "Sensitivity of spinning", - "Sensitivity of spinning in direct-manipulation", - "", // @TODO Missing documentation + { "Sensitivity of spinning", "Sensitivity of spinning in direct-manipulation", "" }, // @TODO Missing documentation 1.f, 0.f, 2.f ) , _inputStillThreshold( - "Input still", - "Threshold for interpreting input as still", - "", // @TODO Missing documentation + { "Input still", "Threshold for interpreting input as still", "" }, // @TODO Missing documentation 0.0005f, 0.f, 0.001f ) , _centroidStillThreshold( - "Centroid stationary", - "Threshold for stationary centroid", - "", // @TODO Missing documentation + { "Centroid stationary", "Threshold for stationary centroid", "" }, // @TODO Missing documentation 0.0018f, 0.f, 0.01f ) // used to void wrongly interpreted roll interactions , _interpretPan( - "Pan delta distance", - "Delta distance between fingers allowed for interpreting pan interaction", - "", // @TODO Missing documentation + { "Pan delta distance", "Delta distance between fingers allowed for interpreting pan interaction", "" }, // @TODO Missing documentation 0.015f, 0.f, 0.1f ) , _slerpTime( - "Time to slerp", - "Time to slerp in seconds to new orientation with new node picking", - "", // @TODO Missing documentation + { "Time to slerp", "Time to slerp in seconds to new orientation with new node picking", "" }, // @TODO Missing documentation 3.f, 0.f, 5.f ) , _guiButton( - "GUI Button", - "GUI button size in pixels", - "", // @TODO Missing documentation + { "GUI Button", "GUI button size in pixels", "" }, // @TODO Missing documentation glm::ivec2(32, 64), glm::ivec2(8, 16), glm::ivec2(128, 256) ) , _friction( - "Friction", - "Friction for different interactions (orbit, zoom, roll, pan)", - "", // @TODO Missing documentation + { "Friction", "Friction for different interactions (orbit, zoom, roll, pan)", "" }, // @TODO Missing documentation glm::vec4(0.01f, 0.025f, 0.02f, 0.02f), glm::vec4(0.f), glm::vec4(0.2f) diff --git a/modules/touch/src/touchmarker.cpp b/modules/touch/src/touchmarker.cpp index f94018117e..05b6439ee7 100644 --- a/modules/touch/src/touchmarker.cpp +++ b/modules/touch/src/touchmarker.cpp @@ -39,14 +39,12 @@ namespace openspace { TouchMarker::TouchMarker() : properties::PropertyOwner("TouchMarker") - , _visible("TouchMarkers visible", "Toggle visibility of markers", "", true) // @TODO Missing documentation - , _radiusSize("Marker size", "Marker radius", "", 30.f, 0.f, 100.f) // @TODO Missing documentation - , _transparency("Transparency of marker", "Marker transparency", "", 0.8f, 0.f, 1.f) // @TODO Missing documentation - , _thickness("Thickness of marker", "Marker thickness", "", 2.f, 0.f, 4.f) // @TODO Missing documentation + , _visible({ "TouchMarkers visible", "Toggle visibility of markers", "" }, true) // @TODO Missing documentation + , _radiusSize({ "Marker size", "Marker radius", "" }, 30.f, 0.f, 100.f) // @TODO Missing documentation + , _transparency({ "Transparency of marker", "Marker transparency", "" }, 0.8f, 0.f, 1.f) // @TODO Missing documentation + , _thickness({ "Thickness of marker", "Marker thickness", "" }, 2.f, 0.f, 4.f) // @TODO Missing documentation , _color( - "MarkerColor", - "Marker color", - "", // @TODO Missing documentation + { "MarkerColor", "Marker color", "" }, // @TODO Missing documentation glm::vec3(204.f / 255.f, 51.f / 255.f, 51.f / 255.f), glm::vec3(0.f), glm::vec3(1.f) diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 1a8f223f6d..103b243293 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -37,12 +37,12 @@ namespace openspace { RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _scalingExponent("scalingExponent", "Scaling Exponent", "", 1, -10, 20) - , _stepSize("stepSize", "Step Size", "", 0.02f, 0.01f, 1.f) // @TODO Missing documentation - , _scaling("scaling", "Scaling", "", glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _translation("translation", "Translation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _rotation("rotation", "Euler rotation", "", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) // @TODO Missing documentation - , _color("color", "Color", "", glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) // @TODO Missing documentation + , _scalingExponent({ "scalingExponent", "Scaling Exponent", "" }, 1, -10, 20) + , _stepSize({ "stepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _scaling({ "scaling", "Scaling", "" }, glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation({ "translation", "Translation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) // @TODO Missing documentation + , _color({ "color", "Color", "" }, glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) // @TODO Missing documentation { float stepSize; int scalingExponent; diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 6498eb0dbe..0ae65b6c21 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -31,17 +31,13 @@ namespace openspace { VolumeClipPlane::VolumeClipPlane(const ghoul::Dictionary& dictionary) : _normal( - "normal", - "Normal", - "", // @TODO Missing documentation + { "normal", "Normal", "" }, // @TODO Missing documentation glm::vec3(1.f, 0.f, 0.f), glm::vec3(-1.f), glm::vec3(1.f) ) , _offsets( - "offsets", - "Offsets", - "", // @TODO Missing documentation + { "offsets", "Offsets", "" }, // @TODO Missing documentation glm::vec2(-2.f, 0.f), glm::vec2(-2.f, 0.f), glm::vec2(2.f, 1.f) diff --git a/modules/volume/rendering/volumeclipplanes.cpp b/modules/volume/rendering/volumeclipplanes.cpp index 5d1a9e8d74..a093262b9d 100644 --- a/modules/volume/rendering/volumeclipplanes.cpp +++ b/modules/volume/rendering/volumeclipplanes.cpp @@ -30,7 +30,7 @@ namespace openspace { VolumeClipPlanes::VolumeClipPlanes(const ghoul::Dictionary& dictionary) - : _nClipPlanes("nClipPlanes", "Number of clip planes", "", 0, 0, 10) // @TODO Missing documentation + : _nClipPlanes({ "nClipPlanes", "Number of clip planes", "" }, 0, 0, 10) // @TODO Missing documentation { std::vector keys = dictionary.keys(); for (const std::string& key : keys) { diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index a5dda2323c..527543f3df 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -78,9 +78,7 @@ int addVirtualProperty(lua_State* L) { if (type == "BoolProperty") { bool v = lua_toboolean(L, -3); prop = std::make_unique( - identifier, - name, - description, + properties::Property::PropertyInfo{ identifier, name, description }, v ); } @@ -90,9 +88,7 @@ int addVirtualProperty(lua_State* L) { int max = static_cast(lua_tonumber(L, -1)); prop = std::make_unique( - identifier, - name, - description, + properties::Property::PropertyInfo{ identifier, name, description }, v, min, max @@ -104,9 +100,7 @@ int addVirtualProperty(lua_State* L) { float max = static_cast(lua_tonumber(L, -1)); prop = std::make_unique( - identifier, - name, - description, + properties::Property::PropertyInfo{ identifier, name, description }, v, min, max @@ -114,9 +108,7 @@ int addVirtualProperty(lua_State* L) { } else if (type == "TriggerProperty") { prop = std::make_unique( - identifier, - name, - description + properties::Property::PropertyInfo{ identifier, name, description } ); } else { diff --git a/src/engine/settingsengine.cpp b/src/engine/settingsengine.cpp index a4da6d755d..b058fcba0d 100644 --- a/src/engine/settingsengine.cpp +++ b/src/engine/settingsengine.cpp @@ -42,11 +42,11 @@ namespace openspace { SettingsEngine::SettingsEngine() : properties::PropertyOwner("Global Properties") - , _scenes("scenes", "Scene", "", properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation - , _busyWaitForDecode("busyWaitForDecode", "Busy Wait for decode", "", false) // @TODO Missing documentation - , _logSGCTOutOfOrderErrors("logSGCTOutOfOrderErrors", "Log SGCT out-of-order", "", false) // @TODO Missing documentation - , _useDoubleBuffering("useDoubleBuffering", "Use double buffering", "", false) // @TODO Missing documentation - , _spiceUseExceptions("enableSpiceExceptions", "Enable Spice Exceptions", "", false) // @TODO Missing documentation + , _scenes({ "scenes", "Scene", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _busyWaitForDecode({ "busyWaitForDecode", "Busy Wait for decode", "" }, false) // @TODO Missing documentation + , _logSGCTOutOfOrderErrors({ "logSGCTOutOfOrderErrors", "Log SGCT out-of-order", "" }, false) // @TODO Missing documentation + , _useDoubleBuffering({ "useDoubleBuffering", "Use double buffering", "" }, false) // @TODO Missing documentation + , _spiceUseExceptions({ "enableSpiceExceptions", "Enable Spice Exceptions", "" }, false) // @TODO Missing documentation { _spiceUseExceptions.onChange([this] { SpiceManager::ref().setExceptionHandling( diff --git a/src/engine/wrapper/sgctwindowwrapper.cpp b/src/engine/wrapper/sgctwindowwrapper.cpp index 758e7bbf9f..36ecd58d84 100644 --- a/src/engine/wrapper/sgctwindowwrapper.cpp +++ b/src/engine/wrapper/sgctwindowwrapper.cpp @@ -36,8 +36,8 @@ namespace { namespace openspace { SGCTWindowWrapper::SGCTWindowWrapper() - : _eyeSeparation("eyeSeparation", "Eye Separation", "", 0.f, 0.f, 10.f) // @TODO Missing documentation - , _showStatsGraph("showStatsGraph", "Show Stats Graph", "", false) // @TODO Missing documentation + : _eyeSeparation({ "eyeSeparation", "Eye Separation", "" }, 0.f, 0.f, 10.f) // @TODO Missing documentation + , _showStatsGraph({ "showStatsGraph", "Show Stats Graph", "" }, false) // @TODO Missing documentation { _showStatsGraph.onChange([this](){ sgct::Engine::instance()->setStatsGraphVisibility(_showStatsGraph); diff --git a/src/interaction/luaconsole.cpp b/src/interaction/luaconsole.cpp index 57c5ff7030..ccf87326b6 100644 --- a/src/interaction/luaconsole.cpp +++ b/src/interaction/luaconsole.cpp @@ -75,49 +75,39 @@ namespace openspace { LuaConsole::LuaConsole() : properties::PropertyOwner("LuaConsole") - , _isVisible("isVisible", "Is Visible", "", false) // @TODO Missing documentation - , _remoteScripting("remoteScripting", "Remote scripting", "", false) // @TODO Missing documentation + , _isVisible({ "isVisible", "Is Visible", "" }, false) // @TODO Missing documentation + , _remoteScripting({ "remoteScripting", "Remote scripting", "" }, false) // @TODO Missing documentation , _backgroundColor( - "backgroundColor", - "Background Color", - "", // @TODO Missing documentation + { "backgroundColor", "Background Color", "" }, // @TODO Missing documentation glm::vec4(21.f / 255.f, 23.f / 255.f, 28.f / 255.f, 0.8f), glm::vec4(0.f), glm::vec4(1.f) ) , _highlightColor( - "highlightColor", - "Highlight Color", - "", // @TODO Missing documentation + { "highlightColor", "Highlight Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _separatorColor( - "separatorColor", - "Separator Color", - "", // @TODO Missing documentation + { "separatorColor", "Separator Color", "" }, // @TODO Missing documentation glm::vec4(0.4f, 0.4f, 0.4f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _entryTextColor( - "entryTextColor", - "Entry Text Color", - "", // @TODO Missing documentation + { "entryTextColor", "Entry Text Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f) ) , _historyTextColor( - "historyTextColor", - "History Text Color", - "", // @TODO Missing documentation + { "historyTextColor", "History Text Color", "" }, // @TODO Missing documentation glm::vec4(1.0f, 1.0f, 1.0f, 0.65f), glm::vec4(0.f), glm::vec4(1.f) ) - , _historyLength("historyLength", "History Length", "", 13, 0, 100) // @TODO Missing documentation + , _historyLength({ "historyLength", "History Length", "" }, 13, 0, 100) // @TODO Missing documentation , _inputPosition(0) , _activeCommand(0) , _autoCompleteInfo({NoAutoComplete, false, ""}) diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index b7fc5bdcde..5fec81b06e 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -54,8 +54,8 @@ namespace openspace::interaction { NavigationHandler::NavigationHandler() : properties::PropertyOwner("NavigationHandler") - , _origin("origin", "Origin", "") - , _useKeyFrameInteraction("useKeyFrameInteraction", "Use keyframe interaction", "", false) // @TODO Missing documentation + , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation + , _useKeyFrameInteraction({ "useKeyFrameInteraction", "Use keyframe interaction", "" }, false) // @TODO Missing documentation { _origin.onChange([this]() { SceneGraphNode* node = sceneGraphNode(_origin.value()); diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index e1c5fc45c2..693750ff1c 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -41,15 +41,18 @@ namespace openspace::interaction { OrbitalNavigator::OrbitalNavigator() : properties::PropertyOwner("OrbitalNavigator") - , _rotationalFriction("rotationalFriction", "Rotational friction", "", true) // @TODO Missing documentation - , _horizontalFriction("horizontalFriction", "Horizontal friction", "", true) // @TODO Missing documentation - , _verticalFriction("verticalFriction", "Vertical friction", "", true) // @TODO Missing documentation - , _followFocusNodeRotationDistance("followFocusNodeRotationDistance", - "Follow focus node rotation distance", "", 2.0f, 0.0f, 10.f) // @TODO Missing documentation - , _minimumAllowedDistance("minimumAllowedDistance", - "Minimum allowed distance", "", 10.0f, 0.0f, 10000.f) // @TODO Missing documentation - , _sensitivity("sensitivity", "Sensitivity", "", 20.0f, 1.0f, 50.f) // @TODO Missing documentation - , _motionLag("motionLag", "Motion lag", "", 0.5f, 0.f, 1.f) // @TODO Missing documentation + , _rotationalFriction({ "rotationalFriction", "Rotational friction", "" }, true) // @TODO Missing documentation + , _horizontalFriction({ "horizontalFriction", "Horizontal friction", "" }, true) // @TODO Missing documentation + , _verticalFriction({ "verticalFriction", "Vertical friction", "" }, true) // @TODO Missing documentation + , _followFocusNodeRotationDistance( + { "followFocusNodeRotationDistance", "Follow focus node rotation distance", "" }, // @TODO Missing documentation + 2.0f, 0.0f, 10.f + ) + , _minimumAllowedDistance( + {"minimumAllowedDistance", "Minimum allowed distance", "" }, // @TODO Missing documentation + 10.0f, 0.0f, 10000.f) + , _sensitivity({ "sensitivity", "Sensitivity", "" }, 20.0f, 1.0f, 50.f) // @TODO Missing documentation + , _motionLag({ "motionLag", "Motion lag", "" }, 0.5f, 0.f, 1.f) // @TODO Missing documentation , _mouseStates(_sensitivity * pow(10.0,-4), 1 / (_motionLag + 0.0000001)) { auto smoothStep = diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 99f3c7b05c..c080cfb44c 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -87,29 +87,25 @@ namespace openspace { ParallelConnection::ParallelConnection() : properties::PropertyOwner("ParallelConnection") - , _password("password", "Password", "") // @TODO Missing documentation - , _hostPassword("hostPassword", "Host Password", "") // @TODO Missing documentation - , _port("port", "Port", "20501", "") // @TODO Missing documentation - , _address("address", "Address", "localhost", "") // @TODO Missing documentation - , _name("name", "Connection name", "Anonymous", "") // @TODO Missing documentation - , _bufferTime("bufferTime", "Buffer Time", "", 1, 0.5, 10) // @TODO Missing documentation + , _password({ "password", "Password", "" }) // @TODO Missing documentation + , _hostPassword({ "hostPassword", "Host Password", "" }) // @TODO Missing documentation + , _port({ "port", "Port", "" }, "20501") // @TODO Missing documentation + , _address({ "address", "Address", "" }, "localhost") // @TODO Missing documentation + , _name({ "name", "Connection name", "" }, "Anonymous") // @TODO Missing documentation + , _bufferTime({ "bufferTime", "Buffer Time", "" }, 1, 0.5, 10) // @TODO Missing documentation , _timeKeyframeInterval( - "timeKeyframeInterval", - "Time keyframe interval", - "", // @TODO Missing documentation + { "timeKeyframeInterval", "Time keyframe interval", ""}, // @TODO Missing documentation 0.1f, 0.f, 1.f ) , _cameraKeyframeInterval( - "cameraKeyframeInterval", - "Camera Keyframe interval", - "", // @TODO Missing documentation + { "cameraKeyframeInterval", "Camera Keyframe interval", "" }, // @TODO Missing documentation 0.1f, 0.f, 1.f ) - , _timeTolerance("timeTolerance", "Time tolerance", "", 1.f, 0.5f, 5.f) // @TODO Missing documentation + , _timeTolerance({ "timeTolerance", "Time tolerance", "" }, 1.f, 0.5f, 5.f) // @TODO Missing documentation , _lastTimeKeyframeTimestamp(0) , _lastCameraKeyframeTimestamp(0) , _clientSocket(INVALID_SOCKET) diff --git a/src/properties/optionproperty.cpp b/src/properties/optionproperty.cpp index a28aad52c6..d7092f5d30 100644 --- a/src/properties/optionproperty.cpp +++ b/src/properties/optionproperty.cpp @@ -32,16 +32,13 @@ namespace openspace::properties { const std::string OptionProperty::OptionsKey = "Options"; -OptionProperty::OptionProperty(std::string identifier, std::string guiName, - std::string desc, Property::Visibility visibility) - : IntProperty(std::move(identifier), std::move(guiName), std::move(desc), visibility) +OptionProperty::OptionProperty(PropertyInfo info) + : IntProperty(std::move(info)) , _displayType(DisplayType::Radio) {} -OptionProperty::OptionProperty(std::string identifier, std::string guiName, - std::string desc, DisplayType displayType, - Property::Visibility visibility) - : IntProperty(std::move(identifier), std::move(guiName), std::move(desc), visibility) +OptionProperty::OptionProperty(PropertyInfo info, DisplayType displayType) + : IntProperty(std::move(info)) , _displayType(displayType) {} diff --git a/src/properties/property.cpp b/src/properties/property.cpp index 218387611f..2f6e41a51b 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -30,8 +30,9 @@ #include +#include + namespace { - const char* MetaDataKeyGuiName = "guiName"; const char* MetaDataKeyGroup = "Group"; const char* MetaDataKeyVisibility = "Visibility"; const char* MetaDataKeyReadOnly = "isReadOnly"; @@ -52,18 +53,24 @@ const char* Property::NameKey = "Name"; const char* Property::TypeKey = "Type"; const char* Property::MetaDataKey = "MetaData"; -Property::Property(std::string identifier, std::string guiName, std::string description, - Visibility visibility) +#ifdef _DEBUG +uint64_t Property::Identifier = 0; +#endif + +Property::Property(PropertyInfo info) : _owner(nullptr) - , _identifier(std::move(identifier)) - , _description(std::move(description)) + , _identifier(std::move(info.identifier)) + , _guiName(std::move(info.guiName)) + , _description(std::move(info.description)) , _currentHandleValue(0) +#ifdef _DEBUG + , _id(Identifier++) +#endif { ghoul_assert(!_identifier.empty(), "Identifier must not be empty"); - ghoul_assert(!guiName.empty(), "guiName must not be empty"); + ghoul_assert(!_guiName.empty(), "guiName must not be empty"); - setVisibility(visibility); - _metaData.setValue(MetaDataKeyGuiName, std::move(guiName)); + setVisibility(info.visibility); } const std::string& Property::identifier() const { @@ -114,9 +121,7 @@ bool Property::setStringValue(std::string) { } std::string Property::guiName() const { - std::string result; - _metaData.getValue(MetaDataKeyGuiName, result); - return result; + return _guiName; } std::string Property::description() const { diff --git a/src/properties/selectionproperty.cpp b/src/properties/selectionproperty.cpp index d2ddf9de79..72c1ca36e7 100644 --- a/src/properties/selectionproperty.cpp +++ b/src/properties/selectionproperty.cpp @@ -36,11 +36,8 @@ namespace openspace::properties { const std::string SelectionProperty::OptionsKey = "Options"; -SelectionProperty::SelectionProperty(std::string identifier, std::string guiName, - std::string desc, - Property::Visibility visibility) - : TemplateProperty(std::move(identifier), std::move(guiName), std::move(desc), - std::vector(), visibility) +SelectionProperty::SelectionProperty(PropertyInfo info) + : TemplateProperty(std::move(info), std::vector()) {} void SelectionProperty::addOption(Option option) { diff --git a/src/properties/triggerproperty.cpp b/src/properties/triggerproperty.cpp index 5a1c0f1396..61b4ddf789 100644 --- a/src/properties/triggerproperty.cpp +++ b/src/properties/triggerproperty.cpp @@ -26,9 +26,8 @@ namespace openspace::properties { -TriggerProperty::TriggerProperty(std::string identifier, std::string guiName, - std::string desc, Property::Visibility visibility) - : Property(std::move(identifier), std::move(guiName), std::move(desc), visibility) +TriggerProperty::TriggerProperty(PropertyInfo info) + : Property(std::move(info)) {} std::string TriggerProperty::className() const { diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index b1e67d53db..e0a9410daf 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -93,7 +93,7 @@ std::unique_ptr Renderable::createFromDictionary( Renderable::Renderable() : properties::PropertyOwner("renderable") - , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation + , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") @@ -102,7 +102,7 @@ Renderable::Renderable() Renderable::Renderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("renderable") - , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation + , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 9c1f7da5f8..94ddb55505 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -100,36 +100,32 @@ RenderEngine::RenderEngine() , _camera(nullptr) , _scene(nullptr) , _raycasterManager(nullptr) - , _performanceMeasurements("performanceMeasurements", "Performance Measurements", "") // @TODO Missing documentation + , _performanceMeasurements({ "performanceMeasurements", "Performance Measurements", "" }) // @TODO Missing documentation , _performanceManager(nullptr) , _renderer(nullptr) , _rendererImplementation(RendererImplementation::Invalid) , _log(nullptr) , _frametimeType( - "frametimeType", - "Type of the frametime display", - "", // @TODO Missing documentation + { "frametimeType", "Type of the frametime display", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _showDate("showDate", "Show Date Information", "", true) // @TODO Missing documentation - , _showInfo("showInfo", "Show Render Information", "", true) // @TODO Missing documentation - , _showLog("showLog", "Show the OnScreen log", "", true) // @TODO Missing documentation - , _takeScreenshot("takeScreenshot", "Take Screenshot", "" ) // @TODO Missing documentation + , _showDate({ "showDate", "Show Date Information", "" }, true) // @TODO Missing documentation + , _showInfo({ "showInfo", "Show Render Information", "" }, true) // @TODO Missing documentation + , _showLog({ "showLog", "Show the OnScreen log", "" }, true) // @TODO Missing documentation + , _takeScreenshot({ "takeScreenshot", "Take Screenshot", "" }) // @TODO Missing documentation , _shouldTakeScreenshot(false) - , _applyWarping("applyWarpingScreenshot", "Apply Warping to Screenshots", "", false) // @TODO Missing documentation - , _showFrameNumber("showFrameNumber", "Show Frame Number", "", false) // @TODO Missing documentation - , _disableMasterRendering("disableMasterRendering", "Disable Master Rendering", "", false) // @TODO Missing documentation + , _applyWarping({ "applyWarpingScreenshot", "Apply Warping to Screenshots", "" }, false) // @TODO Missing documentation + , _showFrameNumber({ "showFrameNumber", "Show Frame Number", "" }, false) // @TODO Missing documentation + , _disableMasterRendering({ "disableMasterRendering", "Disable Master Rendering", "" }, false) // @TODO Missing documentation , _disableSceneTranslationOnMaster( - "disableSceneTranslationOnMaster", - "Disable Scene Translation on Master", - "", // @TODO Missing documentation + { "disableSceneTranslationOnMaster", "Disable Scene Translation on Master", "" }, // @TODO Missing documentation false ) , _globalBlackOutFactor(1.f) , _fadeDuration(2.f) , _currentFadeTime(0.f) , _fadeDirection(0) - , _nAaSamples("nAaSamples", "Number of Antialiasing samples", "", 8, 1, 16) // @TODO Missing documentation + , _nAaSamples({ "nAaSamples", "Number of Antialiasing samples", "" }, 8, 1, 16) // @TODO Missing documentation , _frameNumber(0) { _performanceMeasurements.onChange([this](){ diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 98cac7b3a6..41334a9020 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -98,28 +98,24 @@ std::unique_ptr ScreenSpaceRenderable::createFromDictiona ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("") - , _enabled("enabled", "Is Enabled", "", true) // @TODO Missing documentation - , _useFlatScreen("flatScreen", "Flat Screen", "", true) // @TODO Missing documentation + , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation + , _useFlatScreen({ "flatScreen", "Flat Screen", "" }, true) // @TODO Missing documentation , _euclideanPosition( - "euclideanPosition", - "Euclidean coordinates", - "", // @TODO Missing documentation + { "euclideanPosition", "Euclidean coordinates", "" }, // @TODO Missing documentation glm::vec2(0.f), glm::vec2(-4.f), glm::vec2(4.f) ) , _sphericalPosition( - "sphericalPosition", - "Spherical coordinates", - "", // @TODO Missing documentation + { "sphericalPosition", "Spherical coordinates", "" }, // @TODO Missing documentation glm::vec2(0.f, static_cast(M_PI_2)), glm::vec2(-static_cast(M_PI)), glm::vec2(static_cast(M_PI)) ) - , _depth("depth", "Depth", "", 0.f, 0.f, 1.f) // @TODO Missing documentation - , _scale("scale", "Scale", "", 0.25f, 0.f, 2.f) // @TODO Missing documentation - , _alpha("alpha", "Alpha", "", 1.f, 0.f, 1.f) // @TODO Missing documentation - , _delete("delete", "Delete", "") // @TODO Missing documentation + , _depth({ "depth", "Depth", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation + , _scale({ "scale", "Scale", "" }, 0.25f, 0.f, 2.f) // @TODO Missing documentation + , _alpha({ "alpha", "Alpha", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation , _quad(0) , _vertexPositionBuffer(0) , _texture(nullptr) diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index a678d6171e..6e1f1d6679 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -70,8 +70,10 @@ void applyRegularExpression(lua_State* L, std::regex regex, using ghoul::lua::errorLocation; using ghoul::lua::luaTypeToString; bool isGroupMode = !groupName.empty(); - + + int i = -1; for (properties::Property* prop : properties) { + ++i; // Check the regular expression for all properties std::string id = prop->fullyQualifiedIdentifier(); From 036b271d0da904c83600cdc62c0f8f70a42c853e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 22 Jul 2017 18:22:44 -0400 Subject: [PATCH 03/20] Change capitalization of property names --- data/scene/atmosphereearth.scene | 10 ++-- data/scene/dawn.scene | 14 ++--- data/scene/default.scene | 20 +++++-- data/scene/fieldlines.scene | 12 ++-- data/scene/globebrowsing.scene | 59 ++++++++----------- data/scene/juno.scene | 12 ++-- data/scene/newhorizons.scene | 14 ++--- data/scene/osirisrex.scene | 14 ++--- data/scene/rosetta.scene | 12 ++-- data/scene/satellites.scene | 12 ++-- data/scene/volumetricmilkyway.scene | 4 +- modules/base/rendering/renderablemodel.cpp | 8 +-- modules/base/rendering/renderableplane.cpp | 6 +- modules/base/rendering/renderablesphere.cpp | 10 ++-- modules/base/rendering/renderabletrail.cpp | 12 ++-- .../base/rendering/renderabletrailorbit.cpp | 4 +- .../rendering/renderabletrailtrajectory.cpp | 10 ++-- .../base/rendering/screenspaceframebuffer.cpp | 2 +- modules/base/rendering/screenspaceimage.cpp | 2 +- modules/base/rotation/staticrotation.cpp | 2 +- modules/base/scale/staticscale.cpp | 2 +- .../base/translation/statictranslation.cpp | 2 +- .../rendering/renderabledebugplane.cpp | 6 +- .../rendering/renderablefieldlines.cpp | 10 ++-- modules/galaxy/rendering/renderablegalaxy.cpp | 10 ++-- .../cache/memoryawaretilecache.cpp | 12 ++-- modules/globebrowsing/globes/pointglobe.cpp | 4 +- .../globebrowsing/globes/renderableglobe.cpp | 42 ++++++------- .../globebrowsing/rendering/layer/layer.cpp | 10 ++-- .../rendering/layer/layeradjustment.cpp | 6 +- .../rendering/layer/layergroup.cpp | 2 +- .../rendering/layer/layerrendersettings.cpp | 12 ++-- .../tile/rawtiledatareader/gdalwrapper.cpp | 4 +- .../tile/tileprovider/defaulttileprovider.cpp | 4 +- .../tile/tileprovider/singleimageprovider.cpp | 4 +- .../tileprovider/temporaltileprovider.cpp | 2 +- modules/iswa/rendering/datacygnet.cpp | 14 ++--- modules/iswa/rendering/iswabasegroup.cpp | 6 +- modules/iswa/rendering/iswacygnet.cpp | 4 +- modules/iswa/rendering/iswadatagroup.cpp | 14 ++--- modules/iswa/rendering/iswakameleongroup.cpp | 4 +- modules/iswa/rendering/kameleonplane.cpp | 6 +- .../rendering/renderablekameleonvolume.cpp | 24 ++++---- .../rendering/renderablemultiresvolume.cpp | 26 ++++---- .../newhorizons/rendering/renderablefov.cpp | 20 +++---- .../rendering/renderablemodelprojection.cpp | 6 +- .../rendering/renderableplanetprojection.cpp | 12 ++-- .../rendering/renderableshadowcylinder.cpp | 6 +- .../newhorizons/util/projectioncomponent.cpp | 10 ++-- modules/onscreengui/src/guicomponent.cpp | 2 +- .../src/guiperformancecomponent.cpp | 8 +-- .../renderableconstellationbounds.cpp | 4 +- modules/space/rendering/renderableplanet.cpp | 10 ++-- modules/space/rendering/renderablerings.cpp | 10 ++-- modules/space/rendering/renderablestars.cpp | 12 ++-- .../space/rendering/simplespheregeometry.cpp | 4 +- modules/space/rotation/spicerotation.cpp | 4 +- .../space/translation/keplertranslation.cpp | 16 ++--- .../space/translation/spicetranslation.cpp | 6 +- modules/touch/src/touchinteraction.cpp | 2 +- .../rendering/renderabletoyvolume.cpp | 12 ++-- modules/volume/rendering/volumeclipplane.cpp | 4 +- src/engine/openspaceengine.cpp | 3 +- src/engine/settingsengine.cpp | 10 ++-- src/engine/wrapper/sgctwindowwrapper.cpp | 4 +- src/interaction/luaconsole.cpp | 16 ++--- src/interaction/navigationhandler.cpp | 4 +- src/interaction/orbitalnavigator.cpp | 14 ++--- src/network/parallelconnection.cpp | 18 +++--- src/rendering/renderable.cpp | 4 +- src/rendering/renderengine.cpp | 22 +++---- src/rendering/screenspacerenderable.cpp | 16 ++--- 72 files changed, 363 insertions(+), 365 deletions(-) diff --git a/data/scene/atmosphereearth.scene b/data/scene/atmosphereearth.scene index aea608f35b..a129c1700c 100644 --- a/data/scene/atmosphereearth.scene +++ b/data/scene/atmosphereearth.scene @@ -20,13 +20,13 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) openspace.setPropertyValue("EarthMarker.renderable.enabled", true) - openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) + openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) openspace.printInfo("Done setting default values") diff --git a/data/scene/dawn.scene b/data/scene/dawn.scene index 78c03cece5..a18bf0c916 100644 --- a/data/scene/dawn.scene +++ b/data/scene/dawn.scene @@ -20,15 +20,15 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) - openspace.setPropertyValue("EarthMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", true) --openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) - openspace.setPropertyValue("PlutoTrail.renderable.enabled", false) - openspace.setPropertyValue("PlutoTexture.renderable.enabled", false) + openspace.setPropertyValue("PlutoTrail.renderable.Enabled", false) + openspace.setPropertyValue("PlutoTexture.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) openspace.printInfo("Done setting default values") end diff --git a/data/scene/default.scene b/data/scene/default.scene index 981cbf87ab..b887f7de54 100644 --- a/data/scene/default.scene +++ b/data/scene/default.scene @@ -20,14 +20,22 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("SunMarker.renderable.enabled", false) - openspace.setPropertyValue("EarthMarker.renderable.enabled", false) - openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", false) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", false) + openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) - openspace.addVirtualProperty("BoolProperty", "Show Trails", "*Trail.renderable.enabled", true, nil, nil) + openspace.addVirtualProperty( + "BoolProperty", + "Show Trails", + "*Trail.renderable.enabled", + "Disable or enable all trails of the scene at the same time", + true, + nil, + nil + ) openspace.navigation.resetCameraDirection() diff --git a/data/scene/fieldlines.scene b/data/scene/fieldlines.scene index cf494fe43c..b4936dc5d4 100644 --- a/data/scene/fieldlines.scene +++ b/data/scene/fieldlines.scene @@ -20,13 +20,13 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", false) - openspace.setPropertyValue("EarthMarker.renderable.enabled", false) - openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", false) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", false) + openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) openspace.printInfo("Done setting default values") end diff --git a/data/scene/globebrowsing.scene b/data/scene/globebrowsing.scene index 0c2b8d23c3..96ff9c3df9 100644 --- a/data/scene/globebrowsing.scene +++ b/data/scene/globebrowsing.scene @@ -19,64 +19,53 @@ function preInitialization() -- Toggle night texture, shading, atmosphere and water openspace.bindKey("s", - helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.enabled') .. - helper.property.invert('Earth.RenderableGlobe.performShading') .. - helper.property.invert('Earth.RenderableGlobe.atmosphere') .. - helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.enabled'), + helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') .. + helper.property.invert('Earth.RenderableGlobe.PerformShading') .. + helper.property.invert('Earth.RenderableGlobe.Atmosphere') .. + helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled'), "Toggle night texture, shading, atmosphere, and water for Earth." ) -- Toggle background openspace.bindKey("b", - helper.property.invert('MilkyWay.renderable.enabled') .. - helper.property.invert('Stars.renderable.enabled'), + helper.property.invert('MilkyWay.renderable.Enabled') .. + helper.property.invert('Stars.renderable.Enabled'), "Toggle background (Stars and Milkyway)." ) openspace.bindKey("g", "openspace.setInteractionMode('GlobeBrowsing')" .. - helper.property.invert('MilkyWay.renderable.enabled') .. - helper.property.invert('Stars.renderable.enabled') .. - helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.enabled') .. - helper.property.invert('Earth.RenderableGlobe.performShading') .. - helper.property.invert('Mars.RenderableGlobe.performShading') .. - helper.property.invert('Earth.RenderableGlobe.atmosphere') .. - helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.enabled') .. - helper.property.invert('Moon.RenderableGlobe.enabled') .. - helper.property.invert('Sun.renderable.enabled'), + helper.property.invert('MilkyWay.renderable.Enabled') .. + helper.property.invert('Stars.renderable.Enabled') .. + helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') .. + helper.property.invert('Earth.RenderableGlobe.PerformShading') .. + helper.property.invert('Mars.RenderableGlobe.PerformShading') .. + helper.property.invert('Earth.RenderableGlobe.Atmosphere') .. + helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled') .. + helper.property.invert('Moon.RenderableGlobe.Enabled') .. + helper.property.invert('Sun.renderable.Enabled'), "Toogles background and shading mode on the Earth and Mars alongside visibility of the Moon and the Sun" ) openspace.bindKey("h", - "openspace.setPropertyValue('*Trail.renderable.enabled', false)", + "openspace.setPropertyValue('*Trail.renderable.Enabled', false)", "Disables visibility of the trails" ) - - --[[ - -- Toggle trails - openspace.bindKey("o", - 'openspace.setPropertyValue("*Trail.renderable.enabled", false)' - ) - openspace.bindKey("p", - 'openspace.setPropertyValue("*Trail.renderable.enabled", true)' - ) - -]] end function postInitialization() openspace.printInfo("Setting default values") - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) - openspace.setPropertyValue("Sun.renderable.enabled", true) - openspace.setPropertyValue("SunGlare.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", false) + openspace.setPropertyValue("Sun.renderable.Enabled", true) + openspace.setPropertyValue("SunGlare.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", false) - openspace.setPropertyValue("Earth.RenderableGlobe.atmosphere", true) - openspace.setPropertyValue("Earth.RenderableGlobe.Debug.levelByProjectedAreaElseDistance", false) - openspace.setPropertyValue("Earth.RenderableGlobe.Layers.ColorLayers.blendTileLevels", true) + openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true) + openspace.setPropertyValue("Earth.RenderableGlobe.Debug.LevelByProjectedAreaElseDistance", false) + openspace.setPropertyValue("Earth.RenderableGlobe.Layers.ColorLayers.BlendTileLevels", true) openspace.globebrowsing.goToGeo(0, 0, 20000000) diff --git a/data/scene/juno.scene b/data/scene/juno.scene index eee0999a82..f3fb214f73 100755 --- a/data/scene/juno.scene +++ b/data/scene/juno.scene @@ -26,14 +26,14 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) - openspace.setPropertyValue("EarthMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", true) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) - openspace.setPropertyValue('Jupiter.renderable.performShading', false); + openspace.setPropertyValue('Jupiter.renderable.PerformShading', false); openspace.printInfo("Done setting default values") end diff --git a/data/scene/newhorizons.scene b/data/scene/newhorizons.scene index 30f86d1b94..7dc39df870 100644 --- a/data/scene/newhorizons.scene +++ b/data/scene/newhorizons.scene @@ -26,15 +26,15 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) - openspace.setPropertyValue("EarthMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", true) --openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) - openspace.setPropertyValue("PlutoTrail.renderable.enabled", false) - openspace.setPropertyValue("PlutoTexture.renderable.enabled", false) + openspace.setPropertyValue("PlutoTrail.renderable.Enabled", false) + openspace.setPropertyValue("PlutoTexture.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) openspace.printInfo("Done setting default values") end diff --git a/data/scene/osirisrex.scene b/data/scene/osirisrex.scene index 79c1e58e67..b869051f7b 100644 --- a/data/scene/osirisrex.scene +++ b/data/scene/osirisrex.scene @@ -28,15 +28,15 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", false) - openspace.setPropertyValue("EarthMarker.renderable.enabled", false) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", false) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", false) --openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) - openspace.setPropertyValue("PlutoTrail.renderable.enabled", true) - openspace.setPropertyValue("PlutoTexture.renderable.enabled", false) + openspace.setPropertyValue("PlutoTrail.renderable.Enabled", true) + openspace.setPropertyValue("PlutoTexture.renderable.Enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) -- Activate night textures and water masks openspace.setPropertyValue("Earth.RenderableGlobe.WaterMasks", {0, 1}); diff --git a/data/scene/rosetta.scene b/data/scene/rosetta.scene index 3ba32966e7..ce4c0213da 100644 --- a/data/scene/rosetta.scene +++ b/data/scene/rosetta.scene @@ -28,14 +28,14 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) - openspace.setPropertyValue("EarthMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", true) - openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) - openspace.setPropertyValue("MilkyWay.renderable.segments", 50) + openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55) + openspace.setPropertyValue("MilkyWay.renderable.Segments", 50) - openspace.setPropertyValue('67P.renderable.performShading', false); + openspace.setPropertyValue('67P.renderable.PerformShading', false); openspace.printInfo("Done setting default values") end diff --git a/data/scene/satellites.scene b/data/scene/satellites.scene index 5e09f29196..46cf989799 100644 --- a/data/scene/satellites.scene +++ b/data/scene/satellites.scene @@ -25,12 +25,12 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("SunMarker.renderable.enabled", false) - openspace.setPropertyValue("SunGlare.renderable.enabled", false) - openspace.setPropertyValue("MilkyWay.renderable.enabled", false) - openspace.setPropertyValue("EarthMarker.renderable.enabled", false) - openspace.setPropertyValue("EarthTrail.renderable.enabled", false) - openspace.setPropertyValue("Earth.renderable.performShading", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", false) + openspace.setPropertyValue("SunGlare.renderable.Enabled", false) + openspace.setPropertyValue("MilkyWay.renderable.Enabled", false) + openspace.setPropertyValue("EarthMarker.renderable.Enabled", false) + openspace.setPropertyValue("EarthTrail.renderable.Enabled", false) + openspace.setPropertyValue("Earth.renderable.PerformShading", false) openspace.navigation.resetCameraDirection() diff --git a/data/scene/volumetricmilkyway.scene b/data/scene/volumetricmilkyway.scene index 3a4f4d71c2..7a0708ea32 100644 --- a/data/scene/volumetricmilkyway.scene +++ b/data/scene/volumetricmilkyway.scene @@ -20,8 +20,8 @@ function postInitialization() graphical settings for the renderables. ]]-- openspace.printInfo("Setting default values") - openspace.setPropertyValue("Sun.renderable.enabled", false) - openspace.setPropertyValue("SunMarker.renderable.enabled", true) + openspace.setPropertyValue("Sun.renderable.Enabled", false) + openspace.setPropertyValue("SunMarker.renderable.Enabled", true) -- openspace.setPropertyValue("EarthMarker.renderable.enabled", true) -- openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false) diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 78525ba9e0..5c6596c93e 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -95,10 +95,10 @@ documentation::Documentation RenderableModel::Documentation() { RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _geometry(nullptr) - , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _performFade({ "performFading", "Perform Fading", "" }, false) // @TODO Missing documentation - , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation - , _fading({ "fading", "Fade", "" }, 0) // @TODO Missing documentation + , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _performFade({ "PerformFading", "Perform Fading", "" }, false) // @TODO Missing documentation + , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _fading({ "Fading", "Fade", "" }, 0) // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _modelTransform(1.0) diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index dddf149ec3..75fb5cc5af 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -87,9 +87,9 @@ documentation::Documentation RenderablePlane::Documentation() { RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation - , _billboard({ "billboard", "Billboard", "" }, false) // @TODO Missing documentation - , _size({ "size", "Size", "" }, 10, 0, std::pow(10, 25)) // @TODO Missing documentation + , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation + , _billboard({ "Billboard", "Billboard", "" }, false) // @TODO Missing documentation + , _size({ "Size", "Size", "" }, 10, 0, std::pow(10, 25)) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _blendMode(BlendMode::Normal) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 5120bc4715..03e8715aec 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -92,11 +92,11 @@ documentation::Documentation RenderableSphere::Documentation() { RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation - , _orientation({ "orientation", "Orientation", "" }) // @TODO Missing documentation - , _size({ "size", "Size", "" }, 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation - , _segments({ "segments", "Segments", "" }, 8, 4, 100) // @TODO Missing documentation - , _transparency({ "transparency", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation + , _orientation({ "Orientation", "Orientation", "" }) // @TODO Missing documentation + , _size({ "Size", "Size", "" }, 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation + , _segments({ "Segments", "Segments", "" }, 8, 4, 100) // @TODO Missing documentation + , _transparency({ "Transparency", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _sphere(nullptr) diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index c7a61525c3..e92b515d5a 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -133,13 +133,13 @@ documentation::Documentation RenderableTrail::Documentation() { RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineColor({ "lineColor", "Color", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation - , _useLineFade({ "useLineFade", "Use Line Fade", "" }, true) // @TODO Missing documentation - , _lineFade({ "lineFade", "Line Fade", "" }, 1.f, 0.f, 20.f) // @TODO Missing documentation - , _lineWidth({ "lineWidth", "Line Width", "" }, 2.f, 1.f, 20.f) // @TODO Missing documentation - , _pointSize({ "pointSize", "Point Size", "" }, 1, 1, 64) // @TODO Missing documentation + , _lineColor({ "LineColor", "Color", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation + , _useLineFade({ "UseLineFade", "Use Line Fade", "" }, true) // @TODO Missing documentation + , _lineFade({ "LineFade", "Line Fade", "" }, 1.f, 0.f, 20.f) // @TODO Missing documentation + , _lineWidth({ "LineWidth", "Line Width", "" }, 2.f, 1.f, 20.f) // @TODO Missing documentation + , _pointSize({ "PointSize", "Point Size", "" }, 1, 1, 64) // @TODO Missing documentation , _renderingModes( - { "renderingMode", "Rendering Mode", "" }, // @TODO Missing documentation + { "RenderingMode", "Rendering Mode", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) { diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index 45574e82b4..35ee4bdb32 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -134,8 +134,8 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _period({ "period", "Period in days", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation - , _resolution({ "resolution", "Number of Samples along Orbit", "" }, 10000, 1, 1000000) // @TODO Missing documentation + , _period({ "Period", "Period in days", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation + , _resolution({ "Resolution", "Number of Samples along Orbit", "" }, 10000, 1, 1000000) // @TODO Missing documentation , _needsFullSweep(true) , _indexBufferDirty(true) , _previousTime(0) diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index e60c562640..5c18e1ed01 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -125,14 +125,14 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _startTime({ "startTime", "Start Time", "" }) // @TODO Missing documentation - , _endTime({ "endTime", "End Time", "" }) // @TODO Missing documentation - , _sampleInterval({ "sampleInterval", "Sample Interval", "" }, 2.0, 2.0, 1e6) // @TODO Missing documentation + , _startTime({ "StartTime", "Start Time", "" }) // @TODO Missing documentation + , _endTime({ "EndTime", "End Time", "" }) // @TODO Missing documentation + , _sampleInterval({ "SampleInterval", "Sample Interval", "" }, 2.0, 2.0, 1e6) // @TODO Missing documentation , _timeStampSubsamplingFactor( - { "subSample", "Time Stamp Subsampling Factor", "" }, // @TODO Missing documentation + { "SubSample", "Time Stamp Subsampling Factor", "" }, // @TODO Missing documentation 1, 1, 1000000000 ) - , _renderFullTrail({ "renderFullTrail", "Render Full Trail", "" }, false) // @TODO Missing documentation + , _renderFullTrail({ "RenderFullTrail", "Render Full Trail", "" }, false) // @TODO Missing documentation , _needsFullSweep(true) , _subsamplingIsDirty(true) { diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index 7c3ec87af5..87417acba9 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -48,7 +48,7 @@ documentation::Documentation ScreenSpaceFramebuffer::Documentation() { ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) - , _size({ "size", "Size", "" }, glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation + , _size({ "Size", "Size", "" }, glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation , _framebuffer(nullptr) { documentation::testSpecificationAndThrow( diff --git a/modules/base/rendering/screenspaceimage.cpp b/modules/base/rendering/screenspaceimage.cpp index f2222559c6..72d7545f34 100644 --- a/modules/base/rendering/screenspaceimage.cpp +++ b/modules/base/rendering/screenspaceimage.cpp @@ -70,7 +70,7 @@ ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) , _downloadImage(false) , _textureIsDirty(false) - , _texturePath({ "texturePath", "Texture path", "" }) // @TODO Missing documentation + , _texturePath({ "TexturePath", "Texture path", "" }) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index ce78292788..340a29087f 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -61,7 +61,7 @@ documentation::Documentation StaticRotation::Documentation() { } StaticRotation::StaticRotation() - : _rotationMatrix({ "rotation", "Rotation", "" }, glm::dmat3(1.0)) // @TODO Missing documentation + : _rotationMatrix({ "Rotation", "Rotation", "" }, glm::dmat3(1.0)) // @TODO Missing documentation {} StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index dd4807a23f..75366fa88d 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -49,7 +49,7 @@ documentation::Documentation StaticScale::Documentation() { } StaticScale::StaticScale() - : _scaleValue({ "scale", "Scale", "" }, 1.0, 1.0, 1000.0) // @TODO Missing documentation + : _scaleValue({ "Scale", "Scale", "" }, 1.0, 1.0, 1000.0) // @TODO Missing documentation { addProperty(_scaleValue); } diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index ec126458bf..22c0f366d0 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -60,7 +60,7 @@ documentation::Documentation StaticTranslation::Documentation() { StaticTranslation::StaticTranslation() : _position( - { "position", "Position", "" }, // @TODO Missing documentation + { "Position", "Position", "" }, // @TODO Missing documentation glm::dvec3(0.0), glm::dvec3(-std::numeric_limits::max()), glm::dvec3(std::numeric_limits::max()) diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index 2d900914e5..161fd2675c 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -47,9 +47,9 @@ namespace openspace { RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texture({ "texture", "Texture", "" }, -1, -1, 255) // @TODO Missing documentation - , _billboard({ "billboard", "Billboard", "" }, false) // @TODO Missing documentation - , _size({ "size", "Size", "" }, 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation + , _texture({ "Texture", "Texture", "" }, -1, -1, 255) // @TODO Missing documentation + , _billboard({ "Billboard", "Billboard", "" }, false) // @TODO Missing documentation + , _size({ "Size", "Size", "" }, 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation , _origin(Origin::Center) , _shader(nullptr) , _quad(0) diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 79aaec4c14..e6fb08f376 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -76,16 +76,16 @@ namespace openspace { RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize({ "stepSize", "Fieldline Step Size", "" }, defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation - , _classification({ "classification", "Fieldline Classification", "" }, true) // @TODO Missing documentation + , _stepSize({ "StepSize", "Fieldline Step Size", "" }, defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation + , _classification({ "Classification", "Fieldline Classification", "" }, true) // @TODO Missing documentation , _fieldlineColor( - { "fieldlineColor", "Fieldline Color", "" }, // @TODO Missing documentation + { "FieldlineColor", "Fieldline Color", "" }, // @TODO Missing documentation defaultFieldlineColor, glm::vec4(0.f), glm::vec4(1.f) ) - , _seedPointSource({ "source", "SeedPoint Source", "" }) // @TODO Missing documentation - , _seedPointSourceFile({ "sourceFile", "SeedPoint File", "" }) // @TODO Missing documentation + , _seedPointSource({ "Source", "SeedPoint Source", "" }) // @TODO Missing documentation + , _seedPointSourceFile({ "SourceFile", "SeedPoint File", "" }) // @TODO Missing documentation , _program(nullptr) , _seedPointsAreDirty(true) , _fieldLinesAreDirty(true) diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index 8e8db6b69c..f98c73b749 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -57,11 +57,11 @@ namespace openspace { RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize({ "stepSize", "Step Size", "" }, 0.012, 0.0005, 0.05) // @TODO Missing documentation - , _pointStepSize({ "pointStepSize", "Point Step Size", "" }, 0.01, 0.01, 0.1) // @TODO Missing documentation - , _translation({ "translation", "Translation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation - , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation - , _enabledPointsRatio({ "nEnabledPointsRatio", "Enabled points", "" }, 0.2, 0, 1) // @TODO Missing documentation + , _stepSize({ "StepSize", "Step Size", "" }, 0.012, 0.0005, 0.05) // @TODO Missing documentation + , _pointStepSize({ "PointStepSize", "Point Step Size", "" }, 0.01, 0.01, 0.1) // @TODO Missing documentation + , _translation({ "Translation", "Translation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation + , _rotation({ "Rotation", "Euler rotation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation + , _enabledPointsRatio({ "NEnabledPointsRatio", "Enabled points", "" }, 0.2, 0, 1) // @TODO Missing documentation { float stepSize; glm::vec3 scaling, translation, rotation; diff --git a/modules/globebrowsing/cache/memoryawaretilecache.cpp b/modules/globebrowsing/cache/memoryawaretilecache.cpp index 30d232b58d..704fdaf705 100644 --- a/modules/globebrowsing/cache/memoryawaretilecache.cpp +++ b/modules/globebrowsing/cache/memoryawaretilecache.cpp @@ -45,26 +45,26 @@ MemoryAwareTileCache::MemoryAwareTileCache() : PropertyOwner("TileCache") , _numTextureBytesAllocatedOnCPU(0) , _cpuAllocatedTileData( - { "cpuAllocatedTileData", "CPU allocated tile data (MB)", "" }, // @TODO Missing documentation + { "CpuAllocatedTileData", "CPU allocated tile data (MB)", "" }, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _gpuAllocatedTileData( - { "gpuAllocatedTileData", "GPU allocated tile data (MB)", ""}, // @TODO Missing documentation + { "GpuAllocatedTileData", "GPU allocated tile data (MB)", ""}, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB , _tileCacheSize( - { "tileCacheSize", "Tile cache size", ""}, // @TODO Missing documentation + { "TileCacheSize", "Tile cache size", ""}, // @TODO Missing documentation 1024, // Default 128, // Minimum 2048, // Maximum 1) // Step: One MB - , _applyTileCacheSize({ "applyTileCacheSize", "Apply tile cache size", "" }) // @TODO Missing documentation - , _clearTileCache({ "clearTileCache", "Clear tile cache", "" }) // @TODO Missing documentation - , _usePbo({ "usePbo", "Use PBO", "" }, false) // @TODO Missing documentation + , _applyTileCacheSize({ "ApplyTileCacheSize", "Apply tile cache size", "" }) // @TODO Missing documentation + , _clearTileCache({ "ClearTileCache", "Clear tile cache", "" }) // @TODO Missing documentation + , _usePbo({ "UsePbo", "Use PBO", "" }, false) // @TODO Missing documentation { createDefaultTextureContainers(); diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index 55381f1506..1539bc27bb 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -38,11 +38,11 @@ namespace openspace::globebrowsing { PointGlobe::PointGlobe(const RenderableGlobe& owner) : _owner(owner) , _intensityClamp( - { "intensityClamp", "Intensity clamp", ""}, // @TODO Missing documentation + { "IntensityClamp", "Intensity clamp", ""}, // @TODO Missing documentation 1, 0, 1 ) , _lightIntensity( - { "lightIntensity", "Light intensity", ""}, // @TODO Missing documentation + { "LightIntensity", "Light intensity", ""}, // @TODO Missing documentation 1, 0, 50 ) { diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index cae5f33f7a..c5eb3b9f12 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -42,29 +42,29 @@ namespace openspace::globebrowsing { RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) : _debugProperties({ - BoolProperty({ "saveOrThrowCamera", "save or throw camera", "" }, false), // @TODO Missing documentation - BoolProperty({ "showChunkEdges", "show chunk edges", "" }, false), // @TODO Missing documentation - BoolProperty({ "showChunkBounds", "show chunk bounds", "" }, false), // @TODO Missing documentation - BoolProperty({ "showChunkAABB", "show chunk AABB", "" }, false), // @TODO Missing documentation - BoolProperty({ "showHeightResolution", "show height resolution", "" }, false), // @TODO Missing documentation - BoolProperty({ "showHeightIntensities", "show height intensities", "" }, false), // @TODO Missing documentation - BoolProperty({ "performFrustumCulling", "perform frustum culling", "" }, true), // @TODO Missing documentation - BoolProperty({ "performHorizonCulling", "perform horizon culling", "" }, true), // @TODO Missing documentation - BoolProperty({ "levelByProjectedAreaElseDistance", "level by projected area (else distance)", "" }, true), // @TODO Missing documentation - BoolProperty({ "resetTileProviders", "reset tile providers", "" }, false), // @TODO Missing documentation - BoolProperty({ "toggleEnabledEveryFrame", "toggle enabled every frame", "" }, false), // @TODO Missing documentation - BoolProperty({ "collectStats", "collect stats", "" }, false), // @TODO Missing documentation - BoolProperty({ "limitLevelByAvailableData", "Limit level by available data", "" }, true), // @TODO Missing documentation - IntProperty({ "modelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "" }, 10, 1, 22) // @TODO Missing documentation + BoolProperty({ "SaveOrThrowCamera", "save or throw camera", "" }, false), // @TODO Missing documentation + BoolProperty({ "ShowChunkEdges", "show chunk edges", "" }, false), // @TODO Missing documentation + BoolProperty({ "ShowChunkBounds", "show chunk bounds", "" }, false), // @TODO Missing documentation + BoolProperty({ "ShowChunkAABB", "show chunk AABB", "" }, false), // @TODO Missing documentation + BoolProperty({ "ShowHeightResolution", "show height resolution", "" }, false), // @TODO Missing documentation + BoolProperty({ "ShowHeightIntensities", "show height intensities", "" }, false), // @TODO Missing documentation + BoolProperty({ "PerformFrustumCulling", "perform frustum culling", "" }, true), // @TODO Missing documentation + BoolProperty({ "PerformHorizonCulling", "perform horizon culling", "" }, true), // @TODO Missing documentation + BoolProperty({ "LevelByProjectedAreaElseDistance", "level by projected area (else distance)", "" }, true), // @TODO Missing documentation + BoolProperty({ "ResetTileProviders", "reset tile providers", "" }, false), // @TODO Missing documentation + BoolProperty({ "ToggleEnabledEveryFrame", "toggle enabled every frame", "" }, false), // @TODO Missing documentation + BoolProperty({ "CollectStats", "collect stats", "" }, false), // @TODO Missing documentation + BoolProperty({ "LimitLevelByAvailableData", "Limit level by available data", "" }, true), // @TODO Missing documentation + IntProperty({ "ModelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "" }, 10, 1, 22) // @TODO Missing documentation }) , _generalProperties({ - BoolProperty({ "enabled", "Enabled", "" }, true), // @TODO Missing documentation - BoolProperty({ "performShading", "perform shading", "" }, true), // @TODO Missing documentation - BoolProperty({ "atmosphere", "atmosphere", "" }, false), // @TODO Missing documentation - BoolProperty({ "useAccurateNormals", "useAccurateNormals", "" }, false), // @TODO Missing documentation - FloatProperty({ "lodScaleFactor", "lodScaleFactor", "" }, 10.0f, 1.0f, 50.0f), // @TODO Missing documentation - FloatProperty({ "cameraMinHeight", "cameraMinHeight", "" }, 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation - FloatProperty({ "orenNayarRoughness", "orenNayarRoughness", "" }, 0.0f, 0.0f, 1.0f) // @TODO Missing documentation + BoolProperty({ "Enabled", "Enabled", "" }, true), // @TODO Missing documentation + BoolProperty({ "PerformShading", "perform shading", "" }, true), // @TODO Missing documentation + BoolProperty({ "Atmosphere", "atmosphere", "" }, false), // @TODO Missing documentation + BoolProperty({ "UseAccurateNormals", "useAccurateNormals", "" }, false), // @TODO Missing documentation + FloatProperty({ "LodScaleFactor", "lodScaleFactor", "" }, 10.0f, 1.0f, 50.0f), // @TODO Missing documentation + FloatProperty({ "CameraMinHeight", "cameraMinHeight", "" }, 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation + FloatProperty({ "OrenNayarRoughness", "orenNayarRoughness", "" }, 0.0f, 0.0f, 1.0f) // @TODO Missing documentation }) , _debugPropertyOwner("Debug") { diff --git a/modules/globebrowsing/rendering/layer/layer.cpp b/modules/globebrowsing/rendering/layer/layer.cpp index b3ead7fcaa..985e4605c2 100644 --- a/modules/globebrowsing/rendering/layer/layer.cpp +++ b/modules/globebrowsing/rendering/layer/layer.cpp @@ -42,19 +42,19 @@ namespace { Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict) : properties::PropertyOwner(layerDict.value(keyName)) , _typeOption( - { "type", "Type", "" }, // @TODO Missing documentation + { "Type", "Type", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _blendModeOption( - { "blendMode", "Blend Mode", "" }, // @TODO Missing documentation + { "BlendMode", "Blend Mode", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _enabled({ "enabled", "Enabled", "" }, false) // @TODO Missing documentation - , _reset({ "reset", "Reset", "" }) // @TODO Missing documentation + , _enabled({ "Enabled", "Enabled", "" }, false) // @TODO Missing documentation + , _reset({ "Reset", "Reset", "" }) // @TODO Missing documentation , _tileProvider(nullptr) , _otherTypesProperties{ properties::Vec3Property ( - { "color", "Color", "" }, // @TODO Missing documentation + { "Color", "Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f) diff --git a/modules/globebrowsing/rendering/layer/layeradjustment.cpp b/modules/globebrowsing/rendering/layer/layeradjustment.cpp index 6711f4bb51..83238368b6 100644 --- a/modules/globebrowsing/rendering/layer/layeradjustment.cpp +++ b/modules/globebrowsing/rendering/layer/layeradjustment.cpp @@ -35,19 +35,19 @@ namespace openspace::globebrowsing { LayerAdjustment::LayerAdjustment() : properties::PropertyOwner("adjustment") , chromaKeyColor( - { "chromaKeyColor", "Chroma key color", "" }, // @TODO Missing documentation + { "ChromaKeyColor", "Chroma key color", "" }, // @TODO Missing documentation glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(1.f) ) , chromaKeyTolerance( - { "chromaKeyTolerance", "Chroma key tolerance", "" }, // @TODO Missing documentation + { "ChromaKeyTolerance", "Chroma key tolerance", "" }, // @TODO Missing documentation 0, 0, 1 ) , _typeOption( - { "type", "Type", "" }, // @TODO Missing documentation + { "Type", "Type", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _onChangeCallback([](){}) diff --git a/modules/globebrowsing/rendering/layer/layergroup.cpp b/modules/globebrowsing/rendering/layer/layergroup.cpp index 4b915ed6da..d19a08d222 100644 --- a/modules/globebrowsing/rendering/layer/layergroup.cpp +++ b/modules/globebrowsing/rendering/layer/layergroup.cpp @@ -35,7 +35,7 @@ namespace openspace::globebrowsing { LayerGroup::LayerGroup(layergroupid::GroupID id) : properties::PropertyOwner(std::move(layergroupid::LAYER_GROUP_NAMES[id])) , _groupId(id) - , _levelBlendingEnabled({ "blendTileLevels", "blend tile levels", "" }, false) // @TODO Missing documentation + , _levelBlendingEnabled({ "BlendTileLevels", "blend tile levels", "" }, false) // @TODO Missing documentation { addProperty(_levelBlendingEnabled); } diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index 12736a7806..65ee2c015d 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -36,12 +36,12 @@ namespace openspace::globebrowsing { LayerRenderSettings::LayerRenderSettings() : properties::PropertyOwner("Settings") - , setDefault({ "setDefault", "Set Default", "" }) // @TODO Missing documentation - , opacity(properties::FloatProperty({ "opacity", "Opacity", "" }, 1.f, 0.f, 1.f)) // @TODO Missing documentation - , gamma(properties::FloatProperty({ "gamma", "Gamma", "" }, 1, 0, 5))// @TODO Missing documentation - , multiplier(properties::FloatProperty({ "multiplier", "Multiplier", "" }, 1.f, 0.f, 20.f))// @TODO Missing documentation - , offset(properties::FloatProperty({ "offset", "Offset", "" }, 0.f, -10000.f, 10000.f))// @TODO Missing documentation - , valueBlending(properties::FloatProperty({ "valueBlending", "Value Blending", "" }, // @TODO Missing documentation + , setDefault({ "SetDefault", "Set Default", "" }) // @TODO Missing documentation + , opacity(properties::FloatProperty({ "Opacity", "Opacity", "" }, 1.f, 0.f, 1.f)) // @TODO Missing documentation + , gamma(properties::FloatProperty({ "Gamma", "Gamma", "" }, 1, 0, 5))// @TODO Missing documentation + , multiplier(properties::FloatProperty({ "Multiplier", "Multiplier", "" }, 1.f, 0.f, 20.f))// @TODO Missing documentation + , offset(properties::FloatProperty({ "Offset", "Offset", "" }, 0.f, -10000.f, 10000.f))// @TODO Missing documentation + , valueBlending(properties::FloatProperty({ "ValueBlending", "Value Blending", "" }, // @TODO Missing documentation 1.f, 0.f, 1.f)) , useValueBlending(false) { diff --git a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp index 4d45166380..83dd2a118c 100644 --- a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp +++ b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp @@ -88,9 +88,9 @@ bool GdalWrapper::logGdalErrors() const { GdalWrapper::GdalWrapper(size_t maximumCacheSize, size_t maximumMaximumCacheSize) : PropertyOwner("GdalWrapper") - , _logGdalErrors({ "logGdalErrors", "Log GDAL errors", "" }, true) // @TODO Missing documentation + , _logGdalErrors({ "LogGdalErrors", "Log GDAL errors", "" }, true) // @TODO Missing documentation , _gdalMaximumCacheSize ( - { "gdalMaximumCacheSize", "GDAL maximum cache size", "" }, // @TODO Missing documentation + { "GdalMaximumCacheSize", "GDAL maximum cache size", "" }, // @TODO Missing documentation maximumCacheSize / (1024 * 1024), // Default 0, // Minimum: No caching maximumMaximumCacheSize / (1024 * 1024), // Maximum diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index db888fd9e7..e9ddab72d0 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -55,8 +55,8 @@ namespace openspace::globebrowsing::tileprovider { DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) : TileProvider(dictionary) - , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation - , _tilePixelSize({ "tilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation + , _filePath({ "FilePath", "File Path", "" }, "") // @TODO Missing documentation + , _tilePixelSize({ "TilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation , _preCacheLevel(0) { _tileCache = OsEng.moduleEngine().module()->tileCache(); diff --git a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp index 10d52fb0ab..60bb55434c 100644 --- a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp @@ -36,7 +36,7 @@ namespace openspace::globebrowsing::tileprovider { SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath({ "filePath", "File Path", "" }) // @TODO Missing documentation + , _filePath({ "FilePath", "File Path", "" }) // @TODO Missing documentation { // Required input std::string filePath; @@ -50,7 +50,7 @@ SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) SingleImageProvider::SingleImageProvider(const std::string& imagePath) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath({ "filePath", "File Path", "" }, imagePath) // @TODO Missing documentation + , _filePath({ "FilePath", "File Path", "" }, imagePath) // @TODO Missing documentation { reset(); } diff --git a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp index eeeea69dc3..5867c00cf5 100644 --- a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp @@ -56,7 +56,7 @@ const char* TemporalTileProvider::TemporalXMLTags::TIME_FORMAT = "OpenSpaceTimeI TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) : _initDict(dictionary) - , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation + , _filePath({ "FilePath", "File Path", "" }, "") // @TODO Missing documentation , _successfulInitialization(false) { std::string filePath; diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index 8c3945e7e8..f6ec1c6a6d 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -41,13 +41,13 @@ namespace openspace { DataCygnet::DataCygnet(const ghoul::Dictionary& dictionary) : IswaCygnet(dictionary) , _dataProcessor(nullptr) - , _dataOptions({ "dataOptions", "Data Options", "" }) // @TODO Missing documentation - , _useLog({ "useLog","Use Logarithm", "" }, false) // @TODO Missing documentation - , _useHistogram({ "useHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation - , _autoFilter({ "autoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation - , _normValues({ "normValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues({ "backgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile({ "transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation + , _dataOptions({ "DataOptions", "Data Options", "" }) // @TODO Missing documentation + , _useLog({ "UseLog","Use Logarithm", "" }, false) // @TODO Missing documentation + , _useHistogram({ "UseHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation + , _autoFilter({ "AutoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation + , _normValues({ "NormValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues({ "BackgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile({ "Transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation //FOR TESTING , _numOfBenchmarks(0) , _avgBenchmarkTime(0.0f) diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index 52c02a29a5..b92cca6db1 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -44,9 +44,9 @@ namespace openspace { IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) : properties::PropertyOwner(std::move(name)) - , _enabled({ "enabled", "Enabled", "" }, true) // @TODO Missing documentation - , _alpha({ "alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation - , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation + , _enabled({ "Enabled", "Enabled", "" }, true) // @TODO Missing documentation + , _alpha({ "Alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation , _registered(false) , _type(type) , _dataProcessor(nullptr) diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index 7004ac220b..09ec2bd9a1 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -41,8 +41,8 @@ namespace openspace { IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation - , _alpha({ "alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation + , _alpha({ "Alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation , _shader(nullptr) , _group(nullptr) , _textureDirty(false) diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index 3ce6401508..62578eabcb 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -43,13 +43,13 @@ namespace { namespace openspace{ IswaDataGroup::IswaDataGroup(std::string name, std::string type) : IswaBaseGroup(name, type) - , _useLog({ "useLog","Use Logarithm", "" }, false) // @TODO Missing documentation - , _useHistogram({ "useHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation - , _autoFilter({ "autoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation - , _normValues({ "normValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues({ "backgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile({ "transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation - , _dataOptions({ "dataOptions", "Data Options", "" }) // @TODO Missing documentation + , _useLog({ "UseLog","Use Logarithm", "" }, false) // @TODO Missing documentation + , _useHistogram({ "UseHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation + , _autoFilter({ "AutoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation + , _normValues({ "NormValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation + , _backgroundValues({ "BackgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation + , _transferFunctionsFile({ "Transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation + , _dataOptions({ "DataOptions", "Data Options", "" }) // @TODO Missing documentation { addProperty(_useLog); addProperty(_useHistogram); diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index a29a76bb9a..201a2a537f 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -43,8 +43,8 @@ namespace { namespace openspace{ IswaKameleonGroup::IswaKameleonGroup(std::string name, std::string type) : IswaDataGroup(name, type) - , _resolution({ "resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _fieldlines({ "fieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation + , _resolution({ "Resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _fieldlines({ "FieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation , _fieldlineIndexFile("") , _kameleonPath("") { diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index 3008e61619..98a875716e 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -39,9 +39,9 @@ namespace openspace { KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) : DataCygnet(dictionary) - , _fieldlines({ "fieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation - , _resolution({ "resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _slice({ "slice", "Slice", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation + , _fieldlines({ "FieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation + , _resolution({ "Resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation + , _slice({ "Slice", "Slice", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation { addProperty(_resolution); addProperty(_slice); diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index c8735878c9..ec0780afbb 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -64,24 +64,24 @@ namespace openspace { RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _dimensions({ "dimensions", "Dimensions", "" }) // @TODO Missing documentation - , _variable({ "variable", "Variable", "" }) // @TODO Missing documentation - , _lowerDomainBound({ "lowerDomainBound", "Lower Domain Bound", "" }) // @TODO Missing documentation - , _upperDomainBound({ "upperDomainBound", "Upper Domain Bound", "" }) // @TODO Missing documentation - , _domainScale({ "domainScale", "Domain scale", "" }) // @TODO Missing documentation + , _dimensions({ "Dimensions", "Dimensions", "" }) // @TODO Missing documentation + , _variable({ "Variable", "Variable", "" }) // @TODO Missing documentation + , _lowerDomainBound({ "LowerDomainBound", "Lower Domain Bound", "" }) // @TODO Missing documentation + , _upperDomainBound({ "UpperDomainBound", "Upper Domain Bound", "" }) // @TODO Missing documentation + , _domainScale({ "DomainScale", "Domain scale", "" }) // @TODO Missing documentation , _autoDomainBounds(false) - , _lowerValueBound({ "lowerValueBound", "Lower Value Bound", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation - , _upperValueBound({ "upperValueBound", "Upper Value Bound", "" }, 1.f, 0.01f, 1.f) // @TODO Missing documentation + , _lowerValueBound({ "LowerValueBound", "Lower Value Bound", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation + , _upperValueBound({ "UpperValueBound", "Upper Value Bound", "" }, 1.f, 0.01f, 1.f) // @TODO Missing documentation , _autoValueBounds(false) - , _gridType({ "gridType", "Grid Type", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _gridType({ "GridType", "Grid Type", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation , _autoGridType(false) , _clipPlanes(nullptr) - , _stepSize({ "stepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation - , _sourcePath({ "sourcePath", "Source Path", "" }) // @TODO Missing documentation - , _transferFunctionPath({ "transferFunctionPath", "Transfer Function Path", "" }) // @TODO Missing documentation + , _stepSize({ "StepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _sourcePath({ "SourcePath", "Source Path", "" }) // @TODO Missing documentation + , _transferFunctionPath({ "TransferFunctionPath", "Transfer Function Path", "" }) // @TODO Missing documentation , _raycaster(nullptr) , _transferFunction(nullptr) - , _cache({ "cache", "Cache", "" }) // @TODO Missing documentation + , _cache({ "Cache", "Cache", "" }) // @TODO Missing documentation { glm::vec3 dimensions; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 7f3910268d..a2e48b63ab 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -95,20 +95,20 @@ RenderableMultiresVolume::RenderableMultiresVolume (const ghoul::Dictionary& dic , _errorHistogramManager(nullptr) , _histogramManager(nullptr) , _localErrorHistogramManager(nullptr) - , _stepSizeCoefficient({ "stepSizeCoefficient", "Stepsize Coefficient", "" }, 1.f, 0.01f, 10.f) // @TODO Missing documentation - , _currentTime({ "currentTime", "Current Time", "" }, 0, 0, 0) // @TODO Missing documentation - , _memoryBudget({ "memoryBudget", "Memory Budget", "" }, 0, 0, 0) // @TODO Missing documentation - , _streamingBudget({ "streamingBudget", "Streaming Budget", "" }, 0, 0, 0) // @TODO Missing documentation - , _useGlobalTime({ "useGlobalTime", "Global Time", "" }, false) // @TODO Missing documentation - , _loop({ "loop", "Loop", "" }, false) // @TODO Missing documentation - , _selectorName({ "selector", "Brick Selector", "" }) // @TODO Missing documentation + , _stepSizeCoefficient({ "StepSizeCoefficient", "Stepsize Coefficient", "" }, 1.f, 0.01f, 10.f) // @TODO Missing documentation + , _currentTime({ "CurrentTime", "Current Time", "" }, 0, 0, 0) // @TODO Missing documentation + , _memoryBudget({ "MemoryBudget", "Memory Budget", "" }, 0, 0, 0) // @TODO Missing documentation + , _streamingBudget({ "StreamingBudget", "Streaming Budget", "" }, 0, 0, 0) // @TODO Missing documentation + , _useGlobalTime({ "UseGlobalTime", "Global Time", "" }, false) // @TODO Missing documentation + , _loop({ "Loop", "Loop", "" }, false) // @TODO Missing documentation + , _selectorName({ "Selector", "Brick Selector", "" }) // @TODO Missing documentation , _gatheringStats(false) - , _statsToFile({ "printStats", "Print Stats", "" }, false) // @TODO Missing documentation - , _statsToFileName({ "printStatsFileName", "Stats Filename", "" }) // @TODO Missing documentation - , _scalingExponent({ "scalingExponent", "Scaling Exponent", "" }, 1, -10, 20) // @TODO Missing documentation - , _scaling({ "scaling", "Scaling", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _translation({ "translation", "Translation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation + , _statsToFile({ "PrintStats", "Print Stats", "" }, false) // @TODO Missing documentation + , _statsToFileName({ "PrintStatsFileName", "Stats Filename", "" }) // @TODO Missing documentation + , _scalingExponent({ "ScalingExponent", "Scaling Exponent", "" }, 1, -10, 20) // @TODO Missing documentation + , _scaling({ "Scaling", "Scaling", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation({ "Translation", "Translation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation({ "Rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation { std::string name; //bool success = dictionary.getValue(constants::scenegraphnode::keyName, name); diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index 9d1b569fa3..bb5c09aa64 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -129,38 +129,38 @@ documentation::Documentation RenderableFov::Documentation() { RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineWidth({ "lineWidth", "Line Width", "" }, 1.f, 1.f, 20.f) // @TODO Missing documentation - , _drawSolid({ "solidDraw", "Draw as Quads", "" }, false) // @TODO Missing documentation - , _standOffDistance({ "standOffDistance", "Standoff Distance", "" }, 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation + , _lineWidth({ "LineWidth", "Line Width", "" }, 1.f, 1.f, 20.f) // @TODO Missing documentation + , _drawSolid({ "SolidDraw", "Draw as Quads", "" }, false) // @TODO Missing documentation + , _standOffDistance({ "StandOffDistance", "Standoff Distance", "" }, 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation , _programObject(nullptr) , _drawFOV(false) , _colors({ { - { "colors.defaultStart", "Start of default color", "" }, // @TODO Missing documentation + { "Colors.DefaultStart", "Start of default color", "" }, // @TODO Missing documentation glm::vec4(0.4f) }, { - { "colors.defaultEnd", "End of default color", "" }, // @TODO Missing documentation + { "Colors.DefaultEnd", "End of default color", "" }, // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) }, { - { "colors.active", "Active Color", "" }, // @TODO Missing documentation + { "Colors.Active", "Active Color", "" }, // @TODO Missing documentation glm::vec4(0.f, 1.f, 0.f, 1.f) }, { - { "colors.targetInFieldOfView", "Target-in-field-of-view Color", "" }, // @TODO Missing documentation + { "Colors.TargetInFieldOfView", "Target-in-field-of-view Color", "" }, // @TODO Missing documentation glm::vec4(0.f, 0.5f, 0.7f, 1.f) }, { - { "colors.intersectionStart", "Start of the intersection", "" }, // @TODO Missing documentation + { "Colors.IntersectionStart", "Start of the intersection", "" }, // @TODO Missing documentation glm::vec4(1.f, 0.89f, 0.f, 1.f) }, { - { "colors.intersectionEnd", "End of the intersection", "" }, // @TODO Missing documentation + { "Colors.IntersectionEnd", "End of the intersection", "" }, // @TODO Missing documentation glm::vec4(1.f, 0.29f, 0.f, 1.f) }, { - { "colors.square", "Orthogonal Square", "" }, // @TODO Missing documentation + { "Colors.Square", "Orthogonal Square", "" }, // @TODO Missing documentation glm::vec4(0.85f, 0.85f, 0.85f, 1.f) } }) diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 73953bd118..127042eb0a 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -104,13 +104,13 @@ documentation::Documentation RenderableModelProjection::Documentation() { RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _rotation({ "rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation + , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _rotation({ "Rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _geometry(nullptr) - , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index 67922bcde2..6726b36e28 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -121,16 +121,16 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "planetTexture", "RGB Texture", "" }) // @TODO Missing documentation - , _heightMapTexturePath({ "heightMap", "Heightmap Texture", "" }) // @TODO Missing documentation - , _rotation({ "rotation", "Rotation", "" }, 0, 0, 360) // @TODO Missing documentation + , _colorTexturePath({ "PlanetTexture", "RGB Texture", "" }) // @TODO Missing documentation + , _heightMapTexturePath({ "HeightMap", "Heightmap Texture", "" }) // @TODO Missing documentation + , _rotation({ "Rotation", "Rotation", "" }, 0, 0, 360) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _heightMapTexture(nullptr) - , _shiftMeridianBy180({ "shiftMeiridian", "Shift Meridian by 180 deg", "" }, false) // @TODO Missing documentation - , _heightExaggeration({ "heightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 100.f) // @TODO Missing documentation - , _debugProjectionTextureRotation({ "debug.projectionTextureRotation", "Projection Texture Rotation", "" }, 0.f, 0.f, 360.f) // @TODO Missing documentation + , _shiftMeridianBy180({ "ShiftMeiridian", "Shift Meridian by 180 deg", "" }, false) // @TODO Missing documentation + , _heightExaggeration({ "HeightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 100.f) // @TODO Missing documentation + , _debugProjectionTextureRotation({ "Debug.ProjectionTextureRotation", "Projection Texture Rotation", "" }, 0.f, 0.f, 360.f) // @TODO Missing documentation , _capture(false) { documentation::testSpecificationAndThrow( diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index c4555346fb..b49e14619d 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -46,9 +46,9 @@ namespace openspace { RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _numberOfPoints({ "amountOfPoints", "Points", "" }, 190, 1, 300) // @TODO Missing documentation - , _shadowLength({ "shadowLength", "Shadow Length", "" }, 0.1f, 0.0f, 0.5f) // @TODO Missing documentation - , _shadowColor({ "shadowColor", "Shadow Color", "" }, // @TODO Missing documentation + , _numberOfPoints({ "AmountOfPoints", "Points", "" }, 190, 1, 300) // @TODO Missing documentation + , _shadowLength({ "ShadowLength", "Shadow Length", "" }, 0.1f, 0.0f, 0.5f) // @TODO Missing documentation + , _shadowColor({ "ShadowColor", "Shadow Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.25f), glm::vec4(0.f), glm::vec4(1.f)) , _shader(nullptr) , _vao(0) diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index d58ba518a0..11c9797a9d 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -168,11 +168,11 @@ documentation::Documentation ProjectionComponent::Documentation() { ProjectionComponent::ProjectionComponent() : properties::PropertyOwner("ProjectionComponent") - , _performProjection({ "performProjection", "Perform Projections", "" }, true) // @TODO Missing documentation - , _clearAllProjections({ "clearAllProjections", "Clear Projections", "" }, false) // @TODO Missing documentation - , _projectionFading({ "projectionFading", "Projection Fading", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _textureSize({ "textureSize", "Texture Size", "" }, ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation - , _applyTextureSize({ "applyTextureSize", "Apply Texture Size", "" }) // @TODO Missing documentation + , _performProjection({ "PerformProjection", "Perform Projections", "" }, true) // @TODO Missing documentation + , _clearAllProjections({ "ClearAllProjections", "Clear Projections", "" }, false) // @TODO Missing documentation + , _projectionFading({ "ProjectionFading", "Projection Fading", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _textureSize({ "TextureSize", "Texture Size", "" }, ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation + , _applyTextureSize({ "ApplyTextureSize", "Apply Texture Size", "" }) // @TODO Missing documentation , _textureSizeDirty(false) , _projectionTexture(nullptr) { diff --git a/modules/onscreengui/src/guicomponent.cpp b/modules/onscreengui/src/guicomponent.cpp index e2bcbd2afb..21a8f8d741 100644 --- a/modules/onscreengui/src/guicomponent.cpp +++ b/modules/onscreengui/src/guicomponent.cpp @@ -28,7 +28,7 @@ namespace openspace::gui { GuiComponent::GuiComponent(std::string name) : properties::PropertyOwner(std::move(name)) - , _isEnabled({ "enabled", "Is Enabled", "" }, false) // @TODO Missing documentation + , _isEnabled({ "Enabled", "Is Enabled", "" }, false) // @TODO Missing documentation { addProperty(_isEnabled); } diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index 19d4d357b0..40bbab94cd 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -55,10 +55,10 @@ namespace openspace::gui { GuiPerformanceComponent::GuiPerformanceComponent() : GuiComponent("PerformanceComponent") - , _sortingSelection({ "sortingSelection", "Sorting", "" }, -1, -1, 6) // @TODO Missing documentation - , _sceneGraphIsEnabled({ "showSceneGraph", "Show Scene Graph Measurements", "" }, false) // @TODO Missing documentation - , _functionsIsEnabled({ "showFunctions", "Show Function Measurements", "" }, false) // @TODO Missing documentation - , _outputLogs({ "outputLogs", "Output Logs", "" }, false) // @TODO Missing documentation + , _sortingSelection({ "SortingSelection", "Sorting", "" }, -1, -1, 6) // @TODO Missing documentation + , _sceneGraphIsEnabled({ "ShowSceneGraph", "Show Scene Graph Measurements", "" }, false) // @TODO Missing documentation + , _functionsIsEnabled({ "ShowFunctions", "Show Function Measurements", "" }, false) // @TODO Missing documentation + , _outputLogs({ "OutputLogs", "Output Logs", "" }, false) // @TODO Missing documentation { addProperty(_sortingSelection); diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 75f01a9827..79f9ff1aa8 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -90,8 +90,8 @@ RenderableConstellationBounds::RenderableConstellationBounds( : Renderable(dictionary) , _vertexFilename("") , _constellationFilename("") - , _distance({ "distance", "Distance to the celestial Sphere", "" }, 15.f, 0.f, 30.f) // @TODO Missing documentation - , _constellationSelection({ "constellationSelection", "Constellation Selection", "" }) // @TODO Missing documentation + , _distance({ "Distance", "Distance to the celestial Sphere", "" }, 15.f, 0.f, 30.f) // @TODO Missing documentation + , _constellationSelection({ "ConstellationSelection", "Constellation Selection", "" }) // @TODO Missing documentation , _vao(0) , _vbo(0) { diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 11eb07bc2c..c4bf732375 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -121,15 +121,15 @@ documentation::Documentation RenderablePlanet::Documentation() { RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "colorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _nightTexturePath({ "nightTexture", "Night Texture", "" }) // @TODO Missing documentation - , _heightMapTexturePath({ "heightMap", "Heightmap Texture", "" }) // @TODO Missing documentation + , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation + , _nightTexturePath({ "NightTexture", "Night Texture", "" }) // @TODO Missing documentation + , _heightMapTexturePath({ "HeightMap", "Heightmap Texture", "" }) // @TODO Missing documentation , _programObject(nullptr) , _texture(nullptr) , _nightTexture(nullptr) - , _heightExaggeration({ "heightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation + , _heightExaggeration({ "HeightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation , _geometry(nullptr) - , _performShading({ "performShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation , _alpha(1.f) , _planetRadius(0.f) , _hasNightTexture(false) diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 1e9bc0b33c..7598a1d4ba 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -85,11 +85,11 @@ documentation::Documentation RenderableRings::Documentation() { RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "texture", "Texture", "" }) // @TODO Missing documentation - , _size({ "size", "Size", "" }, 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation - , _offset({ "offset", "Offset", "" }, glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation - , _nightFactor({ "nightFactor", "Night Factor", "" }, 0.33f, 0.f, 1.f) // @TODO Missing documentation - , _transparency({ "transparency", "Transparency", "" }, 0.15f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation + , _size({ "Size", "Size", "" }, 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation + , _offset({ "Offset", "Offset", "" }, glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation + , _nightFactor({ "NightFactor", "Night Factor", "" }, 0.33f, 0.f, 1.f) // @TODO Missing documentation + , _transparency({ "Transparency", "Transparency", "" }, 0.15f, 0.f, 1.f) // @TODO Missing documentation , _shader(nullptr) , _texture(nullptr) , _textureFile(nullptr) diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index ebdd77e719..0e16a93cdd 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -125,20 +125,20 @@ documentation::Documentation RenderableStars::Documentation() { RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _pointSpreadFunctionTexturePath({ "psfTexture", "Point Spread Function Texture", "" }) // @TODO Missing documentation + , _pointSpreadFunctionTexturePath({ "PsfTexture", "Point Spread Function Texture", "" }) // @TODO Missing documentation , _pointSpreadFunctionTexture(nullptr) , _pointSpreadFunctionTextureIsDirty(true) - , _colorTexturePath({ "colorTexture", "ColorBV Texture", "" }) // @TODO Missing documentation + , _colorTexturePath({ "ColorTexture", "ColorBV Texture", "" }) // @TODO Missing documentation , _colorTexture(nullptr) , _colorTextureIsDirty(true) , _colorOption( - { "colorOption", "Color Option", "" }, // @TODO Missing documentation + { "ColorOption", "Color Option", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) , _dataIsDirty(true) - , _alphaValue({ "alphaValue", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _scaleFactor({ "scaleFactor", "Scale Factor", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation - , _minBillboardSize({ "minBillboardSize", "Min Billboard Size", "" }, 1.f, 1.f, 100.f) // @TODO Missing documentation + , _alphaValue({ "AlphaValue", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _scaleFactor({ "ScaleFactor", "Scale Factor", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation + , _minBillboardSize({ "MinBillboardSize", "Min Billboard Size", "" }, 1.f, 1.f, 100.f) // @TODO Missing documentation , _program(nullptr) , _speckFile("") , _nValuesPerStar(0) diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index f090b76b7f..7d97071129 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -39,11 +39,11 @@ namespace openspace::planetgeometry { SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) : PlanetGeometry() , _radius( - { "radius", "Radius", "" }, // @TODO Missing documentation + { "Radius", "Radius", "" }, // @TODO Missing documentation glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(std::pow(10.f, 20.f), std::pow(10.f, 20.f), std::pow(10.f, 20.f))) - , _segments({ "segments", "Segments", "" }, 20, 1, 5000) // @TODO Missing documentation + , _segments({ "Segments", "Segments", "" }, 20, 1, 5000) // @TODO Missing documentation , _sphere(nullptr) { float sphereRadius = 0.f; diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index ed7cf6826b..d778a2039e 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -83,8 +83,8 @@ documentation::Documentation SpiceRotation::Documentation() { } SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) - : _sourceFrame({ "source", "Source", "" }) // @TODO Missing documentation - , _destinationFrame({ "destination", "Destination", "" }) // @TODO Missing documentation + : _sourceFrame({ "Source", "Source", "" }) // @TODO Missing documentation + , _destinationFrame({ "Destination", "Destination", "" }) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index 60fb8432bc..3ad84c468b 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -142,24 +142,24 @@ documentation::Documentation KeplerTranslation::Documentation() { KeplerTranslation::KeplerTranslation() : Translation() - , _eccentricity({ "eccentricity", "Eccentricity", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation - , _semiMajorAxis({ "semimajorAxis", "Semi-major axis", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation - , _inclination({ "inclination", "Inclination", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation + , _eccentricity({ "Eccentricity", "Eccentricity", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation + , _semiMajorAxis({ "SemimajorAxis", "Semi-major axis", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation + , _inclination({ "Inclination", "Inclination", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation , _ascendingNode( - { "ascendingNode", "Right ascension of ascending Node", "" }, // @TODO Missing documentation + { "AscendingNode", "Right ascension of ascending Node", "" }, // @TODO Missing documentation 0.0, 0.0, 360.0 ) , _argumentOfPeriapsis( - { "argumentOfPeriapsis", "Argument of Periapsis", "" }, // @TODO Missing documentation + { "ArgumentOfPeriapsis", "Argument of Periapsis", "" }, // @TODO Missing documentation 0.0, 0.0, 360.0 ) - , _meanAnomalyAtEpoch({ "meanAnomalyAtEpoch", "Mean anomaly at epoch", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation - , _epoch({ "epoch", "Epoch", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation - , _period({ "period", "Orbit period", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation + , _meanAnomalyAtEpoch({ "MeanAnomalyAtEpoch", "Mean anomaly at epoch", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation + , _epoch({ "Epoch", "Epoch", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation + , _period({ "Period", "Orbit period", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation , _orbitPlaneDirty(true) { auto update = [this]() { diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 54e928b484..4f3411f868 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -99,9 +99,9 @@ documentation::Documentation SpiceTranslation::Documentation() { } SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) - : _target({ "target", "Target", "" }) // @TODO Missing documentation - , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation - , _frame({ "frame", "Reference Frame", "" }, DefaultReferenceFrame) // @TODO Missing documentation + : _target({ "Target", "Target", "" }) // @TODO Missing documentation + , _origin({ "Origin", "Origin", "" }) // @TODO Missing documentation + , _frame({ "Frame", "Reference Frame", "" }, DefaultReferenceFrame) // @TODO Missing documentation { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 72c6617d80..55ec5a0146 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -74,7 +74,7 @@ namespace openspace { TouchInteraction::TouchInteraction() : properties::PropertyOwner("TouchInteraction") - , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation + , _origin({ "Origin", "Origin", "" }) // @TODO Missing documentation , _unitTest( { "Click to take a unit test", "Take a unit test saving the LM data into file", "" }, // @TODO Missing documentation false diff --git a/modules/toyvolume/rendering/renderabletoyvolume.cpp b/modules/toyvolume/rendering/renderabletoyvolume.cpp index 103b243293..cf862861a7 100644 --- a/modules/toyvolume/rendering/renderabletoyvolume.cpp +++ b/modules/toyvolume/rendering/renderabletoyvolume.cpp @@ -37,12 +37,12 @@ namespace openspace { RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _scalingExponent({ "scalingExponent", "Scaling Exponent", "" }, 1, -10, 20) - , _stepSize({ "stepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation - , _scaling({ "scaling", "Scaling", "" }, glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _translation({ "translation", "Translation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _rotation({ "rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) // @TODO Missing documentation - , _color({ "color", "Color", "" }, glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) // @TODO Missing documentation + , _scalingExponent({ "ScalingExponent", "Scaling Exponent", "" }, 1, -10, 20) + , _stepSize({ "StepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation + , _scaling({ "Scaling", "Scaling", "" }, glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _translation({ "Translation", "Translation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation + , _rotation({ "Rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f)) // @TODO Missing documentation + , _color({ "Color", "Color", "" }, glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) // @TODO Missing documentation { float stepSize; int scalingExponent; diff --git a/modules/volume/rendering/volumeclipplane.cpp b/modules/volume/rendering/volumeclipplane.cpp index 0ae65b6c21..f160e74999 100644 --- a/modules/volume/rendering/volumeclipplane.cpp +++ b/modules/volume/rendering/volumeclipplane.cpp @@ -31,13 +31,13 @@ namespace openspace { VolumeClipPlane::VolumeClipPlane(const ghoul::Dictionary& dictionary) : _normal( - { "normal", "Normal", "" }, // @TODO Missing documentation + { "Normal", "Normal", "" }, // @TODO Missing documentation glm::vec3(1.f, 0.f, 0.f), glm::vec3(-1.f), glm::vec3(1.f) ) , _offsets( - { "offsets", "Offsets", "" }, // @TODO Missing documentation + { "Offsets", "Offsets", "" }, // @TODO Missing documentation glm::vec2(-2.f, 0.f), glm::vec2(-2.f, 0.f), glm::vec2(2.f, 1.f) diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 8708f2b613..082452fe34 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -1354,7 +1354,8 @@ scripting::LuaLibrary OpenSpaceEngine::luaLibrary() { { "addVirtualProperty", &luascriptfunctions::addVirtualProperty, - "type, name, identifier, [value, minimumValue, maximumValue]", + "type, name, identifier, description," + "[value, minimumValue, maximumValue]", "Adds a virtual property that will set a group of properties" }, { diff --git a/src/engine/settingsengine.cpp b/src/engine/settingsengine.cpp index b058fcba0d..f2be574d63 100644 --- a/src/engine/settingsengine.cpp +++ b/src/engine/settingsengine.cpp @@ -42,11 +42,11 @@ namespace openspace { SettingsEngine::SettingsEngine() : properties::PropertyOwner("Global Properties") - , _scenes({ "scenes", "Scene", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation - , _busyWaitForDecode({ "busyWaitForDecode", "Busy Wait for decode", "" }, false) // @TODO Missing documentation - , _logSGCTOutOfOrderErrors({ "logSGCTOutOfOrderErrors", "Log SGCT out-of-order", "" }, false) // @TODO Missing documentation - , _useDoubleBuffering({ "useDoubleBuffering", "Use double buffering", "" }, false) // @TODO Missing documentation - , _spiceUseExceptions({ "enableSpiceExceptions", "Enable Spice Exceptions", "" }, false) // @TODO Missing documentation + , _scenes({ "Scenes", "Scene", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _busyWaitForDecode({ "BusyWaitForDecode", "Busy Wait for decode", "" }, false) // @TODO Missing documentation + , _logSGCTOutOfOrderErrors({ "LogSGCTOutOfOrderErrors", "Log SGCT out-of-order", "" }, false) // @TODO Missing documentation + , _useDoubleBuffering({ "UseDoubleBuffering", "Use double buffering", "" }, false) // @TODO Missing documentation + , _spiceUseExceptions({ "EnableSpiceExceptions", "Enable Spice Exceptions", "" }, false) // @TODO Missing documentation { _spiceUseExceptions.onChange([this] { SpiceManager::ref().setExceptionHandling( diff --git a/src/engine/wrapper/sgctwindowwrapper.cpp b/src/engine/wrapper/sgctwindowwrapper.cpp index 36ecd58d84..416937a8db 100644 --- a/src/engine/wrapper/sgctwindowwrapper.cpp +++ b/src/engine/wrapper/sgctwindowwrapper.cpp @@ -36,8 +36,8 @@ namespace { namespace openspace { SGCTWindowWrapper::SGCTWindowWrapper() - : _eyeSeparation({ "eyeSeparation", "Eye Separation", "" }, 0.f, 0.f, 10.f) // @TODO Missing documentation - , _showStatsGraph({ "showStatsGraph", "Show Stats Graph", "" }, false) // @TODO Missing documentation + : _eyeSeparation({ "EyeSeparation", "Eye Separation", "" }, 0.f, 0.f, 10.f) // @TODO Missing documentation + , _showStatsGraph({ "ShowStatsGraph", "Show Stats Graph", "" }, false) // @TODO Missing documentation { _showStatsGraph.onChange([this](){ sgct::Engine::instance()->setStatsGraphVisibility(_showStatsGraph); diff --git a/src/interaction/luaconsole.cpp b/src/interaction/luaconsole.cpp index ccf87326b6..d2b0e3a028 100644 --- a/src/interaction/luaconsole.cpp +++ b/src/interaction/luaconsole.cpp @@ -75,39 +75,39 @@ namespace openspace { LuaConsole::LuaConsole() : properties::PropertyOwner("LuaConsole") - , _isVisible({ "isVisible", "Is Visible", "" }, false) // @TODO Missing documentation - , _remoteScripting({ "remoteScripting", "Remote scripting", "" }, false) // @TODO Missing documentation + , _isVisible({ "IsVisible", "Is Visible", "" }, false) // @TODO Missing documentation + , _remoteScripting({ "RemoteScripting", "Remote scripting", "" }, false) // @TODO Missing documentation , _backgroundColor( - { "backgroundColor", "Background Color", "" }, // @TODO Missing documentation + { "BackgroundColor", "Background Color", "" }, // @TODO Missing documentation glm::vec4(21.f / 255.f, 23.f / 255.f, 28.f / 255.f, 0.8f), glm::vec4(0.f), glm::vec4(1.f) ) , _highlightColor( - { "highlightColor", "Highlight Color", "" }, // @TODO Missing documentation + { "HighlightColor", "Highlight Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _separatorColor( - { "separatorColor", "Separator Color", "" }, // @TODO Missing documentation + { "SeparatorColor", "Separator Color", "" }, // @TODO Missing documentation glm::vec4(0.4f, 0.4f, 0.4f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _entryTextColor( - { "entryTextColor", "Entry Text Color", "" }, // @TODO Missing documentation + { "EntryTextColor", "Entry Text Color", "" }, // @TODO Missing documentation glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f) ) , _historyTextColor( - { "historyTextColor", "History Text Color", "" }, // @TODO Missing documentation + { "HistoryTextColor", "History Text Color", "" }, // @TODO Missing documentation glm::vec4(1.0f, 1.0f, 1.0f, 0.65f), glm::vec4(0.f), glm::vec4(1.f) ) - , _historyLength({ "historyLength", "History Length", "" }, 13, 0, 100) // @TODO Missing documentation + , _historyLength({ "HistoryLength", "History Length", "" }, 13, 0, 100) // @TODO Missing documentation , _inputPosition(0) , _activeCommand(0) , _autoCompleteInfo({NoAutoComplete, false, ""}) diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 5fec81b06e..835d19f1f7 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -54,8 +54,8 @@ namespace openspace::interaction { NavigationHandler::NavigationHandler() : properties::PropertyOwner("NavigationHandler") - , _origin({ "origin", "Origin", "" }) // @TODO Missing documentation - , _useKeyFrameInteraction({ "useKeyFrameInteraction", "Use keyframe interaction", "" }, false) // @TODO Missing documentation + , _origin({ "Origin", "Origin", "" }) // @TODO Missing documentation + , _useKeyFrameInteraction({ "UseKeyFrameInteraction", "Use keyframe interaction", "" }, false) // @TODO Missing documentation { _origin.onChange([this]() { SceneGraphNode* node = sceneGraphNode(_origin.value()); diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 693750ff1c..ca9ccb32d0 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -41,18 +41,18 @@ namespace openspace::interaction { OrbitalNavigator::OrbitalNavigator() : properties::PropertyOwner("OrbitalNavigator") - , _rotationalFriction({ "rotationalFriction", "Rotational friction", "" }, true) // @TODO Missing documentation - , _horizontalFriction({ "horizontalFriction", "Horizontal friction", "" }, true) // @TODO Missing documentation - , _verticalFriction({ "verticalFriction", "Vertical friction", "" }, true) // @TODO Missing documentation + , _rotationalFriction({ "RotationalFriction", "Rotational friction", "" }, true) // @TODO Missing documentation + , _horizontalFriction({ "HorizontalFriction", "Horizontal friction", "" }, true) // @TODO Missing documentation + , _verticalFriction({ "VerticalFriction", "Vertical friction", "" }, true) // @TODO Missing documentation , _followFocusNodeRotationDistance( - { "followFocusNodeRotationDistance", "Follow focus node rotation distance", "" }, // @TODO Missing documentation + { "FollowFocusNodeRotationDistance", "Follow focus node rotation distance", "" }, // @TODO Missing documentation 2.0f, 0.0f, 10.f ) , _minimumAllowedDistance( - {"minimumAllowedDistance", "Minimum allowed distance", "" }, // @TODO Missing documentation + {"MinimumAllowedDistance", "Minimum allowed distance", "" }, // @TODO Missing documentation 10.0f, 0.0f, 10000.f) - , _sensitivity({ "sensitivity", "Sensitivity", "" }, 20.0f, 1.0f, 50.f) // @TODO Missing documentation - , _motionLag({ "motionLag", "Motion lag", "" }, 0.5f, 0.f, 1.f) // @TODO Missing documentation + , _sensitivity({ "Sensitivity", "Sensitivity", "" }, 20.0f, 1.0f, 50.f) // @TODO Missing documentation + , _motionLag({ "MotionLag", "Motion lag", "" }, 0.5f, 0.f, 1.f) // @TODO Missing documentation , _mouseStates(_sensitivity * pow(10.0,-4), 1 / (_motionLag + 0.0000001)) { auto smoothStep = diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index c080cfb44c..45ac3c0f9c 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -87,25 +87,25 @@ namespace openspace { ParallelConnection::ParallelConnection() : properties::PropertyOwner("ParallelConnection") - , _password({ "password", "Password", "" }) // @TODO Missing documentation - , _hostPassword({ "hostPassword", "Host Password", "" }) // @TODO Missing documentation - , _port({ "port", "Port", "" }, "20501") // @TODO Missing documentation - , _address({ "address", "Address", "" }, "localhost") // @TODO Missing documentation - , _name({ "name", "Connection name", "" }, "Anonymous") // @TODO Missing documentation - , _bufferTime({ "bufferTime", "Buffer Time", "" }, 1, 0.5, 10) // @TODO Missing documentation + , _password({ "Password", "Password", "" }) // @TODO Missing documentation + , _hostPassword({ "HostPassword", "Host Password", "" }) // @TODO Missing documentation + , _port({ "Port", "Port", "" }, "20501") // @TODO Missing documentation + , _address({ "Address", "Address", "" }, "localhost") // @TODO Missing documentation + , _name({ "Name", "Connection name", "" }, "Anonymous") // @TODO Missing documentation + , _bufferTime({ "BufferTime", "Buffer Time", "" }, 1, 0.5, 10) // @TODO Missing documentation , _timeKeyframeInterval( - { "timeKeyframeInterval", "Time keyframe interval", ""}, // @TODO Missing documentation + { "TimeKeyframeInterval", "Time keyframe interval", ""}, // @TODO Missing documentation 0.1f, 0.f, 1.f ) , _cameraKeyframeInterval( - { "cameraKeyframeInterval", "Camera Keyframe interval", "" }, // @TODO Missing documentation + { "CameraKeyframeInterval", "Camera Keyframe interval", "" }, // @TODO Missing documentation 0.1f, 0.f, 1.f ) - , _timeTolerance({ "timeTolerance", "Time tolerance", "" }, 1.f, 0.5f, 5.f) // @TODO Missing documentation + , _timeTolerance({ "TimeTolerance", "Time tolerance", "" }, 1.f, 0.5f, 5.f) // @TODO Missing documentation , _lastTimeKeyframeTimestamp(0) , _lastCameraKeyframeTimestamp(0) , _clientSocket(INVALID_SOCKET) diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index e0a9410daf..dd2c012c99 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -93,7 +93,7 @@ std::unique_ptr Renderable::createFromDictionary( Renderable::Renderable() : properties::PropertyOwner("renderable") - , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation + , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") @@ -102,7 +102,7 @@ Renderable::Renderable() Renderable::Renderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("renderable") - , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation + , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 94ddb55505..12643c9281 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -100,32 +100,32 @@ RenderEngine::RenderEngine() , _camera(nullptr) , _scene(nullptr) , _raycasterManager(nullptr) - , _performanceMeasurements({ "performanceMeasurements", "Performance Measurements", "" }) // @TODO Missing documentation + , _performanceMeasurements({ "PerformanceMeasurements", "Performance Measurements", "" }) // @TODO Missing documentation , _performanceManager(nullptr) , _renderer(nullptr) , _rendererImplementation(RendererImplementation::Invalid) , _log(nullptr) , _frametimeType( - { "frametimeType", "Type of the frametime display", "" }, // @TODO Missing documentation + { "FrametimeType", "Type of the frametime display", "" }, // @TODO Missing documentation properties::OptionProperty::DisplayType::Dropdown ) - , _showDate({ "showDate", "Show Date Information", "" }, true) // @TODO Missing documentation - , _showInfo({ "showInfo", "Show Render Information", "" }, true) // @TODO Missing documentation - , _showLog({ "showLog", "Show the OnScreen log", "" }, true) // @TODO Missing documentation - , _takeScreenshot({ "takeScreenshot", "Take Screenshot", "" }) // @TODO Missing documentation + , _showDate({ "ShowDate", "Show Date Information", "" }, true) // @TODO Missing documentation + , _showInfo({ "ShowInfo", "Show Render Information", "" }, true) // @TODO Missing documentation + , _showLog({ "ShowLog", "Show the OnScreen log", "" }, true) // @TODO Missing documentation + , _takeScreenshot({ "TakeScreenshot", "Take Screenshot", "" }) // @TODO Missing documentation , _shouldTakeScreenshot(false) - , _applyWarping({ "applyWarpingScreenshot", "Apply Warping to Screenshots", "" }, false) // @TODO Missing documentation - , _showFrameNumber({ "showFrameNumber", "Show Frame Number", "" }, false) // @TODO Missing documentation - , _disableMasterRendering({ "disableMasterRendering", "Disable Master Rendering", "" }, false) // @TODO Missing documentation + , _applyWarping({ "ApplyWarpingScreenshot", "Apply Warping to Screenshots", "" }, false) // @TODO Missing documentation + , _showFrameNumber({ "ShowFrameNumber", "Show Frame Number", "" }, false) // @TODO Missing documentation + , _disableMasterRendering({ "DisableMasterRendering", "Disable Master Rendering", "" }, false) // @TODO Missing documentation , _disableSceneTranslationOnMaster( - { "disableSceneTranslationOnMaster", "Disable Scene Translation on Master", "" }, // @TODO Missing documentation + { "DisableSceneTranslationOnMaster", "Disable Scene Translation on Master", "" }, // @TODO Missing documentation false ) , _globalBlackOutFactor(1.f) , _fadeDuration(2.f) , _currentFadeTime(0.f) , _fadeDirection(0) - , _nAaSamples({ "nAaSamples", "Number of Antialiasing samples", "" }, 8, 1, 16) // @TODO Missing documentation + , _nAaSamples({ "NAaSamples", "Number of Antialiasing samples", "" }, 8, 1, 16) // @TODO Missing documentation , _frameNumber(0) { _performanceMeasurements.onChange([this](){ diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index 41334a9020..fccf1bae30 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -98,24 +98,24 @@ std::unique_ptr ScreenSpaceRenderable::createFromDictiona ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("") - , _enabled({ "enabled", "Is Enabled", "" }, true) // @TODO Missing documentation - , _useFlatScreen({ "flatScreen", "Flat Screen", "" }, true) // @TODO Missing documentation + , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation + , _useFlatScreen({ "FlatScreen", "Flat Screen", "" }, true) // @TODO Missing documentation , _euclideanPosition( - { "euclideanPosition", "Euclidean coordinates", "" }, // @TODO Missing documentation + { "EuclideanPosition", "Euclidean coordinates", "" }, // @TODO Missing documentation glm::vec2(0.f), glm::vec2(-4.f), glm::vec2(4.f) ) , _sphericalPosition( - { "sphericalPosition", "Spherical coordinates", "" }, // @TODO Missing documentation + { "SphericalPosition", "Spherical coordinates", "" }, // @TODO Missing documentation glm::vec2(0.f, static_cast(M_PI_2)), glm::vec2(-static_cast(M_PI)), glm::vec2(static_cast(M_PI)) ) - , _depth({ "depth", "Depth", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation - , _scale({ "scale", "Scale", "" }, 0.25f, 0.f, 2.f) // @TODO Missing documentation - , _alpha({ "alpha", "Alpha", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _delete({ "delete", "Delete", "" }) // @TODO Missing documentation + , _depth({ "Depth", "Depth", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation + , _scale({ "Scale", "Scale", "" }, 0.25f, 0.f, 2.f) // @TODO Missing documentation + , _alpha({ "Alpha", "Alpha", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation , _quad(0) , _vertexPositionBuffer(0) , _texture(nullptr) From 2e6465d888a90128c413b46e1029ed7bb037fbcd Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 22 Jul 2017 23:09:38 -0400 Subject: [PATCH 04/20] Correctly order the Property::Visibility enum --- include/openspace/properties/property.h | 8 ++++---- modules/onscreengui/src/gui.cpp | 2 +- scripts/common.lua | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 48d5288056..62e0fbf15d 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -67,10 +67,10 @@ public: * All > Developer > User > Hidden */ enum class Visibility { - All = 3, ///< Visible for all types, no matter what - Hidden = 2, ///< Never visible - Developer = 1, ///< Visible in Developer mode - User = 0 ///< Visible in User mode + Hidden = 3, ///< Never visible + Developer = 2, ///< Visible in Developer mode + User = 1, ///< Visible in User mode + All = 0, ///< Visible for all types, no matter what }; /** diff --git a/modules/onscreengui/src/gui.cpp b/modules/onscreengui/src/gui.cpp index 30c6dc5804..ba1d041e94 100644 --- a/modules/onscreengui/src/gui.cpp +++ b/modules/onscreengui/src/gui.cpp @@ -41,7 +41,7 @@ #include "gui_lua.inl" -#define SHOW_IMGUI_HELPERS +//#define SHOW_IMGUI_HELPERS namespace { diff --git a/scripts/common.lua b/scripts/common.lua index cf351cdaa7..4ada7ea37d 100644 --- a/scripts/common.lua +++ b/scripts/common.lua @@ -14,12 +14,12 @@ helper.scheduledScript.reversible = {} helper.setCommonKeys = function() openspace.bindKeyLocal( "F1", - helper.property.invert('Global Properties.OnScreenGUI.Main.enabled'), + helper.property.invert('Global Properties.OnScreenGUI.Main.Enabled'), "Toggles the visibility of the on-screen GUI." ) openspace.bindKeyLocal( "F2", - helper.property.invert("RenderEngine.performanceMeasurements"), + helper.property.invert("RenderEngine.PerformanceMeasurements"), "Toogles performance measurements that shows rendering time informations." ) @@ -30,7 +30,7 @@ helper.setCommonKeys = function() ) openspace.bindKeyLocal( "PRINT_SCREEN", - "openspace.setPropertyValueSingle('RenderEngine.takeScreenshot', nil)", + "openspace.setPropertyValueSingle('RenderEngine.TakeScreenshot', nil)", "Saves the contents of the screen to a file in the working directory." ) openspace.bindKey( @@ -52,18 +52,18 @@ helper.setCommonKeys = function() openspace.bindKey( "f", - helper.property.invert('NavigationHandler.OrbitalNavigator.horizontalFriction'), + helper.property.invert('NavigationHandler.OrbitalNavigator.HorizontalFriction'), "Toggles the horizontal friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely." ) openspace.bindKey( "Shift+f", - helper.property.invert('NavigationHandler.OrbitalNavigator.verticalFriction'), + helper.property.invert('NavigationHandler.OrbitalNavigator.VerticalFriction'), "Toggles the vertical friction of the camera. If it is disabled, the camera rises up from or closes in towards the focus object indefinitely." ) openspace.bindKey( "Ctrl+f", - helper.property.invert('NavigationHandler.OrbitalNavigator.rotationalFriction'), + helper.property.invert('NavigationHandler.OrbitalNavigator.RotationalFriction'), "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around its own axis indefinitely." ) @@ -116,12 +116,12 @@ end -- Function that returns the string that enables/disables the renderable 'renderable' helper.renderable.toggle = function(renderable) - return helper.property.invert(renderable .. ".renderable.enabled") + return helper.property.invert(renderable .. ".renderable.Enabled") end -- Function that returns the string that sets the enabled property of to helper.renderable.setEnabled = function(renderable, enabled) - return "openspace.setPropertyValue('" .. renderable .. ".renderable.enabled', " .. (enabled and "true" or "false") .. ");"; + return "openspace.setPropertyValue('" .. renderable .. ".renderable.Enabled', " .. (enabled and "true" or "false") .. ");"; end -- Function that returns a lua table specifying a reversible ScheduledScript for From 1a475ef570eb1b5038a9c37f4751ca68e4145b20 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 24 Jul 2017 00:15:45 -0400 Subject: [PATCH 05/20] Started documenting properties Cleanup of Nagivationhandler properties --- include/openspace/engine/settingsengine.h | 8 -- .../openspace/interaction/orbitalnavigator.h | 4 +- include/openspace/rendering/renderable.h | 2 +- .../globebrowsing/globes/chunkedlodglobe.cpp | 3 +- modules/globebrowsing/globes/pointglobe.cpp | 3 +- .../globebrowsing/globes/renderableglobe.cpp | 14 +-- .../globebrowsing/globes/renderableglobe.h | 2 - scripts/common.lua | 12 +-- src/engine/settingsengine.cpp | 37 +++---- src/engine/wrapper/sgctwindowwrapper.cpp | 19 +++- src/interaction/luaconsole.cpp | 99 +++++++++++++++---- src/interaction/navigationhandler.cpp | 36 +++++-- src/interaction/orbitalnavigator.cpp | 65 +++++++++--- src/network/parallelconnection.cpp | 44 ++++++++- src/rendering/renderable.cpp | 24 +++-- 15 files changed, 257 insertions(+), 115 deletions(-) diff --git a/include/openspace/engine/settingsengine.h b/include/openspace/engine/settingsengine.h index e040192928..4c90b10832 100644 --- a/include/openspace/engine/settingsengine.h +++ b/include/openspace/engine/settingsengine.h @@ -45,16 +45,8 @@ public: void setModules(const std::vector& modules); - bool busyWaitForDecode(); - bool logSGCTOutOfOrderErrors(); - bool useDoubleBuffering(); - private: properties::OptionProperty _scenes; - properties::BoolProperty _busyWaitForDecode; - properties::BoolProperty _logSGCTOutOfOrderErrors; - properties::BoolProperty _useDoubleBuffering; - properties::BoolProperty _spiceUseExceptions; }; } // namespace openspace diff --git a/include/openspace/interaction/orbitalnavigator.h b/include/openspace/interaction/orbitalnavigator.h index 92832f214f..eaf3c6277c 100644 --- a/include/openspace/interaction/orbitalnavigator.h +++ b/include/openspace/interaction/orbitalnavigator.h @@ -65,9 +65,9 @@ private: }; // Properties + properties::BoolProperty _rollFriction; properties::BoolProperty _rotationalFriction; - properties::BoolProperty _horizontalFriction; - properties::BoolProperty _verticalFriction; + properties::BoolProperty _zoomFriction; properties::FloatProperty _followFocusNodeRotationDistance; properties::FloatProperty _minimumAllowedDistance; properties::FloatProperty _sensitivity; diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 56ddd157a2..1baf5639e1 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -61,7 +61,7 @@ public: static std::unique_ptr createFromDictionary(const ghoul::Dictionary& dictionary); // constructors & destructor - Renderable(); + //Renderable(); Renderable(const ghoul::Dictionary& dictionary); virtual ~Renderable(); diff --git a/modules/globebrowsing/globes/chunkedlodglobe.cpp b/modules/globebrowsing/globes/chunkedlodglobe.cpp index 91c4e92ad0..7317939c2e 100644 --- a/modules/globebrowsing/globes/chunkedlodglobe.cpp +++ b/modules/globebrowsing/globes/chunkedlodglobe.cpp @@ -57,7 +57,8 @@ const GeodeticPatch ChunkedLodGlobe::COVERAGE = GeodeticPatch(0, 0, 90, 180); ChunkedLodGlobe::ChunkedLodGlobe(const RenderableGlobe& owner, size_t segmentsPerPatch, std::shared_ptr layerManager) - : minSplitDepth(2) + : Renderable({ { "Name", owner.name() } }) + , minSplitDepth(2) , maxSplitDepth(22) , stats(StatsCollector(absPath("test_stats"), 1, StatsCollector::Enabled::No)) , _owner(owner) diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index 1539bc27bb..04c474c306 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -36,7 +36,8 @@ namespace openspace::globebrowsing { PointGlobe::PointGlobe(const RenderableGlobe& owner) - : _owner(owner) + : Renderable({ { "Name", owner.name() } }) + , _owner(owner) , _intensityClamp( { "IntensityClamp", "Intensity clamp", ""}, // @TODO Missing documentation 1, 0, 1 diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index c5eb3b9f12..e11286978d 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -41,7 +41,8 @@ using namespace openspace::properties; namespace openspace::globebrowsing { RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) - : _debugProperties({ + : Renderable(dictionary) + , _debugProperties({ BoolProperty({ "SaveOrThrowCamera", "save or throw camera", "" }, false), // @TODO Missing documentation BoolProperty({ "ShowChunkEdges", "show chunk edges", "" }, false), // @TODO Missing documentation BoolProperty({ "ShowChunkBounds", "show chunk bounds", "" }, false), // @TODO Missing documentation @@ -52,13 +53,11 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) BoolProperty({ "PerformHorizonCulling", "perform horizon culling", "" }, true), // @TODO Missing documentation BoolProperty({ "LevelByProjectedAreaElseDistance", "level by projected area (else distance)", "" }, true), // @TODO Missing documentation BoolProperty({ "ResetTileProviders", "reset tile providers", "" }, false), // @TODO Missing documentation - BoolProperty({ "ToggleEnabledEveryFrame", "toggle enabled every frame", "" }, false), // @TODO Missing documentation BoolProperty({ "CollectStats", "collect stats", "" }, false), // @TODO Missing documentation BoolProperty({ "LimitLevelByAvailableData", "Limit level by available data", "" }, true), // @TODO Missing documentation IntProperty({ "ModelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "" }, 10, 1, 22) // @TODO Missing documentation }) , _generalProperties({ - BoolProperty({ "Enabled", "Enabled", "" }, true), // @TODO Missing documentation BoolProperty({ "PerformShading", "perform shading", "" }, true), // @TODO Missing documentation BoolProperty({ "Atmosphere", "atmosphere", "" }, false), // @TODO Missing documentation BoolProperty({ "UseAccurateNormals", "useAccurateNormals", "" }, false), // @TODO Missing documentation @@ -102,7 +101,6 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) _distanceSwitch.addSwitchValue(_chunkedLodGlobe); //_distanceSwitch.addSwitchValue(_pointGlobe); - addProperty(_generalProperties.isEnabled); addProperty(_generalProperties.atmosphereEnabled); addProperty(_generalProperties.performShading); addProperty(_generalProperties.useAccurateNormals); @@ -122,7 +120,6 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) _debugProperties.levelByProjectedAreaElseDistance ); _debugPropertyOwner.addProperty(_debugProperties.resetTileProviders); - _debugPropertyOwner.addProperty(_debugProperties.toggleEnabledEveryFrame); _debugPropertyOwner.addProperty(_debugProperties.collectStats); _debugPropertyOwner.addProperty(_debugProperties.limitLevelByAvailableData); _debugPropertyOwner.addProperty(_debugProperties.modelSpaceRenderingCutoffLevel); @@ -160,12 +157,7 @@ void RenderableGlobe::render(const RenderData& data, RendererTasks& tasks) { bool statsEnabled = _debugProperties.collectStats.value(); _chunkedLodGlobe->stats.setEnabled(statsEnabled); - if (_debugProperties.toggleEnabledEveryFrame.value()) { - _generalProperties.isEnabled.setValue( - !_generalProperties.isEnabled.value() - ); - } - if (_generalProperties.isEnabled.value()) { + if (_enabled) { if (_debugProperties.saveOrThrowCamera.value()) { _debugProperties.saveOrThrowCamera.setValue(false); diff --git a/modules/globebrowsing/globes/renderableglobe.h b/modules/globebrowsing/globes/renderableglobe.h index 8c0fa506cc..54a4ecde10 100644 --- a/modules/globebrowsing/globes/renderableglobe.h +++ b/modules/globebrowsing/globes/renderableglobe.h @@ -64,14 +64,12 @@ public: properties::BoolProperty performHorizonCulling; properties::BoolProperty levelByProjectedAreaElseDistance; properties::BoolProperty resetTileProviders; - properties::BoolProperty toggleEnabledEveryFrame; properties::BoolProperty collectStats; properties::BoolProperty limitLevelByAvailableData; properties::IntProperty modelSpaceRenderingCutoffLevel; }; struct GeneralProperties { - properties::BoolProperty isEnabled; properties::BoolProperty performShading; properties::BoolProperty atmosphereEnabled; properties::BoolProperty useAccurateNormals; diff --git a/scripts/common.lua b/scripts/common.lua index 4ada7ea37d..b80c4fdc1a 100644 --- a/scripts/common.lua +++ b/scripts/common.lua @@ -52,19 +52,19 @@ helper.setCommonKeys = function() openspace.bindKey( "f", - helper.property.invert('NavigationHandler.OrbitalNavigator.HorizontalFriction'), - "Toggles the horizontal friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely." + helper.property.invert('NavigationHandler.OrbitalNavigator.RotationalFriction'), + "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely." ) openspace.bindKey( "Shift+f", - helper.property.invert('NavigationHandler.OrbitalNavigator.VerticalFriction'), - "Toggles the vertical friction of the camera. If it is disabled, the camera rises up from or closes in towards the focus object indefinitely." + helper.property.invert('NavigationHandler.OrbitalNavigator.ZoomFriction'), + "Toggles the zoom friction of the camera. If it is disabled, the camera rises up from or closes in towards the focus object indefinitely." ) openspace.bindKey( "Ctrl+f", - helper.property.invert('NavigationHandler.OrbitalNavigator.RotationalFriction'), - "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around its own axis indefinitely." + helper.property.invert('NavigationHandler.OrbitalNavigator.RollFriction'), + "Toggles the roll friction of the camera. If it is disabled, the camera rolls around its own axis indefinitely." ) openspace.bindKey( diff --git a/src/engine/settingsengine.cpp b/src/engine/settingsengine.cpp index f2be574d63..ee3b397e64 100644 --- a/src/engine/settingsengine.cpp +++ b/src/engine/settingsengine.cpp @@ -38,25 +38,22 @@ #include +namespace { + static const openspace::properties::Property::PropertyInfo SceneInfo = { + "Scenes", + "Current Scene", + "Specifies the currently loaded scene. If this value is changed it will cause " + "the current scene to be unloaded and the newly selected scene to be loaded" + }; + +} // namespace + namespace openspace { SettingsEngine::SettingsEngine() : properties::PropertyOwner("Global Properties") - , _scenes({ "Scenes", "Scene", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation - , _busyWaitForDecode({ "BusyWaitForDecode", "Busy Wait for decode", "" }, false) // @TODO Missing documentation - , _logSGCTOutOfOrderErrors({ "LogSGCTOutOfOrderErrors", "Log SGCT out-of-order", "" }, false) // @TODO Missing documentation - , _useDoubleBuffering({ "UseDoubleBuffering", "Use double buffering", "" }, false) // @TODO Missing documentation - , _spiceUseExceptions({ "EnableSpiceExceptions", "Enable Spice Exceptions", "" }, false) // @TODO Missing documentation + , _scenes(SceneInfo, properties::OptionProperty::DisplayType::Dropdown) { - _spiceUseExceptions.onChange([this] { - SpiceManager::ref().setExceptionHandling( - SpiceManager::UseException(_spiceUseExceptions) - ); - }); - addProperty(_spiceUseExceptions); - addProperty(_busyWaitForDecode); - addProperty(_logSGCTOutOfOrderErrors); - addProperty(_useDoubleBuffering); addProperty(_scenes); } @@ -87,16 +84,4 @@ void SettingsEngine::setModules(const std::vector& modules) { } } -bool SettingsEngine::busyWaitForDecode() { - return _busyWaitForDecode; -} - -bool SettingsEngine::logSGCTOutOfOrderErrors() { - return _logSGCTOutOfOrderErrors; -} - -bool SettingsEngine::useDoubleBuffering() { - return _useDoubleBuffering; -} - } // namespace openspace diff --git a/src/engine/wrapper/sgctwindowwrapper.cpp b/src/engine/wrapper/sgctwindowwrapper.cpp index 416937a8db..dc19d46551 100644 --- a/src/engine/wrapper/sgctwindowwrapper.cpp +++ b/src/engine/wrapper/sgctwindowwrapper.cpp @@ -31,13 +31,28 @@ namespace { const char* GuiWindowTag = "GUI"; + + static const openspace::properties::Property::PropertyInfo EyeSeparationInfo = { + "EyeSeparation", + "Eye Separation", + "Sets a static eye separation for use in stereoscopic rendering. If no " + "stereoscopic rendering is performed, this value is unused." + }; + + static const openspace::properties::Property::PropertyInfo ShowStatsGraphInfo = { + "ShowStatsGraph", + "Show Statistics Graph", + "Toggles the rendering of the SGCT statistics graph that is rendered on top of " + "every image. The statistics show the frame time, synchronization time, and many " + "other timings as reported by SGCT." + }; } // namespace namespace openspace { SGCTWindowWrapper::SGCTWindowWrapper() - : _eyeSeparation({ "EyeSeparation", "Eye Separation", "" }, 0.f, 0.f, 10.f) // @TODO Missing documentation - , _showStatsGraph({ "ShowStatsGraph", "Show Stats Graph", "" }, false) // @TODO Missing documentation + : _eyeSeparation(EyeSeparationInfo, 0.f, 0.f, 10.f) + , _showStatsGraph(ShowStatsGraphInfo, false) { _showStatsGraph.onChange([this](){ sgct::Engine::instance()->setStatsGraphVisibility(_showStatsGraph); diff --git a/src/interaction/luaconsole.cpp b/src/interaction/luaconsole.cpp index d2b0e3a028..dba135d8fc 100644 --- a/src/interaction/luaconsole.cpp +++ b/src/interaction/luaconsole.cpp @@ -69,45 +69,96 @@ namespace { // The number of characters to display after the cursor // when horizontal scrolling is required. const int NVisibleCharsAfterCursor = 5; + + const static openspace::properties::Property::PropertyInfo VisibleInfo = { + "IsVisible", + "Is Visible", + "Determines whether the Lua console is shown on the screen or not. Toggling it " + "will fade the console in and out." + }; + + const static openspace::properties::Property::PropertyInfo RemoveScriptingInfo = { + "RemoteScripting", + "Remote scripting", + "Determines whether the entered commands will only be executed locally (if this " + "is disabled), or whether they will be send to connected remove instances." + }; + + const static openspace::properties::Property::PropertyInfo BackgroundColorInfo = { + "BackgroundColor", + "Background Color", + "Sets the background color of the console." + }; + + const static openspace::properties::Property::PropertyInfo HighlightColorInfo = { + "HighlightColor", + "Highlight Color", + "Sets the color of the lines below the console." + }; + + const static openspace::properties::Property::PropertyInfo SeparatorColorInfo = { + "SeparatorColor", + "Separator Color", + "Sets the color of the separator between the history part and the entry part of " + "the console." + }; + + const static openspace::properties::Property::PropertyInfo EntryTextColorInfo = { + "EntryTextColor", + "Entry Text Color", + "Sets the text color of the entry area of the console." + }; + + const static openspace::properties::Property::PropertyInfo HistoryTextColorInfo = { + "HistoryTextColor", + "History Text Color", + "Sets the text color of the history area of the console." + }; + + const static openspace::properties::Property::PropertyInfo HistoryLengthInfo = { + "HistoryLength", + "History Length", + "Determines the length of the history in number of lines." + }; } // namespace namespace openspace { LuaConsole::LuaConsole() : properties::PropertyOwner("LuaConsole") - , _isVisible({ "IsVisible", "Is Visible", "" }, false) // @TODO Missing documentation - , _remoteScripting({ "RemoteScripting", "Remote scripting", "" }, false) // @TODO Missing documentation + , _isVisible(VisibleInfo, false) + , _remoteScripting(RemoveScriptingInfo, false) , _backgroundColor( - { "BackgroundColor", "Background Color", "" }, // @TODO Missing documentation + BackgroundColorInfo, glm::vec4(21.f / 255.f, 23.f / 255.f, 28.f / 255.f, 0.8f), glm::vec4(0.f), glm::vec4(1.f) ) , _highlightColor( - { "HighlightColor", "Highlight Color", "" }, // @TODO Missing documentation + HighlightColorInfo, glm::vec4(1.f, 1.f, 1.f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _separatorColor( - { "SeparatorColor", "Separator Color", "" }, // @TODO Missing documentation + SeparatorColorInfo, glm::vec4(0.4f, 0.4f, 0.4f, 0.f), glm::vec4(0.f), glm::vec4(1.f) ) , _entryTextColor( - { "EntryTextColor", "Entry Text Color", "" }, // @TODO Missing documentation + EntryTextColorInfo, glm::vec4(1.f, 1.f, 1.f, 1.f), glm::vec4(0.f), glm::vec4(1.f) ) , _historyTextColor( - { "HistoryTextColor", "History Text Color", "" }, // @TODO Missing documentation + HistoryTextColorInfo, glm::vec4(1.0f, 1.0f, 1.0f, 0.65f), glm::vec4(0.f), glm::vec4(1.f) ) - , _historyLength({ "HistoryLength", "History Length", "" }, 13, 0, 100) // @TODO Missing documentation + , _historyLength(HistoryLengthInfo, 13, 0, 100) , _inputPosition(0) , _activeCommand(0) , _autoCompleteInfo({NoAutoComplete, false, ""}) @@ -117,7 +168,6 @@ LuaConsole::LuaConsole() { addProperty(_isVisible); addProperty(_remoteScripting); - addProperty(_historyLength); _backgroundColor.setViewOption(properties::Property::ViewOptions::Color); @@ -219,7 +269,6 @@ void LuaConsole::initialize() { ghoul::fontrendering::Font::Outline::No ); - OsEng.parallelConnection().connectionEvent()->subscribe( "luaConsole", "statusChanged", @@ -576,7 +625,10 @@ void LuaConsole::update() { // Compute the height by simulating _historyFont number of lines and checking // what the bounding box for that text would be. using namespace ghoul::fontrendering; - size_t nLines = std::min(static_cast(_historyLength), _commandsHistory.size()); + const size_t nLines = std::min( + static_cast(_historyLength), + _commandsHistory.size() + ); const auto bbox = FontRenderer::defaultRenderer().boundingBox( *_historyFont, std::string(nLines, '\n').c_str() @@ -601,7 +653,6 @@ void LuaConsole::update() { _currentHeight = std::min(static_cast(res.y), _currentHeight); } - void LuaConsole::render() { using namespace ghoul::fontrendering; @@ -663,16 +714,17 @@ void LuaConsole::render() { // Render the current command std::string currentCommand = _commands.at(_activeCommand); - // We chop off the beginning and end of the string until it fits on the screen (with a margin) - // this should be replaced as soon as the mono-spaced fonts work properly. Right now, - // every third character is a bit wider than the others + // We chop off the beginning and end of the string until it fits on the screen (with + // a margin) this should be replaced as soon as the mono-spaced fonts work properly. + // Right now, every third character is a bit wider than the others size_t nChoppedCharsBeginning = 0, nChoppedCharsEnd = 0; const size_t inputPositionFromEnd = currentCommand.size() - _inputPosition; while (true) { + using namespace ghoul::fontrendering; // Compute the current width of the string and console prefix. - const float currentWidth = ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox( + const float currentWidth = FontRenderer::defaultRenderer().boundingBox( *_font, "> %s", currentCommand.c_str() @@ -690,7 +742,7 @@ void LuaConsole::render() { static_cast(currentCommand.size()) )); - // Do not hide the cursor and `NVisibleCharsAfterCursor` more characters in the end. + // Do not hide the cursor and `NVisibleCharsAfterCursor` characters in the end. const size_t maxAdditionalCharsToChopEnd = std::max( 0, static_cast(inputPositionFromEnd) - @@ -701,11 +753,15 @@ void LuaConsole::render() { // Do not hide the cursor in the beginning. const size_t maxAdditionalCharsToChopBeginning = std::max( 0, - static_cast(_inputPosition) - 1 - static_cast(nChoppedCharsBeginning) + static_cast(_inputPosition) - 1 - + static_cast(nChoppedCharsBeginning) ); // Prioritize chopping in the end of the string. - const size_t nCharsToChopEnd = std::min(nCharsOverflow, maxAdditionalCharsToChopEnd); + const size_t nCharsToChopEnd = std::min( + nCharsOverflow, + maxAdditionalCharsToChopEnd + ); const size_t nCharsToChopBeginning = std::min( nCharsOverflow - nCharsToChopEnd, maxAdditionalCharsToChopBeginning @@ -718,7 +774,10 @@ void LuaConsole::render() { _commands.at(_activeCommand).size() - nChoppedCharsBeginning - nChoppedCharsEnd; - currentCommand = _commands.at(_activeCommand).substr(nChoppedCharsBeginning, displayLength); + currentCommand = _commands.at(_activeCommand).substr( + nChoppedCharsBeginning, + displayLength + ); } RenderFontCr( diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 835d19f1f7..29b722a239 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -46,6 +46,21 @@ namespace { const char* KeyFocus = "Focus"; const char* KeyPosition = "Position"; const char* KeyRotation = "Rotation"; + + static const openspace::properties::Property::PropertyInfo OriginInfo = { + "Origin", + "Origin", + "The name of the scene graph node that is the origin of the camera interaction. " + "The camera is always focussed on this object and every interaction is relative " + "towards this object. Any scene graph node can be the origin node." + }; + + static const openspace::properties::Property::PropertyInfo KeyFrameInfo = { + "UseKeyFrameInteraction", + "Use keyframe interaction", + "If this is set to 'true' the entire interaction is based off key frames rather " + "than using the mouse interaction." + }; } // namespace #include "navigationhandler_lua.inl" @@ -54,8 +69,8 @@ namespace openspace::interaction { NavigationHandler::NavigationHandler() : properties::PropertyOwner("NavigationHandler") - , _origin({ "Origin", "Origin", "" }) // @TODO Missing documentation - , _useKeyFrameInteraction({ "UseKeyFrameInteraction", "Use keyframe interaction", "" }, false) // @TODO Missing documentation + , _origin(OriginInfo) + , _useKeyFrameInteraction(KeyFrameInfo, false) { _origin.onChange([this]() { SceneGraphNode* node = sceneGraphNode(_origin.value()); @@ -77,15 +92,20 @@ NavigationHandler::NavigationHandler() addPropertySubOwner(*_orbitalNavigator); } -NavigationHandler::~NavigationHandler() -{ } +NavigationHandler::~NavigationHandler() {} void NavigationHandler::initialize() { - OsEng.parallelConnection().connectionEvent()->subscribe("NavigationHandler", "statusChanged", [this]() { - if (OsEng.parallelConnection().status() == ParallelConnection::Status::ClientWithHost) { - _useKeyFrameInteraction = true; + OsEng.parallelConnection().connectionEvent()->subscribe( + "NavigationHandler", + "statusChanged", + [this]() { + if (OsEng.parallelConnection().status() == + ParallelConnection::Status::ClientWithHost) + { + _useKeyFrameInteraction = true; + } } - }); + ); } void NavigationHandler::deinitialize() { diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index ca9ccb32d0..008c4c0a47 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -35,15 +35,54 @@ namespace { const char* _loggerCat = "OrbitalNavigator"; + + static const openspace::properties::Property::PropertyInfo RollFrictionInfo = { + "RollFriction", + "Roll Friction", + "If this is enabled, a small friction is applied to the rolling part of the " + "camera motion, thus slowing it down within a small time period. If this value " + "is disabled, the camera will roll forever." + }; + + static const openspace::properties::Property::PropertyInfo RotationalFrictionInfo = { + "RotationalFriction", + "Rotational Friction", + "If this is enabled, a small friction is applied to the rotational part of the " + "camera motion, thus slowing it down within a small time period. If this value " + "is disabled, the camera will rotate forever." + }; + + static const openspace::properties::Property::PropertyInfo ZoomFrictionInfo = { + "ZoomFriction", + "Zoom Friction", + "If this is enabled, a small friction is applied to the zoom part of the camera " + "motion, thus slowing it down within a small time period. If this value is " + "disabled, the camera will zoom in or out forever." + }; + + static const openspace::properties::Property::PropertyInfo SensitivityInfo = { + "Sensitivity", + "Sensitivity", + "Determines the sensitivity of the camera motion. The lower the sensitivity is " + "the less impact a mouse mothion will have." + }; + + static const openspace::properties::Property::PropertyInfo FrictionInfo = { + "Friction", + "Friction Factor", + "Determines the factor that is applied if the 'Roll Friction', 'Rotational " + "Friction', and 'Zoom Friction' values are enabled. The lower this value is, the " + "faster the camera movements will stop." + }; } // namespace namespace openspace::interaction { OrbitalNavigator::OrbitalNavigator() : properties::PropertyOwner("OrbitalNavigator") - , _rotationalFriction({ "RotationalFriction", "Rotational friction", "" }, true) // @TODO Missing documentation - , _horizontalFriction({ "HorizontalFriction", "Horizontal friction", "" }, true) // @TODO Missing documentation - , _verticalFriction({ "VerticalFriction", "Vertical friction", "" }, true) // @TODO Missing documentation + , _rollFriction(RollFrictionInfo, true) + , _rotationalFriction(RotationalFrictionInfo, true) + , _zoomFriction(ZoomFrictionInfo, true) , _followFocusNodeRotationDistance( { "FollowFocusNodeRotationDistance", "Follow focus node rotation distance", "" }, // @TODO Missing documentation 2.0f, 0.0f, 10.f @@ -51,8 +90,8 @@ OrbitalNavigator::OrbitalNavigator() , _minimumAllowedDistance( {"MinimumAllowedDistance", "Minimum allowed distance", "" }, // @TODO Missing documentation 10.0f, 0.0f, 10000.f) - , _sensitivity({ "Sensitivity", "Sensitivity", "" }, 20.0f, 1.0f, 50.f) // @TODO Missing documentation - , _motionLag({ "MotionLag", "Motion lag", "" }, 0.5f, 0.f, 1.f) // @TODO Missing documentation + , _sensitivity(SensitivityInfo, 20.0f, 1.0f, 50.f) + , _motionLag(FrictionInfo, 0.5f, 0.f, 1.f) , _mouseStates(_sensitivity * pow(10.0,-4), 1 / (_motionLag + 0.0000001)) { auto smoothStep = @@ -84,14 +123,14 @@ OrbitalNavigator::OrbitalNavigator() _rotateToFocusNodeInterpolator.setTransferFunction(smoothStepDerivedTranferFunction); // Define callback functions for changed properties + _rollFriction.onChange([&]() { + _mouseStates.setRotationalFriction(_rollFriction); + }); _rotationalFriction.onChange([&]() { - _mouseStates.setRotationalFriction(_rotationalFriction); + _mouseStates.setHorizontalFriction(_rotationalFriction); }); - _horizontalFriction.onChange([&]() { - _mouseStates.setHorizontalFriction(_horizontalFriction); - }); - _verticalFriction.onChange([&]() { - _mouseStates.setVerticalFriction(_verticalFriction); + _zoomFriction.onChange([&]() { + _mouseStates.setVerticalFriction(_zoomFriction); }); _sensitivity.onChange([&]() { _mouseStates.setSensitivity(_sensitivity * pow(10.0,-4)); @@ -101,9 +140,9 @@ OrbitalNavigator::OrbitalNavigator() }); // Add the properties + addProperty(_rollFriction); addProperty(_rotationalFriction); - addProperty(_horizontalFriction); - addProperty(_verticalFriction); + addProperty(_zoomFriction); addProperty(_followFocusNodeRotationDistance); addProperty(_minimumAllowedDistance); addProperty(_sensitivity); diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 45ac3c0f9c..aa12b3ddfb 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -81,17 +81,51 @@ namespace { const uint32_t ProtocolVersion = 2; const size_t MaxLatencyDiffs = 64; const char* _loggerCat = "ParallelConnection"; + + static const openspace::properties::Property::PropertyInfo PasswordInfo = { + "Password", + "Password", + "The general password that allows this OpenSpace instance access to the Wormhole " + "server." + }; + + static const openspace::properties::Property::PropertyInfo HostPasswordInfo = { + "HostPassword", + "Host Password", + "The password that is required to take control of the joint session and thus " + "send all commands to connected clients." + }; + + static const openspace::properties::Property::PropertyInfo PortInfo = { + "Port", + "Port", + "The port on which the Wormhole server is listening to connections from " + "OpenSpace." + }; + + static const openspace::properties::Property::PropertyInfo AddressInfo = { + "Address", + "Address", + "The address of the Wormhole server either as a DNS name or an IP address." + }; + + static const openspace::properties::Property::PropertyInfo NameInfo = { + "Name", + "Connection Name", + "The name of this OpenSpace instance that will be potentially broadcast to other " + "connected instances." + }; } // namespace namespace openspace { ParallelConnection::ParallelConnection() : properties::PropertyOwner("ParallelConnection") - , _password({ "Password", "Password", "" }) // @TODO Missing documentation - , _hostPassword({ "HostPassword", "Host Password", "" }) // @TODO Missing documentation - , _port({ "Port", "Port", "" }, "20501") // @TODO Missing documentation - , _address({ "Address", "Address", "" }, "localhost") // @TODO Missing documentation - , _name({ "Name", "Connection name", "" }, "Anonymous") // @TODO Missing documentation + , _password(PasswordInfo) + , _hostPassword(HostPasswordInfo) + , _port(PortInfo, "20501") + , _address(AddressInfo, "localhost") + , _name(NameInfo, "Anonymous") , _bufferTime({ "BufferTime", "Buffer Time", "" }, 1, 0.5, 10) // @TODO Missing documentation , _timeKeyframeInterval( { "TimeKeyframeInterval", "Time keyframe interval", ""}, // @TODO Missing documentation diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index dd2c012c99..75c3a27bc9 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -42,6 +42,12 @@ namespace { const char* keyEnd = "EndTime"; const char* KeyType = "Type"; const char* KeyTag = "Tag"; + + static const openspace::properties::Property::PropertyInfo EnabledInfo = { + "Enabled", + "Is Enabled", + "This setting determines whether this object will be visible or not." + }; } // namespace namespace openspace { @@ -91,18 +97,18 @@ std::unique_ptr Renderable::createFromDictionary( return result; } -Renderable::Renderable() - : properties::PropertyOwner("renderable") - , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation - , _renderBin(RenderBin::Opaque) - , _startTime("") - , _endTime("") - , _hasTimeInterval(false) -{} +//Renderable::Renderable() +// : properties::PropertyOwner("renderable") +// , _enabled(EnabledInfo, true) +// , _renderBin(RenderBin::Opaque) +// , _startTime("") +// , _endTime("") +// , _hasTimeInterval(false) +//{} Renderable::Renderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("renderable") - , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation + , _enabled(EnabledInfo, true) , _renderBin(RenderBin::Opaque) , _startTime("") , _endTime("") From 20e944f86fb163aef9ae711d0c914f4ff4b99c65 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 24 Jul 2017 17:22:19 -0400 Subject: [PATCH 06/20] Added documentation to more classes --- modules/base/rendering/renderablemodel.cpp | 56 +++---- modules/base/rendering/renderablemodel.h | 2 - modules/base/rendering/renderableplane.cpp | 94 ++++++++--- modules/base/rendering/renderableplane.h | 9 +- modules/base/rendering/renderablesphere.cpp | 108 ++++++++---- modules/base/rendering/renderabletrail.cpp | 132 +++++++++------ .../base/rendering/renderabletrailorbit.cpp | 50 +++--- .../rendering/renderabletrailtrajectory.cpp | 114 +++++++------ .../base/rendering/screenspaceframebuffer.cpp | 53 +++--- modules/base/rendering/screenspaceimage.cpp | 11 +- modules/base/rotation/staticrotation.cpp | 24 ++- modules/base/scale/staticscale.cpp | 17 +- .../base/translation/statictranslation.cpp | 22 ++- .../rendering/renderabledebugplane.cpp | 154 +++++++++++++----- .../rendering/renderabledebugplane.h | 13 +- src/rendering/renderengine.cpp | 120 ++++++++++++-- src/rendering/screenspacerenderable.cpp | 96 ++++++++--- 17 files changed, 723 insertions(+), 352 deletions(-) diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 5c6596c93e..374ae7587b 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -46,11 +46,20 @@ namespace { const char* KeyGeometry = "Geometry"; const char* KeyTexture = "Textures.Color"; const char* KeyModelTransform = "Rotation.ModelTransform"; - const char* KeyFading = "Shading.Fadeable"; - const char* keyBody = "Body"; - const char* keyStart = "StartTime"; - const char* keyEnd = "EndTime"; + static const openspace::properties::Property::PropertyInfo TextureInfo = { + "ColorTexture", // @TODO replace with only "Texture" + "Color Texture", + "This value points to a color texture file that is applied to the geometry " + "rendered in this object." + }; + + static const openspace::properties::Property::PropertyInfo ShadingInfo = { + "PerformShading", + "Perform Shading", + "This value determines whether this model should be shaded by using the position " + "of the Sun." + }; } // namespace namespace openspace { @@ -68,10 +77,15 @@ documentation::Documentation RenderableModel::Documentation() { Optional::No }, { - KeyTexture, + KeyTexture, // @TODO replace with TextureInfo.identifier new StringVerifier, - "A color texture that can be applied to the model specified by the " - "Geometry.", + TextureInfo.description, + Optional::Yes + }, + { + ShadingInfo.identifier, + new BoolVerifier, + ShadingInfo.description, Optional::Yes }, { @@ -80,13 +94,6 @@ documentation::Documentation RenderableModel::Documentation() { "Specifies a distinct transformation matrix that is applied to the " "model. If it is not specified, it is equal to the Identity matrix.", Optional::Yes - }, - { - KeyFading, - new BoolVerifier, - "Specifies whether the model should be periodically fading in and out. " - "If this value is not specified, it will not fade.", - Optional::Yes } } }; @@ -95,10 +102,8 @@ documentation::Documentation RenderableModel::Documentation() { RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _geometry(nullptr) - , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _performFade({ "PerformFading", "Perform Fading", "" }, false) // @TODO Missing documentation - , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation - , _fading({ "Fading", "Fade", "" }, 0) // @TODO Missing documentation + , _colorTexturePath(TextureInfo) + , _performShading(ShadingInfo, true) , _programObject(nullptr) , _texture(nullptr) , _modelTransform(1.0) @@ -129,8 +134,8 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _modelTransform = dictionary.value(KeyModelTransform); } - if (dictionary.hasKey(KeyFading)) { - _performFade = dictionary.value(KeyFading); + if (dictionary.hasKey(ShadingInfo.identifier)) { + _performShading = dictionary.value(ShadingInfo.identifier); } addPropertySubOwner(_geometry.get()); @@ -139,7 +144,6 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _colorTexturePath.onChange(std::bind(&RenderableModel::loadTexture, this)); addProperty(_performShading); - addProperty(_performFade); } bool RenderableModel::isReady() const { @@ -179,14 +183,6 @@ bool RenderableModel::deinitialize() { void RenderableModel::render(const RenderData& data, RendererTasks&) { _programObject->activate(); - // Fading - if (_performFade && _fading > 0.f) { - _fading = _fading - 0.01f; - } - else if (!_performFade && _fading < 1.f) { - _fading = _fading + 0.01f; - } - // Model transform and view transform needs to be in double precision glm::dmat4 modelTransform = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * // Translation @@ -201,7 +197,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { _programObject->setUniform("modelViewTransform", glm::mat4(modelViewTransform)); _programObject->setUniform("projectionTransform", data.camera.projectionMatrix()); _programObject->setUniform("performShading", _performShading); - _programObject->setUniform("fading", _fading); + _programObject->setUniform("fading", 1.f); // @TODO remove this _geometry->setUniforms(*_programObject); diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index fadd85bde6..1fc9ec5c51 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -68,9 +68,7 @@ private: std::unique_ptr _geometry; properties::StringProperty _colorTexturePath; - properties::BoolProperty _performFade; properties::BoolProperty _performShading; - properties::FloatProperty _fading; std::unique_ptr _programObject; std::unique_ptr _texture; diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 75fb5cc5af..efb44c9743 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -38,10 +38,39 @@ #include namespace { - const char* KeySize = "Size"; - const char* KeyBillboard = "Billboard"; const char* KeyBlendMode = "BlendMode"; - const char* KeyTexture = "Texture"; + + enum BlendMode { + BlendModeNormal = 0, + BlendModeAdditive + }; + + static const openspace::properties::Property::PropertyInfo TextureInfo = { + "Texture", + "Texture", + "This value specifies an image that is loaded from disk and is used as a texture " + "that is applied to this plane. This image has to be square." + }; + + static const openspace::properties::Property::PropertyInfo BillboardInfo = { + "Billboard", + "Billboard mode", + "This value specifies whether the plane is a billboard, which means that it is " + "always facing the camera. If this is false, it can be oriented using other " + "transformations." + }; + + static const openspace::properties::Property::PropertyInfo SizeInfo = { + "Size", + "Size (in meters)", + "This value specifies the size of the plane in meters." + }; + + static const openspace::properties::Property::PropertyInfo BlendModeInfo = { + "BlendMode", + "Blending Mode", + "This determines the blending mode that is applied to this plane." + }; } // namespace namespace openspace { @@ -53,31 +82,27 @@ documentation::Documentation RenderablePlane::Documentation() { "base_renderable_plane", { { - KeySize, + SizeInfo.identifier, new DoubleVerifier, - "Specifies the size of the square plane in meters.", + SizeInfo.description, Optional::No }, { - KeyBillboard, + BillboardInfo.identifier, new BoolVerifier, - "Specifies whether the plane is a billboard, which means that it is " - "always facing the camera. If this is false, it can be oriented using " - "other transformations. The default is 'false'.", + BillboardInfo.description, Optional::Yes }, { - KeyBlendMode, + BlendModeInfo.identifier, new StringInListVerifier({ "Normal", "Additive" }), - "Specifies the blend mode that is applied to this plane. The default " - "value is 'Normal'.", + BlendModeInfo.description, // + " The default value is 'Normal'.", Optional::Yes }, { - KeyTexture, + TextureInfo.identifier, new StringVerifier, - "Specifies the texture that is applied to this plane. This image has to " - "be a square image.", + TextureInfo.description, Optional::No } } @@ -87,12 +112,13 @@ documentation::Documentation RenderablePlane::Documentation() { RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation - , _billboard({ "Billboard", "Billboard", "" }, false) // @TODO Missing documentation - , _size({ "Size", "Size", "" }, 10, 0, std::pow(10, 25)) // @TODO Missing documentation + , _texturePath(TextureInfo) + , _billboard(BillboardInfo, false) + , _size(SizeInfo, 10.f, 0.f, 1e25) + , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _shader(nullptr) , _texture(nullptr) - , _blendMode(BlendMode::Normal) + //, _blendMode(BlendMode::Normal) , _quad(0) , _vertexPositionBuffer(0) , _planeIsDirty(false) @@ -104,23 +130,39 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) "RenderablePlane" ); - _size = static_cast(dictionary.value(KeySize)); + _size = static_cast(dictionary.value(SizeInfo.identifier)); - if (dictionary.hasKey(KeyBillboard)) { - _billboard = dictionary.value(KeyBillboard); + if (dictionary.hasKey(BillboardInfo.identifier)) { + _billboard = dictionary.value(BillboardInfo.identifier); } + _blendMode.addOptions({ + { BlendModeNormal, "Normal" }, + { BlendModeAdditive, "Additive"} + }); + _blendMode.onChange([&]() { + switch (_blendMode) { + case BlendModeNormal: + setRenderBin(Renderable::RenderBin::Opaque); + break; + case BlendModeAdditive: + setRenderBin(Renderable::RenderBin::Transparent); + break; + default: + throw ghoul::MissingCaseException(); + } + }); + if (dictionary.hasKey(KeyBlendMode)) { const std::string v = dictionary.value(KeyBlendMode); if (v == "Normal") { - _blendMode = BlendMode::Normal; + _blendMode = BlendModeNormal; } else if (v == "Additive") { - _blendMode = BlendMode::Additive; - setRenderBin(Renderable::RenderBin::Transparent); + _blendMode = BlendModeAdditive; } } - _texturePath = absPath(dictionary.value(KeyTexture)); + _texturePath = absPath(dictionary.value(TextureInfo.identifier)); _textureFile = std::make_unique(_texturePath); addProperty(_billboard); diff --git a/modules/base/rendering/renderableplane.h b/modules/base/rendering/renderableplane.h index 4b49246dbe..143a004cae 100644 --- a/modules/base/rendering/renderableplane.h +++ b/modules/base/rendering/renderableplane.h @@ -27,6 +27,7 @@ #include +#include #include #include #include @@ -64,24 +65,18 @@ public: static documentation::Documentation Documentation(); private: - enum class BlendMode : int { - Normal = 0, - Additive - }; - void loadTexture(); void createPlane(); properties::StringProperty _texturePath; properties::BoolProperty _billboard; properties::FloatProperty _size; + properties::OptionProperty _blendMode; std::unique_ptr _shader; std::unique_ptr _texture; std::unique_ptr _textureFile; - BlendMode _blendMode; - GLuint _quad; GLuint _vertexPositionBuffer; diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 03e8715aec..30d2b03de5 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -41,15 +41,44 @@ #include namespace { - const char* KeySize = "Size"; - const char* KeySegments = "Segments"; - const char* KeyTexture = "Texture"; - const char* KeyOrientation = "Orientation"; - enum Orientation { Outside = 1, Inside = 2 }; + + static const openspace::properties::Property::PropertyInfo TextureInfo = { + "Texture", + "Texture", + "This value specifies an image that is loaded from disk and is used as a texture " + "that is applied to this sphere. This image is expected to be an equirectangular " + "projection." + }; + + static const openspace::properties::Property::PropertyInfo OrientationInfo = { + "Orientation", + "Orientation", + "Specifies whether the texture is applied to the inside of the sphere, the " + "outside of the sphere, or both." + }; + + static const openspace::properties::Property::PropertyInfo SegmentsInfo = { + "Segments", + "Number of Segments", + "This value specifies the number of segments that the sphere is separated in." + }; + + static const openspace::properties::Property::PropertyInfo SizeInfo = { + "Size", + "Size (in meters)", + "This value specifies the radius of the sphere in meters." + }; + + static const openspace::properties::Property::PropertyInfo TransparencyInfo = { + "Alpha", + "Transparency", + "This value determines the transparency of the sphere. If this value is set to " + "1, the sphere is completely opaque. At 0, the sphere is completely transparent." + }; } // namespace namespace openspace { @@ -61,28 +90,33 @@ documentation::Documentation RenderableSphere::Documentation() { "base_renderable_sphere", { { - KeySize, + SizeInfo.identifier, new DoubleVerifier, - "Specifies the radius of the sphere in meters.", + SizeInfo.description, Optional::No }, { - KeySegments, + SegmentsInfo.identifier, new IntVerifier, - "Specifies the number of segments the sphere is separated in.", + SegmentsInfo.description, Optional::No }, { - KeyTexture, + TextureInfo.identifier, new StringVerifier, - "Specifies the texture that is applied to the sphere.", + TextureInfo.description, Optional::No }, { - KeyOrientation, + OrientationInfo.identifier, new StringInListVerifier({ "Inside", "Outside", "Inside/Outside" }), - "Specifies whether the texture is applied to the inside of the sphere, " - "the outside of the sphere, or both. The default value is 'Outside'.", + OrientationInfo.description, + Optional::Yes + }, + { + TransparencyInfo.identifier, + new DoubleInRangeVerifier(0.0, 1.0), + TransparencyInfo.description, Optional::Yes } } @@ -92,11 +126,11 @@ documentation::Documentation RenderableSphere::Documentation() { RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation - , _orientation({ "Orientation", "Orientation", "" }) // @TODO Missing documentation - , _size({ "Size", "Size", "" }, 1.f, 0.f, std::pow(10.f, 45)) // @TODO Missing documentation - , _segments({ "Segments", "Segments", "" }, 8, 4, 100) // @TODO Missing documentation - , _transparency({ "Transparency", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath(TextureInfo) + , _orientation(OrientationInfo, properties::OptionProperty::DisplayType::Dropdown) + , _size(SizeInfo, 1.f, 0.f, 1e35) + , _segments(SegmentsInfo, 8, 4, 1000) + , _transparency(TransparencyInfo, 1.f, 0.f, 1.f) , _shader(nullptr) , _texture(nullptr) , _sphere(nullptr) @@ -108,16 +142,18 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) "RenderableSphere" ); - _size = static_cast(dictionary.value(KeySize)); - _segments = static_cast(dictionary.value(KeySegments)); - _texturePath = absPath(dictionary.value(KeyTexture)); + _size = static_cast(dictionary.value(SizeInfo.identifier)); + _segments = static_cast(dictionary.value(SegmentsInfo.identifier)); + _texturePath = absPath(dictionary.value(TextureInfo.identifier)); - _orientation.addOption(Outside, "Outside"); - _orientation.addOption(Inside, "Inside"); - _orientation.addOption(Outside | Inside, "Inside/Outside"); + _orientation.addOptions({ + { Outside, "Outside" }, + { Inside, "Inside" }, + { Outside | Inside, "Inside/Outside" } + }); - if (dictionary.hasKey(KeyOrientation)) { - const std::string v = dictionary.value(KeyOrientation); + if (dictionary.hasKey(OrientationInfo.identifier)) { + const std::string v = dictionary.value(OrientationInfo.identifier); if (v == "Inside") { _orientation = Inside; } @@ -128,7 +164,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) _orientation = Outside | Inside; } else { - ghoul_assert(false, "Missing 'case' label"); + throw ghoul::MissingCaseException(); } } else { @@ -142,12 +178,22 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) addProperty(_segments); _segments.onChange([this](){ _sphereIsDirty = true; }); + _transparency.onChange([this](){ + if (_transparency > 0.f && _transparency < 1.f) { + setRenderBin(Renderable::RenderBin::Transparent); + } + else { + setRenderBin(Renderable::RenderBin::Opaque); + } + }); + if (dictionary.hasKey(TransparencyInfo.identifier)) { + _transparency = dictionary.value(TransparencyInfo.identifier); + } addProperty(_transparency); + addProperty(_texturePath); - _texturePath.onChange([this]() {loadTexture(); }); + _texturePath.onChange([this]() { loadTexture(); }); - - setRenderBin(Renderable::RenderBin::Transparent); } bool RenderableSphere::isReady() const { diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index e92b515d5a..898346c226 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -35,12 +35,6 @@ namespace { const char* KeyTranslation = "Translation"; - const char* KeyColor = "Color"; - const char* KeyEnableFade = "EnableFade"; - const char* KeyFade = "Fade"; - const char* KeyLineWidth = "LineWidth"; - const char* KeyPointSize = "PointSize"; - const char* KeyRendering = "Rendering"; // The possible values for the _renderingModes property enum RenderingMode { @@ -56,6 +50,54 @@ namespace { { "Lines+Points", RenderingModeLinesPoints }, { "Points+Lines", RenderingModeLinesPoints } }; + + static const openspace::properties::Property::PropertyInfo LineColorInfo = { + "Color", + "Color", + "This value determines the RGB main color for the lines and points of the trail." + }; + + static const openspace::properties::Property::PropertyInfo EnableFadeInfo = { + "EnableFade", + "Enable line fading of old points", + "Toggles whether the trail should fade older points out. If this value is " + "'true', the 'Fade' parameter determines the speed of fading. If this value is " + "'false', the entire trail is rendered at full opacity and color." + }; + + static const openspace::properties::Property::PropertyInfo FadeInfo = { + "Fade", + "Line fade", + "The fading factor that is applied to the trail if the 'EnableFade' value is " + "'true'. If it is 'false', this setting has no effect. The higher the number, " + "the less fading is applied." + }; + + static const openspace::properties::Property::PropertyInfo LineWidthInfo = { + "LineWidth", + "Line Width", + "This value specifies the line width of the trail if the selected rendering " + "method includes lines. If the rendering mode is set to Points, this value is " + "ignored." + }; + + static const openspace::properties::Property::PropertyInfo PointSizeInfo = { + "PointSize", + "Point Size", + "This value specifies the base size of the points along the line if the selected " + "rendering method includes points. If the rendering mode is set the Lines, this " + "value is ignored. If a subsampling of the values is performed, the subsampled " + "values are half this size." + }; + + static const openspace::properties::Property::PropertyInfo RenderingModeInfo = { + "Rendering", + "Rendering Mode", + "Determines how the trail should be rendered to the screen.If 'Lines' is " + "selected, only the line part is visible, if 'Points' is selected, only the " + "corresponding points (and subpoints) are shown. 'Lines+Points' shows both parts." + }; + } // namespace namespace openspace { @@ -74,56 +116,42 @@ documentation::Documentation RenderableTrail::Documentation() { Optional::No }, { - KeyColor, + LineColorInfo.identifier, new DoubleVector3Verifier, - "The main color the for lines and points on this trail. The value is " - "interpreted as an RGB value.", + LineColorInfo.description, Optional::No }, { - KeyEnableFade, + EnableFadeInfo.identifier, new BoolVerifier, - "Toggles whether the trail should fade older points out. If this value " - "is 'true', the 'Fade' parameter determines the speed of fading. If this " - "value is 'false', the entire trail is rendered at full opacity and " - "color. The default value is 'true'.", + EnableFadeInfo.description, Optional::Yes }, { - KeyFade, + FadeInfo.identifier, new DoubleVerifier, - "The fading factor that is applied to the trail if the 'EnableFade' " - "value is 'true'. If it is 'false', this setting has no effect. The " - "higher the number, the less fading is applied. This value defaults to " - "1.0.", + FadeInfo.description, Optional::Yes }, { - KeyLineWidth, + LineWidthInfo.identifier, new DoubleVerifier, - "This value specifies the line width of the trail if this rendering " - "method is selected. It defaults to 2.0.", + LineWidthInfo.description, Optional::Yes }, { - KeyPointSize, + PointSizeInfo.identifier, new DoubleVerifier, - "This value specifies the base size of the points along the line if this " - "rendering method is selected. If a subsampling of the values is " - "performed, the subsampled values are half this size. The default value " - "is 1.0.", + PointSizeInfo.description, Optional::Yes }, { - KeyRendering, + RenderingModeInfo.identifier, new StringInListVerifier( // Taken from the RenderingModeConversion map above - { "Lines", "Points", "Lines+Points", "Points + Lines" } + { "Lines", "Points", "Lines+Points", "Points+Lines" } ), - "Determines how the trail should be rendered to the screen. If 'Lines' " - "is selected, only the line part is visible, if 'Points' is selected, " - "only the corresponding points (and subpoints) are shown. " - "Lines+Points' shows both parts. On default, only the lines are rendered", + RenderingModeInfo.description, Optional::Yes } }, @@ -133,14 +161,12 @@ documentation::Documentation RenderableTrail::Documentation() { RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineColor({ "LineColor", "Color", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) // @TODO Missing documentation - , _useLineFade({ "UseLineFade", "Use Line Fade", "" }, true) // @TODO Missing documentation - , _lineFade({ "LineFade", "Line Fade", "" }, 1.f, 0.f, 20.f) // @TODO Missing documentation - , _lineWidth({ "LineWidth", "Line Width", "" }, 2.f, 1.f, 20.f) // @TODO Missing documentation - , _pointSize({ "PointSize", "Point Size", "" }, 1, 1, 64) // @TODO Missing documentation - , _renderingModes( - { "RenderingMode", "Rendering Mode", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown + , _lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f)) + , _useLineFade(EnableFadeInfo, true) + , _lineFade(FadeInfo, 1.f, 0.f, 30.f) + , _lineWidth(LineWidthInfo, 2.f, 1.f, 20.f) + , _pointSize(PointSizeInfo, 1, 1, 64) + , _renderingModes(RenderingModeInfo, properties::OptionProperty::DisplayType::Dropdown ) { _translation = std::unique_ptr(Translation::createFromDictionary( @@ -148,26 +174,28 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) )); addPropertySubOwner(_translation.get()); - _lineColor = dictionary.value(KeyColor); + _lineColor = dictionary.value(LineColorInfo.identifier); addProperty(_lineColor); - if (dictionary.hasKeyAndValue(KeyEnableFade)) { - _useLineFade = dictionary.value(KeyEnableFade); + if (dictionary.hasKeyAndValue(EnableFadeInfo.identifier)) { + _useLineFade = dictionary.value(EnableFadeInfo.identifier); } addProperty(_useLineFade); - if (dictionary.hasKeyAndValue(KeyFade)) { - _lineFade = static_cast(dictionary.value(KeyFade)); + if (dictionary.hasKeyAndValue(FadeInfo.identifier)) { + _lineFade = static_cast(dictionary.value(FadeInfo.identifier)); } addProperty(_lineFade); - if (dictionary.hasKeyAndValue(KeyLineWidth)) { - _lineWidth = static_cast(dictionary.value(KeyLineWidth)); + if (dictionary.hasKeyAndValue(LineWidthInfo.identifier)) { + _lineWidth = static_cast(dictionary.value( + LineWidthInfo.identifier + )); } addProperty(_lineWidth); - if (dictionary.hasKeyAndValue(KeyPointSize)) { - _pointSize = static_cast(dictionary.value(KeyPointSize)); + if (dictionary.hasKeyAndValue(PointSizeInfo.identifier)) { + _pointSize = static_cast(dictionary.value(PointSizeInfo.identifier)); } addProperty(_pointSize); @@ -179,9 +207,9 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) // This map is not accessed out of order as long as the Documentation is adapted // whenever the map changes. The documentation will check for valid values - if (dictionary.hasKeyAndValue(KeyRendering)) { + if (dictionary.hasKeyAndValue(RenderingModeInfo.identifier)) { _renderingModes = RenderingModeConversion.at( - dictionary.value(KeyRendering) + dictionary.value(RenderingModeInfo.identifier) ); } else { diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index 35ee4bdb32..106e0ec8b2 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -81,8 +81,24 @@ // items in memory as was shown to be much slower than the current system. ---abock namespace { - const char* KeyPeriod = "Period"; - const char* KeyResolution = "Resolution"; + static const openspace::properties::Property::PropertyInfo PeriodInfo = { + "Period", + "Period (in days)", + "The objects period, i.e. the length of its orbit around the parent object given " + "in (Earth) days. In the case of Earth, this would be a sidereal year " + "(=365.242 days). If this values is specified as multiples of the period, it is " + "possible to show the effects of precession." + }; + + static const openspace::properties::Property::PropertyInfo ResolutionInfo = { + "Resolution", + "Number of samples along the orbit", + "The number of samples along the orbit. This determines the resolution of the " + "trail; the tradeoff being that a higher resolution is able to resolve more " + "detail, but will take more resources while rendering, too. The higher, the " + "smoother the trail, but also more memory will be used." + }; + } // namespace namespace openspace { @@ -94,27 +110,15 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { "base_renderable_renderabletrailorbit", { { - "Type", - new StringEqualVerifier("RenderableTrailOrbit"), - "", - Optional::No - }, - { - KeyPeriod, + PeriodInfo.identifier, new DoubleVerifier, - "The objects period, i.e. the length of its orbit around the parent " - "object given in (Earth) days. In the case of Earth, this would be a " - "sidereal year (=365.242 days). If this values is specified as multiples " - "of the period, it is possible to show the effects of precession.", + PeriodInfo.description, Optional::No }, { - KeyResolution, + ResolutionInfo.identifier, new IntVerifier, - "The number of samples along the orbit. This determines the resolution " - "of the trail; the tradeoff being that a higher resolution is able to " - "resolve more detail, but will take more resources while rendering, too. " - "The higher, the smoother the trail, but also more memory will be used.", + ResolutionInfo.description, Optional::No } } @@ -134,8 +138,8 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _period({ "Period", "Period in days", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation - , _resolution({ "Resolution", "Number of Samples along Orbit", "" }, 10000, 1, 1000000) // @TODO Missing documentation + , _period(PeriodInfo, 0.0, 0.0, 1e9) + , _resolution(ResolutionInfo, 1e4, 1, 1e6) , _needsFullSweep(true) , _indexBufferDirty(true) , _previousTime(0) @@ -152,12 +156,12 @@ RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) // Period is in days using namespace std::chrono; - long long factor = duration_cast(hours(24)).count(); - _period = dictionary.value(KeyPeriod) * factor; + const long long sph = duration_cast(hours(24)).count(); + _period = dictionary.value(PeriodInfo.identifier) * sph; _period.onChange([&] { _needsFullSweep = true; _indexBufferDirty = true; }); addProperty(_period); - _resolution = static_cast(dictionary.value(KeyResolution)); + _resolution = static_cast(dictionary.value(ResolutionInfo.identifier)); _resolution.onChange([&] { _needsFullSweep = true; _indexBufferDirty = true; }); addProperty(_resolution); diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index 5c18e1ed01..f82af3ab75 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -44,11 +44,45 @@ namespace { const char* KeyTranslation = "Translation"; - const char* KeyStartTime = "StartTime"; - const char* KeyEndTime = "EndTime"; - const char* KeySampleInterval = "SampleInterval"; - const char* KeyTimeStampSubsample = "TimeStampSubsampleFactor"; - const char* KeyShowFullTrail = "ShowFullTrail"; + + static const openspace::properties::Property::PropertyInfo StartTimeInfo = { + "StartTime", + "Start Time", + "The start time for the range of this trajectory. The date must be in ISO 8601 " + "format: YYYY MM DD HH:mm:ss.xxx." + }; + + static const openspace::properties::Property::PropertyInfo EndTimeInfo = { + "EndTime", + "End Time", + "The end time for the range of this trajectory. The date must be in ISO 8601 " + "format: YYYY MM DD HH:mm:ss.xxx." + }; + + static const openspace::properties::Property::PropertyInfo SampleIntervalInfo = { + "SampleInterval", + "Sample Interval", + "The interval between samples of the trajectory. This value (together with " + "'TimeStampSubsampleFactor') determines how far apart (in time) the samples are " + "spaced along the trajectory. The time interval between 'StartTime' and " + "'EndTime' is split into 'SampleInterval' * 'TimeStampSubsampleFactor' segments." + }; + + static const openspace::properties::Property::PropertyInfo TimeSubSampleInfo = { + "TimeStampSubsampleFactor", + "Time Stamp Subsampling Factor", + "The factor that is used to create subsamples along the trajectory. This value " + "(together with 'SampleInterval') determines how far apart (in time) the samples " + "are spaced along the trajectory. The time interval between 'StartTime' and " + "'EndTime' is split into 'SampleInterval' * 'TimeStampSubsampleFactor' segments." + }; + + static const openspace::properties::Property::PropertyInfo RenderFullPathInfo = { + "ShowFullTrail", + "Render Full Trail", + "If this value is set to 'true', the entire trail will be rendered; if it is " + "'false', only the trail until the current time in the application will be shown." + }; } // namespace namespace openspace { @@ -61,56 +95,39 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { "base_renderable_renderabletrailtrajectory", { { - "Type", - new StringEqualVerifier("RenderableTrailTrajectory"), - "", + StartTimeInfo.identifier, + new StringAnnotationVerifier("A valid date in ISO 8601 format"), + StartTimeInfo.description, Optional::No }, { - KeyStartTime, - new StringAnnotationVerifier("A valid date"), - "The start time for the range of this trajectory. The date must be in " - "ISO 8601 format: YYYY MM DD HH:mm:ss.xxx", + EndTimeInfo.identifier, + new StringAnnotationVerifier("A valid date in ISO 8601 format"), + EndTimeInfo.description, Optional::No }, { - KeyEndTime, - new StringAnnotationVerifier("A valid date"), - "The end time for the range of this trajectory. The date must be in " - "ISO 8601 format: YYYY MM DD HH:mm:ss.xxx", - Optional::No - }, - { - KeySampleInterval, + SampleIntervalInfo.identifier, new DoubleVerifier, - "The interval between samples of the trajectory. This value (together " - "with 'TimeStampSubsampleFactor') determines how far apart (in time) the " - "samples are spaced along the trajectory. The time interval between " - "'StartTime' and 'EndTime' is split into 'SampleInterval' * " - "'TimeStampSubsampleFactor' segments.", + SampleIntervalInfo.description, Optional::No }, { - KeyTimeStampSubsample, + TimeSubSampleInfo.identifier, new IntVerifier, - "The factor that is used to create subsamples along the trajectory. This " - "value (together with 'SampleInterval') determines how far apart (in " - "time) the samples are spaced along the trajectory. The time interval " - "between 'StartTime' and 'EndTime' is split into 'SampleInterval' * " - "'TimeStampSubsampleFactor' segments. The default value for this is 1", + TimeSubSampleInfo.description, Optional::Yes }, { - KeyShowFullTrail, + RenderFullPathInfo.identifier, new BoolVerifier, - "If this value is set to 'true', the entire trail will be rendered; if " - "it is 'false', only the trail until the current time in the application " - "will be shown. The default value for this setting is 'false'.", + RenderFullPathInfo.description, Optional::Yes } } }; + // @TODO cleanup // Insert the parents documentation entries until we have a verifier that can deal // with class hierarchy documentation::Documentation parentDoc = RenderableTrail::Documentation(); @@ -125,14 +142,11 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) - , _startTime({ "StartTime", "Start Time", "" }) // @TODO Missing documentation - , _endTime({ "EndTime", "End Time", "" }) // @TODO Missing documentation - , _sampleInterval({ "SampleInterval", "Sample Interval", "" }, 2.0, 2.0, 1e6) // @TODO Missing documentation - , _timeStampSubsamplingFactor( - { "SubSample", "Time Stamp Subsampling Factor", "" }, // @TODO Missing documentation - 1, 1, 1000000000 - ) - , _renderFullTrail({ "RenderFullTrail", "Render Full Trail", "" }, false) // @TODO Missing documentation + , _startTime(StartTimeInfo) + , _endTime(EndTimeInfo) + , _sampleInterval(SampleIntervalInfo, 2.0, 2.0, 1e6) + , _timeStampSubsamplingFactor(TimeSubSampleInfo, 1, 1, 1e9) + , _renderFullTrail(RenderFullPathInfo, false) , _needsFullSweep(true) , _subsamplingIsDirty(true) { @@ -146,28 +160,28 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di _needsFullSweep = true; }); - _startTime = dictionary.value(KeyStartTime); + _startTime = dictionary.value(StartTimeInfo.identifier); _startTime.onChange([this] { _needsFullSweep = true; }); addProperty(_startTime); - _endTime = dictionary.value(KeyEndTime); + _endTime = dictionary.value(EndTimeInfo.identifier); _endTime.onChange([this] { _needsFullSweep = true; }); addProperty(_endTime); - _sampleInterval = dictionary.value(KeySampleInterval); + _sampleInterval = dictionary.value(SampleIntervalInfo.identifier); _sampleInterval.onChange([this] { _needsFullSweep = true; }); addProperty(_sampleInterval); - if (dictionary.hasKeyAndValue(KeyTimeStampSubsample)) { + if (dictionary.hasKeyAndValue(TimeSubSampleInfo.identifier)) { _timeStampSubsamplingFactor = static_cast( - dictionary.value(KeyTimeStampSubsample) + dictionary.value(TimeSubSampleInfo.identifier) ); } _timeStampSubsamplingFactor.onChange([this] { _subsamplingIsDirty = true; }); addProperty(_timeStampSubsamplingFactor); - if (dictionary.hasKeyAndValue(KeyShowFullTrail)) { - _renderFullTrail = dictionary.value(KeyShowFullTrail); + if (dictionary.hasKeyAndValue(RenderFullPathInfo.identifier)) { + _renderFullTrail = dictionary.value(RenderFullPathInfo.identifier); } addProperty(_renderFullTrail); diff --git a/modules/base/rendering/screenspaceframebuffer.cpp b/modules/base/rendering/screenspaceframebuffer.cpp index 87417acba9..8bc62a2c51 100644 --- a/modules/base/rendering/screenspaceframebuffer.cpp +++ b/modules/base/rendering/screenspaceframebuffer.cpp @@ -34,6 +34,15 @@ #include #include + +namespace { + static const openspace::properties::Property::PropertyInfo SizeInfo = { + "Size", + "Size", + "This value explicitly specifies the size of the screen space plane." + }; +} // namespace + namespace openspace { documentation::Documentation ScreenSpaceFramebuffer::Documentation() { @@ -48,7 +57,7 @@ documentation::Documentation ScreenSpaceFramebuffer::Documentation() { ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) - , _size({ "Size", "Size", "" }, glm::vec4(0), glm::vec4(0), glm::vec4(2000)) // @TODO Missing documentation + , _size(SizeInfo, glm::vec4(0), glm::vec4(0), glm::vec4(16384)) , _framebuffer(nullptr) { documentation::testSpecificationAndThrow( @@ -63,13 +72,11 @@ ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictiona glm::vec2 resolution = OsEng.windowWrapper().currentWindowResolution(); addProperty(_size); _size.set(glm::vec4(0, 0, resolution.x,resolution.y)); - - _scale.setValue(1.0f); } -ScreenSpaceFramebuffer::~ScreenSpaceFramebuffer(){} +ScreenSpaceFramebuffer::~ScreenSpaceFramebuffer() {} -bool ScreenSpaceFramebuffer::initialize(){ +bool ScreenSpaceFramebuffer::initialize() { _originalViewportSize = OsEng.windowWrapper().currentWindowResolution(); createPlane(); @@ -79,7 +86,7 @@ bool ScreenSpaceFramebuffer::initialize(){ return isReady(); } -bool ScreenSpaceFramebuffer::deinitialize(){ +bool ScreenSpaceFramebuffer::deinitialize() { glDeleteVertexArrays(1, &_quad); _quad = 0; @@ -88,7 +95,7 @@ bool ScreenSpaceFramebuffer::deinitialize(){ _texture = nullptr; - RenderEngine& renderEngine = OsEng.renderEngine(); + RenderEngine& renderEngine = OsEng.renderEngine(); if (_shader) { renderEngine.removeRenderProgram(_shader); _shader = nullptr; @@ -120,7 +127,7 @@ void ScreenSpaceFramebuffer::render() { glClearColor (0.0f, 0.0f, 0.0f, 0.0f); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_ALPHA_TEST); - for(auto renderFunction : _renderFunctions){ + for (const auto& renderFunction : _renderFunctions) { (*renderFunction)(); } _framebuffer->deactivate(); @@ -142,42 +149,48 @@ void ScreenSpaceFramebuffer::render() { } } +void ScreenSpaceFramebuffer::update() {} -void ScreenSpaceFramebuffer::update(){} - -bool ScreenSpaceFramebuffer::isReady() const{ +bool ScreenSpaceFramebuffer::isReady() const { bool ready = true; - if (!_shader) + if (!_shader) { ready &= false; - if(!_texture) + } + if (!_texture) { ready &= false; + } return ready; } - -void ScreenSpaceFramebuffer::setSize(glm::vec4 size){ +void ScreenSpaceFramebuffer::setSize(glm::vec4 size) { _size.set(size); } -void ScreenSpaceFramebuffer::addRenderFunction(std::shared_ptr> renderFunction){ +void ScreenSpaceFramebuffer::addRenderFunction( + std::shared_ptr> renderFunction) +{ _renderFunctions.push_back(renderFunction); } -void ScreenSpaceFramebuffer::removeAllRenderFunctions(){ +void ScreenSpaceFramebuffer::removeAllRenderFunctions() { _renderFunctions.clear(); } -void ScreenSpaceFramebuffer::createFragmentbuffer(){ +void ScreenSpaceFramebuffer::createFragmentbuffer() { _framebuffer = std::make_unique(); _framebuffer->activate(); - _texture = std::make_unique(glm::uvec3(_originalViewportSize.x, _originalViewportSize.y, 1)); + _texture = std::make_unique(glm::uvec3( + _originalViewportSize.x, + _originalViewportSize.y, + 1 + )); _texture->uploadTexture(); _texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear); _framebuffer->attachTexture(_texture.get(), GL_COLOR_ATTACHMENT0); _framebuffer->deactivate(); } -int ScreenSpaceFramebuffer::id(){ +int ScreenSpaceFramebuffer::id() { static int id = 0; return id++; } diff --git a/modules/base/rendering/screenspaceimage.cpp b/modules/base/rendering/screenspaceimage.cpp index 72d7545f34..8f8932d681 100644 --- a/modules/base/rendering/screenspaceimage.cpp +++ b/modules/base/rendering/screenspaceimage.cpp @@ -39,6 +39,15 @@ namespace { const char* KeyName = "Name"; const char* KeyTexturePath = "TexturePath"; const char* KeyUrl = "URL"; + + static const openspace::properties::Property::PropertyInfo TexturePathInfo = { + "TexturePath", + "Texture path", + "Sets the path of the texture that is displayed on this screen space plane. If " + "this value is changed, the image at the new path will automatically be loaded " + "and displayed. The size of the image will also automatically set the default " + "size of this plane." + }; } // namespace namespace openspace { @@ -70,7 +79,7 @@ ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary) : ScreenSpaceRenderable(dictionary) , _downloadImage(false) , _textureIsDirty(false) - , _texturePath({ "TexturePath", "Texture path", "" }) // @TODO Missing documentation + , _texturePath(TexturePathInfo) { documentation::testSpecificationAndThrow( Documentation(), diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 340a29087f..8f88d81389 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -28,7 +28,12 @@ #include namespace { - const char* KeyRotation = "Rotation"; + static const openspace::properties::Property::PropertyInfo RotationInfo = { + "Rotation", + "Rotation", + "This value is the used as a 3x3 rotation matrix that is applied to the scene " + "graph node that this transformation is attached to relative to its parent." + }; } // namespace namespace openspace { @@ -46,7 +51,7 @@ documentation::Documentation StaticRotation::Documentation() { Optional::No }, { - KeyRotation, + RotationInfo.identifier, new OrVerifier( new DoubleVector3Verifier(), new DoubleMatrix3Verifier() @@ -61,8 +66,11 @@ documentation::Documentation StaticRotation::Documentation() { } StaticRotation::StaticRotation() - : _rotationMatrix({ "Rotation", "Rotation", "" }, glm::dmat3(1.0)) // @TODO Missing documentation -{} + : _rotationMatrix(RotationInfo, glm::dmat3(1.0)) +{ + addProperty(_rotationMatrix); + _rotationMatrix.onChange([this]() { _matrix = _rotationMatrix; }); +} StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) : StaticRotation() @@ -74,18 +82,16 @@ StaticRotation::StaticRotation(const ghoul::Dictionary& dictionary) ); - if (dictionary.hasKeyAndValue(KeyRotation)) { + if (dictionary.hasKeyAndValue(RotationInfo.identifier)) { _rotationMatrix = glm::mat3_cast( - glm::dquat(dictionary.value(KeyRotation)) + glm::dquat(dictionary.value(RotationInfo.identifier)) ); } else { // Must be glm::dmat3 due to specification restriction - _rotationMatrix = dictionary.value(KeyRotation); + _rotationMatrix = dictionary.value(RotationInfo.identifier); } - addProperty(_rotationMatrix); - _rotationMatrix.onChange([this]() { _matrix = _rotationMatrix; }); } } // namespace openspace diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index 75366fa88d..69db7ea3f8 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -28,7 +28,12 @@ #include namespace { - const char* KeyValue = "Scale"; + static const openspace::properties::Property::PropertyInfo ScaleInfo = { + "Scale", + "Scale", + "This value is used as a scaling factor for the scene graph node that this " + "transformation is attached to relative to its parent." + }; } // namespace namespace openspace { @@ -40,27 +45,27 @@ documentation::Documentation StaticScale::Documentation() { "base_scale_static", { { - KeyValue, + ScaleInfo.identifier, new DoubleVerifier, - "The scaling factor by which the scenegraph node is scaled." + ScaleInfo.description, + Optional::No } } }; } StaticScale::StaticScale() - : _scaleValue({ "Scale", "Scale", "" }, 1.0, 1.0, 1000.0) // @TODO Missing documentation + : _scaleValue(ScaleInfo, 1.0, 1.0, 1e6) { addProperty(_scaleValue); } - StaticScale::StaticScale(const ghoul::Dictionary& dictionary) : StaticScale() { documentation::testSpecificationAndThrow(Documentation(), dictionary, "StaticScale"); - _scaleValue = static_cast(dictionary.value(KeyValue)); + _scaleValue = static_cast(dictionary.value(ScaleInfo.identifier)); } double StaticScale::scaleValue() const { diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 22c0f366d0..72a5de4df4 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -28,7 +28,12 @@ #include namespace { - const char* KeyPosition = "Position"; + static const openspace::properties::Property::PropertyInfo PositionInfo = { + "Position", + "Position", + "This value is used as a static offset (in meters) that is applied to the scene " + "graph node that this transformation is attached to relative to its parent." + }; } // namespace namespace openspace { @@ -40,16 +45,9 @@ documentation::Documentation StaticTranslation::Documentation() { "base_transform_translation_static", { { - "Type", - new StringEqualVerifier("StaticTranslation"), - "", - Optional::No - }, - { - KeyPosition, + PositionInfo.identifier, new DoubleVector3Verifier, - "Specifies the position (in meters) that this scenegraph node is located " - "at relative to its parent", + PositionInfo.description, Optional::No } }, @@ -60,7 +58,7 @@ documentation::Documentation StaticTranslation::Documentation() { StaticTranslation::StaticTranslation() : _position( - { "Position", "Position", "" }, // @TODO Missing documentation + PositionInfo, glm::dvec3(0.0), glm::dvec3(-std::numeric_limits::max()), glm::dvec3(std::numeric_limits::max()) @@ -78,7 +76,7 @@ StaticTranslation::StaticTranslation(const ghoul::Dictionary& dictionary) "StaticEphemeris" ); - _position = dictionary.value(KeyPosition); + _position = dictionary.value(PositionInfo.identifier); } glm::dvec3 StaticTranslation::position() const { diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index 161fd2675c..3442f909d7 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -39,62 +39,138 @@ #include #include +#include +#include + namespace { - const char* _loggerCat = "RenderablePlaneTexture"; + enum Origin { + LowerLeft = 0, + LowerRight, + UpperLeft, + UpperRight, + Center + }; + + static const openspace::properties::Property::PropertyInfo TextureInfo = { + "Texture", + "Texture", + "The OpenGL name of the texture that is displayed on this plane." + }; + + static const openspace::properties::Property::PropertyInfo BillboardInfo = { + "Billboard", + "Billboard mode", + "This value specifies whether the plane is a billboard, which means that it is " + "always facing the camera. If this is false, it can be oriented using other " + "transformations." + }; + + static const openspace::properties::Property::PropertyInfo SizeInfo = { + "Size", + "Size (in meters)", + "This value specifies the size of the plane in meters." + }; + + static const openspace::properties::Property::PropertyInfo OriginInfo = { + "Origin", + "Texture Coordinate Origin", + "The origin of the texture coorinate system." + }; } // namespace namespace openspace { +documentation::Documentation RenderableDebugPlane::Documentation() { + using namespace documentation; + return { + "RenderableDebugPlane", + "debugging_renderable_debugplane", + { + { + TextureInfo.identifier, + new IntVerifier, + TextureInfo.description, + Optional::Yes + }, + { + BillboardInfo.identifier, + new BoolVerifier, + BillboardInfo.description, + Optional::Yes + }, + { + SizeInfo.identifier, + new DoubleVerifier, + SizeInfo.description, + Optional::Yes + }, + { + OriginInfo.identifier, + new StringInListVerifier( + { "LowerLeft", "LowerRight", "UpperLeft", "UpperRight", "Center" } + ), + OriginInfo.description, + Optional::Yes + } + }, + Exhaustive::Yes + }; +} + + RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texture({ "Texture", "Texture", "" }, -1, -1, 255) // @TODO Missing documentation - , _billboard({ "Billboard", "Billboard", "" }, false) // @TODO Missing documentation - , _size({ "Size", "Size", "" }, 10.f, 0.f, std::pow(10.f, 25.f)) // @TODO Missing documentation - , _origin(Origin::Center) + , _texture(TextureInfo, -1, -1, 512) + , _billboard(BillboardInfo, false) + , _size(SizeInfo, 10.f, 0.f, 1e25f) + , _origin(OriginInfo, properties::OptionProperty::DisplayType::Dropdown) , _shader(nullptr) , _quad(0) , _vertexPositionBuffer(0) { - dictionary.getValue("Size", _size); - - if (dictionary.hasKey("Name")){ - dictionary.getValue("Name", _nodeName); + if (dictionary.hasKey(TextureInfo.identifier)) { + _texture = static_cast(dictionary.value(TextureInfo.identifier)); } - if (dictionary.hasKey("Texture")) { - int t; - dictionary.getValue("Texture", t); - _texture = t; + if (dictionary.hasKey(SizeInfo.identifier)) { + _size = static_cast(dictionary.value(SizeInfo.identifier)); } - std::string origin; - if (dictionary.getValue("Origin", origin)) { + if (dictionary.hasKey(BillboardInfo.identifier)) { + _billboard = dictionary.value(BillboardInfo.identifier); + } + + _origin.addOptions({ + { LowerLeft, "LowerLeft" }, + { LowerRight, "LowerRight" }, + { UpperLeft, "UpperLeft" }, + { UpperRight, "UpperRight" }, + { Center, "Center" } + }); + _origin.setValue(Center); + + if (dictionary.hasKey(OriginInfo.identifier)) { + const std::string origin = dictionary.value(OriginInfo.identifier); if (origin == "LowerLeft") { - _origin = Origin::LowerLeft; + _origin = LowerLeft; } else if (origin == "LowerRight") { - _origin = Origin::LowerRight; + _origin = LowerRight; } else if (origin == "UpperLeft") { - _origin = Origin::UpperLeft; + _origin = UpperLeft; } else if (origin == "UpperRight") { - _origin = Origin::UpperRight; + _origin = UpperRight; } else if (origin == "Center") { - _origin = Origin::Center; + _origin = Center; } } - - // Attempt to get the billboard value - bool billboard = false; - if (dictionary.getValue("Billboard", billboard)) { - _billboard = billboard; + else { + _origin = Center; } - int texture; - if (dictionary.getValue("Texture", texture)) - _texture = texture; addProperty(_texture); addProperty(_billboard); @@ -105,13 +181,13 @@ RenderableDebugPlane::RenderableDebugPlane(const ghoul::Dictionary& dictionary) setBoundingSphere(_size); } -RenderableDebugPlane::~RenderableDebugPlane() { -} +RenderableDebugPlane::~RenderableDebugPlane() {} bool RenderableDebugPlane::isReady() const { bool ready = true; - if (!_shader) + if (!_shader) { ready &= false; + } return ready; } @@ -120,19 +196,14 @@ bool RenderableDebugPlane::initialize() { glGenBuffers(1, &_vertexPositionBuffer); // generate buffer createPlane(); - if (_shader == nullptr) { - // Plane Program - + if (!_shader) { RenderEngine& renderEngine = OsEng.renderEngine(); _shader = renderEngine.buildRenderProgram("PlaneProgram", "${MODULE_BASE}/shaders/plane_vs.glsl", "${MODULE_BASE}/shaders/plane_fs.glsl" ); - if (!_shader) - return false; } - return isReady(); } @@ -154,8 +225,9 @@ bool RenderableDebugPlane::deinitialize() { void RenderableDebugPlane::render(const RenderData& data, RendererTasks&) { glm::mat4 transform = glm::mat4(1.0); - if (_billboard) + if (_billboard) { transform = glm::inverse(glm::mat4(data.camera.viewRotationMatrix())); + } // Activate shader _shader->activate(); @@ -176,11 +248,13 @@ void RenderableDebugPlane::render(const RenderData& data, RendererTasks&) { } void RenderableDebugPlane::update(const UpdateData&) { - if (_shader->isDirty()) + if (_shader->isDirty()) { _shader->rebuildFromFile(); + } - if (_planeIsDirty) + if (_planeIsDirty) { createPlane(); + } } void RenderableDebugPlane::createPlane() { diff --git a/modules/debugging/rendering/renderabledebugplane.h b/modules/debugging/rendering/renderabledebugplane.h index aa3dbd8fed..6ea0db8819 100644 --- a/modules/debugging/rendering/renderabledebugplane.h +++ b/modules/debugging/rendering/renderabledebugplane.h @@ -27,6 +27,7 @@ #include +#include #include #include #include @@ -37,6 +38,8 @@ namespace ghoul::opengl { class Texture; } // namespace ghoul::opengl +namespace documentation { struct Documentation; } + namespace openspace { struct LinePoint; @@ -54,19 +57,15 @@ public: void render(const RenderData& data, RendererTasks& rendererTask) override; void update(const UpdateData& data) override; -private: - enum class Origin { - LowerLeft, LowerRight, UpperLeft, UpperRight, Center - }; + static documentation::Documentation Documentation(); +private: void createPlane(); properties::IntProperty _texture; properties::BoolProperty _billboard; properties::FloatProperty _size; - - Origin _origin; - std::string _nodeName; + properties::OptionProperty _origin; bool _planeIsDirty; diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 12643c9281..15e772a277 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -90,6 +90,98 @@ namespace { const char* KeyFontMono = "Mono"; const char* KeyFontLight = "Light"; + + static const openspace::properties::Property::PropertyInfo PerformanceInfo = { + "PerformanceMeasurements", + "Performance Measurements", + "If this value is enabled, detailed performance measurements about the updates " + "and rendering of the scene graph nodes are collected each frame. These values " + "provide some information about the impact of individual nodes on the overall " + "performance." + }; + + static const openspace::properties::Property::PropertyInfo FrametimeInfo = { + "FrametimeType", + "Type of the frame time display", + "This value determines the units in which the frame time is displayed." + }; + + static const openspace::properties::Property::PropertyInfo ShowDateInfo = { + "ShowDate", + "Show Date Information", + "This values determines whether the date will be printed in the top left corner " + "of the rendering window if a regular rendering window is used (as opposed to a " + "fisheye rendering, for example)." + }; + + static const openspace::properties::Property::PropertyInfo ShowInfoInfo = { + "ShowInfo", + "Show Rendering Information", + "This value determines whether the rendering info, which is the delta time and " + "the frame time, is shown in the top left corner of the rendering window if a " + "regular rendering window is used (as opposed to a fisheye rendering, for " + "example)." + }; + + static const openspace::properties::Property::PropertyInfo ShowLogInfo = { + "ShowLog", + "Show the on-screen log", + "This value determines whether the on-screen log will be shown or hidden. Even " + "if it is shown, all 'Debug' and 'Trace' level messages are omitted from this " + "log." + }; + + static const openspace::properties::Property::PropertyInfo TakeScreenshotInfo = { + "TakeScreenshot", + "Take Screenshot", + "If this property is triggered, a screenshot is taken and stored in the current " + "working directory (which is the same directory where the OpenSpace.exe) is " + "located in most cases. The images are prefixed with 'SGCT' and postfixed with " + "the number of frames. This function will silently overwrite images that are " + "already present in the folder." + }; + + static const openspace::properties::Property::PropertyInfo ApplyWarpingInfo = { + "ApplyWarpingScreenshot", + "Apply Warping to Screenshots", + "This value determines whether a warping should be applied before taking a " + "screenshot. If it is enabled, all post processing is applied as well, which " + "includes everything rendered on top of the rendering, such as the user " + "interface." + }; + + static const openspace::properties::Property::PropertyInfo ShowFrameNumberInfo = { + "ShowFrameNumber", + "Show Frame Number", + "If this value is enabled, the current frame number is rendered into the window." + }; + + static const openspace::properties::Property::PropertyInfo DisableMasterInfo = { + "DisableMasterRendering", + "Disable Master Rendering", + "If this value is enabled, the rendering on the master node will be disabled. " + "Every other aspect of the application will be unaffected by this and it will " + "still respond to user input. This setting is reasonably only useful in the case " + "of multi-pipeline environments, such as planetariums, where the output of the " + "master node is not required and performance can be gained by disabling it." + }; + + static const openspace::properties::Property::PropertyInfo DisableTranslationInfo = { + "DisableSceneTranslationOnMaster", + "Disable Scene Translation on Master", + "If this value is enabled, any scene translations such as specified in, for " + "example an SGCT configuration, is disabled for the master node. This setting " + "can be useful if a planetarium environment requires a scene translation to be " + "applied, which would otherwise make interacting through the master node " + "difficult." + }; + + static const openspace::properties::Property::PropertyInfo AaSamplesInfo = { + "AaSamples", + "Number of Anti-aliasing samples", + "This value determines the number of anti-aliasing samples to be used in the " + "rendering for the MSAA method." + }; } // namespace @@ -100,32 +192,26 @@ RenderEngine::RenderEngine() , _camera(nullptr) , _scene(nullptr) , _raycasterManager(nullptr) - , _performanceMeasurements({ "PerformanceMeasurements", "Performance Measurements", "" }) // @TODO Missing documentation + , _performanceMeasurements(PerformanceInfo) , _performanceManager(nullptr) , _renderer(nullptr) , _rendererImplementation(RendererImplementation::Invalid) , _log(nullptr) - , _frametimeType( - { "FrametimeType", "Type of the frametime display", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown - ) - , _showDate({ "ShowDate", "Show Date Information", "" }, true) // @TODO Missing documentation - , _showInfo({ "ShowInfo", "Show Render Information", "" }, true) // @TODO Missing documentation - , _showLog({ "ShowLog", "Show the OnScreen log", "" }, true) // @TODO Missing documentation - , _takeScreenshot({ "TakeScreenshot", "Take Screenshot", "" }) // @TODO Missing documentation + , _frametimeType(FrametimeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _showDate(ShowDateInfo, true) + , _showInfo(ShowInfoInfo, true) + , _showLog(ShowLogInfo, true) + , _takeScreenshot(TakeScreenshotInfo) , _shouldTakeScreenshot(false) - , _applyWarping({ "ApplyWarpingScreenshot", "Apply Warping to Screenshots", "" }, false) // @TODO Missing documentation - , _showFrameNumber({ "ShowFrameNumber", "Show Frame Number", "" }, false) // @TODO Missing documentation - , _disableMasterRendering({ "DisableMasterRendering", "Disable Master Rendering", "" }, false) // @TODO Missing documentation - , _disableSceneTranslationOnMaster( - { "DisableSceneTranslationOnMaster", "Disable Scene Translation on Master", "" }, // @TODO Missing documentation - false - ) + , _applyWarping(ApplyWarpingInfo, false) + , _showFrameNumber(ShowFrameNumberInfo, false) + , _disableMasterRendering(DisableMasterInfo, false) + , _disableSceneTranslationOnMaster(DisableTranslationInfo, false) , _globalBlackOutFactor(1.f) , _fadeDuration(2.f) , _currentFadeTime(0.f) , _fadeDirection(0) - , _nAaSamples({ "NAaSamples", "Number of Antialiasing samples", "" }, 8, 1, 16) // @TODO Missing documentation + , _nAaSamples(AaSamplesInfo, 8, 1, 16) , _frameNumber(0) { _performanceMeasurements.onChange([this](){ diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index fccf1bae30..a9af742723 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -33,11 +33,6 @@ #include #include -#ifdef WIN32 -#define _USE_MATH_DEFINES -#include -#endif - namespace { const char* _loggerCat = "ScreenSpaceRenderable"; @@ -49,6 +44,69 @@ namespace { const char* KeyAlpha = "Alpha"; const char* KeyTag = "Tag"; const float PlaneDepth = -2.f; + + static const openspace::properties::Property::PropertyInfo EnabledInfo = { + "Enabled", + "Is Enabled", + "This setting determines whether this sceen space plane will be visible or not." + }; + + static const openspace::properties::Property::PropertyInfo FlatScreenInfo = { + "FlatScreen", + "Flat Screen specification", + "This value determines whether the location of this screen space plane will be " + "specified in a two-dimensional Euclidean plane (if this is set to 'true') or " + "specified in spherical coordinates. By switching this value, the correct " + "property will be shown or hidden. The Euclidean coordinate system is useful if " + "a regular rendering is applied, whereas the spherical coordinates are most " + "useful in a planetarium environment." + }; + + static const openspace::properties::Property::PropertyInfo EuclideanPositionInfo = { + "EuclideanPosition", + "Euclidean coordinates", + "This value determines the position of this screen space plane in Euclidean " + "two-dimensional coordinates." + }; + + static const openspace::properties::Property::PropertyInfo SphericalPositionInfo = { + "SphericalPosition", + "Spherical coordinates", + "This value determines the position of this screen space plane in a spherical " + "coordinate system." + }; + + static const openspace::properties::Property::PropertyInfo DepthInfo = { + "Depth", + "Depth value", + "This value determines the depth of the plane. This value does not change the " + "apparent size of the plane, but is only used to sort the planes correctly. The " + "plane with a lower value will be shown in front of a plane with a higher depth " + "value." + }; + + static const openspace::properties::Property::PropertyInfo ScaleInfo = { + "Scale", + "Scale value", + "This value determines a scale factor for the plane. The default size of a plane " + "is determined by the concrete instance and reflects, for example, the size of " + "the image being displayed." + }; + + static const openspace::properties::Property::PropertyInfo AlphaInfo = { + "Alpha", + "Transparency", + "This value determines the transparency of the screen space plane. If this value " + "is 1, the plane is completely opaque, if this value is 0, the plane is " + "completely transparent." + }; + + static const openspace::properties::Property::PropertyInfo DeleteInfo = { + "Delete", + "Delete", + "If this property is triggered, this screen space plane is removed from the " + "scene." + }; } // namespace namespace openspace { @@ -98,24 +156,24 @@ std::unique_ptr ScreenSpaceRenderable::createFromDictiona ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("") - , _enabled({ "Enabled", "Is Enabled", "" }, true) // @TODO Missing documentation - , _useFlatScreen({ "FlatScreen", "Flat Screen", "" }, true) // @TODO Missing documentation + , _enabled(EnabledInfo, true) + , _useFlatScreen(FlatScreenInfo, true) , _euclideanPosition( - { "EuclideanPosition", "Euclidean coordinates", "" }, // @TODO Missing documentation + EuclideanPositionInfo, glm::vec2(0.f), glm::vec2(-4.f), glm::vec2(4.f) ) , _sphericalPosition( - { "SphericalPosition", "Spherical coordinates", "" }, // @TODO Missing documentation - glm::vec2(0.f, static_cast(M_PI_2)), - glm::vec2(-static_cast(M_PI)), - glm::vec2(static_cast(M_PI)) + SphericalPositionInfo, + glm::vec2(0.f, glm::half_pi()), + glm::vec2(-glm::pi()), + glm::vec2(glm::pi()) ) - , _depth({ "Depth", "Depth", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation - , _scale({ "Scale", "Scale", "" }, 0.25f, 0.f, 2.f) // @TODO Missing documentation - , _alpha({ "Alpha", "Alpha", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation + , _depth(DepthInfo, 0.f, 0.f, 1.f) + , _scale(ScaleInfo, 0.25f, 0.f, 2.f) + , _alpha(AlphaInfo, 1.f, 0.f, 1.f) + , _delete(DeleteInfo) , _quad(0) , _vertexPositionBuffer(0) , _texture(nullptr) @@ -258,8 +316,8 @@ glm::vec2 ScreenSpaceRenderable::toEuclidean(const glm::vec2& spherical, float r } glm::vec2 ScreenSpaceRenderable::toSpherical(const glm::vec2& euclidean) { - _radius = -sqrt(pow(euclidean[0],2)+pow(euclidean[1],2)+pow(PlaneDepth,2)); - float theta = atan2(-PlaneDepth, euclidean[0]) - static_cast(M_PI_2); + _radius = -sqrt(pow(euclidean[0],2) + pow(euclidean[1],2) + pow(PlaneDepth,2)); + float theta = atan2(-PlaneDepth, euclidean[0]) - glm::half_pi(); float phi = acos(euclidean[1]/_radius); return glm::vec2(theta, phi); @@ -315,7 +373,7 @@ glm::mat4 ScreenSpaceRenderable::rotationMatrix() { rotation = glm::rotate(rotation, position.x, glm::vec3(0.f, 1.f, 0.f)); rotation = glm::rotate( rotation, - static_cast(position.y - M_PI_2), + position.y - glm::half_pi(), glm::vec3(1.f, 0.f, 0.f) ); } From e148cf28d00bcdb40a1fc2881e692daa68189b9d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 24 Jul 2017 18:05:59 -0400 Subject: [PATCH 07/20] Adding more documentation --- .../newhorizons/rendering/renderablefov.cpp | 54 +++++++++++++++++-- .../newhorizons/util/projectioncomponent.cpp | 48 +++++++++++++++-- 2 files changed, 94 insertions(+), 8 deletions(-) diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index bb5c09aa64..d53621991c 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -51,6 +51,30 @@ namespace { const char* KeyFrameConversions = "FrameConversions"; const int InterpolationSteps = 5; + + static const openspace::properties::Property::PropertyInfo LineWidthInfo = { + "LineWidth", + "Line Width", + "This value determines width of the lines connecting the instrument to the " + "corners of the field of view." + }; + + static const openspace::properties::Property::PropertyInfo DrawSolidInfo = { + "SolidDraw", + "Solid Draw", + "This value determines whether the field of view should be rendered as a solid " + "or as lines only." + }; + + static const openspace::properties::Property::PropertyInfo StandoffDistanceInfo = { + "StandOffDistance", + "Standoff Distance Factor", + "This value determines the standoff distance factor which influences the " + "distance of the plane to the focus object. If this value is '1', the field of " + "view will be rendered exactly on the surface of, for example, a planet. With a " + "value of smaller than 1, the field of view will hover of ther surface, thus " + "making it more visible." + }; } // namespace namespace openspace { @@ -121,6 +145,18 @@ documentation::Documentation RenderableFov::Documentation() { "A list of frame conversions that should be registered with the " "SpiceManager.", Optional::Yes + }, + { + LineWidthInfo.identifier, + new DoubleVerifier, + LineWidthInfo.description, + Optional::Yes + }, + { + StandoffDistanceInfo.identifier, + new DoubleVerifier, + StandoffDistanceInfo.description, + Optional::Yes } } }; @@ -129,9 +165,9 @@ documentation::Documentation RenderableFov::Documentation() { RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _lineWidth({ "LineWidth", "Line Width", "" }, 1.f, 1.f, 20.f) // @TODO Missing documentation - , _drawSolid({ "SolidDraw", "Draw as Quads", "" }, false) // @TODO Missing documentation - , _standOffDistance({ "StandOffDistance", "Standoff Distance", "" }, 0.9999, 0.99, 1.0, 0.000001) // @TODO Missing documentation + , _lineWidth(LineWidthInfo, 1.f, 1.f, 20.f) + , _drawSolid(DrawSolidInfo, false) + , _standOffDistance(StandoffDistanceInfo, 0.9999, 0.99, 1.0, 0.000001) , _programObject(nullptr) , _drawFOV(false) , _colors({ @@ -201,6 +237,18 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) } } + if (dictionary.hasKey(LineWidthInfo.identifier)) { + _lineWidth = static_cast(dictionary.value( + LineWidthInfo.identifier + )); + } + + if (dictionary.hasKey(StandoffDistanceInfo.identifier)) { + _standOffDistance = static_cast(dictionary.value( + StandoffDistanceInfo.identifier + )); + } + addProperty(_lineWidth); addProperty(_drawSolid); addProperty(_standOffDistance); diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index 11c9797a9d..0bc5c3fefa 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -71,6 +71,44 @@ namespace { "${OPENSPACE_DATA}/scene/common/textures/placeholder.png"; const char* _loggerCat = "ProjectionComponent"; + + static const openspace::properties::Property::PropertyInfo ProjectionInfo = { + "PerformProjection", + "Perform Projections", + "If this value is enabled, this ProjectionComponent will perform projections. If " + "it is disabled, projections will be ignored." + }; + + static const openspace::properties::Property::PropertyInfo ClearProjectionInfo = { + "ClearAllProjections", + "Clear Projections", + "If this property is triggered, it will remove all the projections that have " + "already been applied." + }; + + static const openspace::properties::Property::PropertyInfo FadingInfo = { + "ProjectionFading", + "Projection Fading", + "This value fades the previously performed projections in or out. If this value " + "is equal to '1', the projections are fully visible, if the value is equal to " + "'0', the performed projections are completely invisible." + }; + + static const openspace::properties::Property::PropertyInfo TextureSizeInfo = { + "TextureSize", + "Texture Size", + "This value determines the size of the texture into which the images are " + "projected and thus provides the limit to the resolution of projections that can " + "be applied. Changing this value will not cause the texture to be automatically " + "updated, but triggering the 'ApplyTextureSize' property is required." + }; + + static const openspace::properties::Property::PropertyInfo ApplyTextureSizeInfo = { + "ApplyTextureSize", + "Apply Texture Size", + "Triggering this property applies a new size to the underlying projection " + "texture. The old texture is resized and interpolated to fit the new size." + }; } // namespace namespace openspace { @@ -168,11 +206,11 @@ documentation::Documentation ProjectionComponent::Documentation() { ProjectionComponent::ProjectionComponent() : properties::PropertyOwner("ProjectionComponent") - , _performProjection({ "PerformProjection", "Perform Projections", "" }, true) // @TODO Missing documentation - , _clearAllProjections({ "ClearAllProjections", "Clear Projections", "" }, false) // @TODO Missing documentation - , _projectionFading({ "ProjectionFading", "Projection Fading", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _textureSize({ "TextureSize", "Texture Size", "" }, ivec2(16), ivec2(16), ivec2(32768)) // @TODO Missing documentation - , _applyTextureSize({ "ApplyTextureSize", "Apply Texture Size", "" }) // @TODO Missing documentation + , _performProjection(ProjectionInfo, true) + , _clearAllProjections(ClearProjectionInfo, false) + , _projectionFading(FadingInfo, 1.f, 0.f, 1.f) + , _textureSize(TextureSizeInfo, ivec2(16), ivec2(16), ivec2(32768)) + , _applyTextureSize(ApplyTextureSizeInfo) // @TODO Missing documentation , _textureSizeDirty(false) , _projectionTexture(nullptr) { From 46c1fbb902e893a172d08bd027c978edbe691a25 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 25 Jul 2017 00:21:17 -0400 Subject: [PATCH 08/20] More work on Property documentation --- modules/base/rendering/renderableplane.cpp | 4 +- .../base/translation/statictranslation.cpp | 8 ++- .../globebrowsing/rendering/layer/layer.cpp | 62 +++++++++++++------ .../rendering/layer/layeradjustment.cpp | 43 +++++++------ .../rendering/layer/layergroup.cpp | 13 +++- .../rendering/layer/layerrendersettings.cpp | 45 ++++++++++++-- .../tile/rawtiledatareader/gdalwrapper.cpp | 24 +++++-- .../tile/tileprovider/defaulttileprovider.cpp | 27 ++++++-- 8 files changed, 168 insertions(+), 58 deletions(-) diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index efb44c9743..c67ec7eca0 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -257,10 +257,10 @@ void RenderablePlane::render(const RenderData& data, RendererTasks&) { OsEng.renderEngine().rendererImplementation() == RenderEngine::RendererImplementation::ABuffer; if (usingABufferRenderer) { - _shader->setUniform("additiveBlending", _blendMode == BlendMode::Additive); + _shader->setUniform("additiveBlending", _blendMode == BlendModeAdditive); } - bool additiveBlending = _blendMode == BlendMode::Additive && usingFramebufferRenderer; + bool additiveBlending = _blendMode == BlendModeAdditive && usingFramebufferRenderer; if (additiveBlending) { glDepthMask(false); glBlendFunc(GL_SRC_ALPHA, GL_ONE); diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 72a5de4df4..27b013fab0 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -44,6 +44,12 @@ documentation::Documentation StaticTranslation::Documentation() { "Static Translation", "base_transform_translation_static", { + { + "Type", + new StringEqualVerifier("StaticTranslation"), + "", + Optional::No + }, { PositionInfo.identifier, new DoubleVector3Verifier, @@ -73,7 +79,7 @@ StaticTranslation::StaticTranslation(const ghoul::Dictionary& dictionary) documentation::testSpecificationAndThrow( Documentation(), dictionary, - "StaticEphemeris" + "StaticTranslation" ); _position = dictionary.value(PositionInfo.identifier); diff --git a/modules/globebrowsing/rendering/layer/layer.cpp b/modules/globebrowsing/rendering/layer/layer.cpp index 985e4605c2..4887d15f14 100644 --- a/modules/globebrowsing/rendering/layer/layer.cpp +++ b/modules/globebrowsing/rendering/layer/layer.cpp @@ -37,29 +37,55 @@ namespace { const char* keySettings = "Settings"; const char* keyAdjustment = "Adjustment"; const char* KeyBlendMode = "BlendMode"; + + static const openspace::properties::Property::PropertyInfo TypeInfo = { + "Type", + "Type", + "The type of this Layer. This value is a read-only property and thus cannot be " + "changed." + }; + + static const openspace::properties::Property::PropertyInfo BlendModeInfo = { + "BlendMode", + "Blend Mode", + "This value specifies the blend mode that is applied to this layer. The blend " + "mode determines how this layer is added to the underlying layers beneath." + }; + + static const openspace::properties::Property::PropertyInfo EnabledInfo = { + "Enabled", + "Enabled", + "If this value is enabled, the layer will be used for the final composition of " + "the planet. If this value is disabled, the layer will be ignored in the " + "composition." + }; + + static const openspace::properties::Property::PropertyInfo ResetInfo = { + "Reset", + "Reset", + "If this value is triggered, this layer will be reset. This will delete the " + "local cache for this layer and will trigger a fresh load of all tiles." + }; + + static const openspace::properties::Property::PropertyInfo ColorInfo = { + "Color", + "Color", + "If the 'Type' of this layer is a solid color, this value determines what this " + "solid color is." + }; + } // namespace Layer::Layer(layergroupid::GroupID id, const ghoul::Dictionary& layerDict) : properties::PropertyOwner(layerDict.value(keyName)) - , _typeOption( - { "Type", "Type", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown - ) - , _blendModeOption( - { "BlendMode", "Blend Mode", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown - ) - , _enabled({ "Enabled", "Enabled", "" }, false) // @TODO Missing documentation - , _reset({ "Reset", "Reset", "" }) // @TODO Missing documentation + , _typeOption(TypeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _blendModeOption(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _enabled(EnabledInfo, false) + , _reset(ResetInfo) , _tileProvider(nullptr) - , _otherTypesProperties{ - properties::Vec3Property ( - { "Color", "Color", "" }, // @TODO Missing documentation - glm::vec4(1.f, 1.f, 1.f, 1.f), - glm::vec4(0.f), - glm::vec4(1.f) - ) - } + , _otherTypesProperties({ + { ColorInfo, glm::vec4(1.f), glm::vec4(0.f), glm::vec4(1.f) } + }) , _layerGroupId(id) { layergroupid::TypeID typeID = parseTypeIdFromDictionary(layerDict); diff --git a/modules/globebrowsing/rendering/layer/layeradjustment.cpp b/modules/globebrowsing/rendering/layer/layeradjustment.cpp index 83238368b6..63ce096e6f 100644 --- a/modules/globebrowsing/rendering/layer/layeradjustment.cpp +++ b/modules/globebrowsing/rendering/layer/layeradjustment.cpp @@ -28,29 +28,34 @@ namespace { const char* keyType = "Type"; const char* keyChromaKeyColor = "ChromaKeyColor"; const char* keyChromaKeyTolerance = "ChromaKeyTolerance"; + + static const openspace::properties::Property::PropertyInfo ChromaKeyColorInfo = { + "ChromaKeyColor", + "Chroma Key Color", + "This color is used as the chroma key for the layer that is adjusted." + }; + + static const openspace::properties::Property::PropertyInfo ChromaKeyToleranceInfo = { + "ChromaKeyTolerance", + "Chroma Key Tolerance", + "This value determines the tolerance that is used to determine whether a color " + "is matching the selected Chroma key." + }; + + static const openspace::properties::Property::PropertyInfo TypeInfo = { + "Type", + "Type", + "The type of layer adjustment that is applied to the underlying layer." + }; } // namespace namespace openspace::globebrowsing { LayerAdjustment::LayerAdjustment() : properties::PropertyOwner("adjustment") - , chromaKeyColor( - { "ChromaKeyColor", "Chroma key color", "" }, // @TODO Missing documentation - glm::vec3(0.f, 0.f, 0.f), - glm::vec3(0.f), - glm::vec3(1.f) - ) - , chromaKeyTolerance( - { "ChromaKeyTolerance", "Chroma key tolerance", "" }, // @TODO Missing documentation - 0, - 0, - 1 - ) - , _typeOption( - { "Type", "Type", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown - ) - , _onChangeCallback([](){}) + , chromaKeyColor(ChromaKeyColorInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(1.f)) + , chromaKeyTolerance(ChromaKeyToleranceInfo, 0.f, 0.f, 1.f) + , _typeOption(TypeInfo, properties::OptionProperty::DisplayType::Dropdown) { // Add options to option properties for (int i = 0; i < layergroupid::NUM_ADJUSTMENT_TYPES; ++i) { @@ -63,7 +68,9 @@ LayerAdjustment::LayerAdjustment() removeVisibleProperties(); _type = static_cast(_typeOption.value()); addVisibleProperties(); - _onChangeCallback(); + if (_onChangeCallback) { + _onChangeCallback(); + } }); chromaKeyColor.setViewOption(properties::Property::ViewOptions::Color); diff --git a/modules/globebrowsing/rendering/layer/layergroup.cpp b/modules/globebrowsing/rendering/layer/layergroup.cpp index d19a08d222..917c5d7793 100644 --- a/modules/globebrowsing/rendering/layer/layergroup.cpp +++ b/modules/globebrowsing/rendering/layer/layergroup.cpp @@ -28,14 +28,23 @@ namespace { const char* _loggerCat = "LayerGroup"; -} + + static const openspace::properties::Property::PropertyInfo BlendTileInfo = { + "BlendTileLevels", + "Blend between levels", + "If this value is enabled, images between different levels are interpolated, " + "rather than switching between levels abruptly. This makes transitions smoother " + "and more visually pleasing." + }; + +} // namespace namespace openspace::globebrowsing { LayerGroup::LayerGroup(layergroupid::GroupID id) : properties::PropertyOwner(std::move(layergroupid::LAYER_GROUP_NAMES[id])) , _groupId(id) - , _levelBlendingEnabled({ "BlendTileLevels", "blend tile levels", "" }, false) // @TODO Missing documentation + , _levelBlendingEnabled(BlendTileInfo, true) { addProperty(_levelBlendingEnabled); } diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index 65ee2c015d..8c8d4c7fba 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -30,17 +30,52 @@ namespace { const char* keyMultiplier = "Multiplier"; const char* keyOffset = "Offset"; const char* keyValueBlending = "ValueBlending"; + + static const openspace::properties::Property::PropertyInfo SetDefaultInfo = { + "SetDefault", + "Set Default", + "If this value is triggered it will reset all of these values to their default " + "values." + }; + + static const openspace::properties::Property::PropertyInfo OpacityInfo = { + "Opacity", + "Opacity", + "This value sets the transparency of this layer. If this value is equal to '1', " + "the layer is completely opaque. If this value is equal to '0', the layer is " + "completely transparent." + }; + + static const openspace::properties::Property::PropertyInfo GammaInfo = { + "Gamma", + "Gamma", + "This value is used as an exponent to adjust the color for each tile." + }; + + static const openspace::properties::Property::PropertyInfo MultiplierInfo = { + "Multiplier", + "Multiplier", + "This value is used as a multiplier to adjust the color applied after taking the " + "gamma value as an exponent." + }; + + static const openspace::properties::Property::PropertyInfo OffsetInfo = { + "Offset", + "Offset", + "This value is used as an additive modifier to adjust the color applied after " + "the gamma exponent and the multiplier has been performed." + }; } // namespace namespace openspace::globebrowsing { LayerRenderSettings::LayerRenderSettings() : properties::PropertyOwner("Settings") - , setDefault({ "SetDefault", "Set Default", "" }) // @TODO Missing documentation - , opacity(properties::FloatProperty({ "Opacity", "Opacity", "" }, 1.f, 0.f, 1.f)) // @TODO Missing documentation - , gamma(properties::FloatProperty({ "Gamma", "Gamma", "" }, 1, 0, 5))// @TODO Missing documentation - , multiplier(properties::FloatProperty({ "Multiplier", "Multiplier", "" }, 1.f, 0.f, 20.f))// @TODO Missing documentation - , offset(properties::FloatProperty({ "Offset", "Offset", "" }, 0.f, -10000.f, 10000.f))// @TODO Missing documentation + , setDefault(SetDefaultInfo) + , opacity(OpacityInfo, 1.f, 0.f, 1.f) + , gamma(GammaInfo, 1.f, 0.f, 5.f) + , multiplier(MultiplierInfo, 1.f, 0.f, 20.f) + , offset(OffsetInfo, 0.f, -10000.f, 10000.f) , valueBlending(properties::FloatProperty({ "ValueBlending", "Value Blending", "" }, // @TODO Missing documentation 1.f, 0.f, 1.f)) , useValueBlending(false) diff --git a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp index 83dd2a118c..9d60df5fdd 100644 --- a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp +++ b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp @@ -37,6 +37,20 @@ namespace { const char* _loggerCat = "GdalWrapper"; + + static const openspace::properties::Property::PropertyInfo LogGdalErrorInfo = { + "LogGdalErrors", + "Log GDAL errors", + "If this value is enabled, any error that is raised by GDAL will be logged using " + "the logmanager. If this value is disabled, any error will be ignored." + }; + + static const openspace::properties::Property::PropertyInfo GdalMaximumCacheInfo = { + "GdalMaximumCacheSize", + "GDAL maximum cache size", + "This function sets the maximum amount of RAM memory in MB that GDAL is " + "permitted to use for caching." + }; } // namespace namespace openspace::globebrowsing { @@ -56,8 +70,7 @@ void gdalErrorHandler(CPLErr eErrClass, int errNo, const char *msg) { GdalWrapper* GdalWrapper::_singleton = nullptr; std::mutex GdalWrapper::_mutexLock; -void GdalWrapper::create(size_t maximumCacheSize, - size_t maximumMaximumCacheSize) { +void GdalWrapper::create(size_t maximumCacheSize, size_t maximumMaximumCacheSize) { std::lock_guard guard(_mutexLock); _singleton = new GdalWrapper(maximumCacheSize, maximumMaximumCacheSize); } @@ -85,12 +98,11 @@ bool GdalWrapper::logGdalErrors() const { return _logGdalErrors; } -GdalWrapper::GdalWrapper(size_t maximumCacheSize, - size_t maximumMaximumCacheSize) +GdalWrapper::GdalWrapper(size_t maximumCacheSize, size_t maximumMaximumCacheSize) : PropertyOwner("GdalWrapper") - , _logGdalErrors({ "LogGdalErrors", "Log GDAL errors", "" }, true) // @TODO Missing documentation + , _logGdalErrors(LogGdalErrorInfo, true) , _gdalMaximumCacheSize ( - { "GdalMaximumCacheSize", "GDAL maximum cache size", "" }, // @TODO Missing documentation + GdalMaximumCacheInfo, maximumCacheSize / (1024 * 1024), // Default 0, // Minimum: No caching maximumMaximumCacheSize / (1024 * 1024), // Maximum diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index e9ddab72d0..632c7f3207 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -49,14 +49,30 @@ namespace { const char* KeyFilePath = "FilePath"; const char* KeyBasePath = "BasePath"; const char* KeyPreCacheLevel = "PreCacheLevel"; + + static const openspace::properties::Property::PropertyInfo FilePathInfo = { + "FilePath", + "File Path", + "The path of the GDAL file or the image file that is to be used in this tile " + "provider." + }; + + static const openspace::properties::Property::PropertyInfo TilePixelSizeInfo = { + "TilePixelSize", + "Tile Pixel Size", + "This value is the preferred size (in pixels) for each tile. Choosing the right " + "value is a tradeoff between more efficiency (larger images) and better quality " + "(smaller images). The tile pixel size has to be smaller than the size of the " + "complete image if a single image is used." + }; } namespace openspace::globebrowsing::tileprovider { DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) : TileProvider(dictionary) - , _filePath({ "FilePath", "File Path", "" }, "") // @TODO Missing documentation - , _tilePixelSize({ "TilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation + , _filePath(FilePathInfo, "") + , _tilePixelSize(TilePixelSizeInfo, 32, 32, 2048) , _preCacheLevel(0) { _tileCache = OsEng.moduleEngine().module()->tileCache(); @@ -105,11 +121,10 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) addProperty(_tilePixelSize); } -DefaultTileProvider::DefaultTileProvider( - std::shared_ptr tileReader) +DefaultTileProvider::DefaultTileProvider(std::shared_ptr tileReader) : _asyncTextureDataProvider(tileReader) - , _filePath({ "filePath", "File Path", "" }, "") // @TODO Missing documentation - , _tilePixelSize({ "tilePixelSize", "Tile Pixel Size", "" }, 32, 32, 1024) // @TODO Missing documentation + , _filePath(FilePathInfo, "") + , _tilePixelSize(TilePixelSizeInfo, 32, 32, 2048) {} DefaultTileProvider::~DefaultTileProvider() {} From e93070504b8c589297de4ccfdddbd223b07e1853 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 25 Jul 2017 01:08:20 -0400 Subject: [PATCH 09/20] Some more property documentation --- .../cache/memoryawaretilecache.cpp | 67 +++++++++++++------ .../tile/tileprovider/singleimageprovider.cpp | 11 ++- src/interaction/orbitalnavigator.cpp | 21 ++++-- src/network/parallelconnection.cpp | 42 ++++++++---- 4 files changed, 97 insertions(+), 44 deletions(-) diff --git a/modules/globebrowsing/cache/memoryawaretilecache.cpp b/modules/globebrowsing/cache/memoryawaretilecache.cpp index 704fdaf705..5ad33722c5 100644 --- a/modules/globebrowsing/cache/memoryawaretilecache.cpp +++ b/modules/globebrowsing/cache/memoryawaretilecache.cpp @@ -37,6 +37,46 @@ namespace { const char* _loggerCat = "MemoryAwareTileCache"; + + static const openspace::properties::Property::PropertyInfo CpuAllocatedDataInfo = { + "CpuAllocatedTileData", + "CPU allocated tile data (MB)", + "This value denotes the amount of RAM memory (in MB) that this tile cache is " + "utilizing." + }; + + static const openspace::properties::Property::PropertyInfo GpuAllocatedDataInfo = { + "GpuAllocatedTileData", + "GPU allocated tile data (MB)", + "This value denotes the amount of GPU memory (in MB) that this tile cache is " + "utilizing." + }; + + static const openspace::properties::Property::PropertyInfo TileCacheSizeInfo = { + "TileCacheSize", + "Tile cache size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ApplyTileCacheInfo = { + "ApplyTileCacheSize", + "Apply tile cache size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ClearTileCacheInfo = { + "ClearTileCache", + "Clear tile cache", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UsePboInfo = { + "UsePbo", + "Use PBO", + "If this value is enabled, pixel buffer objects are used to upload the texture " + "data asynchronously. If this value is disabled, the upload is synchronously." + }; + } // namespace namespace openspace::globebrowsing::cache { @@ -44,27 +84,12 @@ namespace openspace::globebrowsing::cache { MemoryAwareTileCache::MemoryAwareTileCache() : PropertyOwner("TileCache") , _numTextureBytesAllocatedOnCPU(0) - , _cpuAllocatedTileData( - { "CpuAllocatedTileData", "CPU allocated tile data (MB)", "" }, // @TODO Missing documentation - 1024, // Default - 128, // Minimum - 2048, // Maximum - 1) // Step: One MB - , _gpuAllocatedTileData( - { "GpuAllocatedTileData", "GPU allocated tile data (MB)", ""}, // @TODO Missing documentation - 1024, // Default - 128, // Minimum - 2048, // Maximum - 1) // Step: One MB - , _tileCacheSize( - { "TileCacheSize", "Tile cache size", ""}, // @TODO Missing documentation - 1024, // Default - 128, // Minimum - 2048, // Maximum - 1) // Step: One MB - , _applyTileCacheSize({ "ApplyTileCacheSize", "Apply tile cache size", "" }) // @TODO Missing documentation - , _clearTileCache({ "ClearTileCache", "Clear tile cache", "" }) // @TODO Missing documentation - , _usePbo({ "UsePbo", "Use PBO", "" }, false) // @TODO Missing documentation + , _cpuAllocatedTileData(CpuAllocatedDataInfo, 1024, 128, 2048, 1) + , _gpuAllocatedTileData(GpuAllocatedDataInfo, 1024, 128, 2048, 1) + , _tileCacheSize(TileCacheSizeInfo, 1024, 128, 2048, 1) + , _applyTileCacheSize(ApplyTileCacheInfo) + , _clearTileCache(ClearTileCacheInfo) + , _usePbo(UsePboInfo, false) { createDefaultTextureContainers(); diff --git a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp index 60bb55434c..6a4397fc00 100644 --- a/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/singleimageprovider.cpp @@ -30,13 +30,20 @@ namespace { const char* KeyFilePath = "FilePath"; + + static const openspace::properties::Property::PropertyInfo FilePathInfo = { + "FilePath", + "File Path", + "The file path that is used for this image provider. The file must point to an " + "image that is then loaded and used for all tiles." + }; } // namespace namespace openspace::globebrowsing::tileprovider { SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath({ "FilePath", "File Path", "" }) // @TODO Missing documentation + , _filePath(FilePathInfo) { // Required input std::string filePath; @@ -50,7 +57,7 @@ SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary) SingleImageProvider::SingleImageProvider(const std::string& imagePath) : _tile(nullptr, nullptr, Tile::Status::Unavailable) - , _filePath({ "FilePath", "File Path", "" }, imagePath) // @TODO Missing documentation + , _filePath(FilePathInfo, imagePath) { reset(); } diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 008c4c0a47..9f6021650e 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -74,6 +74,18 @@ namespace { "Friction', and 'Zoom Friction' values are enabled. The lower this value is, the " "faster the camera movements will stop." }; + + static const openspace::properties::Property::PropertyInfo FollowFocusNodeInfo = { + "FollowFocusNodeRotationDistance", + "Follow focus node rotation distance", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo MinimumDistanceInfo = { + "MinimumAllowedDistance", + "Minimum allowed distance", + "" // @TODO Missing documentation + } } // namespace namespace openspace::interaction { @@ -83,13 +95,8 @@ OrbitalNavigator::OrbitalNavigator() , _rollFriction(RollFrictionInfo, true) , _rotationalFriction(RotationalFrictionInfo, true) , _zoomFriction(ZoomFrictionInfo, true) - , _followFocusNodeRotationDistance( - { "FollowFocusNodeRotationDistance", "Follow focus node rotation distance", "" }, // @TODO Missing documentation - 2.0f, 0.0f, 10.f - ) - , _minimumAllowedDistance( - {"MinimumAllowedDistance", "Minimum allowed distance", "" }, // @TODO Missing documentation - 10.0f, 0.0f, 10000.f) + , _followFocusNodeRotationDistance(FollowFocusNodeInfo, 2.0f, 0.0f, 10.f) + , _minimumAllowedDistance(FollowFocusNodeInfo, 10.0f, 0.0f, 10000.f) , _sensitivity(SensitivityInfo, 20.0f, 1.0f, 50.f) , _motionLag(FrictionInfo, 0.5f, 0.f, 1.f) , _mouseStates(_sensitivity * pow(10.0,-4), 1 / (_motionLag + 0.0000001)) diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index aa12b3ddfb..0407543276 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -115,6 +115,30 @@ namespace { "The name of this OpenSpace instance that will be potentially broadcast to other " "connected instances." }; + + static const openspace::properties::Property::PropertyInfo BufferTimeInfo = { + "BufferTime", + "Buffer Time", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TimeKeyFrameInfo = { + "TimeKeyframeInterval", + "Time keyframe interval", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo CameraKeyFrameInfo = { + "CameraKeyframeInterval", + "Camera Keyframe interval", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TimeToleranceInfo = { + "TimeTolerance", + "Time tolerance", + "" // @TODO Missing documentation + }; } // namespace namespace openspace { @@ -126,20 +150,10 @@ ParallelConnection::ParallelConnection() , _port(PortInfo, "20501") , _address(AddressInfo, "localhost") , _name(NameInfo, "Anonymous") - , _bufferTime({ "BufferTime", "Buffer Time", "" }, 1, 0.5, 10) // @TODO Missing documentation - , _timeKeyframeInterval( - { "TimeKeyframeInterval", "Time keyframe interval", ""}, // @TODO Missing documentation - 0.1f, - 0.f, - 1.f - ) - , _cameraKeyframeInterval( - { "CameraKeyframeInterval", "Camera Keyframe interval", "" }, // @TODO Missing documentation - 0.1f, - 0.f, - 1.f - ) - , _timeTolerance({ "TimeTolerance", "Time tolerance", "" }, 1.f, 0.5f, 5.f) // @TODO Missing documentation + , _bufferTime(BufferTimeInfo, 1, 0.5, 10) + , _timeKeyframeInterval(TimeKeyFrameInfo, 0.1f, 0.f, 1.f) + , _cameraKeyframeInterval(CameraKeyFrameInfo, 0.1f, 0.f, 1.f) + , _timeTolerance(TimeToleranceInfo, 1.f, 0.5f, 5.f) , _lastTimeKeyframeTimestamp(0) , _lastCameraKeyframeTimestamp(0) , _clientSocket(INVALID_SOCKET) From 2cef26c1e391a911f6dafee7a4f4e1252606ed8f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 25 Jul 2017 12:12:05 -0400 Subject: [PATCH 10/20] Update paper.md Add indexed affiliations Add references to the Summary text --- support/joss/paper.md | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/support/joss/paper.md b/support/joss/paper.md index 32f1308f7e..4493fd3043 100644 --- a/support/joss/paper.md +++ b/support/joss/paper.md @@ -6,40 +6,51 @@ tags: authors: - name: Alexander Bock orcid: 0000-0002-2849-6146 - affiliation: Linköping University - affiliation: New York University + affiliation: 1 + affiliation: 4 - name: Emil Axelsson orcid: 0000-0003-3482-6356 - affiliation: Linköping University - - name: Kalle Bladin + affiliation: 1 + - name: Karl Bladin orcid: 0000-0001-7789-0142 - affiliation: Linköping University + affiliation: 1 - name: Jonathas Costa orcid: 0000-0002-5008-5685 - affiliation: New York University + affiliation: 4 - name: Gene Payne orcid: 0000-0001-8022-4781 - affiliation: University of Utah + affiliation: 5 - name: Matthew Territo orcid: 0000-0002-7085-1770 - affiliation: University of Utah + affiliation: 5 - name: Joakim Kilby - affiliation: Linköping University + affiliation: 1 - name: Eric Myers orcid: 0000-0002-2474-5125 - affiliation: American Museum of Natural History + affiliation: 2 name: Masha Kuznetsova - affiliation: Community Coordinated Modeling Center + affiliation: 3 - name: Carter Emmart - affiliation: American Museum of Natural History + affiliation: 2 - name: Anders Ynnerman orcid: 0000-0002-9466-9826 - affiliation: Linköping University -date: 01 June 2017 + affiliation: 1 +affiliations: + - name: Linköping University + index: 1 + - name: American Museum of Natural History + index: 2 + - name: Community Coordinated Modeling Center + index: 3 + - New York University + index: 4 + - University of Utah + index: 5 +date: 25 July 2017 bibliography: paper.bib --- # Summary -OpenSpace is an open source interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public and scientists, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software supports multiple operating systems with an extensible architecture powering high resolution tiled displays, planetarium domes, as well as desktop computers. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. +OpenSpace [-@Webpage; @OpenSpace]is an open source interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos [@Bladin17GlobeBrowsing; @Bock15bOpenSpace]. Bringing the latest techniques from data visualization research to the general public and scientists [@Bock15OpenSpace], OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations over a large span of sizes [@Bock17DSG]. The software supports multiple operating systems with an extensible architecture powering high resolution tiled displays, planetarium domes, as well as desktop computers. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. -# References \ No newline at end of file +# References From d95576077b779def83d773bd27a3540f46a066e2 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 25 Jul 2017 18:06:55 -0400 Subject: [PATCH 11/20] More work on documentation --- modules/debugging/debuggingmodule.cpp | 8 + modules/debugging/debuggingmodule.h | 2 + .../rendering/renderablefieldlines.cpp | 40 ++- modules/galaxy/rendering/renderablegalaxy.cpp | 42 ++- modules/globebrowsing/globes/pointglobe.cpp | 24 +- .../globebrowsing/globes/renderableglobe.cpp | 152 +++++++++-- .../rendering/gpu/gpulayerrendersettings.cpp | 8 - .../rendering/layer/layerrendersettings.cpp | 33 +-- .../rendering/layer/layerrendersettings.h | 7 - .../tileprovider/temporaltileprovider.cpp | 9 +- modules/iswa/rendering/datacygnet.cpp | 57 +++- modules/iswa/rendering/iswabasegroup.cpp | 27 +- modules/iswa/rendering/iswacygnet.cpp | 15 +- modules/iswa/rendering/iswadatagroup.cpp | 57 +++- modules/iswa/rendering/iswakameleongroup.cpp | 17 +- modules/iswa/rendering/kameleonplane.cpp | 24 +- .../rendering/renderablekameleonvolume.cpp | 96 ++++++- .../rendering/renderablemultiresvolume.cpp | 126 +++++++-- .../newhorizons/rendering/renderablefov.cpp | 90 ++++-- .../rendering/renderablemodelprojection.cpp | 36 ++- .../rendering/renderableplanetprojection.cpp | 63 ++++- .../rendering/renderableplanetprojection.h | 1 - .../rendering/renderableshadowcylinder.cpp | 258 ++++++++++++++++-- .../rendering/renderableshadowcylinder.h | 24 +- .../newhorizons/util/projectioncomponent.cpp | 2 +- modules/onscreengui/src/guicomponent.cpp | 10 +- .../src/guiperformancecomponent.cpp | 35 ++- .../renderableconstellationbounds.cpp | 98 +++++-- .../rendering/renderableconstellationbounds.h | 8 +- .../space/translation/keplertranslation.cpp | 151 ++++++---- src/interaction/orbitalnavigator.cpp | 2 +- 31 files changed, 1215 insertions(+), 307 deletions(-) diff --git a/modules/debugging/debuggingmodule.cpp b/modules/debugging/debuggingmodule.cpp index 4e89c43622..4b009b91d4 100644 --- a/modules/debugging/debuggingmodule.cpp +++ b/modules/debugging/debuggingmodule.cpp @@ -24,6 +24,7 @@ #include +#include #include #include @@ -42,4 +43,11 @@ void DebuggingModule::internalInitialize() { fRenderable->registerClass("RenderableDebugPlane"); } +std::vector DebuggingModule::documentations() const { + return { + RenderableDebugPlane::Documentation() + }; +} + + } // namespace openspace diff --git a/modules/debugging/debuggingmodule.h b/modules/debugging/debuggingmodule.h index a030471b21..525aec54a8 100644 --- a/modules/debugging/debuggingmodule.h +++ b/modules/debugging/debuggingmodule.h @@ -35,6 +35,8 @@ public: DebuggingModule(); + std::vector documentations() const override; + protected: void internalInitialize() override; }; diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index e6fb08f376..0813f76ae1 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -70,22 +70,52 @@ namespace { const int SeedPointSourceFile = 0; const int SeedPointSourceTable = 1; + + static const openspace::properties::Property::PropertyInfo StepSizeInfo = { + "StepSize", + "Fieldline Step Size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo Classification = { + "Classification", + "Fieldline Classification", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo FieldlineColorInfo = { + "FieldlineColor", + "Fieldline Color", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo SeedPointSourceInfo = { + "Source", + "SeedPoint Source", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo SeedPointFileInfo = { + "SourceFile", + "SeedPoint File", + "" // @TODO Missing documentation + }; } // namespace namespace openspace { RenderableFieldlines::RenderableFieldlines(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize({ "StepSize", "Fieldline Step Size", "" }, defaultFieldlineStepSize, 0.f, 10.f) // @TODO Missing documentation - , _classification({ "Classification", "Fieldline Classification", "" }, true) // @TODO Missing documentation + , _stepSize(StepSizeInfo, defaultFieldlineStepSize, 0.f, 10.f) + , _classification(Classification, true) , _fieldlineColor( - { "FieldlineColor", "Fieldline Color", "" }, // @TODO Missing documentation + FieldlineColorInfo, defaultFieldlineColor, glm::vec4(0.f), glm::vec4(1.f) ) - , _seedPointSource({ "Source", "SeedPoint Source", "" }) // @TODO Missing documentation - , _seedPointSourceFile({ "SourceFile", "SeedPoint File", "" }) // @TODO Missing documentation + , _seedPointSource(SeedPointSourceInfo) + , _seedPointSourceFile(SeedPointFileInfo) , _program(nullptr) , _seedPointsAreDirty(true) , _fieldLinesAreDirty(true) diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index f98c73b749..94b86c6671 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -51,17 +51,47 @@ namespace { const std::string GlslBoundsVsPath = "${MODULES}/toyvolume/shaders/boundsVs.glsl"; const std::string GlslBoundsFsPath = "${MODULES}/toyvolume/shaders/boundsFs.glsl"; const std::string _loggerCat = "Renderable Galaxy"; -} + + static const openspace::properties::Property::PropertyInfo StepSizeInfo = { + "StepSize", + "Step Size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo PointStepSizeInfo = { + "PointStepSize", + "Point Step Size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TranslationInfo = { + "Translation", + "Translation", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo RotationInfo = { + "Rotation", + "Euler rotation", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo EnabledPointsRatioInfo = { + "NEnabledPointsRatio", + "Enabled points", + "" // @TODO Missing documentation + }; +} // namespace namespace openspace { RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _stepSize({ "StepSize", "Step Size", "" }, 0.012, 0.0005, 0.05) // @TODO Missing documentation - , _pointStepSize({ "PointStepSize", "Point Step Size", "" }, 0.01, 0.01, 0.1) // @TODO Missing documentation - , _translation({ "Translation", "Translation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0)) // @TODO Missing documentation - , _rotation({ "Rotation", "Euler rotation", "" }, glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28)) // @TODO Missing documentation - , _enabledPointsRatio({ "NEnabledPointsRatio", "Enabled points", "" }, 0.2, 0, 1) // @TODO Missing documentation + , _stepSize(StepSizeInfo, 0.012f, 0.0005f, 0.05f) + , _pointStepSize(PointStepSizeInfo, 0.01f, 0.01f, 0.1f) + , _translation(TranslationInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) + , _rotation(RotationInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(6.28f)) + , _enabledPointsRatio(EnabledPointsRatioInfo, 0.2f, 0.f, 1.f) { float stepSize; glm::vec3 scaling, translation, rotation; diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index 04c474c306..3514648d18 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -33,19 +33,27 @@ #include +namespace { + static const openspace::properties::Property::PropertyInfo IntensityClampInfo = { + "IntensityClamp", + "Intensity clamp", + "" + }; + + static const openspace::properties::Property::PropertyInfo LightIntensityInfo = { + "LightIntensity", + "Light intensity", + "" // @TODO Missing documentation + }; +} // namespace + namespace openspace::globebrowsing { PointGlobe::PointGlobe(const RenderableGlobe& owner) : Renderable({ { "Name", owner.name() } }) , _owner(owner) - , _intensityClamp( - { "IntensityClamp", "Intensity clamp", ""}, // @TODO Missing documentation - 1, 0, 1 - ) - , _lightIntensity( - { "LightIntensity", "Light intensity", ""}, // @TODO Missing documentation - 1, 0, 50 - ) + , _intensityClamp(IntensityClampInfo, 1.f, 0.f, 1.f) + , _lightIntensity(LightIntensityInfo, 1.f, 0.f, 50.f) { addProperty(_intensityClamp); addProperty(_lightIntensity); diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index e11286978d..01045b9611 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -34,6 +34,120 @@ namespace { const char* keyRadii = "Radii"; const char* keySegmentsPerPatch = "SegmentsPerPatch"; const char* keyLayers = "Layers"; + + static const openspace::properties::Property::PropertyInfo SaveOrThrowInfo = { + "SaveOrThrowCamera", + "Save or throw camera", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ShowChunkEdgeInfo = { + "ShowChunkEdges", + "Show chunk edges", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ShowChunkBoundsInfo = { + "ShowChunkBounds", + "Show chunk bounds", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ShowChunkAABBInfo = { + "ShowChunkAABB", + "Show chunk AABB", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo HeightResolutionInfo = { + "ShowHeightResolution", + "Show height resolution", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo HeightIntensityInfo = { + "ShowHeightIntensities", + "Show height intensities", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo FrustumCullingInfo = { + "PerformFrustumCulling", + "Perform frustum culling", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo HorizonCullingInfo = { + "PerformHorizonCulling", + "Perform horizon culling", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LevelProjectedAreaInfo = { + "LevelByProjectedAreaElseDistance", + "Level by projected area (else distance)", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ResetTileProviderInfo = { + "ResetTileProviders", + "Reset tile providers", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo CollectStatsInfo = { + "CollectStats", + "Collect stats", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LimitLevelInfo = { + "LimitLevelByAvailableData", + "Limit level by available data", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ModelSpaceRenderingInfo = { + "ModelSpaceRenderingCutoffLevel", + "Model Space Rendering Cutoff Level", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo PerformShadingInfo = { + "PerformShading", + "Perform shading", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo AtmosphereInfo = { + "Atmosphere", + "Atmosphere", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo AccurateNormalsInfo = { + "UseAccurateNormals", + "Use Accurate Normals", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LodScaleFactorInfo = { + "LodScaleFactor", + "Level of Detail Scale Factor", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo CameraMinHeightInfo = { + "CameraMinHeight", + "Camera Minimum Height", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo OrenNayarRoughnessInfo = { + "OrenNayarRoughness", + "orenNayarRoughness", + "" // @TODO Missing documentation + }; } // namespace using namespace openspace::properties; @@ -43,27 +157,27 @@ namespace openspace::globebrowsing { RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _debugProperties({ - BoolProperty({ "SaveOrThrowCamera", "save or throw camera", "" }, false), // @TODO Missing documentation - BoolProperty({ "ShowChunkEdges", "show chunk edges", "" }, false), // @TODO Missing documentation - BoolProperty({ "ShowChunkBounds", "show chunk bounds", "" }, false), // @TODO Missing documentation - BoolProperty({ "ShowChunkAABB", "show chunk AABB", "" }, false), // @TODO Missing documentation - BoolProperty({ "ShowHeightResolution", "show height resolution", "" }, false), // @TODO Missing documentation - BoolProperty({ "ShowHeightIntensities", "show height intensities", "" }, false), // @TODO Missing documentation - BoolProperty({ "PerformFrustumCulling", "perform frustum culling", "" }, true), // @TODO Missing documentation - BoolProperty({ "PerformHorizonCulling", "perform horizon culling", "" }, true), // @TODO Missing documentation - BoolProperty({ "LevelByProjectedAreaElseDistance", "level by projected area (else distance)", "" }, true), // @TODO Missing documentation - BoolProperty({ "ResetTileProviders", "reset tile providers", "" }, false), // @TODO Missing documentation - BoolProperty({ "CollectStats", "collect stats", "" }, false), // @TODO Missing documentation - BoolProperty({ "LimitLevelByAvailableData", "Limit level by available data", "" }, true), // @TODO Missing documentation - IntProperty({ "ModelSpaceRenderingCutoffLevel", "Model Space Rendering Cutoff Level", "" }, 10, 1, 22) // @TODO Missing documentation + BoolProperty(SaveOrThrowInfo, false), + BoolProperty(ShowChunkEdgeInfo, false), + BoolProperty(ShowChunkBoundsInfo, false), + BoolProperty(ShowChunkAABBInfo, false), + BoolProperty(HeightResolutionInfo, false), + BoolProperty(HeightIntensityInfo, false), + BoolProperty(FrustumCullingInfo, true), + BoolProperty(HorizonCullingInfo, true), + BoolProperty(LevelProjectedAreaInfo, true), + BoolProperty(ResetTileProviderInfo, false), + BoolProperty(CollectStatsInfo, false), + BoolProperty(LimitLevelInfo, true), + IntProperty(ModelSpaceRenderingInfo, 10, 1, 22) }) , _generalProperties({ - BoolProperty({ "PerformShading", "perform shading", "" }, true), // @TODO Missing documentation - BoolProperty({ "Atmosphere", "atmosphere", "" }, false), // @TODO Missing documentation - BoolProperty({ "UseAccurateNormals", "useAccurateNormals", "" }, false), // @TODO Missing documentation - FloatProperty({ "LodScaleFactor", "lodScaleFactor", "" }, 10.0f, 1.0f, 50.0f), // @TODO Missing documentation - FloatProperty({ "CameraMinHeight", "cameraMinHeight", "" }, 100.0f, 0.0f, 1000.0f), // @TODO Missing documentation - FloatProperty({ "OrenNayarRoughness", "orenNayarRoughness", "" }, 0.0f, 0.0f, 1.0f) // @TODO Missing documentation + BoolProperty(PerformShadingInfo, true), + BoolProperty(AtmosphereInfo, false), + BoolProperty(AccurateNormalsInfo, false), + FloatProperty(LodScaleFactorInfo, 10.f, 1.f, 50.f), + FloatProperty(CameraMinHeightInfo, 100.f, 0.f, 1000.f), + FloatProperty(OrenNayarRoughnessInfo, 0.f, 0.f, 1.f) }) , _debugPropertyOwner("Debug") { diff --git a/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp b/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp index 256e08f8c7..450f6708cf 100644 --- a/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp +++ b/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp @@ -35,10 +35,6 @@ void GPULayerRenderSettings::setValue(ghoul::opengl::ProgramObject* programObjec gpuGamma.setValue(programObject, layerSettings.gamma.value()); gpuMultiplier.setValue(programObject, layerSettings.multiplier.value()); gpuOffset.setValue(programObject, layerSettings.offset.value()); - - if (layerSettings.useValueBlending) { - gpuValueBlending.setValue(programObject, layerSettings.valueBlending.value()); - } } void GPULayerRenderSettings::bind(const LayerRenderSettings& layerSettings, @@ -49,10 +45,6 @@ void GPULayerRenderSettings::bind(const LayerRenderSettings& layerSettings, gpuGamma.bind(programObject, nameBase + "gamma"); gpuMultiplier.bind(programObject, nameBase + "multiplier"); gpuOffset.bind(programObject, nameBase + "offset"); - - if (layerSettings.useValueBlending) { - gpuValueBlending.bind(programObject, nameBase + "valueBlending"); - } } } // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index 8c8d4c7fba..37902658f5 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -76,22 +76,23 @@ LayerRenderSettings::LayerRenderSettings() , gamma(GammaInfo, 1.f, 0.f, 5.f) , multiplier(MultiplierInfo, 1.f, 0.f, 20.f) , offset(OffsetInfo, 0.f, -10000.f, 10000.f) - , valueBlending(properties::FloatProperty({ "ValueBlending", "Value Blending", "" }, // @TODO Missing documentation - 1.f, 0.f, 1.f)) - , useValueBlending(false) { - // Implicitly added properties (other ones are not for all layer types) addProperty(opacity); addProperty(gamma); addProperty(multiplier); addProperty(offset); addProperty(setDefault); - setDefault.onChange([this](){ setDefaultValues(); }); + setDefault.onChange([this](){ + opacity = 1.f; + gamma = 1.f; + multiplier = 1.f; + offset = 0.f; + }); } void LayerRenderSettings::setValuesFromDictionary( - const ghoul::Dictionary& renderSettingsDict) + const ghoul::Dictionary& renderSettingsDict) { float dictOpacity; float dictGamma; @@ -99,22 +100,18 @@ void LayerRenderSettings::setValuesFromDictionary( float dictOffset; float dictValueBlending; - if(renderSettingsDict.getValue(keyOpacity, dictOpacity)) { + if (renderSettingsDict.getValue(keyOpacity, dictOpacity)) { opacity = dictOpacity; } - if(renderSettingsDict.getValue(keyGamma, dictGamma)) { + if (renderSettingsDict.getValue(keyGamma, dictGamma)) { gamma = dictGamma; } - if(renderSettingsDict.getValue(keyMultiplier, dictMultiplier)) { + if (renderSettingsDict.getValue(keyMultiplier, dictMultiplier)) { multiplier = dictMultiplier; } - if(renderSettingsDict.getValue(keyOffset, dictOffset)) { + if (renderSettingsDict.getValue(keyOffset, dictOffset)) { multiplier = dictOffset; } - if(renderSettingsDict.getValue(keyValueBlending, dictValueBlending)) { - valueBlending = dictValueBlending; - useValueBlending = true; - } } float LayerRenderSettings::performLayerSettings(float currentValue) const { @@ -138,12 +135,4 @@ glm::vec4 LayerRenderSettings::performLayerSettings(glm::vec4 currentValue) cons return newValue; } -void LayerRenderSettings::setDefaultValues() { - opacity = 1.f; - gamma = 1.f; - multiplier = 1.f; - offset = 0.f; - valueBlending = 1.f; -} - } // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.h b/modules/globebrowsing/rendering/layer/layerrendersettings.h index 3128556f1e..f46d648e5f 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.h +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.h @@ -42,10 +42,6 @@ struct LayerRenderSettings : public properties::PropertyOwner { properties::FloatProperty multiplier; properties::FloatProperty offset; - // Optional properties - properties::FloatProperty valueBlending; - bool useValueBlending = false; - void setValuesFromDictionary(const ghoul::Dictionary& renderSettingsDict); /// This function matches the function with the same name in the @@ -54,9 +50,6 @@ struct LayerRenderSettings : public properties::PropertyOwner { /// This function matches the function with the same name in the /// shader code glm::vec4 performLayerSettings(glm::vec4 currentValue) const; - -private: - void setDefaultValues(); }; } // namespace openspace::globebrowsing diff --git a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp index 5867c00cf5..2982fe0496 100644 --- a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp @@ -42,6 +42,13 @@ namespace { const char* KeyBasePath = "BasePath"; const char* KeyPreCacheStartTime = "PreCacheStartTime"; const char* KeyPreCacheEndTime = "PreCacheEndTime"; + + static const openspace::properties::Property::PropertyInfo FilePathInfo = { + "FilePath", + "File Path", + "This is the path to the XML configuration file that describes the temporal tile " + "information." + }; } // namespace namespace openspace::globebrowsing::tileprovider { @@ -56,7 +63,7 @@ const char* TemporalTileProvider::TemporalXMLTags::TIME_FORMAT = "OpenSpaceTimeI TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) : _initDict(dictionary) - , _filePath({ "FilePath", "File Path", "" }, "") // @TODO Missing documentation + , _filePath(FilePathInfo) , _successfulInitialization(false) { std::string filePath; diff --git a/modules/iswa/rendering/datacygnet.cpp b/modules/iswa/rendering/datacygnet.cpp index f6ec1c6a6d..21ad6984aa 100644 --- a/modules/iswa/rendering/datacygnet.cpp +++ b/modules/iswa/rendering/datacygnet.cpp @@ -34,6 +34,49 @@ namespace { const char* _loggerCat = "DataCygnet"; + + static const openspace::properties::Property::PropertyInfo DataOptionsInfo = { + "DataOptions", + "Data Options", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UseLogInfo = { + "UseLog", + "Use Logarithm", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UseHistogramInfo = { + "UseHistogram", + "Auto Contrast", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo AutoFilterInfo = { + "AutoFilter", + "Auto Filter", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo NormalizeValuesInfo = { + "NormValues", + "Normalize Values", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo BackgroundInfo = { + "BackgroundValues", + "Background Values", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TransferFunctionsFile = { + "Transferfunctions", + "Transfer Functions", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace { @@ -41,13 +84,13 @@ namespace openspace { DataCygnet::DataCygnet(const ghoul::Dictionary& dictionary) : IswaCygnet(dictionary) , _dataProcessor(nullptr) - , _dataOptions({ "DataOptions", "Data Options", "" }) // @TODO Missing documentation - , _useLog({ "UseLog","Use Logarithm", "" }, false) // @TODO Missing documentation - , _useHistogram({ "UseHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation - , _autoFilter({ "AutoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation - , _normValues({ "NormValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues({ "BackgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile({ "Transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation + , _dataOptions(DataOptionsInfo) + , _useLog(UseLogInfo, false) + , _useHistogram(UseHistogramInfo, false) + , _autoFilter(AutoFilterInfo, true) + , _normValues(NormalizeValuesInfo, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(5.f)) + , _backgroundValues(BackgroundInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(1.f)) + , _transferFunctionsFile(TransferFunctionsFile, "${SCENE}/iswa/tfs/default.tf") //FOR TESTING , _numOfBenchmarks(0) , _avgBenchmarkTime(0.0f) diff --git a/modules/iswa/rendering/iswabasegroup.cpp b/modules/iswa/rendering/iswabasegroup.cpp index b92cca6db1..db2c08d102 100644 --- a/modules/iswa/rendering/iswabasegroup.cpp +++ b/modules/iswa/rendering/iswabasegroup.cpp @@ -38,15 +38,34 @@ namespace { const char* _loggerCat = "IswaBaseGroup"; using json = nlohmann::json; + + static const openspace::properties::Property::PropertyInfo EnabledInfo = { + "Enabled", + "Enabled", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo AlphaInfo = { + "Alpha", + "Alpha", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo DeleteInfo = { + "Delete", + "Delete", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace { IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) : properties::PropertyOwner(std::move(name)) - , _enabled({ "Enabled", "Enabled", "" }, true) // @TODO Missing documentation - , _alpha({ "Alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation - , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation + , _enabled(EnabledInfo, true) + , _alpha(AlphaInfo, 0.9f, 0.f, 1.f) + , _delete(DeleteInfo) , _registered(false) , _type(type) , _dataProcessor(nullptr) @@ -55,7 +74,7 @@ IswaBaseGroup::IswaBaseGroup(std::string name, std::string type) addProperty(_alpha); addProperty(_delete); - _groupEvent = std::make_shared >(); + _groupEvent = std::make_shared>(); registerProperties(); } diff --git a/modules/iswa/rendering/iswacygnet.cpp b/modules/iswa/rendering/iswacygnet.cpp index 09ec2bd9a1..4ad94a72e4 100644 --- a/modules/iswa/rendering/iswacygnet.cpp +++ b/modules/iswa/rendering/iswacygnet.cpp @@ -35,14 +35,25 @@ namespace { const char* _loggerCat = "IswaCygnet"; + + static const openspace::properties::Property::PropertyInfo DeleteInfo = { + "Delete", + "Delete", + "" // @TODO Missing documentation + }; + static const openspace::properties::Property::PropertyInfo AlphaInfo = { + "Alpha", + "Alpha", + "" // @TODO Missing documentation + }; } // namespace namespace openspace { IswaCygnet::IswaCygnet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _delete({ "Delete", "Delete", "" }) // @TODO Missing documentation - , _alpha({ "Alpha", "Alpha", "" }, 0.9f, 0.0f, 1.0f) // @TODO Missing documentation + , _delete(DeleteInfo) + , _alpha(AlphaInfo, 0.9f, 0.f, 1.f) , _shader(nullptr) , _group(nullptr) , _textureDirty(false) diff --git a/modules/iswa/rendering/iswadatagroup.cpp b/modules/iswa/rendering/iswadatagroup.cpp index 62578eabcb..6048b9873b 100644 --- a/modules/iswa/rendering/iswadatagroup.cpp +++ b/modules/iswa/rendering/iswadatagroup.cpp @@ -38,18 +38,61 @@ namespace { const char* _loggerCat = "IswaDataGroup"; using json = nlohmann::json; + + static const openspace::properties::Property::PropertyInfo UseLogInfo = { + "UseLog", + "Use Logarithm", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UseHistogramInfo = { + "UseHistogram", + "Auto Contrast", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo AutoFilterInfo = { + "AutoFilter", + "Auto Filter", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo NormalizeValues = { + "NormValues", + "Normalize Values", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo BackgroundInfo = { + "BackgroundValues", + "Background Values", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TransferFunctionInfo = { + "Transferfunctions", + "Transfer Functions", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo DataOptionsInfo = { + "DataOptions", + "Data Options", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace{ IswaDataGroup::IswaDataGroup(std::string name, std::string type) : IswaBaseGroup(name, type) - , _useLog({ "UseLog","Use Logarithm", "" }, false) // @TODO Missing documentation - , _useHistogram({ "UseHistogram", "Auto Contrast", "" }, false) // @TODO Missing documentation - , _autoFilter({ "AutoFilter", "Auto Filter", "" }, true) // @TODO Missing documentation - , _normValues({ "NormValues", "Normalize Values", "" }, glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) // @TODO Missing documentation - , _backgroundValues({ "BackgroundValues", "Background Values", "" }, glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0)) // @TODO Missing documentation - , _transferFunctionsFile({ "Transferfunctions", "Transfer Functions", "" }, "${SCENE}/iswa/tfs/default.tf") // @TODO Missing documentation - , _dataOptions({ "DataOptions", "Data Options", "" }) // @TODO Missing documentation + , _useLog(UseLogInfo, false) + , _useHistogram(UseHistogramInfo, false) + , _autoFilter(AutoFilterInfo, true) + , _normValues(NormalizeValues, glm::vec2(1.f), glm::vec2(0.f), glm::vec2(5.f)) + , _backgroundValues(BackgroundInfo, glm::vec2(0.f), glm::vec2(0.f), glm::vec2(1.f)) + , _transferFunctionsFile(TransferFunctionInfo, "${SCENE}/iswa/tfs/default.tf") + , _dataOptions(DataOptionsInfo) { addProperty(_useLog); addProperty(_useHistogram); diff --git a/modules/iswa/rendering/iswakameleongroup.cpp b/modules/iswa/rendering/iswakameleongroup.cpp index 201a2a537f..926f7c3ca0 100644 --- a/modules/iswa/rendering/iswakameleongroup.cpp +++ b/modules/iswa/rendering/iswakameleongroup.cpp @@ -38,13 +38,26 @@ namespace { const char* _loggerCat = "IswaDataGroup"; using json = nlohmann::json; + + static const openspace::properties::Property::PropertyInfo ResolutionInfo = { + "Resolution", + "Resolution%", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo FieldlineSeedInfo = { + "FieldlineSeedsIndexFile", + "Fieldline Seedpoints", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace{ IswaKameleonGroup::IswaKameleonGroup(std::string name, std::string type) : IswaDataGroup(name, type) - , _resolution({ "Resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _fieldlines({ "FieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation + , _resolution(ResolutionInfo, 100.f, 10.f, 200.f) + , _fieldlines(FieldlineSeedInfo) , _fieldlineIndexFile("") , _kameleonPath("") { diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp index 98a875716e..03d25aea2b 100644 --- a/modules/iswa/rendering/kameleonplane.cpp +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -33,15 +33,33 @@ namespace { using json = nlohmann::json; const char* _loggerCat = "KameleonPlane"; + + static const openspace::properties::Property::PropertyInfo FieldLineSeedsInfo = { + "FieldlineSeedsIndexFile", + "Fieldline Seedpoints", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ResolutionInfo = { + "Resolution", + "Resolution%", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo SliceInfo = { + "Slice", + "Slice", + "" // @TODO Missing documentation + }; } // namespace namespace openspace { KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) : DataCygnet(dictionary) - , _fieldlines({ "FieldlineSeedsIndexFile", "Fieldline Seedpoints", "" }) // @TODO Missing documentation - , _resolution({ "Resolution", "Resolution%", "" }, 100.0f, 10.0f, 200.0f) // @TODO Missing documentation - , _slice({ "Slice", "Slice", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation + , _fieldlines(FieldLineSeedsInfo) + , _resolution(ResolutionInfo, 100.f, 10.f, 200.f) + , _slice(SliceInfo, 0.f, 0.f, 1.f) { addProperty(_resolution); addProperty(_slice); diff --git a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp index ec0780afbb..9b0a27c389 100644 --- a/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp +++ b/modules/kameleonvolume/rendering/renderablekameleonvolume.cpp @@ -58,30 +58,102 @@ namespace { const char* KeyCache = "Cache"; const char* KeyGridType = "GridType"; const char* ValueSphericalGridType = "Spherical"; + + static const openspace::properties::Property::PropertyInfo DimensionsInfo = { + "Dimensions", + "Dimensions", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo VariableInfo = { + "Variable", + "Variable", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LowerDomainBoundInfo = { + "LowerDomainBound", + "Lower Domain Bound", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UpperDomainBoundInfo = { + "UpperDomainBound", + "Upper Domain Bound", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo DomainScaleInfo = { + "DomainScale", + "Domain scale", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LowerValueBoundInfo = { + "LowerValueBound", + "Lower Value Bound", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UpperValueBoundInfo = { + "UpperValueBound", + "Upper Value Bound", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo GridTypeInfo = { + "GridType", + "Grid Type", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo StepSizeInfo = { + "StepSize", + "Step Size", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo SourcePathInfo = { + "SourcePath", + "Source Path", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TransferFunctionInfo = { + "TransferFunctionPath", + "Transfer Function Path", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo CacheInfo = { + "Cache", + "Cache", + "" // @TODO Missing documentation + }; } // namespace namespace openspace { RenderableKameleonVolume::RenderableKameleonVolume(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _dimensions({ "Dimensions", "Dimensions", "" }) // @TODO Missing documentation - , _variable({ "Variable", "Variable", "" }) // @TODO Missing documentation - , _lowerDomainBound({ "LowerDomainBound", "Lower Domain Bound", "" }) // @TODO Missing documentation - , _upperDomainBound({ "UpperDomainBound", "Upper Domain Bound", "" }) // @TODO Missing documentation - , _domainScale({ "DomainScale", "Domain scale", "" }) // @TODO Missing documentation + , _dimensions(DimensionsInfo) + , _variable(VariableInfo) + , _lowerDomainBound(LowerDomainBoundInfo) + , _upperDomainBound(UpperDomainBoundInfo) + , _domainScale(DomainScaleInfo) , _autoDomainBounds(false) - , _lowerValueBound({ "LowerValueBound", "Lower Value Bound", "" }, 0.f, 0.f, 1.f) // @TODO Missing documentation - , _upperValueBound({ "UpperValueBound", "Upper Value Bound", "" }, 1.f, 0.01f, 1.f) // @TODO Missing documentation + , _lowerValueBound(LowerValueBoundInfo, 0.f, 0.f, 1.f) + , _upperValueBound(UpperValueBoundInfo, 1.f, 0.01f, 1.f) , _autoValueBounds(false) - , _gridType({ "GridType", "Grid Type", "" }, properties::OptionProperty::DisplayType::Dropdown) // @TODO Missing documentation + , _gridType(GridTypeInfo, properties::OptionProperty::DisplayType::Dropdown) , _autoGridType(false) , _clipPlanes(nullptr) - , _stepSize({ "StepSize", "Step Size", "" }, 0.02f, 0.01f, 1.f) // @TODO Missing documentation - , _sourcePath({ "SourcePath", "Source Path", "" }) // @TODO Missing documentation - , _transferFunctionPath({ "TransferFunctionPath", "Transfer Function Path", "" }) // @TODO Missing documentation + , _stepSize(StepSizeInfo, 0.02f, 0.01f, 1.f) + , _sourcePath(SourcePathInfo) + , _transferFunctionPath(TransferFunctionInfo) , _raycaster(nullptr) , _transferFunction(nullptr) - , _cache({ "Cache", "Cache", "" }) // @TODO Missing documentation + , _cache(CacheInfo) { glm::vec3 dimensions; diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index a2e48b63ab..090e5c4b70 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -80,6 +80,85 @@ namespace { const char* GlslHelperPath = "${MODULES}/multiresvolume/shaders/helper.glsl"; const char* GlslHeaderPath = "${MODULES}/multiresvolume/shaders/header.glsl"; bool registeredGlslHelpers = false; + + static const openspace::properties::Property::PropertyInfo StepSizeCoefficientInfo = { + "StepSizeCoefficient", + "Stepsize Coefficient", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo CurrentTimeInfo = { + "CurrentTime", + "Current Time", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo MemoryBudgetInfo = { + "MemoryBudget", + "Memory Budget", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo StreamingBudgetInfo = { + "StreamingBudget", + "Streaming Budget", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo UseGlobalTimeInfo = { + "UseGlobalTime", + "Global Time", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo LoopInfo = { + "Loop", + "Loop", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo SelectorNameInfo = { + "Selector", + "Brick Selector", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo StatsToFileInfo = { + "PrintStats", + "Print Stats", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo StatsToFileNameInfo = { + "PrintStatsFileName", + "Stats Filename", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ScalingExponentInfo = { + "ScalingExponent", + "Scaling Exponent", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo ScalingInfo = { + "Scaling", + "Scaling", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo TranslationInfo = { + "Translation", + "Translation", + "" // @TODO Missing documentation + }; + + static const openspace::properties::Property::PropertyInfo RotationInfo = { + "Rotation", + "Euler rotation", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace { @@ -95,20 +174,20 @@ RenderableMultiresVolume::RenderableMultiresVolume (const ghoul::Dictionary& dic , _errorHistogramManager(nullptr) , _histogramManager(nullptr) , _localErrorHistogramManager(nullptr) - , _stepSizeCoefficient({ "StepSizeCoefficient", "Stepsize Coefficient", "" }, 1.f, 0.01f, 10.f) // @TODO Missing documentation - , _currentTime({ "CurrentTime", "Current Time", "" }, 0, 0, 0) // @TODO Missing documentation - , _memoryBudget({ "MemoryBudget", "Memory Budget", "" }, 0, 0, 0) // @TODO Missing documentation - , _streamingBudget({ "StreamingBudget", "Streaming Budget", "" }, 0, 0, 0) // @TODO Missing documentation - , _useGlobalTime({ "UseGlobalTime", "Global Time", "" }, false) // @TODO Missing documentation - , _loop({ "Loop", "Loop", "" }, false) // @TODO Missing documentation - , _selectorName({ "Selector", "Brick Selector", "" }) // @TODO Missing documentation + , _stepSizeCoefficient(StepSizeCoefficientInfo, 1.f, 0.01f, 10.f) + , _currentTime(CurrentTimeInfo, 0, 0, 0) + , _memoryBudget(MemoryBudgetInfo, 0, 0, 0) + , _streamingBudget(StreamingBudgetInfo, 0, 0, 0) + , _useGlobalTime(UseGlobalTimeInfo, false) + , _loop(LoopInfo, false) + , _selectorName(SelectorNameInfo) , _gatheringStats(false) - , _statsToFile({ "PrintStats", "Print Stats", "" }, false) // @TODO Missing documentation - , _statsToFileName({ "PrintStatsFileName", "Stats Filename", "" }) // @TODO Missing documentation - , _scalingExponent({ "ScalingExponent", "Scaling Exponent", "" }, 1, -10, 20) // @TODO Missing documentation - , _scaling({ "Scaling", "Scaling", "" }, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _translation({ "Translation", "Translation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) // @TODO Missing documentation - , _rotation({ "Rotation", "Euler rotation", "" }, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) // @TODO Missing documentation + , _statsToFile(StatsToFileInfo, false) + , _statsToFileName(StatsToFileNameInfo) + , _scalingExponent(ScalingExponentInfo, 1, -10, 20) + , _scaling(ScalingInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(10.f)) + , _translation(TranslationInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(10.f)) + , _rotation(RotationInfo, glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(6.28f)) { std::string name; //bool success = dictionary.getValue(constants::scenegraphnode::keyName, name); @@ -349,9 +428,24 @@ bool RenderableMultiresVolume::initialize() { unsigned int maxInitialBudget = 2048; int initialBudget = std::min(maxInitialBudget, maxNumBricks); - _currentTime = properties::IntProperty({ "currentTime", "Current Time", "" }, 0, 0, _tsp->header().numTimesteps_ - 1); // @TODO Missing documentation - _memoryBudget = properties::IntProperty({ "memoryBudget", "Memory Budget", "" }, initialBudget, 0, maxNumBricks); // @TODO Missing documentation - _streamingBudget = properties::IntProperty({ "streamingBudget", "Streaming Budget", "" }, initialBudget, 0, maxNumBricks); // @TODO Missing documentation + _currentTime = properties::IntProperty( + CurrentTimeInfo, + 0, + 0, + _tsp->header().numTimesteps_ - 1 + ); + _memoryBudget = properties::IntProperty( + MemoryBudgetInfo, + initialBudget, + 0, + maxNumBricks + ); + _streamingBudget = properties::IntProperty( + StreamingBudgetInfo, + initialBudget, + 0, + maxNumBricks + ); addProperty(_currentTime); addProperty(_memoryBudget); addProperty(_streamingBudget); diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index d53621991c..e830715a20 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -75,6 +75,61 @@ namespace { "value of smaller than 1, the field of view will hover of ther surface, thus " "making it more visible." }; + + static const openspace::properties::Property::PropertyInfo DefaultStartColorInfo = { + "Colors.DefaultStart", + "Start of default color", + "This value determines the color of the field of view frustum close to the " + "instrument. The final colors are interpolated between this value and the end " + "color." + }; + + static const openspace::properties::Property::PropertyInfo DefaultEndColorInfo = { + "Colors.DefaultEnd", + "End of default color", + "This value determines the color of the field of view frustum close to the " + "target. The final colors are interpolated between this value and the start " + "color." + }; + + static const openspace::properties::Property::PropertyInfo ActiveColorInfo = { + "Colors.Active", + "Active Color", + "This value determines the color that is used when the instrument's field of " + "view is active." + }; + + static const openspace::properties::Property::PropertyInfo TargetInFovInfo = { + "Colors.TargetInFieldOfView", + "Target in field-of-view Color", + "This value determines the color that is used if the target is inside the field " + "of view of the instrument but the instrument is not yet active." + }; + + static const openspace::properties::Property::PropertyInfo IntersectionStartInfo = { + "Colors.IntersectionStart", + "Start of the intersection", + "This value determines the color that is used close to the instrument if one of " + "the field of view corners is intersecting the target object. The final color is " + "retrieved by interpolating between this color and the intersection end color." + }; + + static const openspace::properties::Property::PropertyInfo IntersectionEndInfo = { + "Colors.IntersectionEnd", + "End of the intersection", + "This value determines the color that is used close to the target if one of the " + "field of view corners is intersecting the target object. The final color is " + "retrieved by interpolating between this color and the intersection begin color." + }; + + static const openspace::properties::Property::PropertyInfo SquareColorInfo = { + "Colors.Square", + "Orthogonal Square", + "This value determines the color that is used for the field of view square in " + "the case that there is no intersection and that the instrument is not currently " + "active." + }; + } // namespace namespace openspace { @@ -171,34 +226,13 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary) , _programObject(nullptr) , _drawFOV(false) , _colors({ - { - { "Colors.DefaultStart", "Start of default color", "" }, // @TODO Missing documentation - glm::vec4(0.4f) - }, - { - { "Colors.DefaultEnd", "End of default color", "" }, // @TODO Missing documentation - glm::vec4(0.85f, 0.85f, 0.85f, 1.f) - }, - { - { "Colors.Active", "Active Color", "" }, // @TODO Missing documentation - glm::vec4(0.f, 1.f, 0.f, 1.f) - }, - { - { "Colors.TargetInFieldOfView", "Target-in-field-of-view Color", "" }, // @TODO Missing documentation - glm::vec4(0.f, 0.5f, 0.7f, 1.f) - }, - { - { "Colors.IntersectionStart", "Start of the intersection", "" }, // @TODO Missing documentation - glm::vec4(1.f, 0.89f, 0.f, 1.f) - }, - { - { "Colors.IntersectionEnd", "End of the intersection", "" }, // @TODO Missing documentation - glm::vec4(1.f, 0.29f, 0.f, 1.f) - }, - { - { "Colors.Square", "Orthogonal Square", "" }, // @TODO Missing documentation - glm::vec4(0.85f, 0.85f, 0.85f, 1.f) - } + { DefaultStartColorInfo, glm::vec4(0.4f) }, + { DefaultEndColorInfo, glm::vec4(0.85f, 0.85f, 0.85f, 1.f) }, + { ActiveColorInfo, glm::vec4(0.f, 1.f, 0.f, 1.f) }, + { TargetInFovInfo, glm::vec4(0.f, 0.5f, 0.7f, 1.f) }, + { IntersectionStartInfo, glm::vec4(1.f, 0.89f, 0.f, 1.f) }, + { IntersectionEndInfo, glm::vec4(1.f, 0.29f, 0.f, 1.f) }, + { SquareColorInfo, glm::vec4(0.85f, 0.85f, 0.85f, 1.f) } }) { documentation::testSpecificationAndThrow( diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 127042eb0a..459dc5c918 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -53,6 +53,21 @@ namespace { const char* keyTextureColor = "Textures.Color"; const char* _destination = "GALACTIC"; + + static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { + "ColorTexture", + "Color Base Texture", + "This is the path to a local image file that is used as the base texture for " + "the model on which the image projections are layered." + }; + + static const openspace::properties::Property::PropertyInfo PerformShadingInfo = { + "PerformShading", + "Perform Shading", + "If this value is enabled, the model will be shaded based on the relative " + "location to the Sun. If this value is disabled, shading is disabled and the " + "entire model is rendered brightly." + }; } // namespace namespace openspace { @@ -83,12 +98,17 @@ documentation::Documentation RenderableModelProjection::Documentation() { Optional::No }, { - keyTextureColor, + keyTextureColor, // @TODO Change to ColorTextureInfo.identifier new StringVerifier, - "The base texture for the model that is shown before any projection " - "occurred.", + ColorTextureInfo.description, Optional::No }, + { + PerformShadingInfo.identifier, + new BoolVerifier, + PerformShadingInfo.description, + Optional::Yes + }, { keyBoundingSphereRadius, new DoubleVerifier, @@ -104,13 +124,13 @@ documentation::Documentation RenderableModelProjection::Documentation() { RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _rotation({ "Rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Missing documentation + , _colorTexturePath(ColorTextureInfo) + , _rotation({ "Rotation", "Rotation", "" }, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(360.f)) // @TODO Remove this property , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _geometry(nullptr) - , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _performShading(PerformShadingInfo, true) { documentation::testSpecificationAndThrow( Documentation(), @@ -146,6 +166,10 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di dictionary.getValue(keyBoundingSphereRadius, boundingSphereRadius); setBoundingSphere(boundingSphereRadius); + if (dictionary.hasKey(PerformShadingInfo.identifier)) { + _performShading = dictionary.value(PerformShadingInfo.identifier); + } + Renderable::addProperty(_performShading); Renderable::addProperty(_rotation); } diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index 6726b36e28..62450baa15 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -63,6 +63,34 @@ namespace { const char* keyRadius = "Geometry.Radius"; // const char* keyShading = "PerformShading"; const char* _mainFrame = "GALACTIC"; + + static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { + "PlanetTexture", + "Color Base Texture", + "The path to the base color texture that is used on the planet prior to any " + "image projection." + }; + + static const openspace::properties::Property::PropertyInfo HeightTextureInfo = { + "HeightMap", + "Heightmap Texture", + "The path to the height map texture that is used for the planet. If no height " + "map is specified the planet does not use a height field." + }; + + static const openspace::properties::Property::PropertyInfo ShiftMeridianInfo = { + "ShiftMeridian", + "Shift Meridian by 180 deg", + "Shift the position of the meridian by 180 degrees. This value " + }; + + static const openspace::properties::Property::PropertyInfo HeightExaggerationInfo = { + "HeightExaggeration", + "Height Exaggeration", + "This value determines the level of height exaggeration that is applied to a " + "potential height field. A value of '0' inhibits the height field, whereas a " + "value of '1' uses the measured height field." + }; } // namespace namespace openspace { @@ -99,20 +127,21 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { Optional::Yes }, { - keyColorTexture, + keyColorTexture, // @TODO This should be ColorTextureInfo.identifier new StringVerifier, - "The path to the base color texture that is used on the planet prior to " - "any image projection. The path can use tokens of the form '${...}' or " - "be specified relative to the directory of the mod file.", + ColorTextureInfo.description, Optional::No }, { - keyHeightTexture, + keyHeightTexture, // @TODO This should be HeightTextureInfo.identifier new StringVerifier, - "The path to the height map texture that is used on the planet. The path " - "can use tokens of the form '${...}' or be specified relative to the " - "directory of the mod file. If no height map is specified the planet " - "does not use a height field.", + HeightTextureInfo.description, + Optional::Yes + }, + { + HeightExaggerationInfo.identifier, + new DoubleVerifier, + HeightExaggerationInfo.description, Optional::Yes } } @@ -121,16 +150,15 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "PlanetTexture", "RGB Texture", "" }) // @TODO Missing documentation - , _heightMapTexturePath({ "HeightMap", "Heightmap Texture", "" }) // @TODO Missing documentation + , _colorTexturePath(ColorTextureInfo) + , _heightMapTexturePath(HeightTextureInfo) , _rotation({ "Rotation", "Rotation", "" }, 0, 0, 360) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _heightMapTexture(nullptr) - , _shiftMeridianBy180({ "ShiftMeiridian", "Shift Meridian by 180 deg", "" }, false) // @TODO Missing documentation - , _heightExaggeration({ "HeightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 100.f) // @TODO Missing documentation - , _debugProjectionTextureRotation({ "Debug.ProjectionTextureRotation", "Projection Texture Rotation", "" }, 0.f, 0.f, 360.f) // @TODO Missing documentation + , _shiftMeridianBy180({"asd", "", "" }, false) // @TODO Missing documentation + , _heightExaggeration(HeightExaggerationInfo, 1.f, 0.f, 100.f) , _capture(false) { documentation::testSpecificationAndThrow( @@ -187,8 +215,13 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& addProperty(_heightMapTexturePath); _heightMapTexturePath.onChange(std::bind(&RenderablePlanetProjection::loadTextures, this)); + if (dictionary.hasKey(HeightExaggerationInfo.identifier)) { + _heightExaggeration = static_cast( + dictionary.value(HeightExaggerationInfo.identifier) + ); + } + addProperty(_heightExaggeration); - addProperty(_debugProjectionTextureRotation); addProperty(_shiftMeridianBy180); } diff --git a/modules/newhorizons/rendering/renderableplanetprojection.h b/modules/newhorizons/rendering/renderableplanetprojection.h index 3571edb979..ee131fdcb4 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.h +++ b/modules/newhorizons/rendering/renderableplanetprojection.h @@ -78,7 +78,6 @@ private: properties::BoolProperty _shiftMeridianBy180; properties::FloatProperty _heightExaggeration; - properties::FloatProperty _debugProjectionTextureRotation; std::unique_ptr _geometry; diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index b49e14619d..60fa854b48 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -33,39 +34,234 @@ #include namespace { - const char* KeyType = "TerminatorType"; - const char* KeyLightSource = "LightSource"; - const char* KeyObserver = "Observer"; - const char* KeyBody = "Body"; - const char* KeyBodyFrame = "BodyFrame"; const char* KeyMainFrame = "MainFrame"; - const char* KeyAberration = "Aberration"; + + static const openspace::properties::Property::PropertyInfo NumberPointsInfo = { + "AmountOfPoints", + "Points", + "This value determines the number of control points that is used to construct " + "the shadow geometry. The higher this number, the more detailed the shadow is, " + "but it will have a negative impact on the performance." + }; + + static const openspace::properties::Property::PropertyInfo ShadowLengthInfo = { + "ShadowLength", + "Shadow Length", + "This value determines the length of the shadow that is cast by the target " + "object. The total distance of the shadow is equal to the distance from the " + "target to the Sun multiplied with this value." + }; + + static const openspace::properties::Property::PropertyInfo ShadowColorInfo = { + "ShadowColor", + "Shadow Color", + "This value determines the color that is used for the shadow cylinder." + }; + + static const openspace::properties::Property::PropertyInfo TerminatorTypeInfo = { + "TerminatorType", + "Terminator Type", + "This value determines the type of the terminator that is used to calculate the " + "shadow eclipse." + }; + + static const openspace::properties::Property::PropertyInfo LightSourceInfo = { + "LightSource", + "Light Source", + "This value determines the SPICE name of the object that is used as the " + "illuminator for computing the shadow cylinder." + }; + + static const openspace::properties::Property::PropertyInfo ObserverInfo = { + "Observer", + "Observer", + "This value specifies the SPICE name of the object that is the observer of the " + "shadow cylinder." + }; + + static const openspace::properties::Property::PropertyInfo BodyInfo = { + "Body", + "Target Body", + "This value is the SPICE name of target body that is used as the shadow caster " + "for the shadow cylinder." + }; + + static const openspace::properties::Property::PropertyInfo BodyFrameInfo = { + "BodyFrame", + "Body Frame", + "This value is the SPICE name of the reference frame in which the shadow " + "cylinder is expressed." + }; + + static const openspace::properties::Property::PropertyInfo AberrationInfo = { + "Aberration", + "Aberration", + "This value determines the aberration method that is used to compute the shadow " + "cylinder." + }; } // namespace namespace openspace { +documentation::Documentation RenderableShadowCylinder::Documentation() { + using namespace documentation; + return { + "RenderableShadowCylinder", + "newhorizons_renderable_shadowcylinder", + { + { + "Type", + new StringEqualVerifier("RenderableShadowCylinder"), + "", + Optional::No + }, + { + NumberPointsInfo.identifier, + new IntVerifier, + NumberPointsInfo.description, + Optional::Yes + }, + { + ShadowLengthInfo.identifier, + new DoubleVerifier, + ShadowLengthInfo.description, + Optional::Yes + }, + { + ShadowColorInfo.identifier, + new DoubleVector4Verifier, + ShadowColorInfo.description, + Optional::Yes + }, + { + TerminatorTypeInfo.identifier, + new StringInListVerifier({ + // Synchronized with SpiceManager::terminatorTypeFromString + "UMBRAL", "PENUMBRAL" + }), + TerminatorTypeInfo.description, + Optional::No + }, + { + LightSourceInfo.identifier, + new StringVerifier, + LightSourceInfo.description, + Optional::No + }, + { + ObserverInfo.identifier, + new StringVerifier, + ObserverInfo.description, + Optional::No + }, + { + BodyInfo.identifier, + new StringVerifier, + BodyInfo.description, + Optional::No + }, + { + BodyFrameInfo.identifier, + new StringVerifier, + BodyFrameInfo.description, + Optional::No + }, + { + AberrationInfo.identifier, + new StringInListVerifier({ + // SpiceManager::AberrationCorrection::AberrationCorrection + "NONE", "LT", "LT+S", "CN", "CN+S" + }), + AberrationInfo.description, + Optional::No + }, + }, + Exhaustive::Yes + }; +} + RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _numberOfPoints({ "AmountOfPoints", "Points", "" }, 190, 1, 300) // @TODO Missing documentation - , _shadowLength({ "ShadowLength", "Shadow Length", "" }, 0.1f, 0.0f, 0.5f) // @TODO Missing documentation - , _shadowColor({ "ShadowColor", "Shadow Color", "" }, // @TODO Missing documentation - glm::vec4(1.f, 1.f, 1.f, 0.25f), glm::vec4(0.f), glm::vec4(1.f)) + , _numberOfPoints(NumberPointsInfo, 190, 1, 300) + , _shadowLength(ShadowLengthInfo, 0.1f, 0.f, 0.5f) + , _shadowColor( + ShadowColorInfo, + glm::vec4(1.f, 1.f, 1.f, 0.25f), + glm::vec4(0.f), glm::vec4(1.f) + ) + , _terminatorType( + TerminatorTypeInfo, + properties::OptionProperty::DisplayType::Dropdown + ) + , _lightSource(LightSourceInfo) + , _observer(ObserverInfo) + , _body(BodyInfo) + , _bodyFrame(BodyFrameInfo) + , _mainFrame({"mainFrame", "Main Frame", ""}) // @TODO Remove this + , _aberration(AberrationInfo) , _shader(nullptr) , _vao(0) , _vbo(0) { + documentation::testSpecificationAndThrow( + Documentation(), + dictionary, + "RenderableShadowCylinder" + ); + + if (dictionary.hasKey(NumberPointsInfo.identifier)) { + _numberOfPoints = static_cast( + dictionary.value(NumberPointsInfo.identifier) + ); + } addProperty(_numberOfPoints); + + + if (dictionary.hasKey(ShadowLengthInfo.identifier)) { + _shadowLength = static_cast( + dictionary.value(ShadowLengthInfo.identifier) + ); + } addProperty(_shadowLength); + + + if (dictionary.hasKey(ShadowColorInfo.identifier)) { + _shadowColor = dictionary.value(ShadowLengthInfo.identifier); + } + _shadowColor.setViewOption(properties::Property::ViewOptions::Color); addProperty(_shadowColor); - _terminatorType = dictionary.value(KeyType); - _lightSource = dictionary.value(KeyLightSource); - _observer = dictionary.value(KeyObserver); - _body = dictionary.value(KeyBody); - _bodyFrame = dictionary.value(KeyBodyFrame); + + _terminatorType.addOptions({ + { static_cast(SpiceManager::TerminatorType::Umbral), "Umbral" }, + { static_cast(SpiceManager::TerminatorType::Penumbral), "Penumbral" } + }); + _terminatorType = static_cast(SpiceManager::terminatorTypeFromString( + dictionary.value(TerminatorTypeInfo.identifier) + )); + addProperty(_terminatorType); + + + _lightSource = dictionary.value(LightSourceInfo.identifier); + _observer = dictionary.value(ObserverInfo.identifier); + _body = dictionary.value(BodyInfo.identifier); + _bodyFrame = dictionary.value(BodyFrameInfo.identifier); _mainFrame = dictionary.value(KeyMainFrame); - _aberration = SpiceManager::AberrationCorrection(dictionary.value(KeyAberration)); + + using T = SpiceManager::AberrationCorrection::Type; + _aberration.addOptions({ + { static_cast(T::None), "None" }, + { static_cast(T::ConvergedNewtonian), "Converged Newtonian" }, + { static_cast(T::ConvergedNewtonianStellar), "Converged Newtonian Stellar" }, + { static_cast(T::LightTime), "Light Time" }, + { static_cast(T::LightTimeStellar), "Light Time Stellar" }, + + }); + SpiceManager::AberrationCorrection aberration = SpiceManager::AberrationCorrection( + dictionary.value(AberrationInfo.identifier) + ); + _aberration = static_cast(aberration.type); } bool RenderableShadowCylinder::initialize() { @@ -79,10 +275,6 @@ bool RenderableShadowCylinder::initialize() { "${MODULE_NEWHORIZONS}/shaders/terminatorshadow_fs.glsl" ); - if (!_shader) - return false; - - return true; } @@ -136,7 +328,11 @@ void RenderableShadowCylinder::render(const RenderData& data, RendererTasks&) { } void RenderableShadowCylinder::update(const UpdateData& data) { - _stateMatrix = SpiceManager::ref().positionTransformMatrix(_bodyFrame, _mainFrame, data.time.j2000Seconds()); + _stateMatrix = SpiceManager::ref().positionTransformMatrix( + _bodyFrame, + _mainFrame, + data.time.j2000Seconds() + ); if (_shader->isDirty()) { _shader->rebuildFromFile(); } @@ -162,8 +358,11 @@ void RenderableShadowCylinder::createCylinder(double time) { _observer, _bodyFrame, _lightSource, - SpiceManager::terminatorTypeFromString(_terminatorType), - _aberration, + static_cast(_terminatorType.value()), + { + SpiceManager::AberrationCorrection::Type(_aberration.value()), + SpiceManager::AberrationCorrection::Direction::Reception + }, time, _numberOfPoints ); @@ -181,8 +380,17 @@ void RenderableShadowCylinder::createCylinder(double time) { ); double lt; - glm::dvec3 vecLightSource = - SpiceManager::ref().targetPosition(_body, _lightSource, _mainFrame, _aberration, time, lt); + glm::dvec3 vecLightSource = SpiceManager::ref().targetPosition( + _body, + _lightSource, + _mainFrame, + { + SpiceManager::AberrationCorrection::Type(_aberration.value()), + SpiceManager::AberrationCorrection::Direction::Reception + }, + time, + lt + ); vecLightSource = glm::inverse(_stateMatrix) * vecLightSource; diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.h b/modules/newhorizons/rendering/renderableshadowcylinder.h index 6f32334a5b..cebe3a4bdc 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.h +++ b/modules/newhorizons/rendering/renderableshadowcylinder.h @@ -27,6 +27,8 @@ #include +#include +#include #include #include #include @@ -37,6 +39,8 @@ namespace ghoul::opengl { class ProgramObject; } +namespace documentation { struct Documentation; } + namespace openspace { struct RenderData; @@ -53,15 +57,26 @@ public: void render(const RenderData& data, RendererTasks& rendererTask) override; void update(const UpdateData& data) override; + static documentation::Documentation Documentation(); + private: struct CylinderVBOLayout { float x, y, z, e; }; void createCylinder(double time); + + properties::IntProperty _numberOfPoints; properties::FloatProperty _shadowLength; properties::Vec4Property _shadowColor; + properties::OptionProperty _terminatorType; + properties::StringProperty _lightSource; + properties::StringProperty _observer; + properties::StringProperty _body; + properties::StringProperty _bodyFrame; + properties::StringProperty _mainFrame; + properties::OptionProperty _aberration; std::unique_ptr _shader; @@ -71,14 +86,7 @@ private: GLuint _vbo; std::vector _vertices; - - std::string _terminatorType; - std::string _lightSource; - std::string _observer; - std::string _body; - std::string _bodyFrame; - std::string _mainFrame; - SpiceManager::AberrationCorrection _aberration; + // SpiceManager::AberrationCorrection }; } // namespace openspace diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index 0bc5c3fefa..06b19c6141 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -210,7 +210,7 @@ ProjectionComponent::ProjectionComponent() , _clearAllProjections(ClearProjectionInfo, false) , _projectionFading(FadingInfo, 1.f, 0.f, 1.f) , _textureSize(TextureSizeInfo, ivec2(16), ivec2(16), ivec2(32768)) - , _applyTextureSize(ApplyTextureSizeInfo) // @TODO Missing documentation + , _applyTextureSize(ApplyTextureSizeInfo) , _textureSizeDirty(false) , _projectionTexture(nullptr) { diff --git a/modules/onscreengui/src/guicomponent.cpp b/modules/onscreengui/src/guicomponent.cpp index 21a8f8d741..d915aa918c 100644 --- a/modules/onscreengui/src/guicomponent.cpp +++ b/modules/onscreengui/src/guicomponent.cpp @@ -24,11 +24,19 @@ #include +namespace { + static const openspace::properties::Property::PropertyInfo EnabledInfo = { + "Enabled", + "Is Enabled", + "This setting determines whether this object will be visible or not." + }; +} // namespace + namespace openspace::gui { GuiComponent::GuiComponent(std::string name) : properties::PropertyOwner(std::move(name)) - , _isEnabled({ "Enabled", "Is Enabled", "" }, false) // @TODO Missing documentation + , _isEnabled(EnabledInfo, false) { addProperty(_isEnabled); } diff --git a/modules/onscreengui/src/guiperformancecomponent.cpp b/modules/onscreengui/src/guiperformancecomponent.cpp index 40bbab94cd..82bb28405f 100644 --- a/modules/onscreengui/src/guiperformancecomponent.cpp +++ b/modules/onscreengui/src/guiperformancecomponent.cpp @@ -49,16 +49,43 @@ namespace { Render = 4, Total = 5 }; + + static const openspace::properties::Property::PropertyInfo SortingSelectionInfo = { + "SortingSelection", + "Sorting", + "This value determines the sorting order of the performance measurements." + }; + + static const openspace::properties::Property::PropertyInfo SceneGraphEnabledInfo = { + "ShowSceneGraph", + "Show Scene Graph Measurements", + "If this value is enabled, the window showing the measurements for the scene " + "graph values is visible." + }; + + static const openspace::properties::Property::PropertyInfo FunctionsEnabledInfo = { + "ShowFunctions", + "Show Function Measurements", + "If this value is enabled, the window showing the measurements for the " + "individual functions is visible." + }; + + static const openspace::properties::Property::PropertyInfo OutputLogsInfo = { + "OutputLogs", + "Output Logs", + "" // @TODO Missing documentation + }; + } // namespace namespace openspace::gui { GuiPerformanceComponent::GuiPerformanceComponent() : GuiComponent("PerformanceComponent") - , _sortingSelection({ "SortingSelection", "Sorting", "" }, -1, -1, 6) // @TODO Missing documentation - , _sceneGraphIsEnabled({ "ShowSceneGraph", "Show Scene Graph Measurements", "" }, false) // @TODO Missing documentation - , _functionsIsEnabled({ "ShowFunctions", "Show Function Measurements", "" }, false) // @TODO Missing documentation - , _outputLogs({ "OutputLogs", "Output Logs", "" }, false) // @TODO Missing documentation + , _sortingSelection(SortingSelectionInfo, -1, -1, 6) + , _sceneGraphIsEnabled(SceneGraphEnabledInfo, false) + , _functionsIsEnabled(FunctionsEnabledInfo, false) + , _outputLogs(OutputLogsInfo, false) { addProperty(_sortingSelection); diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 79f9ff1aa8..0e8d96366a 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -41,11 +41,8 @@ #include "SpiceZpr.h" namespace { - const char* KeyVertexFile = "File"; - const char* KeyConstellationFile = "ConstellationFile"; const char* KeyReferenceFrame = "ReferenceFrame"; - const char* DefaultReferenceFrame = "J2000"; float deg2rad(float deg) { @@ -55,6 +52,35 @@ namespace { // 360 degrees / 24h = 15 degrees/h return deg2rad(rightAscension * 15); } + + + static const openspace::properties::Property::PropertyInfo VertexInfo = { + "File", + "Vertex File Path", + "The file pointed to with this value contains the vertex locations of the " + "constellations." + }; + + static const openspace::properties::Property::PropertyInfo ConstellationInfo = { + "ConstellationFile", + "Constellation File Path", + "Specifies the file that contains the mapping between constellation " + "abbreviations and full name of the constellation. If this value is empty, the " + "abbreviations are used as the full names." + }; + + static const openspace::properties::Property::PropertyInfo DistanceInfo = { + "Distance", + "Distance to the celestial sphere", + "This value specifies the value to the celestial sphere in kilometers at which " + "the constellations are projected." + }; + + static const openspace::properties::Property::PropertyInfo SelectionInfo = { + "ConstellationSelection", + "Constellation Selection", + "The constellations that are selected are displayed on the celestial sphere." + }; } // namespace namespace openspace { @@ -66,19 +92,30 @@ documentation::Documentation RenderableConstellationBounds::Documentation() { "space_renderable_constellationbounds", { { - KeyVertexFile, + VertexInfo.identifier, new StringVerifier, - "Specifies the file containing the bounds information about the " - "constellation locations.", + VertexInfo.description, Optional::No }, { - KeyConstellationFile, + ConstellationInfo.identifier, new StringVerifier, "Specifies the file that contains the mapping between constellation " "abbreviations and full name of the constellation. If the file is " "omitted, the abbreviations are used as the full names.", Optional::Yes + }, + { + DistanceInfo.identifier, + new DoubleVerifier, + DistanceInfo.description, + Optional::Yes + }, + { + SelectionInfo.identifier, + new StringListVerifier, + SelectionInfo.description, + Optional::Yes } } }; @@ -88,10 +125,10 @@ documentation::Documentation RenderableConstellationBounds::Documentation() { RenderableConstellationBounds::RenderableConstellationBounds( const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _vertexFilename("") - , _constellationFilename("") - , _distance({ "Distance", "Distance to the celestial Sphere", "" }, 15.f, 0.f, 30.f) // @TODO Missing documentation - , _constellationSelection({ "ConstellationSelection", "Constellation Selection", "" }) // @TODO Missing documentation + , _vertexFilename(VertexInfo) + , _constellationFilename(ConstellationInfo) + , _distance(DistanceInfo, 15.f, 0.f, 30.f) + , _constellationSelection(SelectionInfo) , _vao(0) , _vbo(0) { @@ -101,13 +138,26 @@ RenderableConstellationBounds::RenderableConstellationBounds( "RenderableConstellationBounds" ); - _vertexFilename = dictionary.value(KeyVertexFile); + _vertexFilename.onChange([&](){ + loadVertexFile(); + }); + addProperty(_vertexFilename); + _vertexFilename = dictionary.value(VertexInfo.identifier); - if (dictionary.hasKey(KeyConstellationFile)) { - _constellationFilename = dictionary.value(KeyConstellationFile); + _constellationFilename.onChange([&](){ + loadConstellationFile(); + }); + addProperty(_constellationFilename); + if (dictionary.hasKey(ConstellationInfo.identifier)) { + _constellationFilename = dictionary.value(ConstellationInfo.identifier); } + if (dictionary.hasKey(DistanceInfo.identifier)) { + _distance = static_cast(dictionary.value(DistanceInfo.identifier)); + } addProperty(_distance); + + fillSelectionProperty(); addProperty(_constellationSelection); _constellationSelection.onChange( [this]() { selectionPropertyHasChanged(); } @@ -115,20 +165,12 @@ RenderableConstellationBounds::RenderableConstellationBounds( } bool RenderableConstellationBounds::initialize() { - _program = OsEng.renderEngine().buildRenderProgram("ConstellationBounds", + _program = OsEng.renderEngine().buildRenderProgram( + "ConstellationBounds", "${MODULE_SPACE}/shaders/constellationbounds_vs.glsl", - "${MODULE_SPACE}/shaders/constellationbounds_fs.glsl"); + "${MODULE_SPACE}/shaders/constellationbounds_fs.glsl" + ); - bool loadSuccess = loadVertexFile(); - if (!loadSuccess) { - return false; - } - loadSuccess = loadConstellationFile(); - if (!loadSuccess) { - return false; - } - - fillSelectionProperty(); glGenVertexArrays(1, &_vao); glBindVertexArray(_vao); @@ -199,7 +241,7 @@ void RenderableConstellationBounds::render(const RenderData& data, RendererTasks } bool RenderableConstellationBounds::loadVertexFile() { - if (_vertexFilename.empty()) { + if (_vertexFilename.value().empty()) { return false; } @@ -292,7 +334,7 @@ bool RenderableConstellationBounds::loadVertexFile() { } bool RenderableConstellationBounds::loadConstellationFile() { - if (_constellationFilename.empty()) { + if (_constellationFilename.value().empty()) { return true; } diff --git a/modules/space/rendering/renderableconstellationbounds.h b/modules/space/rendering/renderableconstellationbounds.h index ec88c5eb71..200e2d8359 100644 --- a/modules/space/rendering/renderableconstellationbounds.h +++ b/modules/space/rendering/renderableconstellationbounds.h @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -93,8 +94,11 @@ private: */ void selectionPropertyHasChanged(); - std::string _vertexFilename; ///< The filename containing the constellation bounds - std::string _constellationFilename; ///< The file containing constellation names + /// The filename containing the constellation bounds + properties::StringProperty _vertexFilename; + + /// The file containing constellation names + properties::StringProperty _constellationFilename; std::unique_ptr _program; diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index 3ad84c468b..765c2e86f7 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -34,15 +34,6 @@ #include namespace { - const char* KeyEccentricity = "Eccentricity"; - const char* KeySemiMajorAxis = "SemiMajorAxis"; - const char* KeyInclination = "Inclination"; - const char* KeyAscendingNode = "AscendingNode"; - const char* KeyArgumentOfPeriapsis = "ArgumentOfPeriapsis"; - const char* KeyMeanAnomaly = "MeanAnomaly"; - const char* KeyEpoch = "Epoch"; - const char* KeyPeriod = "Period"; - template T solveIteration(Func function, T x0, const T& err = 0.0, int maxIterations = 100) { @@ -59,6 +50,67 @@ T solveIteration(Func function, T x0, const T& err = 0.0, int maxIterations = 10 return x2; } + + static const openspace::properties::Property::PropertyInfo EccentricityInfo = { + "Eccentricity", + "Eccentricity", + "This value determines the eccentricity, that is the deviation from a perfect " + "sphere, for this orbit. Currently, hyperbolic orbits using Keplerian elements " + "are not supported." + }; + + static const openspace::properties::Property::PropertyInfo SemiMajorAxisInfo = { + "SemiMajorAxis", + "Semi-major axis", + "This value determines the semi-major axis, that is the distance of the object " + "from the central body in kilometers (semi-major axis = average of periapsis and " + "apoapsis)." + }; + + static const openspace::properties::Property::PropertyInfo InclinationInfo = { + "Inclination", + "Inclination", + "This value determines the degrees of inclination, or the angle of the orbital " + "plane, relative to the reference plane, on which the object orbits around the " + "central body." + }; + + static const openspace::properties::Property::PropertyInfo AscendingNodeInfo = { + "AscendingNode", + "Right ascension of ascending Node", + "This value determines the right ascension of the ascending node in degrees, " + "that is the location of position along the orbit where the inclined plane and " + "the horizonal reference plane intersect." + }; + + static const openspace::properties::Property::PropertyInfo ArgumentOfPeriapsisInfo = { + "ArgumentOfPeriapsis", + "Argument of Periapsis", + "This value determines the argument of periapsis in degrees, that is the " + "position on the orbit that is closest to the orbiting body." + }; + + static const openspace::properties::Property::PropertyInfo MeanAnomalyAtEpochInfo = { + "MeanAnomaly", + "Mean anomaly at epoch", + "This value determines the mean anomaly at the epoch in degrees, which " + "determines the initial location of the object along the orbit at epoch." + }; + + static const openspace::properties::Property::PropertyInfo EpochInfo = { + "Epoch", + "Epoch", + "This value determines the epoch for which the initial location is defined in " + "the form of YYYY MM DD HH:mm:ss." + }; + + static const openspace::properties::Property::PropertyInfo PeriodInfo = { + "Period", + "Orbit period", + "Specifies the orbital period (in seconds)." + }; + + } // namespace namespace openspace { @@ -81,58 +133,51 @@ documentation::Documentation KeplerTranslation::Documentation() { Optional::No }, { - KeyEccentricity, + EccentricityInfo.identifier, new DoubleInRangeVerifier(0.0, 1.0), - "Specifies the eccentricity of the orbit; currently, OpenSpace does not " - "support hyperbolic orbits using Keplerian elements.", + EccentricityInfo.description, Optional::No }, { - KeySemiMajorAxis, + SemiMajorAxisInfo.identifier, new DoubleVerifier, - "Specifies the semi-major axis of the orbit in kilometers (semi-major " - "axis = average of periapsis and apoapsis).", + SemiMajorAxisInfo.description, Optional::No }, { - KeyInclination, + InclinationInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - "Specifies the inclination angle (degrees) of the orbit relative to the " - "reference plane (in the case of Earth, the equatorial plane.", + InclinationInfo.description, Optional::No }, { - KeyAscendingNode, + AscendingNodeInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - "Specifies the right ascension of the ascending node (in degrees!) " - "relative to the vernal equinox.", + AscendingNodeInfo.description, Optional::No }, { - KeyArgumentOfPeriapsis, + ArgumentOfPeriapsisInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - "Specifies the argument of periapsis as angle (in degrees) from the " - "ascending.", + ArgumentOfPeriapsisInfo.description, Optional::No }, { - KeyMeanAnomaly, + MeanAnomalyAtEpochInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - "Specifies the position of the orbiting body (in degrees) along the " - "elliptical orbit at epoch time.", + MeanAnomalyAtEpochInfo.description, Optional::No }, { - KeyEpoch, + EpochInfo.identifier, new StringVerifier, - "Specifies the epoch time used for position as a string of the form: " - "YYYY MM DD HH:mm:ss", + EpochInfo.description, Optional::No }, { - KeyPeriod, + PeriodInfo.identifier, new DoubleGreaterVerifier(0.0), - "Specifies the orbital period (in seconds).", + PeriodInfo.description, Optional::No }, }, @@ -142,24 +187,14 @@ documentation::Documentation KeplerTranslation::Documentation() { KeplerTranslation::KeplerTranslation() : Translation() - , _eccentricity({ "Eccentricity", "Eccentricity", "" }, 0.0, 0.0, 1.0) // @TODO Missing documentation - , _semiMajorAxis({ "SemimajorAxis", "Semi-major axis", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation - , _inclination({ "Inclination", "Inclination", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation - , _ascendingNode( - { "AscendingNode", "Right ascension of ascending Node", "" }, // @TODO Missing documentation - 0.0, - 0.0, - 360.0 - ) - , _argumentOfPeriapsis( - { "ArgumentOfPeriapsis", "Argument of Periapsis", "" }, // @TODO Missing documentation - 0.0, - 0.0, - 360.0 - ) - , _meanAnomalyAtEpoch({ "MeanAnomalyAtEpoch", "Mean anomaly at epoch", "" }, 0.0, 0.0, 360.0) // @TODO Missing documentation - , _epoch({ "Epoch", "Epoch", "" }, 0.0, 0.0, 1e9) // @TODO Missing documentation - , _period({ "Period", "Orbit period", "" }, 0.0, 0.0, 1e6) // @TODO Missing documentation + , _eccentricity(EccentricityInfo, 0.0, 0.0, 1.0) + , _semiMajorAxis(SemiMajorAxisInfo, 0.0, 0.0, 1e6) + , _inclination(InclinationInfo, 0.0, 0.0, 360.0) + , _ascendingNode(AscendingNodeInfo, 0.0, 0.0, 360.0) + , _argumentOfPeriapsis(ArgumentOfPeriapsisInfo, 0.0, 0.0, 360.0) + , _meanAnomalyAtEpoch(MeanAnomalyAtEpochInfo, 0.0, 0.0, 360.0) + , _epoch(EpochInfo, 0.0, 0.0, 1e9) + , _period(PeriodInfo, 0.0, 0.0, 1e6) , _orbitPlaneDirty(true) { auto update = [this]() { @@ -199,14 +234,14 @@ KeplerTranslation::KeplerTranslation(const ghoul::Dictionary& dictionary) ); setKeplerElements( - dictionary.value(KeyEccentricity), - dictionary.value(KeySemiMajorAxis), - dictionary.value(KeyInclination), - dictionary.value(KeyAscendingNode), - dictionary.value(KeyArgumentOfPeriapsis), - dictionary.value(KeyMeanAnomaly), - dictionary.value(KeyPeriod), - dictionary.value(KeyEpoch) + dictionary.value(EccentricityInfo.identifier), + dictionary.value(SemiMajorAxisInfo.identifier), + dictionary.value(InclinationInfo.identifier), + dictionary.value(AscendingNodeInfo.identifier), + dictionary.value(ArgumentOfPeriapsisInfo.identifier), + dictionary.value(MeanAnomalyAtEpochInfo.identifier), + dictionary.value(PeriodInfo.identifier), + dictionary.value(EpochInfo.identifier) ); } diff --git a/src/interaction/orbitalnavigator.cpp b/src/interaction/orbitalnavigator.cpp index 9f6021650e..df19529c41 100644 --- a/src/interaction/orbitalnavigator.cpp +++ b/src/interaction/orbitalnavigator.cpp @@ -85,7 +85,7 @@ namespace { "MinimumAllowedDistance", "Minimum allowed distance", "" // @TODO Missing documentation - } + }; } // namespace namespace openspace::interaction { From 53489b5302e9472c4ca964b3eefe0366209aacaa Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 25 Jul 2017 23:44:09 -0400 Subject: [PATCH 12/20] More documentation work --- modules/space/rendering/renderableplanet.cpp | 75 ++++++++- modules/space/rendering/renderablerings.cpp | 103 +++++++++--- modules/space/rendering/renderablestars.cpp | 147 ++++++++++++++---- .../space/rendering/simplespheregeometry.cpp | 108 ++++++++----- .../space/rendering/simplespheregeometry.h | 4 + modules/space/rotation/spicerotation.cpp | 36 +++-- modules/space/spacemodule.cpp | 3 +- .../space/translation/spicetranslation.cpp | 56 ++++--- 8 files changed, 397 insertions(+), 135 deletions(-) diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index c4bf732375..28c70d9264 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -65,6 +65,44 @@ namespace { const char* keyShadowSource = "Source"; const char* keyShadowCaster = "Caster"; const char* keyBody = "Body"; + + static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { + "PlanetTexture", + "Color Base Texture", + "The path to the base color texture that is used on the planet prior to any " + "image projection." + }; + + static const openspace::properties::Property::PropertyInfo HeightTextureInfo = { + "HeightMap", + "Heightmap Texture", + "The path to the height map texture that is used for the planet. If no height " + "map is specified the planet does not use a height field." + }; + + static const openspace::properties::Property::PropertyInfo NightTextureInfo = { + "NightTexture", + "Night Texture", + "The path to the night texture that is used for the part of the planet that is " + "facing away from the Sun. If no night texture is loaded, the night side of the " + "planet is rendered dark." + }; + + static const openspace::properties::Property::PropertyInfo HeightExaggerationInfo = { + "HeightExaggeration", + "Height Exaggeration", + "This value determines the level of height exaggeration that is applied to a " + "potential height field. A value of '0' inhibits the height field, whereas a " + "value of '1' uses the measured height field." + }; + + static const openspace::properties::Property::PropertyInfo PerformShadingInfo = { + "PerformShading", + "Perform Shading", + "If this value is enabled, the model will be shaded based on the relative " + "location to the Sun. If this value is disabled, shading is disabled and the " + "entire model is rendered brightly." + }; } // namespace namespace openspace { @@ -89,19 +127,19 @@ documentation::Documentation RenderablePlanet::Documentation() { Optional::Yes }, { - KeyColorTexture, + KeyColorTexture, // @TODO Use ColorTextureInfo.identifier instead new StringVerifier, "Specifies the color texture that is used for this RenderablePlanet.", Optional::Yes }, { - KeyHeightTexture, + KeyHeightTexture, // @TODO Use HeightTextureInfo.identifier instead new StringVerifier, "Specifies the height texture that is used for this RenderablePlanet.", Optional::Yes }, { - KeyNightTexture, + KeyNightTexture, // @TODO Use NightTextureInfo.identifier instead new StringVerifier, "Specifies the texture that is used for the night side of this " "RenderablePlanet.", @@ -114,6 +152,18 @@ documentation::Documentation RenderablePlanet::Documentation() { "this value is 'false', any existing night texture will not be used. " "This value defaults to 'true'.", Optional::Yes + }, + { + HeightExaggerationInfo.identifier, + new DoubleVerifier, + HeightExaggerationInfo.description, + Optional::Yes + }, + { + PerformShadingInfo.identifier, + new BoolVerifier, + PerformShadingInfo.description, + Optional::Yes } } }; @@ -121,15 +171,15 @@ documentation::Documentation RenderablePlanet::Documentation() { RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _colorTexturePath({ "ColorTexture", "Color Texture", "" }) // @TODO Missing documentation - , _nightTexturePath({ "NightTexture", "Night Texture", "" }) // @TODO Missing documentation - , _heightMapTexturePath({ "HeightMap", "Heightmap Texture", "" }) // @TODO Missing documentation + , _colorTexturePath(ColorTextureInfo) + , _nightTexturePath(NightTextureInfo) + , _heightMapTexturePath(HeightTextureInfo) , _programObject(nullptr) , _texture(nullptr) , _nightTexture(nullptr) - , _heightExaggeration({ "HeightExaggeration", "Height Exaggeration", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation + , _heightExaggeration(HeightExaggerationInfo, 1.f, 0.f, 10.f) , _geometry(nullptr) - , _performShading({ "PerformShading", "Perform Shading", "" }, true) // @TODO Missing documentation + , _performShading(PerformShadingInfo, true) , _alpha(1.f) , _planetRadius(0.f) , _hasNightTexture(false) @@ -201,7 +251,16 @@ RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) addProperty(_heightMapTexturePath); _heightMapTexturePath.onChange(loadTextureCallback); + if (dictionary.hasKey(HeightExaggerationInfo.identifier)) { + _heightExaggeration = static_cast( + dictionary.value(HeightExaggerationInfo.identifier) + ); + } addProperty(_heightExaggeration); + + if (dictionary.hasKey(HeightExaggerationInfo.identifier)) { + _performShading = dictionary.value(HeightExaggerationInfo.identifier); + } addProperty(_performShading); // Shadow data: diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 7598a1d4ba..28367c68d1 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -38,9 +38,42 @@ #include namespace { - const char* KeyTexture = "Texture"; - const char* KeySize = "Size"; - const char* KeyOffset = "Offset"; + static const openspace::properties::Property::PropertyInfo TextureInfo = { + "Texture", + "Texture", + "This value is the path to a texture on disk that contains a one-dimensional " + "texture which is used for these rings." + }; + + static const openspace::properties::Property::PropertyInfo SizeInfo = { + "Size", + "Size", + "This value specifies the radius of the rings in meter." + }; + + static const openspace::properties::Property::PropertyInfo OffsetInfo = { + "Offset", + "Offset", + "This value is used to limit the width of the rings.Each of the two values is a " + "value between 0 and 1, where 0 is the center of the ring and 1 is the maximum " + "extent at the radius. If this value is, for example {0.5, 1.0}, the ring is " + "only shown between radius/2 and radius. It defaults to {0.0, 1.0}." + }; + + static const openspace::properties::Property::PropertyInfo NightFactorInfo = { + "NightFactor", + "Night Factor", + "This value is a multiplicative factor that is applied to the side of the rings " + "that is facing away from the Sun. If this value is equal to '1', no darkening " + "of the night side occurs." + }; + + static const openspace::properties::Property::PropertyInfo TransparencyInfo = { + "Transparency", + "Transparency", + "This value determines the transparency of part of the rings depending on the " + "color values. For this value v, the transparency is equal to length(color) / v." + }; } // namespace namespace openspace { @@ -58,38 +91,47 @@ documentation::Documentation RenderableRings::Documentation() { Optional::No }, { - KeyTexture, + TextureInfo.identifier, new StringVerifier, - "The one dimensional texture that is used for both sides of the ring.", + TextureInfo.description, Optional::No }, { - KeySize, + SizeInfo.identifier, new DoubleVerifier, - "The radius of the rings in meters.", + SizeInfo.description, Optional::No }, { - KeyOffset, + OffsetInfo.identifier, new DoubleVector2Verifier, - "The offset that is used to limit the width of the rings. Each of the " - "two values is a value between 0 and 1, where 0 is the center of the " - "ring and 1 is the maximum extent at the radius. If this value is, for " - "example {0.5, 1.0}, the ring is only shown between radius/2 and radius. " - "It defaults to {0.0, 1.0}.", + OffsetInfo.description, + Optional::Yes + }, + { + NightFactorInfo.identifier, + new DoubleVerifier, + NightFactorInfo.description, + Optional::Yes + }, + { + TransparencyInfo.identifier, + new DoubleVerifier, + TransparencyInfo.description, Optional::Yes } - } + }, + Exhaustive::Yes }; } RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _texturePath({ "Texture", "Texture", "" }) // @TODO Missing documentation - , _size({ "Size", "Size", "" }, 1.f, 0.f, std::pow(1.f, 25.f)) // @TODO Missing documentation - , _offset({ "Offset", "Offset", "" }, glm::vec2(0, 1.f), glm::vec2(0.f), glm::vec2(1.f)) // @TODO Missing documentation - , _nightFactor({ "NightFactor", "Night Factor", "" }, 0.33f, 0.f, 1.f) // @TODO Missing documentation - , _transparency({ "Transparency", "Transparency", "" }, 0.15f, 0.f, 1.f) // @TODO Missing documentation + , _texturePath(TextureInfo) + , _size(SizeInfo, 1.f, 0.f, 1e25) + , _offset(OffsetInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(1.f)) + , _nightFactor(NightFactorInfo, 0.33f, 0.f, 1.f) + , _transparency(TransparencyInfo, 0.15f, 0.f, 1.f) , _shader(nullptr) , _texture(nullptr) , _textureFile(nullptr) @@ -106,26 +148,37 @@ RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) "RenderableRings" ); - _size = static_cast(dictionary.value(KeySize)); + _size = static_cast(dictionary.value(SizeInfo.identifier)); setBoundingSphere(_size); - addProperty(_size); _size.onChange([&]() { _planeIsDirty = true; }); + addProperty(_size); - _texturePath = absPath(dictionary.value(KeyTexture)); + _texturePath = absPath(dictionary.value(TextureInfo.identifier)); _textureFile = std::make_unique(_texturePath); - if (dictionary.hasKeyAndValue(KeyOffset)) { - _offset = dictionary.value(KeyOffset); + if (dictionary.hasKey(OffsetInfo.identifier)) { + _offset = dictionary.value(OffsetInfo.identifier); } addProperty(_offset); + _texturePath.onChange([&]() { loadTexture(); }); addProperty(_texturePath); - _texturePath.onChange([&](){ loadTexture(); }); _textureFile->setCallback([&](const File&) { _textureIsDirty = true; }); + if (dictionary.hasKey(NightFactorInfo.identifier)) { + _nightFactor = static_cast( + dictionary.value(NightFactorInfo.identifier) + ); + } addProperty(_nightFactor); + + if (dictionary.hasKey(TransparencyInfo.identifier)) { + _transparency = static_cast( + dictionary.value(TransparencyInfo.identifier) + ); + } addProperty(_transparency); } diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index 0e16a93cdd..ff414456da 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -45,8 +45,6 @@ namespace { const char* _loggerCat = "RenderableStars"; const char* KeyFile = "File"; - const char* KeyTexture = "Texture"; - const char* KeyColorMap = "ColorMap"; const int8_t CurrentCacheVersion = 1; @@ -79,6 +77,48 @@ namespace { float speed; }; + + static const openspace::properties::Property::PropertyInfo PsfTextureInfo = { + "Texture", + "Point Spread Function Texture", + "The path to the texture that should be used as a point spread function for the " + "stars." + }; + + static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { + "ColorMap", + "ColorBV Texture", + "The path to the texture that is used to convert from the B-V value of the star " + "to its color. The texture is used as a one dimensional lookup function." + }; + + static const openspace::properties::Property::PropertyInfo ColorOptionInfo = { + "ColorOption", + "Color Option", + "This value determines which quantity is used for determining the color of the " + "stars." + }; + + static const openspace::properties::Property::PropertyInfo TransparencyInfo = { + "Transparency", + "Transparency", + "This value is a multiplicative factor that is applied to the transparency of " + "all stars." + }; + + static const openspace::properties::Property::PropertyInfo ScaleFactorInfo = { + "ScaleFactor", + "Scale Factor", + "This value is used as a multiplicative factor that is applied to the apparent " + "size of each star." + }; + + static const openspace::properties::Property::PropertyInfo MinBillboardSizeInfo = { + "MinBillboardSize", + "Min Billboard Size", + "This value is used as a lower limit on the size of stars that are rendered. Any " + "stars that have a smaller apparent size will be discarded entirely." + }; } // namespace namespace openspace { @@ -103,20 +143,42 @@ documentation::Documentation RenderableStars::Documentation() { Optional::No }, { - KeyTexture, + PsfTextureInfo.identifier, new StringVerifier, - "The path to the texture that should be used as a point spread function " - "for the stars. The path is relative to the location of the .mod file " - "and can contain file system token.", + PsfTextureInfo.description, Optional::No }, { - KeyColorMap, + ColorTextureInfo.identifier, new StringVerifier, - "The path to the texture that is used to convert from the B-V value of " - "the star to its color. The texture is used as a one dimensional lookup " - "function.", + ColorTextureInfo.description, Optional::No + }, + { + ColorOptionInfo.identifier, + new StringInListVerifier({ + "Color", "Velocity", "Speed" + }), + ColorOptionInfo.description, + Optional::Yes + }, + { + TransparencyInfo.identifier, + new DoubleVerifier, + TransparencyInfo.description, + Optional::Yes + }, + { + ScaleFactorInfo.identifier, + new DoubleVerifier, + ScaleFactorInfo.description, + Optional::Yes + }, + { + MinBillboardSizeInfo.identifier, + new DoubleVerifier, + MinBillboardSizeInfo.description, + Optional::Yes } } }; @@ -125,20 +187,17 @@ documentation::Documentation RenderableStars::Documentation() { RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) : Renderable(dictionary) - , _pointSpreadFunctionTexturePath({ "PsfTexture", "Point Spread Function Texture", "" }) // @TODO Missing documentation + , _pointSpreadFunctionTexturePath(PsfTextureInfo) , _pointSpreadFunctionTexture(nullptr) , _pointSpreadFunctionTextureIsDirty(true) - , _colorTexturePath({ "ColorTexture", "ColorBV Texture", "" }) // @TODO Missing documentation + , _colorTexturePath(ColorTextureInfo) , _colorTexture(nullptr) , _colorTextureIsDirty(true) - , _colorOption( - { "ColorOption", "Color Option", "" }, // @TODO Missing documentation - properties::OptionProperty::DisplayType::Dropdown - ) + , _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _dataIsDirty(true) - , _alphaValue({ "AlphaValue", "Transparency", "" }, 1.f, 0.f, 1.f) // @TODO Missing documentation - , _scaleFactor({ "ScaleFactor", "Scale Factor", "" }, 1.f, 0.f, 10.f) // @TODO Missing documentation - , _minBillboardSize({ "MinBillboardSize", "Min Billboard Size", "" }, 1.f, 1.f, 100.f) // @TODO Missing documentation + , _alphaValue(TransparencyInfo, 1.f, 0.f, 1.f) + , _scaleFactor(ScaleFactorInfo, 1.f, 0.f, 10.f) + , _minBillboardSize(MinBillboardSizeInfo, 1.f, 1.f, 100.f) , _program(nullptr) , _speckFile("") , _nValuesPerStar(0) @@ -161,34 +220,62 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) _speckFile = absPath(dictionary.value(KeyFile)); - //_colorOption.addOptions({ - // { ColorOption::Color, "Color" }, - // { ColorOption::Velocity, "Velocity" }, - // { ColorOption::Speed, "Speed" } - //}); - _colorOption.addOption(ColorOption::Color, "Color"); - _colorOption.addOption(ColorOption::Velocity, "Velocity"); - _colorOption.addOption(ColorOption::Speed, "Speed"); + _colorOption.addOptions({ + { ColorOption::Color, "Color" }, + { ColorOption::Velocity, "Velocity" }, + { ColorOption::Speed, "Speed" } + }); + if (dictionary.hasKey(ColorOptionInfo.identifier)) { + const std::string colorOption = dictionary.value( + ColorOptionInfo.identifier + ); + if (colorOption == "Color") { + _colorOption = ColorOption::Color; + } + else if (colorOption == "Velocity") { + _colorOption = ColorOption::Velocity; + } + else { + _colorOption = ColorOption::Speed; + } + } + _colorOption.onChange([&] { _dataIsDirty = true; }); addProperty(_colorOption); - _colorOption.onChange([&]{ _dataIsDirty = true;}); - addProperty(_pointSpreadFunctionTexturePath); _pointSpreadFunctionTexturePath.onChange( [&]{ _pointSpreadFunctionTextureIsDirty = true; } ); _pointSpreadFunctionFile->setCallback( [&](const File&) { _pointSpreadFunctionTextureIsDirty = true; } ); + addProperty(_pointSpreadFunctionTexturePath); - addProperty(_colorTexturePath); _colorTexturePath.onChange([&]{ _colorTextureIsDirty = true; }); _colorTextureFile->setCallback( [&](const File&) { _colorTextureIsDirty = true; } ); + addProperty(_colorTexturePath); + if (dictionary.hasKey(TransparencyInfo.identifier)) { + _alphaValue = static_cast( + dictionary.value(TransparencyInfo.identifier) + ); + } addProperty(_alphaValue); + + if (dictionary.hasKey(ScaleFactorInfo.identifier)) { + _scaleFactor = static_cast( + dictionary.value(ScaleFactorInfo.identifier) + ); + } addProperty(_scaleFactor); + + if (dictionary.hasKey(MinBillboardSizeInfo.identifier)) { + _minBillboardSize = static_cast( + dictionary.value(MinBillboardSizeInfo.identifier) + ); + } addProperty(_minBillboardSize); } diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 7d97071129..103e45855d 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -23,70 +23,108 @@ ****************************************************************************************/ #include -#include + +#include #include #include +#include namespace { const char* _loggerCat = "SimpleSphereGeometry"; - const char* keyRadius = "Radius"; - const char* keySegments = "Segments"; + static const openspace::properties::Property::PropertyInfo RadiusInfo = { + "Radius", + "Radius", + "This value specifies the radius of this sphere in meters." + }; + + static const openspace::properties::Property::PropertyInfo SegmentsInfo = { + "Segments", + "Segments", + "This value specifies the number of segments that this sphere is split into." + }; } // namespace namespace openspace::planetgeometry { +documentation::Documentation SimpleSphereGeometry::Documentation() { + using namespace documentation; + return { + "SimpleSphereGeometry", + "space_geometry_simplesphere", + { + { + "Type", + new StringEqualVerifier("SimpleSphereGeometry"), + "", + Optional::No + }, + { + RadiusInfo.identifier, + new OrVerifier( + new DoubleVerifier, + new DoubleVector3Verifier + ), + RadiusInfo.description, + Optional::No + }, + { + SegmentsInfo.identifier, + new IntVerifier, + SegmentsInfo.description, + Optional::No + } + }, + Exhaustive::Yes + }; +} + SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) : PlanetGeometry() - , _radius( - { "Radius", "Radius", "" }, // @TODO Missing documentation - glm::vec3(1.f, 1.f, 1.f), - glm::vec3(0.f, 0.f, 0.f), - glm::vec3(std::pow(10.f, 20.f), std::pow(10.f, 20.f), std::pow(10.f, 20.f))) - , _segments({ "Segments", "Segments", "" }, 20, 1, 5000) // @TODO Missing documentation + , _radius(RadiusInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(std::pow(10.f, 20.f))) + , _segments(SegmentsInfo, 20, 1, 5000) , _sphere(nullptr) { + documentation::testSpecificationAndThrow( + Documentation(), + dictionary, + "SimpleSphereGeometry" + ); + float sphereRadius = 0.f; glm::vec3 ellipsoidRadius; - if (dictionary.getValue(keyRadius, sphereRadius)) { - _radius = { sphereRadius, sphereRadius, sphereRadius }; - } else if (dictionary.getValue(keyRadius, ellipsoidRadius)) { - _radius = ellipsoidRadius; - } else { - LERROR("SimpleSphereGeometry did not provide a key '" - << keyRadius << "'"); + if (dictionary.hasKeyAndValue(RadiusInfo.identifier)) { + const float r = static_cast( + dictionary.value(RadiusInfo.identifier) + ); + _radius = { r, r, r }; + } + else { + _radius = dictionary.value(RadiusInfo.identifier); } - double segments = 0; - if (dictionary.getValue(keySegments, segments)) { - _segments = static_cast(segments); - } else { - LERROR("SimpleSphereGeometry did not provide a key '" - << keySegments << "'"); - } + _segments = dictionary.value(SegmentsInfo.identifier); // The shader need the radii values but they are not changeable runtime // TODO: Possibly add a scaling property @AA - addProperty(_radius); // Changing the radius/scaling should affect the shader but not the geometry? @AA - _radius.onChange(std::bind(&SimpleSphereGeometry::createSphere, this)); + _radius.onChange([&]() { createSphere(); }); + addProperty(_radius); + + _segments.onChange([&]() { createSphere(); }); addProperty(_segments); - _segments.onChange(std::bind(&SimpleSphereGeometry::createSphere, this)); } -SimpleSphereGeometry::~SimpleSphereGeometry() { -} +SimpleSphereGeometry::~SimpleSphereGeometry() {} -bool SimpleSphereGeometry::initialize(Renderable* parent) -{ +bool SimpleSphereGeometry::initialize(Renderable* parent) { bool success = PlanetGeometry::initialize(parent); createSphere(); return success; } void SimpleSphereGeometry::deinitialize() { - if (_sphere) - delete _sphere; + delete _sphere; _sphere = nullptr; } @@ -94,13 +132,11 @@ void SimpleSphereGeometry::render() { _sphere->render(); } -void SimpleSphereGeometry::createSphere(){ +void SimpleSphereGeometry::createSphere() { const glm::vec3 radius = _radius.value(); _parent->setBoundingSphere(std::max(std::max(radius[0], radius[1]), radius[2])); - if(_sphere) - delete _sphere; - + delete _sphere; _sphere = new PowerScaledSphere(glm::vec4(radius, 0.0), _segments); _sphere->initialize(); } diff --git a/modules/space/rendering/simplespheregeometry.h b/modules/space/rendering/simplespheregeometry.h index 20c7e84f60..78f42392b5 100644 --- a/modules/space/rendering/simplespheregeometry.h +++ b/modules/space/rendering/simplespheregeometry.h @@ -35,6 +35,8 @@ namespace openspace { class PowerScaledSphere; } // namespace openspace +namespace openspace::documentation { struct Documentation; } + namespace openspace::planetgeometry { class SimpleSphereGeometry : public PlanetGeometry { @@ -46,6 +48,8 @@ public: void deinitialize() override; void render() override; + static documentation::Documentation Documentation(); + private: void createSphere(); diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index d778a2039e..fe02d671bd 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -35,6 +35,20 @@ namespace { const char* KeySourceFrame = "SourceFrame"; const char* KeyDestinationFrame = "DestinationFrame"; const char* KeyKernels = "Kernels"; + + static const openspace::properties::Property::PropertyInfo SourceInfo = { + "Source", + "Source", + "This value specifies the source frame that is used as the basis for the " + "coordinate transformation. This has to be a valid SPICE name." + }; + + static const openspace::properties::Property::PropertyInfo DestinationInfo = { + "Destination", + "Destination", + "This value specifies the destination frame that is used for the coordinate " + "transformation. This has to be a valid SPICE name." + }; } // namespace namespace openspace { @@ -52,25 +66,21 @@ documentation::Documentation SpiceRotation::Documentation() { Optional::No }, { - KeySourceFrame, + SourceInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or integer"), - "The source frame that is used as the basis for the coordinate " - "transformation. This has to be a valid SPICE name.", + SourceInfo.description, Optional::No }, { - KeyDestinationFrame, + DestinationInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or integer"), - "The destination frame that is used for the coordinate transformation. " - "This has to be a valid SPICE name.", + DestinationInfo.description, Optional::No }, { KeyKernels, new OrVerifier( - new TableVerifier({ - { "*", new StringVerifier } - }), + new StringListVerifier, new StringVerifier ), "A single kernel or list of kernels that this SpiceTranslation depends " @@ -83,8 +93,8 @@ documentation::Documentation SpiceRotation::Documentation() { } SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) - : _sourceFrame({ "Source", "Source", "" }) // @TODO Missing documentation - , _destinationFrame({ "Destination", "Destination", "" }) // @TODO Missing documentation + : _sourceFrame(SourceInfo) // @TODO Missing documentation + , _destinationFrame(DestinationInfo) { documentation::testSpecificationAndThrow( Documentation(), @@ -92,8 +102,8 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) "SpiceRotation" ); - _sourceFrame = dictionary.value(KeySourceFrame); - _destinationFrame = dictionary.value(KeyDestinationFrame); + _sourceFrame = dictionary.value(SourceInfo.identifier); + _destinationFrame = dictionary.value(DestinationInfo.identifier); if (dictionary.hasKeyAndValue(KeyKernels)) { SpiceManager::ref().loadKernel(dictionary.value(KeyKernels)); diff --git a/modules/space/spacemodule.cpp b/modules/space/spacemodule.cpp index cd1baf6328..5b2ba60d00 100644 --- a/modules/space/spacemodule.cpp +++ b/modules/space/spacemodule.cpp @@ -86,7 +86,8 @@ std::vector SpaceModule::documentations() const { RenderableStars::Documentation(), SpiceRotation::Documentation(), SpiceTranslation::Documentation(), - planetgeometry::PlanetGeometry::Documentation() + planetgeometry::PlanetGeometry::Documentation(), + planetgeometry::SimpleSphereGeometry::Documentation() }; } diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 4f3411f868..4ea74936a5 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -34,11 +34,30 @@ namespace { const char* KeyBody = "Body"; - const char* KeyObserver = "Observer"; - const char* KeyFrame = "Frame"; const char* KeyKernels = "Kernels"; - const char* DefaultReferenceFrame = "GALACTIC"; + static const openspace::properties::Property::PropertyInfo TargetInfo = { + "Target", + "Target", + "This is the SPICE NAIF name for the body whose translation is to be computed by " + "the SpiceTranslation. It can either be a fully qualified name (such as 'EARTH') " + "or a NAIF integer id code (such as '399')." + }; + + static const openspace::properties::Property::PropertyInfo OriginInfo = { + "Origin", + "Origin", + "This is the SPICE NAIF name for the parent of the body whose translation is to " + "be computed by the SpiceTranslation. It can either be a fully qualified name " + "(such as 'SOLAR SYSTEM BARYCENTER') or a NAIF integer id code (such as '0')." + }; + + static const openspace::properties::Property::PropertyInfo FrameInfo = { + "Frame", + "Reference Frame", + "This is the SPICE NAIF name for the reference frame in which the position " + "should be retrieved. The default value is GALACTIC." + }; } // namespace namespace openspace { @@ -57,7 +76,7 @@ documentation::Documentation SpiceTranslation::Documentation() { Optional::No }, { - KeyBody, + KeyBody, // @TODO Rename to TargetInfo.identifier new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"), "This is the SPICE NAIF name for the body whose translation is to be " "computed by the SpiceTranslation. It can either be a fully qualified " @@ -65,22 +84,18 @@ documentation::Documentation SpiceTranslation::Documentation() { Optional::No }, { - KeyObserver, + OriginInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"), - "This is the SPICE NAIF name for the parent of the body whose " - "translation is to be computed by the SpiceTranslation. It can either be " - "a fully qualified name (such as 'SOLAR SYSTEM BARYCENTER') or a NAIF " - "integer id code (such as '0').", + OriginInfo.description, Optional::No }, { - KeyFrame, + FrameInfo.identifier, new StringAnnotationVerifier( "A valid SPICE NAIF name for a reference frame" ), - "This is the SPICE NAIF name for the reference frame in which the " - "position should be retrieved. The default value is GALACTIC", - Optional::Yes + FrameInfo.description, + Optional::No }, { KeyKernels, @@ -99,9 +114,9 @@ documentation::Documentation SpiceTranslation::Documentation() { } SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) - : _target({ "Target", "Target", "" }) // @TODO Missing documentation - , _origin({ "Origin", "Origin", "" }) // @TODO Missing documentation - , _frame({ "Frame", "Reference Frame", "" }, DefaultReferenceFrame) // @TODO Missing documentation + : _target(TargetInfo) + , _origin(OriginInfo) + , _frame(FrameInfo) { documentation::testSpecificationAndThrow( Documentation(), @@ -109,12 +124,9 @@ SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) "SpiceTranslation" ); - _target = dictionary.value(KeyBody); - _origin = dictionary.value(KeyObserver); - - if (dictionary.hasKey(KeyFrame)) { - _frame = dictionary.value(KeyFrame); - } + _target = dictionary.value(TargetInfo.identifier); + _origin = dictionary.value(OriginInfo.identifier); + _frame = dictionary.value(FrameInfo.identifier); auto loadKernel = [](const std::string& kernel) { if (!FileSys.fileExists(kernel)) { From dc79a94142344724af95caf493eb6efcb592658f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 11:59:48 -0400 Subject: [PATCH 13/20] Remove warnings Update SGCT repository Update Ghoul repository --- ext/ghoul | 2 +- ext/sgct | 2 +- .../properties/numericalproperty.inl | 1 + modules/base/rendering/renderableplane.cpp | 2 +- modules/base/rendering/renderablesphere.cpp | 6 ++-- .../base/rendering/renderabletrailorbit.cpp | 2 +- .../rendering/renderabletrailtrajectory.cpp | 2 +- .../cache/memoryawaretilecache.cpp | 3 +- .../other/pixelbuffercontainer.inl | 2 +- .../rendering/gpu/gpulayerrendersettings.cpp | 2 +- .../rendering/layer/layerrendersettings.cpp | 1 - modules/globebrowsing/tile/rawtile.cpp | 6 +++- .../tile/rawtiledatareader/gdalwrapper.cpp | 10 +++++++ .../tile/tileprovider/defaulttileprovider.cpp | 2 +- .../sizereferencetileprovider.cpp | 8 +++-- .../tileprovider/temporaltileprovider.cpp | 4 +-- .../tile/tileprovider/texttileprovider.cpp | 2 +- .../tileprovider/tileindextileprovider.cpp | 2 +- modules/kameleon/src/kameleonwrapper.cpp | 30 +++++++++++++++++-- .../kameleonvolume/kameleonvolumereader.cpp | 1 - .../rendering/renderablemodelprojection.cpp | 2 +- modules/space/rendering/renderablerings.cpp | 2 +- modules/space/rendering/renderablestars.cpp | 8 +++-- .../space/rendering/simplespheregeometry.cpp | 1 - modules/touch/CMakeLists.txt | 2 ++ src/engine/downloadmanager.cpp | 11 ++++++- src/network/parallelconnection.cpp | 6 ++++ support/cmake/support_macros.cmake | 3 +- 28 files changed, 94 insertions(+), 31 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index c1daefdce9..1fc3d1f78d 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit c1daefdce9a252d9048c4b9225f904cda3eb5f90 +Subproject commit 1fc3d1f78dfd9227ee0068f388f96ea6b1b7bf9f diff --git a/ext/sgct b/ext/sgct index f1c7ddb602..ac291882d9 160000 --- a/ext/sgct +++ b/ext/sgct @@ -1 +1 @@ -Subproject commit f1c7ddb602148425424048285d457aeb7c57a7d6 +Subproject commit ac291882d9dba5636f3b7ef412f39f95e112d057 diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 7e83b15fa3..b3cb206af3 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -246,6 +246,7 @@ template NumericalProperty::NumericalProperty(PropertyInfo info, T value) : NumericalProperty( std::move(info), + std::move(value), PropertyDelegate>::template defaultMinimumValue(), PropertyDelegate>::template defaultMaximumValue(), PropertyDelegate>::template defaultSteppingValue() diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index c67ec7eca0..268e2855e3 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -114,7 +114,7 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _texturePath(TextureInfo) , _billboard(BillboardInfo, false) - , _size(SizeInfo, 10.f, 0.f, 1e25) + , _size(SizeInfo, 10.f, 0.f, 1e25f) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _shader(nullptr) , _texture(nullptr) diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index 30d2b03de5..a226bd7bda 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -128,7 +128,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _texturePath(TextureInfo) , _orientation(OrientationInfo, properties::OptionProperty::DisplayType::Dropdown) - , _size(SizeInfo, 1.f, 0.f, 1e35) + , _size(SizeInfo, 1.f, 0.f, 1e35f) , _segments(SegmentsInfo, 8, 4, 1000) , _transparency(TransparencyInfo, 1.f, 0.f, 1.f) , _shader(nullptr) @@ -187,7 +187,9 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary) } }); if (dictionary.hasKey(TransparencyInfo.identifier)) { - _transparency = dictionary.value(TransparencyInfo.identifier); + _transparency = static_cast( + dictionary.value(TransparencyInfo.identifier) + ); } addProperty(_transparency); diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index 106e0ec8b2..d69d2adceb 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -139,7 +139,7 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary) : RenderableTrail(dictionary) , _period(PeriodInfo, 0.0, 0.0, 1e9) - , _resolution(ResolutionInfo, 1e4, 1, 1e6) + , _resolution(ResolutionInfo, 10000, 1, 1000000) , _needsFullSweep(true) , _indexBufferDirty(true) , _previousTime(0) diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index f82af3ab75..d44705a6f6 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -145,7 +145,7 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di , _startTime(StartTimeInfo) , _endTime(EndTimeInfo) , _sampleInterval(SampleIntervalInfo, 2.0, 2.0, 1e6) - , _timeStampSubsamplingFactor(TimeSubSampleInfo, 1, 1, 1e9) + , _timeStampSubsamplingFactor(TimeSubSampleInfo, 1, 1, 1000000000) , _renderFullTrail(RenderFullPathInfo, false) , _needsFullSweep(true) , _subsamplingIsDirty(true) diff --git a/modules/globebrowsing/cache/memoryawaretilecache.cpp b/modules/globebrowsing/cache/memoryawaretilecache.cpp index 5ad33722c5..f97d196be8 100644 --- a/modules/globebrowsing/cache/memoryawaretilecache.cpp +++ b/modules/globebrowsing/cache/memoryawaretilecache.cpp @@ -169,7 +169,8 @@ void MemoryAwareTileCache::setSizeEstimated(size_t estimatedSize) { size_t sumTextureTypeSize = std::accumulate( _textureContainerMap.cbegin(), - _textureContainerMap.cend(), 0, + _textureContainerMap.cend(), + size_t(0), [](size_t s, const std::pair& p) { diff --git a/modules/globebrowsing/other/pixelbuffercontainer.inl b/modules/globebrowsing/other/pixelbuffercontainer.inl index 2f9109145f..46c3d09d23 100644 --- a/modules/globebrowsing/other/pixelbuffercontainer.inl +++ b/modules/globebrowsing/other/pixelbuffercontainer.inl @@ -52,7 +52,7 @@ void* PixelBufferContainer::mapBuffer(KeyType key, PixelBuffer::Access _pixelBuffers[i]->unbind(); if (dataPtr) { // Success in mapping // Add this index to the map of mapped pixel buffers - _indexMap.emplace(key, i); + _indexMap.emplace(key, static_cast(i)); return dataPtr; } } diff --git a/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp b/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp index 450f6708cf..d2adf6d794 100644 --- a/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp +++ b/modules/globebrowsing/rendering/gpu/gpulayerrendersettings.cpp @@ -37,7 +37,7 @@ void GPULayerRenderSettings::setValue(ghoul::opengl::ProgramObject* programObjec gpuOffset.setValue(programObject, layerSettings.offset.value()); } -void GPULayerRenderSettings::bind(const LayerRenderSettings& layerSettings, +void GPULayerRenderSettings::bind(const LayerRenderSettings&, ghoul::opengl::ProgramObject* programObject, const std::string& nameBase) { diff --git a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp index 37902658f5..f8cb1ec335 100644 --- a/modules/globebrowsing/rendering/layer/layerrendersettings.cpp +++ b/modules/globebrowsing/rendering/layer/layerrendersettings.cpp @@ -98,7 +98,6 @@ void LayerRenderSettings::setValuesFromDictionary( float dictGamma; float dictMultiplier; float dictOffset; - float dictValueBlending; if (renderSettingsDict.getValue(keyOpacity, dictOpacity)) { opacity = dictOpacity; diff --git a/modules/globebrowsing/tile/rawtile.cpp b/modules/globebrowsing/tile/rawtile.cpp index ec36caa9fc..43a93496bc 100644 --- a/modules/globebrowsing/tile/rawtile.cpp +++ b/modules/globebrowsing/tile/rawtile.cpp @@ -42,7 +42,11 @@ RawTile RawTile::createDefault(const TileTextureInitData& initData) { RawTile defaultRes; defaultRes.textureInitData = std::make_shared(initData); defaultRes.imageData = new char[initData.totalNumBytes()]; - std::fill_n(static_cast(defaultRes.imageData), initData.totalNumBytes(), 0); + std::fill_n( + static_cast(defaultRes.imageData), + initData.totalNumBytes(), + char(0) + ); return defaultRes; } diff --git a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp index 9d60df5fdd..ce50ee17cd 100644 --- a/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp +++ b/modules/globebrowsing/tile/rawtiledatareader/gdalwrapper.cpp @@ -33,8 +33,18 @@ #include #include + +#ifdef WIN32 +#pragma warning (push) +#pragma warning (disable : 4251) // needs to have dll-interface to be used by clients +#endif // WIN32 + #include +#ifdef WIN32 +#pragma warning (pop) +#endif // WIN32 + namespace { const char* _loggerCat = "GdalWrapper"; diff --git a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp index 632c7f3207..f2b59bd4c0 100644 --- a/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/defaulttileprovider.cpp @@ -96,7 +96,7 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary) int tilePixelSize = 0; if (dictionary.getValue(KeyTilePixelSize, pixelSize)) { LDEBUG("Default pixel size overridden: " << pixelSize); - tilePixelSize = pixelSize; + tilePixelSize = static_cast(pixelSize); } TileTextureInitData initData(LayerManager::getTileTextureInitData( _layerGroupID, tilePixelSize)); diff --git a/modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp b/modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp index 448adff75e..4f02613a7c 100644 --- a/modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/sizereferencetileprovider.cpp @@ -71,7 +71,9 @@ void SizeReferenceTileProvider::renderText(const ghoul::fontrendering::FontRende glm::vec2 textPosition; textPosition.x = 0; - textPosition.y = aboveEquator ? _fontSize / 2 : _initData.dimensionsWithPadding().y - 3 * _fontSize / 2; + textPosition.y = aboveEquator ? + _fontSize / 2.f : + _initData.dimensionsWithPadding().y - 3.f * _fontSize / 2.f; glm::vec4 color(1.0, 1.0, 1.0, 1.0); fontRenderer.render( @@ -80,7 +82,7 @@ void SizeReferenceTileProvider::renderText(const ghoul::fontrendering::FontRende color, " %.0f %s", tileLongitudalLength, unit.c_str() - ); + ); } int SizeReferenceTileProvider::roundedLongitudalLength(const TileIndex& tileIndex) const { @@ -95,7 +97,7 @@ int SizeReferenceTileProvider::roundedLongitudalLength(const TileIndex& tileInde if (useKm) { l /= 1000; } - l = std::round(l); + l = static_cast(std::round(l)); if (useKm) { l *= 1000; } diff --git a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp index 2982fe0496..fa9a609bdd 100644 --- a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp @@ -71,7 +71,7 @@ TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) try { filePath = absPath(filePath); } - catch (const std::runtime_error& e) { + catch (const std::runtime_error&) { // File path was not a path to a file but a GDAL config or empty } @@ -123,7 +123,7 @@ bool TemporalTileProvider::readFilePath() { ghoul::filesystem::File(_filePath.value()).directoryName() ); } - catch (const std::runtime_error& e) { + catch (const std::runtime_error&) { // File path was not a path to a file but a GDAL config or empty } diff --git a/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp index 0e1494db0f..cdf048d919 100644 --- a/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp @@ -47,7 +47,7 @@ TextTileProvider::TextTileProvider(const TileTextureInitData& initData, size_t f , _fontSize(fontSize) { _tileCache = OsEng.moduleEngine().module()->tileCache(); - _font = OsEng.fontManager().font("Mono", _fontSize); + _font = OsEng.fontManager().font("Mono", static_cast(_fontSize)); _fontRenderer = std::unique_ptr(FontRenderer::createDefault()); _fontRenderer->setFramebufferSize(_initData.dimensionsWithPadding()); diff --git a/modules/globebrowsing/tile/tileprovider/tileindextileprovider.cpp b/modules/globebrowsing/tile/tileprovider/tileindextileprovider.cpp index 72c12ec552..4baf0608a0 100644 --- a/modules/globebrowsing/tile/tileprovider/tileindextileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/tileindextileprovider.cpp @@ -30,7 +30,7 @@ namespace openspace::globebrowsing::tileprovider { -TileIndexTileProvider::TileIndexTileProvider(const ghoul::Dictionary& dict) +TileIndexTileProvider::TileIndexTileProvider(const ghoul::Dictionary&) : TextTileProvider(LayerManager::getTileTextureInitData( layergroupid::GroupID::ColorLayers )) diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index e05a0bd3f8..9c6925050d 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -28,6 +28,11 @@ #include #include +#ifdef WIN32 +#pragma warning (push) +#pragma warning (disable : 4619) // #pragma warning: there is no warning number '4675' +#endif // WIN32 + #include #include #include @@ -35,6 +40,10 @@ #include #include +#ifdef WIN32 +#pragma warning (pop) +#endif // WIN32 + #define _USE_MATH_DEFINES #include #include @@ -940,9 +949,24 @@ void KameleonWrapper::getGridVariables(std::string& x, std::string& y, std::stri y = tokens.at(1); z = tokens.at(2); - std::transform(x.begin(), x.end(), x.begin(), ::tolower); - std::transform(y.begin(), y.end(), y.begin(), ::tolower); - std::transform(z.begin(), z.end(), z.begin(), ::tolower); + std::transform( + x.begin(), + x.end(), + x.begin(), + [](char c) { return static_cast(tolower(c)); } + ); + std::transform( + y.begin(), + y.end(), + y.begin(), + [](char c) { return static_cast(tolower(c)); } + ); + std::transform( + z.begin(), + z.end(), + z.begin(), + [](char c) { return static_cast(tolower(c)); } + ); } KameleonWrapper::GridType KameleonWrapper::getGridType( diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index a68bc9c74b..5bde722d5e 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -28,7 +28,6 @@ #ifdef WIN32 #pragma warning (push) -#pragma warning (disable : 4345) // #pragma warning: there is no warning number '4345' #pragma warning (disable : 4619) // #pragma warning: there is no warning number '4619' #pragma warning (disable : 4675) // #pragma warning: there is no warning number '4675' #pragma warning (disable : 4800) // #pragma warning: there is no warning number '4800' diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 459dc5c918..6b023ada05 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -139,7 +139,7 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di ); std::string name; - [[maybe_unused]] bool success = dictionary.getValue(SceneGraphNode::KeyName, name); + [[ maybe_unused ]] bool success = dictionary.getValue(SceneGraphNode::KeyName, name); ghoul_assert(success, "Name was not passed to RenderableModelProjection"); using ghoul::Dictionary; diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 28367c68d1..5c8c584d5d 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -128,7 +128,7 @@ documentation::Documentation RenderableRings::Documentation() { RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _texturePath(TextureInfo) - , _size(SizeInfo, 1.f, 0.f, 1e25) + , _size(SizeInfo, 1.f, 0.f, 1e25f) , _offset(OffsetInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(1.f)) , _nightFactor(NightFactorInfo, 0.33f, 0.f, 1.f) , _transparency(TransparencyInfo, 0.15f, 0.f, 1.f) diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index ff414456da..ccdd5f5143 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -212,10 +212,14 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) "RenderableStars" ); - _pointSpreadFunctionTexturePath = absPath(dictionary.value(KeyTexture)); + _pointSpreadFunctionTexturePath = absPath(dictionary.value( + PsfTextureInfo.identifier + )); _pointSpreadFunctionFile = std::make_unique(_pointSpreadFunctionTexturePath); - _colorTexturePath = absPath(dictionary.value(KeyColorMap)); + _colorTexturePath = absPath(dictionary.value( + ColorTextureInfo.identifier + )); _colorTextureFile = std::make_unique(_colorTexturePath); _speckFile = absPath(dictionary.value(KeyFile)); diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 103e45855d..27c2f8a393 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -91,7 +91,6 @@ SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) "SimpleSphereGeometry" ); - float sphereRadius = 0.f; glm::vec3 ellipsoidRadius; if (dictionary.hasKeyAndValue(RadiusInfo.identifier)) { const float r = static_cast( diff --git a/modules/touch/CMakeLists.txt b/modules/touch/CMakeLists.txt index 45a7400757..0cf5bc55f4 100644 --- a/modules/touch/CMakeLists.txt +++ b/modules/touch/CMakeLists.txt @@ -53,3 +53,5 @@ create_new_module( ) include_external_library(${touch_module} libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext) + +disable_external_warnings_for_file(${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp) diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index adbf268aa3..81ecbe24bc 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -36,7 +36,16 @@ #include #ifdef OPENSPACE_CURL_ENABLED +#ifdef WIN32 +#pragma warning (push) +#pragma warning (disable: 4574) // 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0' +#endif // WIN32 + #include + +#ifdef WIN32 +#pragma warning (pop) +#endif // WIN32 #endif namespace { @@ -318,7 +327,7 @@ DownloadManager::downloadRequestFiles( LDEBUG("Request File: " << requestFile); bool isFinished = false; - auto callback = [&](const FileFuture& f) { + auto callback = [&](const FileFuture&) { LDEBUG("Finished: " << requestFile); std::ifstream temporary(requestFile); std::string line; diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 0407543276..aa817dd756 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -56,9 +56,15 @@ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif + +#pragma warning (push) +#pragma warning (disable: 4574) // 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0' + #include #include #include + +#pragma warning (pop) #endif #include diff --git a/support/cmake/support_macros.cmake b/support/cmake/support_macros.cmake index 2ae89cd8ec..318cd51c9b 100644 --- a/support/cmake/support_macros.cmake +++ b/support/cmake/support_macros.cmake @@ -170,7 +170,7 @@ function (add_external_dependencies) set(SGCT_LIGHT_ONLY ON CACHE BOOL "" FORCE) set(SGCT_CUSTOMOUTPUTDIRS OFF CACHE BOOL "" FORCE) set(JPEG_TURBO_WITH_SIMD OFF CACHE BOOL "" FORCE) - + add_subdirectory(${OPENSPACE_EXT_DIR}/sgct) target_include_directories(libOpenSpace SYSTEM PUBLIC ${OPENSPACE_EXT_DIR}/sgct/include) target_link_libraries( @@ -243,6 +243,7 @@ function (add_external_dependencies) set(CMAKE_PREFIX_PATH "~/Qt/5.6/clang_64/lib/cmake" "~/Qt/5.7/clang_64/lib/cmake" + "~/Qt/5.8/clang_64/lib/cmake" PARENT_SCOPE ) endif () From 4fc5bc5384fb62a87c58e223da82e97d94bc6592 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 26 Jul 2017 12:20:54 -0400 Subject: [PATCH 14/20] Fixing up YAML affiliations --- support/joss/paper.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/support/joss/paper.md b/support/joss/paper.md index 4493fd3043..f60d80ffa9 100644 --- a/support/joss/paper.md +++ b/support/joss/paper.md @@ -6,8 +6,7 @@ tags: authors: - name: Alexander Bock orcid: 0000-0002-2849-6146 - affiliation: 1 - affiliation: 4 + affiliation: 1,4 - name: Emil Axelsson orcid: 0000-0003-3482-6356 affiliation: 1 @@ -42,9 +41,9 @@ affiliations: index: 2 - name: Community Coordinated Modeling Center index: 3 - - New York University + - name: New York University index: 4 - - University of Utah + - name: University of Utah index: 5 date: 25 July 2017 bibliography: paper.bib From 51e1541cf1efc5bdb3b12efb808ccf93bfcf1c9d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 16:12:13 -0400 Subject: [PATCH 15/20] Fix static initialization fiasco with touch input Restore backwards compatibility of mod files Provide better feedback about specification errors --- .../osirisrex/osirisrex/osirisrex.mod | 2 +- modules/onscreengui/onscreenguimodule.cpp | 21 +++++----- modules/onscreengui/onscreenguimodule.h | 4 +- modules/onscreengui/src/gui_lua.inl | 10 +++-- modules/space/rotation/spicerotation.cpp | 6 +-- .../space/translation/spicetranslation.cpp | 40 ++++++++++++------- modules/space/translation/spicetranslation.h | 2 +- modules/touch/src/touchinteraction.cpp | 30 ++++++++------ src/scene/sceneloader.cpp | 19 ++++++++- 9 files changed, 83 insertions(+), 51 deletions(-) diff --git a/data/scene/missions/osirisrex/osirisrex/osirisrex.mod b/data/scene/missions/osirisrex/osirisrex/osirisrex.mod index a6f220cf56..12776ce226 100644 --- a/data/scene/missions/osirisrex/osirisrex/osirisrex.mod +++ b/data/scene/missions/osirisrex/osirisrex/osirisrex.mod @@ -347,7 +347,7 @@ return { Type = "SpiceTranslation", Body = "OSIRIS-REX", Frame = "IAU_EARTH", - Observer = "EARTH", + Observer = "EARTH", }, Color = { 0.9, 0.9, 0.0 }, StartTime = "2016 SEP 8 23:05:00.50", diff --git a/modules/onscreengui/onscreenguimodule.cpp b/modules/onscreengui/onscreenguimodule.cpp index d380ad210b..20353effe6 100644 --- a/modules/onscreengui/onscreenguimodule.cpp +++ b/modules/onscreengui/onscreenguimodule.cpp @@ -42,9 +42,6 @@ namespace openspace { -gui::GUI OnScreenGUIModule::gui; -Touch OnScreenGUIModule::touchInput; - OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { addPropertySubOwner(gui); @@ -59,7 +56,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { OsEng.registerModuleCallback( OpenSpaceEngine::CallbackOption::Initialize, - [](){ + [&](){ LDEBUGC("OnScreenGUIModule", "Initializing GUI"); gui.initialize(); @@ -107,7 +104,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { OsEng.registerModuleCallback( OpenSpaceEngine::CallbackOption::Deinitialize, - [](){ + [&](){ LDEBUGC("OnScreenGui", "Deinitialize GUI"); gui.deinitialize(); } @@ -115,7 +112,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { OsEng.registerModuleCallback( OpenSpaceEngine::CallbackOption::InitializeGL, - [](){ + [&](){ LDEBUGC("OnScreenGui", "Initializing GUI OpenGL"); gui.initializeGL(); } @@ -123,7 +120,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { OsEng.registerModuleCallback( OpenSpaceEngine::CallbackOption::DeinitializeGL, - [](){ + [&](){ LDEBUGC("OnScreenGui", "Deinitialize GUI OpenGL"); gui.deinitializeGL(); } @@ -134,7 +131,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { // everything else in the case of fisheyes. With this being in the Render callback // the GUI would be rendered on top of each of the cube faces OpenSpaceEngine::CallbackOption::PostDraw, - [](){ + [&](){ WindowWrapper& wrapper = OsEng.windowWrapper(); bool showGui = wrapper.hasGuiWindow() ? wrapper.isGuiWindow() : true; if (wrapper.isMaster() && showGui ) { @@ -164,7 +161,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { ); OsEng.registerModuleKeyboardCallback( - [](Key key, KeyModifier mod, KeyAction action) -> bool { + [&](Key key, KeyModifier mod, KeyAction action) -> bool { if (gui.isEnabled()) { return gui.keyCallback(key, mod, action); } @@ -175,7 +172,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { ); OsEng.registerModuleCharCallback( - [](unsigned int codepoint, KeyModifier modifier) -> bool { + [&](unsigned int codepoint, KeyModifier modifier) -> bool { if (gui.isEnabled()) { return gui.charCallback(codepoint, modifier); } @@ -186,7 +183,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { ); OsEng.registerModuleMouseButtonCallback( - [](MouseButton button, MouseAction action) -> bool { + [&](MouseButton button, MouseAction action) -> bool { if (gui.isEnabled()) { return gui.mouseButtonCallback(button, action); } @@ -197,7 +194,7 @@ OnScreenGUIModule::OnScreenGUIModule() : OpenSpaceModule(Name) { ); OsEng.registerModuleMouseScrollWheelCallback( - [](double, double posY) -> bool { + [&](double, double posY) -> bool { if (gui.isEnabled()) { return gui.mouseWheelCallback(posY); } diff --git a/modules/onscreengui/onscreenguimodule.h b/modules/onscreengui/onscreenguimodule.h index 9792fc42b6..600200b709 100644 --- a/modules/onscreengui/onscreenguimodule.h +++ b/modules/onscreengui/onscreenguimodule.h @@ -43,8 +43,8 @@ public: OnScreenGUIModule(); - static gui::GUI gui; - static Touch touchInput; + gui::GUI gui; + Touch touchInput = { false, glm::vec2(0), 0 }; }; } // namespace openspace diff --git a/modules/onscreengui/src/gui_lua.inl b/modules/onscreengui/src/gui_lua.inl index d2fcc6f9ea..41b76c7659 100644 --- a/modules/onscreengui/src/gui_lua.inl +++ b/modules/onscreengui/src/gui_lua.inl @@ -22,6 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ +#include + namespace openspace::gui::luascriptfunctions { /** @@ -35,7 +37,7 @@ int show(lua_State* L) { return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); } - OnScreenGUIModule::gui.setEnabled(true); + OsEng.moduleEngine().module()->gui.setEnabled(true); return 0; } @@ -50,7 +52,7 @@ int hide(lua_State* L) { return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); } - OnScreenGUIModule::gui.setEnabled(false); + OsEng.moduleEngine().module()->gui.setEnabled(false); return 0; } @@ -65,7 +67,9 @@ int toggle(lua_State* L) { return luaL_error(L, "Expected %i arguments, got %i", 0, nArguments); } - OnScreenGUIModule::gui.setEnabled(!OnScreenGUIModule::gui.isEnabled()); + OsEng.moduleEngine().module()->gui.setEnabled( + !OsEng.moduleEngine().module()->gui.isEnabled() + ); return 0; } diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index fe02d671bd..d1117f2df0 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -32,19 +32,17 @@ #include namespace { - const char* KeySourceFrame = "SourceFrame"; - const char* KeyDestinationFrame = "DestinationFrame"; const char* KeyKernels = "Kernels"; static const openspace::properties::Property::PropertyInfo SourceInfo = { - "Source", + "SourceFrame", "Source", "This value specifies the source frame that is used as the basis for the " "coordinate transformation. This has to be a valid SPICE name." }; static const openspace::properties::Property::PropertyInfo DestinationInfo = { - "Destination", + "DestinationFrame", "Destination", "This value specifies the destination frame that is used for the coordinate " "transformation. This has to be a valid SPICE name." diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 4ea74936a5..01fbadfc18 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -36,6 +36,8 @@ namespace { const char* KeyBody = "Body"; const char* KeyKernels = "Kernels"; + const char* DefaultReferenceFrame = "GALACTIC"; + static const openspace::properties::Property::PropertyInfo TargetInfo = { "Target", "Target", @@ -44,9 +46,9 @@ namespace { "or a NAIF integer id code (such as '399')." }; - static const openspace::properties::Property::PropertyInfo OriginInfo = { - "Origin", - "Origin", + static const openspace::properties::Property::PropertyInfo ObserverInfo = { + "Observer", + "Observer", "This is the SPICE NAIF name for the parent of the body whose translation is to " "be computed by the SpiceTranslation. It can either be a fully qualified name " "(such as 'SOLAR SYSTEM BARYCENTER') or a NAIF integer id code (such as '0')." @@ -65,7 +67,7 @@ namespace openspace { documentation::Documentation SpiceTranslation::Documentation() { using namespace openspace::documentation; - return{ + return { "Spice Translation", "space_translation_spicetranslation", { @@ -84,9 +86,9 @@ documentation::Documentation SpiceTranslation::Documentation() { Optional::No }, { - OriginInfo.identifier, + ObserverInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"), - OriginInfo.description, + ObserverInfo.description, Optional::No }, { @@ -95,7 +97,7 @@ documentation::Documentation SpiceTranslation::Documentation() { "A valid SPICE NAIF name for a reference frame" ), FrameInfo.description, - Optional::No + Optional::Yes }, { KeyKernels, @@ -115,8 +117,8 @@ documentation::Documentation SpiceTranslation::Documentation() { SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) : _target(TargetInfo) - , _origin(OriginInfo) - , _frame(FrameInfo) + , _observer(ObserverInfo) + , _frame(FrameInfo, DefaultReferenceFrame) { documentation::testSpecificationAndThrow( Documentation(), @@ -124,9 +126,12 @@ SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) "SpiceTranslation" ); - _target = dictionary.value(TargetInfo.identifier); - _origin = dictionary.value(OriginInfo.identifier); - _frame = dictionary.value(FrameInfo.identifier); + _target = dictionary.value(KeyBody); + _observer = dictionary.value(ObserverInfo.identifier); + + if (dictionary.hasKey(FrameInfo.identifier)) { + _frame = dictionary.value(FrameInfo.identifier); + } auto loadKernel = [](const std::string& kernel) { if (!FileSys.fileExists(kernel)) { @@ -163,8 +168,8 @@ SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) _target.onChange(update); addProperty(_target); - _origin.onChange(update); - addProperty(_origin); + _observer.onChange(update); + addProperty(_observer); _frame.onChange(update); addProperty(_frame); @@ -177,7 +182,12 @@ glm::dvec3 SpiceTranslation::position() const { void SpiceTranslation::update(const UpdateData& data) { double lightTime = 0.0; _position = SpiceManager::ref().targetPosition( - _target, _origin, _frame, {}, data.time.j2000Seconds(), lightTime + _target, + _observer, + _frame, + {}, + data.time.j2000Seconds(), + lightTime ) * glm::pow(10.0, 3.0); } diff --git a/modules/space/translation/spicetranslation.h b/modules/space/translation/spicetranslation.h index 9be65fc52d..1e8cd24559 100644 --- a/modules/space/translation/spicetranslation.h +++ b/modules/space/translation/spicetranslation.h @@ -41,7 +41,7 @@ public: private: properties::StringProperty _target; - properties::StringProperty _origin; + properties::StringProperty _observer; properties::StringProperty _frame; glm::dvec3 _position; diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 55ec5a0146..c2b83202d2 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -213,7 +214,8 @@ TouchInteraction::TouchInteraction() }); levmarq_init(&_lmstat); - OnScreenGUIModule::touchInput = { false, glm::vec2(0), 0 }; + + _time.initSession(); } @@ -248,17 +250,20 @@ bool TouchInteraction::guiMode(const std::vector& list) { WindowWrapper& wrapper = OsEng.windowWrapper(); glm::ivec2 res = wrapper.currentWindowSize(); glm::dvec2 pos = glm::vec2(list.at(0).getScreenX(res.x), list.at(0).getScreenY(res.y)); // mouse pixel position - _guiON = OnScreenGUIModule::gui.isEnabled(); + + OnScreenGUIModule& module = *(OsEng.moduleEngine().module()); + _guiON = module.gui.isEnabled(); + if (_tap && list.size() == 1 && std::abs(pos.x) < _guiButton.value().x && std::abs(pos.y) < _guiButton.value().y) { // pressed invisible button _guiON = !_guiON; - OnScreenGUIModule::gui.setEnabled(_guiON); + module.gui.setEnabled(_guiON); std::string mode = (_guiON) ? "" : "de"; LINFO("GUI mode is " << mode << "activated. Inside box by: (" << static_cast(100 * (pos.x / _guiButton.value().x)) << "%, " << static_cast(100 * (pos.y / _guiButton.value().y)) << "%)\n"); } else if (_guiON) { - OnScreenGUIModule::touchInput = { _guiON, pos, 1 }; // emulate touch input as a mouse + module.touchInput = { _guiON, pos, 1 }; // emulate touch input as a mouse } return _guiON; } @@ -450,7 +455,7 @@ void TouchInteraction::directControl(const std::vector& list) { _vel.pan = glm::dvec2(0.0, 0.0); } else { // prevents touch to infinitely be active (due to windows bridge case where event doesnt get consumed sometimes when LMA fails to converge) - OnScreenGUIModule::touchInput = { 1, glm::dvec2(0.0, 0.0), 1 }; + OsEng.moduleEngine().module()->touchInput = { 1, glm::dvec2(0.0, 0.0), 1 }; resetAfterInput(); } } @@ -809,22 +814,23 @@ void TouchInteraction::resetAfterInput() { } } // Reset emulated mouse values + OnScreenGUIModule& module = *(OsEng.moduleEngine().module()); if (_guiON) { - bool activeLastFrame = OnScreenGUIModule::touchInput.action; - OnScreenGUIModule::touchInput.active = false; + bool activeLastFrame = module.touchInput.action; + module.touchInput.active = false; if (activeLastFrame) { - OnScreenGUIModule::touchInput.active = true; - OnScreenGUIModule::touchInput.action = 0; + module.touchInput.active = true; + module.touchInput.action = 0; } } else { - OnScreenGUIModule::touchInput.active = false; - OnScreenGUIModule::touchInput.action = 0; + module.touchInput.active = false; + module.touchInput.action = 0; } _lmSuccess = true; // Ensure that _guiON is consistent with properties in OnScreenGUI and - _guiON = OnScreenGUIModule::gui.isEnabled(); + _guiON = module.gui.isEnabled(); // Reset variables _lastVel.orbit = glm::dvec2(0.0, 0.0); diff --git a/src/scene/sceneloader.cpp b/src/scene/sceneloader.cpp index ca376f9742..c53e9abea7 100644 --- a/src/scene/sceneloader.cpp +++ b/src/scene/sceneloader.cpp @@ -276,7 +276,24 @@ std::vector SceneLoader::loadModule(const std::string& } try { loadedNodes.push_back(loadNode(nodeDictionary)); - } catch (ghoul::RuntimeError& e) { + } + catch (documentation::SpecificationError& e) { + LERROR("Specification error in node from " << path); + LERRORC(e.component, e.message); + for (const documentation::TestResult::Offense& offense : e.result.offenses) { + LERRORC( + e.component, + offense.offender + ": " + std::to_string(offense.reason) + ); + } + for (const documentation::TestResult::Warning& warning : e.result.warnings) { + LWARNINGC( + e.component, + warning.offender + ": " + std::to_string(warning.reason) + ); + } + } + catch (ghoul::RuntimeError& e) { LERROR("Failed loading node from " << path << ": " << e.message << ", " << e.component); } } From ce034ccc962aeeb9844b6ddaf00796bb21bf1632 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 16:46:20 -0400 Subject: [PATCH 16/20] Remove startup warnings --- data/scene/milkyway/milkyway.mod | 1 + modules/space/rendering/renderablerings.cpp | 3 +-- modules/space/rendering/simplespheregeometry.cpp | 11 ++--------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/data/scene/milkyway/milkyway.mod b/data/scene/milkyway/milkyway.mod index 49c07a217c..0e84178339 100644 --- a/data/scene/milkyway/milkyway.mod +++ b/data/scene/milkyway/milkyway.mod @@ -6,6 +6,7 @@ return { Type = "RenderableSphere", Size = 10E22, Segments = 40, + Alpha = 0.2, Texture = "textures/DarkUniverse_mellinger_8k.jpg", Orientation = "Inside/Outside" } diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 5c8c584d5d..646716317c 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -120,8 +120,7 @@ documentation::Documentation RenderableRings::Documentation() { TransparencyInfo.description, Optional::Yes } - }, - Exhaustive::Yes + } }; } diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 27c2f8a393..88dff332cf 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -53,12 +53,6 @@ documentation::Documentation SimpleSphereGeometry::Documentation() { "SimpleSphereGeometry", "space_geometry_simplesphere", { - { - "Type", - new StringEqualVerifier("SimpleSphereGeometry"), - "", - Optional::No - }, { RadiusInfo.identifier, new OrVerifier( @@ -74,8 +68,7 @@ documentation::Documentation SimpleSphereGeometry::Documentation() { SegmentsInfo.description, Optional::No } - }, - Exhaustive::Yes + } }; } @@ -102,7 +95,7 @@ SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary) _radius = dictionary.value(RadiusInfo.identifier); } - _segments = dictionary.value(SegmentsInfo.identifier); + _segments = static_cast(dictionary.value(SegmentsInfo.identifier)); // The shader need the radii values but they are not changeable runtime // TODO: Possibly add a scaling property @AA From 59bccd040d6fd872a714074f0a4e8e061b60927d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 17:29:57 -0400 Subject: [PATCH 17/20] Cleanup changes --- .../openspace/properties/templateproperty.inl | 20 ------------------- include/openspace/rendering/renderable.h | 1 - modules/base/rendering/renderableplane.cpp | 7 ++----- src/rendering/renderable.cpp | 9 --------- src/scene/scene_lua.inl | 2 -- 5 files changed, 2 insertions(+), 37 deletions(-) diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index 7581324390..6420a78f13 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -142,21 +142,6 @@ namespace openspace::properties { } \ - -// 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 -//TemplateProperty::TemplateProperty(std::string identifier, std::string guiName, -// Property::Visibility visibility) -// : TemplateProperty( -// std::move(identifier), std::move(guiName), -// PropertyDelegate>::template defaultValue(), -// visibility) -//{ -//} - template TemplateProperty::TemplateProperty(PropertyInfo info, T value) : Property(std::move(info)) @@ -168,11 +153,6 @@ std::string TemplateProperty::className() const { return PropertyDelegate>::className(); } -//template -//std::string TemplateProperty::description() { -// return -//} - template TemplateProperty::operator T() { return _value; diff --git a/include/openspace/rendering/renderable.h b/include/openspace/rendering/renderable.h index 1baf5639e1..623535fc81 100644 --- a/include/openspace/rendering/renderable.h +++ b/include/openspace/rendering/renderable.h @@ -61,7 +61,6 @@ public: static std::unique_ptr createFromDictionary(const ghoul::Dictionary& dictionary); // constructors & destructor - //Renderable(); Renderable(const ghoul::Dictionary& dictionary); virtual ~Renderable(); diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 268e2855e3..8dafb0a336 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -38,8 +38,6 @@ #include namespace { - const char* KeyBlendMode = "BlendMode"; - enum BlendMode { BlendModeNormal = 0, BlendModeAdditive @@ -118,7 +116,6 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) , _shader(nullptr) , _texture(nullptr) - //, _blendMode(BlendMode::Normal) , _quad(0) , _vertexPositionBuffer(0) , _planeIsDirty(false) @@ -153,8 +150,8 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary) } }); - if (dictionary.hasKey(KeyBlendMode)) { - const std::string v = dictionary.value(KeyBlendMode); + if (dictionary.hasKey(BlendModeInfo.identifier)) { + const std::string v = dictionary.value(BlendModeInfo.identifier); if (v == "Normal") { _blendMode = BlendModeNormal; } diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 75c3a27bc9..65b51003ed 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -97,15 +97,6 @@ std::unique_ptr Renderable::createFromDictionary( return result; } -//Renderable::Renderable() -// : properties::PropertyOwner("renderable") -// , _enabled(EnabledInfo, true) -// , _renderBin(RenderBin::Opaque) -// , _startTime("") -// , _endTime("") -// , _hasTimeInterval(false) -//{} - Renderable::Renderable(const ghoul::Dictionary& dictionary) : properties::PropertyOwner("renderable") , _enabled(EnabledInfo, true) diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 6e1f1d6679..4dc36497bc 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -71,9 +71,7 @@ void applyRegularExpression(lua_State* L, std::regex regex, using ghoul::lua::luaTypeToString; bool isGroupMode = !groupName.empty(); - int i = -1; for (properties::Property* prop : properties) { - ++i; // Check the regular expression for all properties std::string id = prop->fullyQualifiedIdentifier(); From 0b30a9e2440a8b6ed2c94e949704497102f4040e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 17:58:12 -0400 Subject: [PATCH 18/20] Jenkins compile fix for Linux --- include/openspace/properties/numericalproperty.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index cac67dea48..76f1545e6a 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -32,7 +32,7 @@ namespace openspace::properties { template class NumericalProperty : public TemplateProperty { public: - using Property::PropertyInfo; + using TemplateProperty::PropertyInfo; NumericalProperty(PropertyInfo info); NumericalProperty(PropertyInfo info, T value); From 14b4f5c1f0076e667df0581efc8f033234a921b7 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 18:15:40 -0400 Subject: [PATCH 19/20] Jenkins compile fix --- Jenkinsfile | 3 +++ include/openspace/properties/scalar/boolproperty.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6bec006822..92761a10a4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,7 @@ stage('Build') { parallel linux: { node('linux') { timeout(time: 30, unit: 'MINUTES') { + deleteDir() checkout scm sh 'git submodule update --init --recursive' sh ''' @@ -42,6 +43,7 @@ stage('Build') { windows: { node('windows') { timeout(time: 30, unit: 'MINUTES') { + deleteDir() checkout scm bat ''' git submodule update --init --recursive @@ -57,6 +59,7 @@ stage('Build') { osx: { node('osx') { timeout(time: 30, unit: 'MINUTES') { + deleteDir() checkout scm sh 'git submodule update --init --recursive' sh ''' diff --git a/include/openspace/properties/scalar/boolproperty.h b/include/openspace/properties/scalar/boolproperty.h index c5f4f53ee6..cf21cd4754 100644 --- a/include/openspace/properties/scalar/boolproperty.h +++ b/include/openspace/properties/scalar/boolproperty.h @@ -40,7 +40,7 @@ * @} @} */ -#include +#include namespace openspace::properties { From 142f807586c05636784d5fe77460efc629dad354 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 19:20:57 -0400 Subject: [PATCH 20/20] Jenkins compile fix --- Jenkinsfile | 3 --- include/openspace/properties/numericalproperty.h | 10 ++++------ include/openspace/properties/numericalproperty.inl | 10 +++++----- include/openspace/properties/optionproperty.h | 4 +--- include/openspace/properties/selectionproperty.h | 4 +--- include/openspace/properties/templateproperty.h | 3 +-- include/openspace/properties/templateproperty.inl | 2 +- src/properties/selectionproperty.cpp | 2 +- 8 files changed, 14 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 92761a10a4..6bec006822 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,6 @@ stage('Build') { parallel linux: { node('linux') { timeout(time: 30, unit: 'MINUTES') { - deleteDir() checkout scm sh 'git submodule update --init --recursive' sh ''' @@ -43,7 +42,6 @@ stage('Build') { windows: { node('windows') { timeout(time: 30, unit: 'MINUTES') { - deleteDir() checkout scm bat ''' git submodule update --init --recursive @@ -59,7 +57,6 @@ stage('Build') { osx: { node('osx') { timeout(time: 30, unit: 'MINUTES') { - deleteDir() checkout scm sh 'git submodule update --init --recursive' sh ''' diff --git a/include/openspace/properties/numericalproperty.h b/include/openspace/properties/numericalproperty.h index 76f1545e6a..8e5bc6cb23 100644 --- a/include/openspace/properties/numericalproperty.h +++ b/include/openspace/properties/numericalproperty.h @@ -32,12 +32,10 @@ namespace openspace::properties { template class NumericalProperty : public TemplateProperty { public: - using TemplateProperty::PropertyInfo; - - NumericalProperty(PropertyInfo info); - NumericalProperty(PropertyInfo info, T value); - NumericalProperty(PropertyInfo info, T value, T minimumValue, T maximumValue); - NumericalProperty(PropertyInfo info, T value, T minimumValue, T maximumValue, + NumericalProperty(Property::PropertyInfo info); + NumericalProperty(Property::PropertyInfo info, T value); + NumericalProperty(Property::PropertyInfo info, T value, T minimumValue, T maximumValue); + NumericalProperty(Property::PropertyInfo info, T value, T minimumValue, T maximumValue, T steppingValue); bool getLuaValue(lua_State* state) const override; diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index b3cb206af3..0c524a3b0c 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -232,7 +232,7 @@ const std::string NumericalProperty::SteppingValueKey = "SteppingValue"; // a single constructor template -NumericalProperty::NumericalProperty(PropertyInfo info) +NumericalProperty::NumericalProperty(Property::PropertyInfo info) : NumericalProperty( std::move(info), PropertyDelegate>::template defaultValue(), @@ -243,7 +243,7 @@ NumericalProperty::NumericalProperty(PropertyInfo info) {} template -NumericalProperty::NumericalProperty(PropertyInfo info, T value) +NumericalProperty::NumericalProperty(Property::PropertyInfo info, T value) : NumericalProperty( std::move(info), std::move(value), @@ -254,8 +254,8 @@ NumericalProperty::NumericalProperty(PropertyInfo info, T value) {} template -NumericalProperty::NumericalProperty(PropertyInfo info, T value, T minimumValue, - T maximumValue) +NumericalProperty::NumericalProperty(Property::PropertyInfo info, T value, + T minimumValue, T maximumValue) : NumericalProperty( std::move(info), std::move(value), std::move(minimumValue), std::move(maximumValue), @@ -264,7 +264,7 @@ NumericalProperty::NumericalProperty(PropertyInfo info, T value, T minimumVal {} template -NumericalProperty::NumericalProperty(PropertyInfo info, T value, +NumericalProperty::NumericalProperty(Property::PropertyInfo info, T value, T minimumValue, T maximumValue, T steppingValue) : TemplateProperty(std::move(info), std::move(value)) , _minimumValue(std::move(minimumValue)) diff --git a/include/openspace/properties/optionproperty.h b/include/openspace/properties/optionproperty.h index e2e40f33dc..1f57f4e98f 100644 --- a/include/openspace/properties/optionproperty.h +++ b/include/openspace/properties/optionproperty.h @@ -40,8 +40,6 @@ namespace openspace::properties { */ class OptionProperty : public IntProperty { public: - using Property::PropertyInfo; - /** * The struct storing a single option consisting of an integer value and * a string description. @@ -64,7 +62,7 @@ public: * \pre \p info.identifier must not be empty * \pre \p info.guiName must not be empty */ - OptionProperty(PropertyInfo info); + OptionProperty(Property::PropertyInfo info); /** * The constructor delegating the identifier and the guiName diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 3e036a90ce..ea59ad2d4d 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -33,14 +33,12 @@ namespace openspace::properties { class SelectionProperty : public TemplateProperty> { public: - using Property::PropertyInfo; - struct Option { int value; std::string description; }; - SelectionProperty(PropertyInfo info); + SelectionProperty(Property::PropertyInfo info); void addOption(Option option); void removeOptions(); diff --git a/include/openspace/properties/templateproperty.h b/include/openspace/properties/templateproperty.h index 1d6d253346..0e48e3abb5 100644 --- a/include/openspace/properties/templateproperty.h +++ b/include/openspace/properties/templateproperty.h @@ -51,7 +51,6 @@ namespace openspace::properties { template class TemplateProperty : public Property { public: - using Property::PropertyInfo; using ValueType = T; /** @@ -63,7 +62,7 @@ public: * \pre \p info.identifier must not be empty * \pre \p info.guiName must not be empty */ - TemplateProperty(PropertyInfo info, + TemplateProperty(Property::PropertyInfo info, T value = PropertyDelegate>::template defaultValue()); /** diff --git a/include/openspace/properties/templateproperty.inl b/include/openspace/properties/templateproperty.inl index 6420a78f13..eef8b1158e 100644 --- a/include/openspace/properties/templateproperty.inl +++ b/include/openspace/properties/templateproperty.inl @@ -143,7 +143,7 @@ namespace openspace::properties { template -TemplateProperty::TemplateProperty(PropertyInfo info, T value) +TemplateProperty::TemplateProperty(Property::PropertyInfo info, T value) : Property(std::move(info)) , _value(std::move(value)) {} diff --git a/src/properties/selectionproperty.cpp b/src/properties/selectionproperty.cpp index 72c1ca36e7..fbde88e714 100644 --- a/src/properties/selectionproperty.cpp +++ b/src/properties/selectionproperty.cpp @@ -36,7 +36,7 @@ namespace openspace::properties { const std::string SelectionProperty::OptionsKey = "Options"; -SelectionProperty::SelectionProperty(PropertyInfo info) +SelectionProperty::SelectionProperty(Property::PropertyInfo info) : TemplateProperty(std::move(info), std::vector()) {}