From 19f8e30813049560dd4b1dd21ecbb23e6dc536c3 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 26 Jul 2017 21:40:59 -0400 Subject: [PATCH] Change RenderableModel "Rotation.ModelTransform" to "ModelTransform" Add Property descriptions to the documentation file Remove update method from StaticTranslation Remove spelling error in RenderableGlobe Remove rotation from renderablemodel projection Fix setting the Origin through the GUI Reorder Optional and documentation arguments for DocumentationEntry, and making Optional a non-optional argument --- .../missions/rosetta/rosetta/rosetta.mod | 28 +-- data/web/common/style.css | 4 + data/web/properties/property.hbs | 1 + .../openspace/documentation/documentation.h | 6 +- modules/base/rendering/modelgeometry.cpp | 8 +- modules/base/rendering/renderablemodel.cpp | 35 ++-- modules/base/rendering/renderablemodel.h | 4 +- modules/base/rendering/renderableplane.cpp | 12 +- modules/base/rendering/renderablesphere.cpp | 20 +- modules/base/rendering/renderabletrail.cpp | 28 +-- .../base/rendering/renderabletrailorbit.cpp | 8 +- .../rendering/renderabletrailtrajectory.cpp | 20 +- modules/base/rendering/screenspaceimage.cpp | 8 +- modules/base/rotation/staticrotation.cpp | 5 +- modules/base/scale/staticscale.cpp | 4 +- modules/base/shaders/model_fs.glsl | 3 +- .../base/translation/statictranslation.cpp | 7 +- modules/base/translation/statictranslation.h | 1 - .../rendering/renderabledebugplane.cpp | 16 +- .../globebrowsing/globes/renderableglobe.cpp | 3 +- .../tasks/kameleondocumentationtask.cpp | 3 + .../tasks/kameleonmetadatatojsontask.cpp | 3 + .../rendering/renderablecrawlingline.cpp | 22 +-- .../newhorizons/rendering/renderablefov.cpp | 39 ++-- .../rendering/renderablemodelprojection.cpp | 62 ++----- .../rendering/renderablemodelprojection.h | 2 - .../rendering/renderableplanetprojection.cpp | 24 +-- .../rendering/renderableshadowcylinder.cpp | 40 ++-- .../newhorizons/util/projectioncomponent.cpp | 41 ++--- .../onscreengui/src/guiorigincomponent.cpp | 2 +- modules/space/rendering/planetgeometry.cpp | 4 +- .../renderableconstellationbounds.cpp | 16 +- modules/space/rendering/renderableplanet.cpp | 32 ++-- modules/space/rendering/renderablerings.cpp | 21 +-- modules/space/rendering/renderablestars.cpp | 29 ++- .../space/rendering/simplespheregeometry.cpp | 8 +- modules/space/rotation/spicerotation.cpp | 13 +- .../space/translation/keplertranslation.cpp | 33 ++-- .../space/translation/spicetranslation.cpp | 17 +- modules/space/translation/tletranslation.cpp | 10 +- src/documentation/documentation.cpp | 10 +- src/documentation/verifier.cpp | 8 +- src/engine/configurationmanager_doc.inl | 174 +++++++++--------- src/engine/logfactory.cpp | 22 ++- src/mission/mission.cpp | 16 +- src/rendering/renderable.cpp | 4 +- src/rendering/screenspacerenderable.cpp | 4 +- src/scene/rotation.cpp | 4 +- src/scene/scale.cpp | 4 +- src/scene/scene.cpp | 3 +- src/scene/scene_doc.inl | 29 +-- src/scene/scenegraphnode_doc.inl | 28 +-- src/scene/translation.cpp | 4 +- src/scripting/scriptscheduler.cpp | 19 +- src/util/task.cpp | 4 +- src/util/timerange.cpp | 8 +- 56 files changed, 491 insertions(+), 492 deletions(-) diff --git a/data/scene/missions/rosetta/rosetta/rosetta.mod b/data/scene/missions/rosetta/rosetta/rosetta.mod index 930a4941df..961749dd01 100644 --- a/data/scene/missions/rosetta/rosetta/rosetta.mod +++ b/data/scene/missions/rosetta/rosetta/rosetta.mod @@ -48,7 +48,7 @@ RosettaKernels = { "${OPENSPACE_DATA}/spice/Rosetta/PCK/ROS_CGS_RSOC_V03.TPC", } -RotationMatrix = { +local RotationMatrix = { 0, 1, 0, 0, 0, 1, 1, 0, 0 @@ -99,7 +99,7 @@ return { Type = "simple", Color = "textures/foil_silver_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, { @@ -116,7 +116,7 @@ return { Type = "simple", Color = "textures/foil_silver_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, { @@ -133,7 +133,7 @@ return { Type = "simple", Color = "textures/dish_AO.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix }, -- Transform = { @@ -158,7 +158,7 @@ return { Type = "simple", Color = "textures/parts2_AO.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -176,7 +176,7 @@ return { Type = "simple", Color = "textures/foil_silver_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -194,7 +194,7 @@ return { Type = "simple", Color = "textures/tex_01.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -212,7 +212,7 @@ return { Type = "simple", Color = "textures/tex_01.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix }, -- Transform = { @@ -237,7 +237,7 @@ return { Type = "simple", Color = "textures/tex_01.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix }, -- Transform = { @@ -262,7 +262,7 @@ return { Type = "simple", Color = "textures/foil_gold_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -304,7 +304,7 @@ return { Type = "simple", Color = "textures/foil_silver_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -322,7 +322,7 @@ return { Type = "simple", Color = "textures/parts2_AO.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -340,7 +340,7 @@ return { Type = "simple", Color = "textures/foil_silver_ramp.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, @@ -358,7 +358,7 @@ return { Type = "simple", Color = "textures/tex_01.png" }, - Rotation = { ModelTransform = RotationMatrix } + ModelTransform = RotationMatrix } }, { diff --git a/data/web/common/style.css b/data/web/common/style.css index ac82e9fe77..f785e54ff7 100644 --- a/data/web/common/style.css +++ b/data/web/common/style.css @@ -57,6 +57,10 @@ font-size: 0.9em; } +.documentation-documentation { + font-size: 0.9em; +} + .documentation-container { font-size: 1.2em; } diff --git a/data/web/properties/property.hbs b/data/web/properties/property.hbs index b01807229d..7a0bd7a430 100644 --- a/data/web/properties/property.hbs +++ b/data/web/properties/property.hbs @@ -10,6 +10,7 @@

{{fullyQualifiedId}} copy

+

{{description}}

diff --git a/include/openspace/documentation/documentation.h b/include/openspace/documentation/documentation.h index 852b8faa9b..6458a55485 100644 --- a/include/openspace/documentation/documentation.h +++ b/include/openspace/documentation/documentation.h @@ -162,7 +162,7 @@ struct DocumentationEntry { * \pre \p verifier must not be nullptr */ DocumentationEntry(std::string key, std::shared_ptr verifier, - std::string doc = "", Optional optional = Optional::No); + Optional optional, std::string doc = ""); /** * The constructor for a DocumentationEntry describing a \p key in a Documentation. @@ -185,8 +185,8 @@ struct DocumentationEntry { * \pre \p key must not be empty * \pre \p verifier must not be nullptr */ - DocumentationEntry(std::string key, Verifier* verifier, std::string doc = "", - Optional optional = Optional::No); + DocumentationEntry(std::string key, Verifier* verifier, Optional optional, + std::string doc = ""); /// The key that is described by this DocumentationEntry std::string key; diff --git a/modules/base/rendering/modelgeometry.cpp b/modules/base/rendering/modelgeometry.cpp index c82d08c700..df680a4b99 100644 --- a/modules/base/rendering/modelgeometry.cpp +++ b/modules/base/rendering/modelgeometry.cpp @@ -55,16 +55,16 @@ documentation:: Documentation ModelGeometry::Documentation() { { KeyType, new StringVerifier, - "The type of the Model Geometry that should be generated", - Optional::No + Optional::No, + "The type of the Model Geometry that should be generated" }, { KeyGeomModelFile, new StringVerifier, + Optional::No, "The file that should be loaded in this ModelGeometry. The file can " "contain filesystem tokens or can be specified relatively to the " - "location of the .mod file.", - Optional::No + "location of the .mod file." } } }; diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 374ae7587b..4dd43cd3ff 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -42,10 +42,10 @@ #include #include -namespace { +namespace { const char* KeyGeometry = "Geometry"; const char* KeyTexture = "Textures.Color"; - const char* KeyModelTransform = "Rotation.ModelTransform"; + const char* KeyModelTransform = "ModelTransform"; static const openspace::properties::Property::PropertyInfo TextureInfo = { "ColorTexture", // @TODO replace with only "Texture" @@ -60,6 +60,13 @@ namespace { "This value determines whether this model should be shaded by using the position " "of the Sun." }; + + static const openspace::properties::Property::PropertyInfo ModelTransformInfo = { + "ModelTransform", + "Model Transform", + "This value specifies the model transform that is applied to the model before " + "all other transformations are applied." + }; } // namespace namespace openspace { @@ -73,27 +80,26 @@ documentation::Documentation RenderableModel::Documentation() { { KeyGeometry, new ReferencingVerifier("base_geometry_model"), - "This specifies the model that is rendered by the Renderable.", - Optional::No + Optional::No, + "This specifies the model that is rendered by the Renderable." }, { KeyTexture, // @TODO replace with TextureInfo.identifier new StringVerifier, - TextureInfo.description, - Optional::Yes + Optional::Yes, + TextureInfo.description }, { ShadingInfo.identifier, new BoolVerifier, - ShadingInfo.description, - Optional::Yes + Optional::Yes, + ShadingInfo.description }, { - KeyModelTransform, + ModelTransformInfo.identifier, new DoubleMatrix3Verifier, - "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 + Optional::Yes, + ModelTransformInfo.description } } }; @@ -104,9 +110,9 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) , _geometry(nullptr) , _colorTexturePath(TextureInfo) , _performShading(ShadingInfo, true) + , _modelTransform(ModelTransformInfo, glm::mat3(1.0)) , _programObject(nullptr) , _texture(nullptr) - , _modelTransform(1.0) { ghoul_precondition( dictionary.hasKeyAndValue(SceneGraphNode::KeyName), @@ -187,7 +193,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { glm::dmat4 modelTransform = glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * // Translation glm::dmat4(data.modelTransform.rotation) * // Spice rotation - glm::dmat4(glm::scale(glm::dmat4(_modelTransform), glm::dvec3(data.modelTransform.scale))); + glm::dmat4(glm::scale(glm::dmat4(_modelTransform.value()), glm::dvec3(data.modelTransform.scale))); glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() * modelTransform; glm::vec3 directionToSun = glm::normalize(_sunPos - data.modelTransform.translation); @@ -197,7 +203,6 @@ 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", 1.f); // @TODO remove this _geometry->setUniforms(*_programObject); diff --git a/modules/base/rendering/renderablemodel.h b/modules/base/rendering/renderablemodel.h index 1fc9ec5c51..57a7f600b8 100644 --- a/modules/base/rendering/renderablemodel.h +++ b/modules/base/rendering/renderablemodel.h @@ -28,9 +28,9 @@ #include #include +#include #include #include -#include #include @@ -69,11 +69,11 @@ private: properties::StringProperty _colorTexturePath; properties::BoolProperty _performShading; + properties::Mat3Property _modelTransform; std::unique_ptr _programObject; std::unique_ptr _texture; - glm::dmat3 _modelTransform; glm::dvec3 _sunPos; }; diff --git a/modules/base/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp index 8dafb0a336..82e5d24653 100644 --- a/modules/base/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -82,26 +82,26 @@ documentation::Documentation RenderablePlane::Documentation() { { SizeInfo.identifier, new DoubleVerifier, - SizeInfo.description, - Optional::No + Optional::No, + SizeInfo.description }, { BillboardInfo.identifier, new BoolVerifier, - BillboardInfo.description, - Optional::Yes + Optional::Yes, + BillboardInfo.description }, { BlendModeInfo.identifier, new StringInListVerifier({ "Normal", "Additive" }), + Optional::Yes, BlendModeInfo.description, // + " The default value is 'Normal'.", - Optional::Yes }, { TextureInfo.identifier, new StringVerifier, + Optional::No, TextureInfo.description, - Optional::No } } }; diff --git a/modules/base/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp index a226bd7bda..3276b08098 100644 --- a/modules/base/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -92,32 +92,32 @@ documentation::Documentation RenderableSphere::Documentation() { { SizeInfo.identifier, new DoubleVerifier, - SizeInfo.description, - Optional::No + Optional::No, + SizeInfo.description }, { SegmentsInfo.identifier, new IntVerifier, - SegmentsInfo.description, - Optional::No + Optional::No, + SegmentsInfo.description }, { TextureInfo.identifier, new StringVerifier, - TextureInfo.description, - Optional::No + Optional::No, + TextureInfo.description }, { OrientationInfo.identifier, new StringInListVerifier({ "Inside", "Outside", "Inside/Outside" }), - OrientationInfo.description, - Optional::Yes + Optional::Yes, + OrientationInfo.description }, { TransparencyInfo.identifier, new DoubleInRangeVerifier(0.0, 1.0), - TransparencyInfo.description, - Optional::Yes + Optional::Yes, + TransparencyInfo.description } } }; diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 898346c226..39b5d4ca5a 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -111,39 +111,39 @@ documentation::Documentation RenderableTrail::Documentation() { { KeyTranslation, new ReferencingVerifier("core_transform_translation"), + Optional::No, "This object is used to compute locations along the path. Any " - "Translation object can be used here.", - Optional::No + "Translation object can be used here." }, { LineColorInfo.identifier, new DoubleVector3Verifier, - LineColorInfo.description, - Optional::No + Optional::No, + LineColorInfo.description }, { EnableFadeInfo.identifier, new BoolVerifier, - EnableFadeInfo.description, - Optional::Yes + Optional::Yes, + EnableFadeInfo.description }, { FadeInfo.identifier, new DoubleVerifier, - FadeInfo.description, - Optional::Yes + Optional::Yes, + FadeInfo.description }, { LineWidthInfo.identifier, new DoubleVerifier, - LineWidthInfo.description, - Optional::Yes + Optional::Yes, + LineWidthInfo.description }, { PointSizeInfo.identifier, new DoubleVerifier, - PointSizeInfo.description, - Optional::Yes + Optional::Yes, + PointSizeInfo.description }, { RenderingModeInfo.identifier, @@ -151,8 +151,8 @@ documentation::Documentation RenderableTrail::Documentation() { // Taken from the RenderingModeConversion map above { "Lines", "Points", "Lines+Points", "Points+Lines" } ), - RenderingModeInfo.description, - Optional::Yes + Optional::Yes, + RenderingModeInfo.description } }, Exhaustive::No diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index d69d2adceb..6bb29dacf3 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -112,14 +112,14 @@ documentation::Documentation RenderableTrailOrbit::Documentation() { { PeriodInfo.identifier, new DoubleVerifier, - PeriodInfo.description, - Optional::No + Optional::No, + PeriodInfo.description }, { ResolutionInfo.identifier, new IntVerifier, - ResolutionInfo.description, - Optional::No + Optional::No, + ResolutionInfo.description } } }; diff --git a/modules/base/rendering/renderabletrailtrajectory.cpp b/modules/base/rendering/renderabletrailtrajectory.cpp index d44705a6f6..8129dc8dc9 100644 --- a/modules/base/rendering/renderabletrailtrajectory.cpp +++ b/modules/base/rendering/renderabletrailtrajectory.cpp @@ -97,32 +97,32 @@ documentation::Documentation RenderableTrailTrajectory::Documentation() { { StartTimeInfo.identifier, new StringAnnotationVerifier("A valid date in ISO 8601 format"), - StartTimeInfo.description, - Optional::No + Optional::No, + StartTimeInfo.description }, { EndTimeInfo.identifier, new StringAnnotationVerifier("A valid date in ISO 8601 format"), - EndTimeInfo.description, - Optional::No + Optional::No, + EndTimeInfo.description }, { SampleIntervalInfo.identifier, new DoubleVerifier, - SampleIntervalInfo.description, - Optional::No + Optional::No, + SampleIntervalInfo.description }, { TimeSubSampleInfo.identifier, new IntVerifier, - TimeSubSampleInfo.description, - Optional::Yes + Optional::Yes, + TimeSubSampleInfo.description }, { RenderFullPathInfo.identifier, new BoolVerifier, - RenderFullPathInfo.description, - Optional::Yes + Optional::Yes, + RenderFullPathInfo.description } } }; diff --git a/modules/base/rendering/screenspaceimage.cpp b/modules/base/rendering/screenspaceimage.cpp index 8f8932d681..735e53c171 100644 --- a/modules/base/rendering/screenspaceimage.cpp +++ b/modules/base/rendering/screenspaceimage.cpp @@ -61,15 +61,15 @@ documentation::Documentation ScreenSpaceImage::Documentation() { { KeyName, new StringVerifier, - "Specifies the GUI name of the ScreenspaceImage", - Optional::Yes + Optional::Yes, + "Specifies the GUI name of the ScreenspaceImage" }, { KeyTexturePath, new StringVerifier, + Optional::Yes, "Specifies the image that is shown on the screenspace-aligned plane. If " - "this value is set and the URL is not, the disk image is used.", - Optional::Yes + "this value is set and the URL is not, the disk image is used." } } }; diff --git a/modules/base/rotation/staticrotation.cpp b/modules/base/rotation/staticrotation.cpp index 8f88d81389..f728305935 100644 --- a/modules/base/rotation/staticrotation.cpp +++ b/modules/base/rotation/staticrotation.cpp @@ -47,7 +47,6 @@ documentation::Documentation StaticRotation::Documentation() { { "Type", new StringEqualVerifier("StaticRotation"), - "", Optional::No }, { @@ -56,9 +55,9 @@ documentation::Documentation StaticRotation::Documentation() { new DoubleVector3Verifier(), new DoubleMatrix3Verifier() ), + Optional::No, "Stores the static rotation as either a vector containing Euler angles " - "or by specifiying the 3x3 rotation matrix directly", - Optional::No + "or by specifiying the 3x3 rotation matrix directly" } }, Exhaustive::Yes diff --git a/modules/base/scale/staticscale.cpp b/modules/base/scale/staticscale.cpp index 69db7ea3f8..8a9f895856 100644 --- a/modules/base/scale/staticscale.cpp +++ b/modules/base/scale/staticscale.cpp @@ -47,8 +47,8 @@ documentation::Documentation StaticScale::Documentation() { { ScaleInfo.identifier, new DoubleVerifier, - ScaleInfo.description, - Optional::No + Optional::No, + ScaleInfo.description } } }; diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index da2bb50a24..3ef96cac5e 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -29,7 +29,6 @@ in vec3 vs_normalViewSpace; in vec4 vs_positionCameraSpace; in float vs_screenSpaceDepth; -uniform float fading; uniform bool performShading = true; uniform vec3 directionToSunViewSpace; uniform sampler2D texture1; @@ -69,7 +68,7 @@ Fragment getFragment() { frag.color.rgb = diffuseAlbedo; } - frag.color.a = fading; + frag.color.a = 1.0; frag.depth = vs_screenSpaceDepth; return frag; diff --git a/modules/base/translation/statictranslation.cpp b/modules/base/translation/statictranslation.cpp index 27b013fab0..a11cf42a05 100644 --- a/modules/base/translation/statictranslation.cpp +++ b/modules/base/translation/statictranslation.cpp @@ -47,14 +47,13 @@ documentation::Documentation StaticTranslation::Documentation() { { "Type", new StringEqualVerifier("StaticTranslation"), - "", Optional::No }, { PositionInfo.identifier, new DoubleVector3Verifier, - PositionInfo.description, - Optional::No + Optional::No, + PositionInfo.description } }, Exhaustive::Yes @@ -89,6 +88,4 @@ glm::dvec3 StaticTranslation::position() const { return _position; } -void StaticTranslation::update(const UpdateData&) {} - } // namespace openspace diff --git a/modules/base/translation/statictranslation.h b/modules/base/translation/statictranslation.h index fd92a76645..a7bd625054 100644 --- a/modules/base/translation/statictranslation.h +++ b/modules/base/translation/statictranslation.h @@ -38,7 +38,6 @@ public: StaticTranslation(); StaticTranslation(const ghoul::Dictionary& dictionary); virtual glm::dvec3 position() const; - virtual void update(const UpdateData& data) override; static documentation::Documentation Documentation(); diff --git a/modules/debugging/rendering/renderabledebugplane.cpp b/modules/debugging/rendering/renderabledebugplane.cpp index 3442f909d7..12cb8745e9 100644 --- a/modules/debugging/rendering/renderabledebugplane.cpp +++ b/modules/debugging/rendering/renderabledebugplane.cpp @@ -89,28 +89,28 @@ documentation::Documentation RenderableDebugPlane::Documentation() { { TextureInfo.identifier, new IntVerifier, - TextureInfo.description, - Optional::Yes + Optional::Yes, + TextureInfo.description }, { BillboardInfo.identifier, new BoolVerifier, - BillboardInfo.description, - Optional::Yes + Optional::Yes, + BillboardInfo.description }, { SizeInfo.identifier, new DoubleVerifier, - SizeInfo.description, - Optional::Yes + Optional::Yes, + SizeInfo.description }, { OriginInfo.identifier, new StringInListVerifier( { "LowerLeft", "LowerRight", "UpperLeft", "UpperRight", "Center" } ), - OriginInfo.description, - Optional::Yes + Optional::Yes, + OriginInfo.description } }, Exhaustive::Yes diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index 01045b9611..632c03fcb7 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -199,8 +199,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) // Init layer manager ghoul::Dictionary layersDictionary; if (!dictionary.getValue(keyLayers, layersDictionary)) { - throw ghoul::RuntimeError( - std::string(keyLayers) + " must be specified specified!"); + throw ghoul::RuntimeError(std::string(keyLayers) + " must be specified"); } _layerManager = std::make_shared(layersDictionary); diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index 3de805b347..7ced53033f 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -145,16 +145,19 @@ documentation::Documentation KameleonDocumentationTask::documentation() { { "Type", new StringEqualVerifier("KameleonDocumentationTask"), + Optional::No, "The type of this task" }, { KeyInput, new StringAnnotationVerifier("A file path to a cdf file"), + Optional::No, "The cdf file to extract data from" }, { KeyOutput, new StringAnnotationVerifier("A valid filepath"), + Optional::No, "The html file to write documentation to" } } diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp index 536301af87..75309f32cf 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp @@ -79,16 +79,19 @@ documentation::Documentation KameleonMetadataToJsonTask::documentation() { { "Type", new StringEqualVerifier("KameleonMetadataToJsonTask"), + Optional::No, "The type of this task" }, { KeyInput, new StringAnnotationVerifier("A file path to a cdf file"), + Optional::No, "The cdf file to extract data from" }, { KeyOutput, new StringAnnotationVerifier("A valid filepath"), + Optional::No, "The json file to export data into" } } diff --git a/modules/newhorizons/rendering/renderablecrawlingline.cpp b/modules/newhorizons/rendering/renderablecrawlingline.cpp index a4516d0e1c..7857f2715c 100644 --- a/modules/newhorizons/rendering/renderablecrawlingline.cpp +++ b/modules/newhorizons/rendering/renderablecrawlingline.cpp @@ -61,22 +61,22 @@ documentation::Documentation RenderableCrawlingLine::Documentation() { { KeySource, new StringVerifier, + Optional::No, "Denotes the SPICE name of the source of the renderable crawling line, " - "for example, the space craft", - Optional::No + "for example, the space craft" }, { KeyTarget, new StringVerifier, - "Denotes the SPICE name of the target of the crawling line", - Optional::Yes + Optional::Yes, + "Denotes the SPICE name of the target of the crawling line" }, { KeyInstrument, new StringVerifier, + Optional::No, "Denotes the SPICE name of the instrument that is used to render the " - "crawling line", - Optional::No + "crawling line" }, { KeyColor, @@ -85,22 +85,22 @@ documentation::Documentation RenderableCrawlingLine::Documentation() { { KeyColorStart, new DoubleVector4Verifier, + Optional::No, "The color at the start of the line", - Optional::No }, { KeyColorEnd, new DoubleVector4Verifier, - "The color at the end of the line", - Optional::No + Optional::No, + "The color at the end of the line" } }, Exhaustive::Yes }), + Optional::No, "Specifies the colors that are used for the crawling line. One value " "determines the starting color of the line, the second value is the " - "color at the end of the line.", - Optional::No + "color at the end of the line." } } }; diff --git a/modules/newhorizons/rendering/renderablefov.cpp b/modules/newhorizons/rendering/renderablefov.cpp index e830715a20..6c02e1736c 100644 --- a/modules/newhorizons/rendering/renderablefov.cpp +++ b/modules/newhorizons/rendering/renderablefov.cpp @@ -143,16 +143,16 @@ documentation::Documentation RenderableFov::Documentation() { { KeyBody, new StringVerifier, + Optional::No, "The SPICE name of the source body for which the field of view should be " - "rendered.", - Optional::No + "rendered." }, { KeyFrame, new StringVerifier, + Optional::No, "The SPICE name of the source body's frame in which the field of view " - "should be rendered.", - Optional::No + "should be rendered." }, { KeyInstrument, @@ -160,8 +160,8 @@ documentation::Documentation RenderableFov::Documentation() { { KeyInstrumentName, new StringVerifier, - "The SPICE name of the instrument that is rendered", - Optional::No + Optional::No, + "The SPICE name of the instrument that is rendered" }, { KeyInstrumentAberration, @@ -173,45 +173,46 @@ documentation::Documentation RenderableFov::Documentation() { "XLT", "XLT+S", "XCN", "XCN+S" }), + Optional::Yes, "The aberration correction that is used for this field of view. " - "The default is 'NONE'.", - Optional::Yes + "The default is 'NONE'." } }), + Optional::No, "A table describing the instrument whose field of view should be " - "rendered.", - Optional::No + "rendered." }, { KeyPotentialTargets, new StringListVerifier, + Optional::No, "A list of potential targets (specified as SPICE names) that the field " - "of view should be tested against.", - Optional::No + "of view should be tested against." }, { KeyFrameConversions, new TableVerifier({ { DocumentationEntry::Wildcard, - new StringVerifier + new StringVerifier, + Optional::No } }), + Optional::Yes, "A list of frame conversions that should be registered with the " - "SpiceManager.", - Optional::Yes + "SpiceManager." }, { LineWidthInfo.identifier, new DoubleVerifier, - LineWidthInfo.description, - Optional::Yes + Optional::Yes, + LineWidthInfo.description }, { StandoffDistanceInfo.identifier, new DoubleVerifier, - StandoffDistanceInfo.description, - Optional::Yes + Optional::Yes, + StandoffDistanceInfo.description } } }; diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 6b023ada05..6b58159866 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -82,41 +82,41 @@ documentation::Documentation RenderableModelProjection::Documentation() { { "Type", new StringEqualVerifier("RenderableModelProjection"), - "", - Optional::No + Optional::No, + "" }, { keyGeometry, new ReferencingVerifier("base_geometry_model"), - "The geometry that is used for rendering this model.", - Optional::No + Optional::No, + "The geometry that is used for rendering this model." }, { keyProjection, new ReferencingVerifier("newhorizons_projectioncomponent"), - "Contains information about projecting onto this planet.", - Optional::No + Optional::No, + "Contains information about projecting onto this planet." }, { keyTextureColor, // @TODO Change to ColorTextureInfo.identifier new StringVerifier, - ColorTextureInfo.description, - Optional::No + Optional::No, + ColorTextureInfo.description }, { PerformShadingInfo.identifier, new BoolVerifier, - PerformShadingInfo.description, - Optional::Yes + Optional::Yes, + PerformShadingInfo.description }, { keyBoundingSphereRadius, new DoubleVerifier, + Optional::Yes, "The radius of the bounding sphere of this object. This has to be a " "radius that is larger than anything that is rendered by it. It has to " "be at least as big as the convex hull of the object. The default value " - "is 10e9 meters.", - Optional::Yes + "is 10e9 meters." } } }; @@ -125,7 +125,6 @@ documentation::Documentation RenderableModelProjection::Documentation() { RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary) : Renderable(dictionary) , _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) @@ -171,7 +170,6 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di } Renderable::addProperty(_performShading); - Renderable::addProperty(_rotation); } RenderableModelProjection::~RenderableModelProjection() { @@ -376,30 +374,11 @@ void RenderableModelProjection::attitudeParameters(double time) { return; } - _transform = glm::mat4(1); - glm::mat4 rotPropX = glm::rotate( - _transform, - glm::radians(static_cast(_rotation.value().x)), - glm::vec3(1, 0, 0) - ); - glm::mat4 rotPropY = glm::rotate( - _transform, - glm::radians(static_cast(_rotation.value().y)), - glm::vec3(0, 1, 0) - ); - glm::mat4 rotPropZ = glm::rotate( - _transform, - glm::radians(static_cast(_rotation.value().z)), - glm::vec3(0, 0, 1) - ); - for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { _transform[i][j] = static_cast(_stateMatrix[i][j]); } } - _transform = _transform * rotPropX * rotPropY * rotPropZ; - glm::dvec3 boresight; try { SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId()); @@ -409,13 +388,14 @@ void RenderableModelProjection::attitudeParameters(double time) { } double lightTime; - glm::dvec3 p = - SpiceManager::ref().targetPosition( - _projectionComponent.projectorId(), - _projectionComponent.projecteeId(), - _destination, - _projectionComponent.aberration(), - time, lightTime); + glm::dvec3 p = SpiceManager::ref().targetPosition( + _projectionComponent.projectorId(), + _projectionComponent.projecteeId(), + _destination, + _projectionComponent.aberration(), + time, lightTime + ); + psc position = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z); position[3] += 4; @@ -434,8 +414,6 @@ void RenderableModelProjection::attitudeParameters(double time) { ); } - - void RenderableModelProjection::project() { for (auto img : _imageTimes) { attitudeParameters(img.timeRange.start); diff --git a/modules/newhorizons/rendering/renderablemodelprojection.h b/modules/newhorizons/rendering/renderablemodelprojection.h index 1b0cc9b22d..42cd0a9fc4 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.h +++ b/modules/newhorizons/rendering/renderablemodelprojection.h @@ -78,8 +78,6 @@ private: properties::StringProperty _colorTexturePath; - properties::Vec3Property _rotation; - std::unique_ptr _programObject; std::unique_ptr _fboProgramObject; std::unique_ptr _depthFboProgramObject; diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index 62450baa15..357f6887fe 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -104,45 +104,45 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { { "Type", new StringEqualVerifier("RenderablePlanetProjection"), - "", - Optional::No + Optional::No, + "" }, { keyGeometry, new ReferencingVerifier("space_geometry_planet"), + Optional::No, "The geometry that is used for rendering this planet.", - Optional::No }, { keyProjection, new ReferencingVerifier("newhorizons_projectioncomponent"), + Optional::No, "Contains information about projecting onto this planet.", - Optional::No }, { keyMeridianShift, new BoolVerifier, + Optional::Yes, "Determines whether the meridian of the planet should be shifted by 180 " - "degrees. The default value is 'false'", - Optional::Yes + "degrees. The default value is 'false'" }, { keyColorTexture, // @TODO This should be ColorTextureInfo.identifier new StringVerifier, - ColorTextureInfo.description, - Optional::No + Optional::No, + ColorTextureInfo.description }, { keyHeightTexture, // @TODO This should be HeightTextureInfo.identifier new StringVerifier, - HeightTextureInfo.description, - Optional::Yes + Optional::Yes, + HeightTextureInfo.description }, { HeightExaggerationInfo.identifier, new DoubleVerifier, - HeightExaggerationInfo.description, - Optional::Yes + Optional::Yes, + HeightExaggerationInfo.description } } }; diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index 60fa854b48..465c84db02 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -112,26 +112,26 @@ documentation::Documentation RenderableShadowCylinder::Documentation() { { "Type", new StringEqualVerifier("RenderableShadowCylinder"), - "", - Optional::No + Optional::No, + "" }, { NumberPointsInfo.identifier, new IntVerifier, - NumberPointsInfo.description, - Optional::Yes + Optional::Yes, + NumberPointsInfo.description }, { ShadowLengthInfo.identifier, new DoubleVerifier, - ShadowLengthInfo.description, - Optional::Yes + Optional::Yes, + ShadowLengthInfo.description }, { ShadowColorInfo.identifier, new DoubleVector4Verifier, - ShadowColorInfo.description, - Optional::Yes + Optional::Yes, + ShadowColorInfo.description }, { TerminatorTypeInfo.identifier, @@ -139,32 +139,32 @@ documentation::Documentation RenderableShadowCylinder::Documentation() { // Synchronized with SpiceManager::terminatorTypeFromString "UMBRAL", "PENUMBRAL" }), - TerminatorTypeInfo.description, - Optional::No + Optional::No, + TerminatorTypeInfo.description }, { LightSourceInfo.identifier, new StringVerifier, - LightSourceInfo.description, - Optional::No + Optional::No, + LightSourceInfo.description }, { ObserverInfo.identifier, new StringVerifier, - ObserverInfo.description, - Optional::No + Optional::No, + ObserverInfo.description }, { BodyInfo.identifier, new StringVerifier, - BodyInfo.description, - Optional::No + Optional::No, + BodyInfo.description }, { BodyFrameInfo.identifier, new StringVerifier, - BodyFrameInfo.description, - Optional::No + Optional::No, + BodyFrameInfo.description }, { AberrationInfo.identifier, @@ -172,8 +172,8 @@ documentation::Documentation RenderableShadowCylinder::Documentation() { // SpiceManager::AberrationCorrection::AberrationCorrection "NONE", "LT", "LT+S", "CN", "CN+S" }), - AberrationInfo.description, - Optional::No + Optional::No, + AberrationInfo.description }, }, Exhaustive::Yes diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index 06b19c6141..fcf5578e63 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -125,34 +125,34 @@ documentation::Documentation ProjectionComponent::Documentation() { { keyInstrument, new StringAnnotationVerifier("A SPICE name of an instrument"), - "The instrument that is used to perform the projections", - Optional::No + Optional::No, + "The instrument that is used to perform the projections" }, { keyInstrumentFovy, new DoubleVerifier, - "The field of view in degrees along the y axis", - Optional::No + Optional::No, + "The field of view in degrees along the y axis" }, { keyInstrumentAspect, new DoubleVerifier, - "The aspect ratio of the instrument in relation between x and y axis", - Optional::No + Optional::No, + "The aspect ratio of the instrument in relation between x and y axis" }, { keyProjObserver, new StringAnnotationVerifier("A SPICE name of the observing object"), + Optional::No, "The observer that is doing the projection. This has to be a valid SPICE " - "name or SPICE integer.", - Optional::No + "name or SPICE integer." }, { keyProjTarget, new StringAnnotationVerifier("A SPICE name of the observed object"), + Optional::No, "The observed object that is projected on. This has to be a valid SPICE " - "name or SPICE integer.", - Optional::No + "name or SPICE integer." }, { keyProjAberration, @@ -160,46 +160,45 @@ documentation::Documentation ProjectionComponent::Documentation() { // from SpiceManager::AberrationCorrection::AberrationCorrection "NONE", "LT", "LT+S", "CN", "CN+S", "XLT", "XLT+S", "XCN", "XCN+S" }), + Optional::No, "The aberration correction that is supposed to be used for the " "projection. The values for the correction correspond to the SPICE " "definition as described in " - "ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/IDL/cspice/spkezr_c.html", - Optional::No + "ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/IDL/cspice/spkezr_c.html" }, { keyPotentialTargets, new StringListVerifier, + Optional::Yes, "The list of potential targets that are involved with the image " - "projection", - Optional::Yes + "projection" }, { keyNeedsTextureMapDilation, new BoolVerifier, + Optional::Yes, "Determines whether a dilation step of the texture map has to be " "performed after each projection. This is necessary if the texture of " "the projected object is a texture map where the borders are not " - "touching. The default value is 'false'.", - Optional::Yes + "touching. The default value is 'false'." }, { keyNeedsShadowing, new BoolVerifier, + Optional::Yes, "Determines whether the object requires a self-shadowing algorithm. This " "is necessary if the object is concave and might cast a shadow on itself " - "during presentation. The default value is 'false'.", - Optional::Yes + "during presentation. The default value is 'false'." }, { keyTextureMapAspectRatio, new DoubleVerifier, + Optional::Yes, "Sets the desired aspect ratio of the projected texture. This might be " "necessary as planets usually have 2x1 aspect ratios, whereas this does " "not hold for non-planet objects (comets, asteroids, etc). The default " - "value is '1.0'.", - Optional::Yes + "value is '1.0'." } - } }; } diff --git a/modules/onscreengui/src/guiorigincomponent.cpp b/modules/onscreengui/src/guiorigincomponent.cpp index 3505f904cd..0e093f7eaf 100644 --- a/modules/onscreengui/src/guiorigincomponent.cpp +++ b/modules/onscreengui/src/guiorigincomponent.cpp @@ -69,7 +69,7 @@ void GuiOriginComponent::render() { bool hasChanged = ImGui::Combo("Origin", ¤tPosition, nodeNames.c_str()); if (hasChanged) { OsEng.scriptEngine().queueScript( - "openspace.setPropertyValue('NavigationHandler.origin', '" + + "openspace.setPropertyValue('NavigationHandler.Origin', '" + nodes[currentPosition]->name() + "');", scripting::ScriptEngine::RemoteScripting::Yes ); diff --git a/modules/space/rendering/planetgeometry.cpp b/modules/space/rendering/planetgeometry.cpp index ad66dfc7bf..42c18f9e96 100644 --- a/modules/space/rendering/planetgeometry.cpp +++ b/modules/space/rendering/planetgeometry.cpp @@ -45,8 +45,8 @@ documentation::Documentation PlanetGeometry::Documentation() { { KeyType, new StringVerifier, - "The type of the PlanetGeometry that will can be constructed.", - Optional::No + Optional::No, + "The type of the PlanetGeometry that will can be constructed." } } }; diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 0e8d96366a..dc2f316475 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -94,28 +94,28 @@ documentation::Documentation RenderableConstellationBounds::Documentation() { { VertexInfo.identifier, new StringVerifier, - VertexInfo.description, - Optional::No + Optional::No, + VertexInfo.description }, { ConstellationInfo.identifier, new StringVerifier, + Optional::Yes, "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 + "omitted, the abbreviations are used as the full names." }, { DistanceInfo.identifier, new DoubleVerifier, - DistanceInfo.description, - Optional::Yes + Optional::Yes, + DistanceInfo.description }, { SelectionInfo.identifier, new StringListVerifier, - SelectionInfo.description, - Optional::Yes + Optional::Yes, + SelectionInfo.description } } }; diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 28c70d9264..86ea1410ee 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -116,54 +116,54 @@ documentation::Documentation RenderablePlanet::Documentation() { { KeyGeometry, new ReferencingVerifier("space_geometry_planet"), - "Specifies the planet geometry that is used for this RenderablePlanet.", - Optional::No + Optional::No, + "Specifies the planet geometry that is used for this RenderablePlanet." }, { KeyRadius, new DoubleVerifier, + Optional::Yes, "Specifies the radius of the planet. If this value is not specified, it " - "will try to query the SPICE library for radius values.", - Optional::Yes + "will try to query the SPICE library for radius values." }, { KeyColorTexture, // @TODO Use ColorTextureInfo.identifier instead new StringVerifier, - "Specifies the color texture that is used for this RenderablePlanet.", - Optional::Yes + Optional::Yes, + "Specifies the color texture that is used for this RenderablePlanet." }, { KeyHeightTexture, // @TODO Use HeightTextureInfo.identifier instead new StringVerifier, - "Specifies the height texture that is used for this RenderablePlanet.", - Optional::Yes + Optional::Yes, + "Specifies the height texture that is used for this RenderablePlanet." }, { KeyNightTexture, // @TODO Use NightTextureInfo.identifier instead new StringVerifier, + Optional::Yes, "Specifies the texture that is used for the night side of this " - "RenderablePlanet.", - Optional::Yes + "RenderablePlanet." }, { KeyShading, new BoolVerifier, + Optional::Yes, "Specifies whether the planet should be rendered shaded by the Sun. If " "this value is 'false', any existing night texture will not be used. " - "This value defaults to 'true'.", - Optional::Yes + "This value defaults to 'true'." }, { HeightExaggerationInfo.identifier, new DoubleVerifier, - HeightExaggerationInfo.description, - Optional::Yes + Optional::Yes, + HeightExaggerationInfo.description }, { PerformShadingInfo.identifier, new BoolVerifier, - PerformShadingInfo.description, - Optional::Yes + Optional::Yes, + PerformShadingInfo.description } } }; diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 646716317c..9ba7e61b87 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -87,38 +87,37 @@ documentation::Documentation RenderableRings::Documentation() { { "Type", new StringEqualVerifier("RenderableRings"), - "", Optional::No }, { TextureInfo.identifier, new StringVerifier, - TextureInfo.description, - Optional::No + Optional::No, + TextureInfo.description }, { SizeInfo.identifier, new DoubleVerifier, - SizeInfo.description, - Optional::No + Optional::No, + SizeInfo.description }, { OffsetInfo.identifier, new DoubleVector2Verifier, - OffsetInfo.description, - Optional::Yes + Optional::Yes, + OffsetInfo.description }, { NightFactorInfo.identifier, new DoubleVerifier, - NightFactorInfo.description, - Optional::Yes + Optional::Yes, + NightFactorInfo.description }, { TransparencyInfo.identifier, new DoubleVerifier, - TransparencyInfo.description, - Optional::Yes + Optional::Yes, + TransparencyInfo.description } } }; diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index ccdd5f5143..c5972a83cf 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -132,53 +132,52 @@ documentation::Documentation RenderableStars::Documentation() { { "Type", new StringEqualVerifier("RenderableStars"), - "", Optional::No }, { KeyFile, new StringVerifier, + Optional::No, "The path to the SPECK file that contains information about the stars " - "being rendered.", - Optional::No + "being rendered." }, { PsfTextureInfo.identifier, new StringVerifier, - PsfTextureInfo.description, - Optional::No + Optional::No, + PsfTextureInfo.description }, { ColorTextureInfo.identifier, new StringVerifier, - ColorTextureInfo.description, - Optional::No + Optional::No, + ColorTextureInfo.description }, { ColorOptionInfo.identifier, new StringInListVerifier({ "Color", "Velocity", "Speed" }), - ColorOptionInfo.description, - Optional::Yes + Optional::Yes, + ColorOptionInfo.description }, { TransparencyInfo.identifier, new DoubleVerifier, - TransparencyInfo.description, - Optional::Yes + Optional::Yes, + TransparencyInfo.description }, { ScaleFactorInfo.identifier, new DoubleVerifier, - ScaleFactorInfo.description, - Optional::Yes + Optional::Yes, + ScaleFactorInfo.description }, { MinBillboardSizeInfo.identifier, new DoubleVerifier, - MinBillboardSizeInfo.description, - Optional::Yes + Optional::Yes, + MinBillboardSizeInfo.description } } }; diff --git a/modules/space/rendering/simplespheregeometry.cpp b/modules/space/rendering/simplespheregeometry.cpp index 88dff332cf..3e583b08f6 100644 --- a/modules/space/rendering/simplespheregeometry.cpp +++ b/modules/space/rendering/simplespheregeometry.cpp @@ -59,14 +59,14 @@ documentation::Documentation SimpleSphereGeometry::Documentation() { new DoubleVerifier, new DoubleVector3Verifier ), - RadiusInfo.description, - Optional::No + Optional::No, + RadiusInfo.description }, { SegmentsInfo.identifier, new IntVerifier, - SegmentsInfo.description, - Optional::No + Optional::No, + SegmentsInfo.description } } }; diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index d1117f2df0..16886e3544 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -60,20 +60,19 @@ documentation::Documentation SpiceRotation::Documentation() { { "Type", new StringEqualVerifier("SpiceRotation"), - "", Optional::No }, { SourceInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or integer"), - SourceInfo.description, - Optional::No + Optional::No, + SourceInfo.description }, { DestinationInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or integer"), - DestinationInfo.description, - Optional::No + Optional::No, + DestinationInfo.description }, { KeyKernels, @@ -81,10 +80,10 @@ documentation::Documentation SpiceRotation::Documentation() { new StringListVerifier, new StringVerifier ), + Optional::Yes, "A single kernel or list of kernels that this SpiceTranslation depends " "on. All provided kernels will be loaded before any other operation is " - "performed.", - Optional::Yes + "performed." } } }; diff --git a/modules/space/translation/keplertranslation.cpp b/modules/space/translation/keplertranslation.cpp index 765c2e86f7..cf7557f003 100644 --- a/modules/space/translation/keplertranslation.cpp +++ b/modules/space/translation/keplertranslation.cpp @@ -129,56 +129,55 @@ documentation::Documentation KeplerTranslation::Documentation() { { "Type", new StringEqualVerifier("KeplerTranslation"), - "", Optional::No }, { EccentricityInfo.identifier, new DoubleInRangeVerifier(0.0, 1.0), - EccentricityInfo.description, - Optional::No + Optional::No, + EccentricityInfo.description }, { SemiMajorAxisInfo.identifier, new DoubleVerifier, - SemiMajorAxisInfo.description, - Optional::No + Optional::No, + SemiMajorAxisInfo.description }, { InclinationInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - InclinationInfo.description, - Optional::No + Optional::No, + InclinationInfo.description }, { AscendingNodeInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - AscendingNodeInfo.description, - Optional::No + Optional::No, + AscendingNodeInfo.description }, { ArgumentOfPeriapsisInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - ArgumentOfPeriapsisInfo.description, - Optional::No + Optional::No, + ArgumentOfPeriapsisInfo.description }, { MeanAnomalyAtEpochInfo.identifier, new DoubleInRangeVerifier(0.0, 360.0), - MeanAnomalyAtEpochInfo.description, - Optional::No + Optional::No, + MeanAnomalyAtEpochInfo.description }, { EpochInfo.identifier, new StringVerifier, - EpochInfo.description, - Optional::No + Optional::No, + EpochInfo.description }, { PeriodInfo.identifier, new DoubleGreaterVerifier(0.0), - PeriodInfo.description, - Optional::No + Optional::No, + PeriodInfo.description }, }, Exhaustive::Yes diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 01fbadfc18..19c3505201 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -74,30 +74,29 @@ documentation::Documentation SpiceTranslation::Documentation() { { "Type", new StringEqualVerifier("SpiceTranslation"), - "", Optional::No }, { KeyBody, // @TODO Rename to TargetInfo.identifier new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"), + Optional::No, "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').", - Optional::No + "name (such as 'EARTH') or a NAIF integer id code (such as '399')." }, { ObserverInfo.identifier, new StringAnnotationVerifier("A valid SPICE NAIF name or identifier"), - ObserverInfo.description, - Optional::No + Optional::No, + ObserverInfo.description }, { FrameInfo.identifier, new StringAnnotationVerifier( "A valid SPICE NAIF name for a reference frame" ), - FrameInfo.description, - Optional::Yes + Optional::Yes, + FrameInfo.description }, { KeyKernels, @@ -105,10 +104,10 @@ documentation::Documentation SpiceTranslation::Documentation() { new StringListVerifier, new StringVerifier ), + Optional::Yes, "A single kernel or list of kernels that this SpiceTranslation depends " "on. All provided kernels will be loaded before any other operation is " - "performed.", - Optional::Yes + "performed." } }, Exhaustive::Yes diff --git a/modules/space/translation/tletranslation.cpp b/modules/space/translation/tletranslation.cpp index ebc7897b51..3cef279b20 100644 --- a/modules/space/translation/tletranslation.cpp +++ b/modules/space/translation/tletranslation.cpp @@ -239,20 +239,20 @@ documentation::Documentation TLETranslation::Documentation() { { "Type", new StringEqualVerifier("TLETranslation"), - "", Optional::No }, { KeyFile, new StringVerifier, - "Specifies the filename of the Two-Line-Element file", - Optional::No + Optional::No, + "Specifies the filename of the Two-Line-Element file" }, { KeyLineNum, new DoubleGreaterVerifier(0), - "Specifies the line number within the file where the group of 3 TLE lines begins (1-based)", - Optional::No + Optional::No, + "Specifies the line number within the file where the group of 3 TLE " + "lines begins (1-based)." } }, Exhaustive::No diff --git a/src/documentation/documentation.cpp b/src/documentation/documentation.cpp index 9bd66deaf5..b43d47aa3f 100644 --- a/src/documentation/documentation.cpp +++ b/src/documentation/documentation.cpp @@ -115,7 +115,7 @@ SpecificationError::SpecificationError(TestResult res, std::string component) } DocumentationEntry::DocumentationEntry(std::string k, std::shared_ptr v, - std::string doc, Optional opt) + Optional opt, std::string doc) : key(std::move(k)) , verifier(std::move(v)) , optional(opt) @@ -125,10 +125,10 @@ DocumentationEntry::DocumentationEntry(std::string k, std::shared_ptr ghoul_assert(verifier, "Verifier must not be nullptr"); } -DocumentationEntry::DocumentationEntry(std::string key, Verifier* v, std::string doc, - Optional optional) - : DocumentationEntry(std::move(key), std::shared_ptr(v), std::move(doc), - optional) +DocumentationEntry::DocumentationEntry(std::string key, Verifier* v, Optional optional, + std::string doc) + : DocumentationEntry(std::move(key), std::shared_ptr(v), optional, + std::move(doc)) {} Documentation::Documentation(std::string n, std::string id, DocumentationEntries entries, diff --git a/src/documentation/verifier.cpp b/src/documentation/verifier.cpp index 73c116c1a7..6662caaa77 100644 --- a/src/documentation/verifier.cpp +++ b/src/documentation/verifier.cpp @@ -204,7 +204,9 @@ std::string TableVerifier::type() const { } StringListVerifier::StringListVerifier(std::string elementDocumentation) - : TableVerifier({{ "*", new StringVerifier, std::move(elementDocumentation) }}) + : TableVerifier({ + { "*", new StringVerifier, Optional::No, std::move(elementDocumentation) } + }) {} std::string StringListVerifier::type() const { @@ -212,7 +214,9 @@ std::string StringListVerifier::type() const { } IntListVerifier::IntListVerifier(std::string elementDocumentation) - : TableVerifier({ { "*", new IntVerifier, std::move(elementDocumentation) } }) + : TableVerifier({ + { "*", new IntVerifier, Optional::No, std::move(elementDocumentation) } + }) {} std::string IntListVerifier::type() const { diff --git a/src/engine/configurationmanager_doc.inl b/src/engine/configurationmanager_doc.inl index 982bc65607..d0c9740275 100644 --- a/src/engine/configurationmanager_doc.inl +++ b/src/engine/configurationmanager_doc.inl @@ -37,51 +37,51 @@ documentation::Documentation ConfigurationManager::Documentation() { { ConfigurationManager::KeyConfigSgct, new StringAnnotationVerifier("A valid SGCT configuration file"), + Optional::No, "The SGCT configuration file that determines the window and view frustum " - "settings that are being used when OpenSpace is started.", - Optional::No + "settings that are being used when OpenSpace is started." }, { ConfigurationManager::KeyConfigScene, new StringAnnotationVerifier( "A valid scene file as described in the Scene documentation" ), + Optional::No, "The scene description that is used to populate the application after " "startup. The scene determines which objects are loaded, the startup " "time and other scene-specific settings. More information is provided in " - "the Scene documentation.", - Optional::No + "the Scene documentation." }, { ConfigurationManager::KeyConfigTask, new StringAnnotationVerifier( - "A valid task file as described in the Task documentation"), - "The root task to be performed when launching the task runner " - "applicaition.", - Optional::Yes + "A valid task file as described in the Task documentation" + ), + Optional::Yes, + "The root task to be performed when launching the task runner application." }, { ConfigurationManager::KeyPaths, new StringListVerifier, + Optional::No, "A list of paths that are automatically registered with the file system. " "If a key X is used in the table, it is then useable by referencing ${X} " - "in all other configuration files or scripts.", - Optional::No + "in all other configuration files or scripts." }, { ConfigurationManager::KeyPaths + '.' + ConfigurationManager::KeyCache, new StringVerifier, + Optional::No, "The path to be used as a cache folder. If per scene caching is enabled, the " - "name of the scene will be appended to this folder", - Optional::No + "name of the scene will be appended to this folder" }, { ConfigurationManager::KeyFonts, new StringListVerifier("Font paths loadable by FreeType"), + Optional::Yes, "A list of all fonts that will automatically be loaded on startup. Each " "key-value pair contained in the table will become the name and the file " - "for a font.", - Optional::Yes + "for a font." }, { ConfigurationManager::KeyLogging, @@ -89,15 +89,15 @@ documentation::Documentation ConfigurationManager::Documentation() { { ConfigurationManager::PartLogDir, new StringVerifier, - "The directory for logs. Default value is \"${BASE_PATH}\"", - Optional::Yes + Optional::Yes, + "The directory for logs. Default value is \"${BASE_PATH}\"" }, { ConfigurationManager::PartLogPerformancePrefix, new StringVerifier, + Optional::Yes, "A string to prefix PerformanceMeasurement logfiles." - "Default value is \"PM-\"", - Optional::Yes + "Default value is \"PM-\"" }, { ConfigurationManager::PartLogLevel, @@ -105,21 +105,21 @@ documentation::Documentation ConfigurationManager::Documentation() { // List from logmanager.cpp::levelFromString { "Trace", "Debug", "Info", "Warning", "Error", "Fatal", "None" } ), + Optional::Yes, "The severity of log messages that will be displayed. Only " "messages of the selected level or higher will be displayed. All " "levels below will be silently discarded. The order of " - "severities is: Debug < Info < Warning < Error < Fatal < None.", - Optional::Yes + "severities is: Debug < Info < Warning < Error < Fatal < None." }, { ConfigurationManager::PartImmediateFlush, new BoolVerifier, + Optional::Yes, "Determines whether error messages will be displayed immediately " "or if it is acceptable to have a short delay, but being more " "performant. If the delay is allowed ('true'), messages might " "get lost if the application crashes shortly after a message was " - "logged.", - Optional::Yes + "logged." }, { ConfigurationManager::PartLogs, @@ -127,14 +127,15 @@ documentation::Documentation ConfigurationManager::Documentation() { { "*", new ReferencingVerifier("core_logfactory"), + Optional::No, "Additional log files" } }), + Optional::Yes, "Per default, log messages are written to the console, the " "onscreen text, and (if available) the Visual Studio output " "window. This table can define other logging methods that will " - "be used additionally.", - Optional::Yes + "be used additionally." }, { ConfigurationManager::PartCapabilitiesVerbosity, @@ -142,62 +143,62 @@ documentation::Documentation ConfigurationManager::Documentation() { // List from OpenspaceEngine::initialize { "None", "Minimal", "Default", "Full" } ), + Optional::Yes, "At startup, a list of system capabilities is created and logged." - "This value determines how verbose this listing should be.", - Optional::Yes + "This value determines how verbose this listing should be." } }), + Optional::Yes, "Configurations for the logging of messages that are generated " "throughout the code and are useful for debugging potential errors or " - "other information.", - Optional::Yes + "other information." }, { ConfigurationManager::KeyLuaDocumentation, new StringVerifier, + Optional::Yes, "The filename that will be created on startup containing the documentation " "of available Lua functions that can be executed in scene files or per " - "console. Any existing file will be silently overwritten.", - Optional::Yes + "console. Any existing file will be silently overwritten." }, { ConfigurationManager::KeyPropertyDocumentation, new StringVerifier, + Optional::Yes, "The file that will be created on startup containing a list of all " - "properties in the scene. Any existing file will be silently overwritten.", - Optional::Yes + "properties in the scene. Any existing file will be silently overwritten." }, { ConfigurationManager::KeyScriptLog, new StringVerifier, + Optional::Yes, "The file that will be created on startup containing the log of all Lua " "scripts that are executed in the last session. Any existing file (including " - "the results from previous runs) will be silently overwritten.", - Optional::Yes + "the results from previous runs) will be silently overwritten." }, { ConfigurationManager::KeyKeyboardShortcuts, new StringVerifier, + Optional::Yes, "The file that will be created on startup containing the list of all " "keyboard bindings with their respective Lua scripts. For each key, it " - "mentions which scripts will be executed in the current session.", - Optional::Yes + "mentions which scripts will be executed in the current session." }, { ConfigurationManager::KeyDocumentation, new StringVerifier, + Optional::Yes, "The file that will be created on startup containing this documentation. Any " - "previous file in this location will be silently overwritten.", - Optional::Yes + "previous file in this location will be silently overwritten." }, { ConfigurationManager::KeyFactoryDocumentation, new StringVerifier, + Optional::Yes, "The file that will be created on startup containing the factory " "documentation which shows the different types of objects that can be " "created in the current application configuration. Any previous file in this " - "location will be silently overritten.", - Optional::Yes + "location will be silently overritten." }, { ConfigurationManager::KeyLauncher, @@ -208,32 +209,32 @@ documentation::Documentation ConfigurationManager::Documentation() { // List from logmanager.cpp::levelFromString { "Trace", "Debug", "Info", "Warning", "Error", "Fatal", "None" } ), + Optional::Yes, "The severity of log messages that will be displayed. Only " "messages of the selected level or higher will be displayed. All " "levels below will be silently discarded. The order of " - "severities is: Debug < Info < Warning < Error < Fatal < None.", - Optional::Yes + "severities is: Debug < Info < Warning < Error < Fatal < None." }, }), - "Configurations for the Launcher & syncing application.", - Optional::Yes + Optional::Yes, + "Configurations for the Launcher & syncing application." }, { ConfigurationManager::KeyShutdownCountdown, new DoubleGreaterEqualVerifier(0.0), + Optional::Yes, "The countdown that the application will wait between pressing ESC and " "actually shutting down. If ESC is pressed again in this time, the " - "shutdown is aborted.", - Optional::Yes + "shutdown is aborted." }, { ConfigurationManager::KeyPerSceneCache, new BoolVerifier, + Optional::Yes, "If this is set to 'true', the name of the scene will be appended to the " "cache directory, thus not reusing the same directory. This is useful in " "cases where the same instance of OpenSpace is run with multiple scenes, but " - "the caches should be retained. This value defaults to 'false'.", - Optional::Yes + "the caches should be retained. This value defaults to 'false'." }, { ConfigurationManager::KeyOnScreenTextScaling, @@ -241,11 +242,11 @@ documentation::Documentation ConfigurationManager::Documentation() { // Values from RenderEngine:updateRenderer "window", "framebuffer" }), + Optional::Yes, "The method for scaling the onscreen text in the window. As the resolution " "of the rendering can be different from the size of the window, the onscreen " "text can either be scaled according to the window size ('window'), or the " - "rendering resolution ('framebuffer'). This value defaults to 'window'.", - Optional::Yes + "rendering resolution ('framebuffer'). This value defaults to 'window'." }, { ConfigurationManager::KeyDownloadRequestURL, @@ -253,10 +254,10 @@ documentation::Documentation ConfigurationManager::Documentation() { new StringVerifier, new StringListVerifier ), + Optional::Yes, "The URL from which files will be downloaded by the Launcher. This can " "either be a single URL or a list of possible URLs from which the " - "Launcher can then choose.", - Optional::Yes + "Launcher can then choose." }, { ConfigurationManager::KeyRenderingMethod, @@ -264,27 +265,27 @@ documentation::Documentation ConfigurationManager::Documentation() { // List from RenderEngine::setRendererFromString { "Framebuffer", "ABuffer" } ), + Optional::Yes, "The renderer that is use after startup. The renderer 'ABuffer' requires " - "support for at least OpenGL 4.3", - Optional::Yes + "support for at least OpenGL 4.3" }, { ConfigurationManager::KeyDisableMasterRendering, new BoolVerifier, + Optional::Yes, "Toggles whether the master in a multi-application setup should be rendering " "or just managing the state of the network. This is desired in cases where " - "the master computer does not have the resources to render a scene.", - Optional::Yes + "the master computer does not have the resources to render a scene." }, { ConfigurationManager::KeyDisableSceneOnMaster, new BoolVerifier, + Optional::Yes, "Toggles whether a potential scene transformation matrix, for example as " "specified in an SGCT configuration file, should apply to the master node. " "With some configurations, applying such a transformation complicates the " "interaction and it is thus desired to disable the transformation. The " - "default is false.", - Optional::Yes + "default is false." }, { ConfigurationManager::KeyHttpProxy, @@ -292,11 +293,13 @@ documentation::Documentation ConfigurationManager::Documentation() { { ConfigurationManager::PartHttpProxyAddress, new StringVerifier, + Optional::No, "The address of the http proxy" }, { ConfigurationManager::PartHttpProxyPort, new StringVerifier, + Optional::No, "The port of the http proxy" }, { @@ -304,25 +307,25 @@ documentation::Documentation ConfigurationManager::Documentation() { new StringInListVerifier( { "basic", "ntlm", "digest", "any" } ), - "The authentication method of the http proxy", - Optional::Yes + Optional::Yes, + "The authentication method of the http proxy" }, { ConfigurationManager::PartHttpProxyUser, new StringVerifier, - "The user of the http proxy", - Optional::Yes + Optional::Yes, + "The user of the http proxy" }, { ConfigurationManager::PartHttpProxyPassword, new StringVerifier, - "The password of the http proxy", - Optional::Yes + Optional::Yes, + "The password of the http proxy" } }), + Optional::Yes, "This defines the use for a proxy when fetching data over http." - "No proxy will be used if this is left out.", - Optional::Yes + "No proxy will be used if this is left out." }, { ConfigurationManager::KeyOpenGLDebugContext, @@ -330,17 +333,17 @@ documentation::Documentation ConfigurationManager::Documentation() { { ConfigurationManager::PartActivate, new BoolVerifier, - "Determines whether the OpenGL context should be a debug context", - Optional::No + Optional::No, + "Determines whether the OpenGL context should be a debug context" }, { ConfigurationManager::PartSynchronous, new BoolVerifier, + Optional::Yes, "Determines whether the OpenGL debug callbacks are performed " "synchronously. If set to the callbacks are in the same thead " "as the context and in the scope of the OpenGL function that " - "triggered the message. The default value is .", - Optional::Yes + "triggered the message. The default value is ." }, { ConfigurationManager::PartFilterIdentifier, @@ -350,8 +353,8 @@ documentation::Documentation ConfigurationManager::Documentation() { { ConfigurationManager::PartFilterIdentifierIdentifier, new IntVerifier, - "The identifier that is to be filtered", - Optional::No + Optional::No, + "The identifier that is to be filtered" }, { ConfigurationManager::PartFilterIdentifierSource, @@ -360,8 +363,8 @@ documentation::Documentation ConfigurationManager::Documentation() { "API", "Window System", "Shader Compiler", "Third Party", "Application", "Other", "Don't care" }), - "The source of the identifier to be filtered", - Optional::No + Optional::No, + "The source of the identifier to be filtered" }, { ConfigurationManager::PartFilterIdentifierType, @@ -371,13 +374,15 @@ documentation::Documentation ConfigurationManager::Documentation() { "Performance", "Marker", "Push group", "Pop group", "Other", "Don't care" }), + Optional::No, "The type of the identifier to be filtered" } }), + Optional::No, "Individual OpenGL debug message identifiers" }}), - "A list of OpenGL debug messages identifiers that are filtered", - Optional::Yes + Optional::Yes, + "A list of OpenGL debug messages identifiers that are filtered" }, { ConfigurationManager::PartFilterSeverity, @@ -387,32 +392,33 @@ documentation::Documentation ConfigurationManager::Documentation() { new StringInListVerifier( // ghoul::debugcontext.cpp { "High", "Medium", "Low", "Notification" } - ) + ), + Optional::No } }), - "A list of severities that can are filtered out", - Optional::Yes + Optional::Yes, + "A list of severities that can are filtered out" } }), + Optional::Yes, "Determines the settings for the creation of an OpenGL debug context.", - Optional::Yes }, { ConfigurationManager::KeyCheckOpenGLState, new BoolVerifier, + Optional::Yes, "Determines whether the OpenGL state is checked after each OpenGL function " "call. This will dramatically slow down the rendering, but will make finding " - "OpenGL errors easier. This defaults to 'false'.", - Optional::Yes + "OpenGL errors easier. This defaults to 'false'." }, { ConfigurationManager::KeyLogEachOpenGLCall, new BoolVerifier, + Optional::Yes, "Determines whether each OpenGL call that happens should be logged using the " "'TRACE' loglevel. This will bring the rendering to a crawl but provides " "useful debugging features for the order in which OpenGL calls occur. This " - "defaults to 'false'.", - Optional::Yes + "defaults to 'false'." } } }; diff --git a/src/engine/logfactory.cpp b/src/engine/logfactory.cpp index ea6c3f84d4..444d4a0885 100644 --- a/src/engine/logfactory.cpp +++ b/src/engine/logfactory.cpp @@ -67,47 +67,49 @@ documentation::Documentation LogFactoryDocumentation() { // List from createLog valueTextLog, valueHtmlLog }), + Optional::No, "The type of the new log to be generated." }, { keyFilename, new StringVerifier, + Optional::No, "The filename to which the log will be written." }, { keyAppend, new BoolVerifier, + Optional::Yes, "Determines whether the file will be cleared at startup or if the " - "contents will be appended to previous runs.", - Optional::Yes + "contents will be appended to previous runs." }, { keyTimeStamping, new BoolVerifier, + Optional::Yes, "Determines whether the log entires should be stamped with the time at " - "which the message was logged.", - Optional::Yes + "which the message was logged." }, { keyDateStamping, new BoolVerifier, + Optional::Yes, "Determines whether the log entries should be stamped with the date at " - "which the message was logged.", - Optional::Yes + "which the message was logged." }, { keyCategoryStamping, new BoolVerifier, + Optional::Yes, "Determines whether the log entries should be stamped with the " - "category that creates the log message.", - Optional::Yes + "category that creates the log message." }, { keyLogLevelStamping, new BoolVerifier, + Optional::Yes, "Determines whether the log entries should be stamped with the log level " - "that was used to create the log message.", - Optional::Yes + "that was used to create the log message." } }, Exhaustive::Yes diff --git a/src/mission/mission.cpp b/src/mission/mission.cpp index 2dac741175..8ad5eb08a1 100644 --- a/src/mission/mission.cpp +++ b/src/mission/mission.cpp @@ -50,29 +50,29 @@ documentation::Documentation MissionPhase::Documentation() { { KeyName, new StringVerifier, + Optional::No, "The human readable name of this mission or mission phase that is " - "displayed to the user.", - Optional::No + "displayed to the user." }, { KeyDescription, new StringVerifier, - "A description of this mission or mission phase.", - Optional::Yes + Optional::Yes, + "A description of this mission or mission phase." }, { KeyTimeRange, new ReferencingVerifier("core_util_timerange"), + Optional::Yes, "The time range for which this mission or mission phase is valid. If no " "time range is specified, the ranges of sub mission phases are used " - "instead.", - Optional::Yes + "instead." }, { KeyPhases, new ReferencingVerifier("core_mission_mission"), - "The phases into which this mission or mission phase is separated.", - Optional::Yes + Optional::Yes, + "The phases into which this mission or mission phase is separated." } }, Exhaustive::Yes diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 65b51003ed..f8fb604e6b 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -62,11 +62,11 @@ documentation::Documentation Renderable::Documentation() { { KeyType, new StringAnnotationVerifier("A valid Renderable created by a factory"), + Optional::No, "This key specifies the type of Renderable that gets created. It has to be one" "of the valid Renderables that are available for creation (see the " "FactoryDocumentation for a list of possible Renderables), which depends on " - "the configration of the application", - Optional::No + "the configration of the application" } } }; diff --git a/src/rendering/screenspacerenderable.cpp b/src/rendering/screenspacerenderable.cpp index a9af742723..ae648e730f 100644 --- a/src/rendering/screenspacerenderable.cpp +++ b/src/rendering/screenspacerenderable.cpp @@ -121,11 +121,11 @@ documentation::Documentation ScreenSpaceRenderable::Documentation() { { KeyType, new StringAnnotationVerifier("Must name a valid Screenspace renderable"), + Optional::No, "The type of the Screenspace renderable that is to be created. The " "available types of Screenspace renderable depend on the configuration of" "the application and can be written to disk on application startup into " - "the FactoryDocumentation.", - Optional::No + "the FactoryDocumentation." } } }; diff --git a/src/scene/rotation.cpp b/src/scene/rotation.cpp index 9aaee189a8..11ae9eadad 100644 --- a/src/scene/rotation.cpp +++ b/src/scene/rotation.cpp @@ -47,11 +47,11 @@ documentation::Documentation Rotation::Documentation() { { KeyType, new StringAnnotationVerifier("Must name a valid Rotation type."), + Optional::No, "The type of the rotation that is described in this element. The " "available types of rotations depend on the configuration of the " "application and can be written to disk on application startup into the " - "FactoryDocumentation.", - Optional::No + "FactoryDocumentation." } } }; diff --git a/src/scene/scale.cpp b/src/scene/scale.cpp index cd2c152186..0788c5fc58 100644 --- a/src/scene/scale.cpp +++ b/src/scene/scale.cpp @@ -48,11 +48,11 @@ documentation::Documentation Scale::Documentation() { { KeyType, new StringAnnotationVerifier("Must name a valid Scale type"), + Optional::No, "The type of the scaling that is described in this element. " "The available types of scaling depend on the configuration " "of the application and can be written to disk on " - "application startup into the FactoryDocumentation.", - Optional::No + "application startup into the FactoryDocumentation." } }, Exhaustive::No diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 2f65a7b5d7..547c1e6627 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -290,7 +290,8 @@ std::string Scene::generateJson() const { json << "\"id\": \"" << p->identifier() << "\","; json << "\"type\": \"" << p->className() << "\","; json << "\"fullyQualifiedId\": \"" << p->fullyQualifiedIdentifier() << "\","; - json << "\"guiName\": \"" << p->guiName() << "\""; + json << "\"guiName\": \"" << p->guiName() << "\","; + json << "\"description\": \"" << escapedJson(p->description()) << "\""; json << "}"; if (p != properties.back()) { json << ","; diff --git a/src/scene/scene_doc.inl b/src/scene/scene_doc.inl index c6be2cc5a2..7e12ff7475 100644 --- a/src/scene/scene_doc.inl +++ b/src/scene/scene_doc.inl @@ -37,16 +37,16 @@ documentation::Documentation Scene::Documentation() { { "ScenePath", new StringVerifier, + Optional::Yes, "The path to the base directory of the scene. The path is considered " - "relative to the location of the scene description file.", - Optional::Yes + "relative to the location of the scene description file." }, { "CommonFolder", new StringAnnotationVerifier("A valid scene module folder"), + Optional::Yes, "The path to the common folder that is loaded and will be bound to the " - "${COMMON_MODULE} path token so that assets can be reused easily.", - Optional::Yes + "${COMMON_MODULE} path token so that assets can be reused easily." }, { "Camera", @@ -54,37 +54,42 @@ documentation::Documentation Scene::Documentation() { { "Focus", new StringAnnotationVerifier("A valid object in the scene"), + Optional::No, "The initial focus node of the camera, i.e., the node around which " "the interaction will be performed." }, { "Position", new DoubleVector3Verifier, - "The initial camera positive relative to the focus object.", - Optional::Yes + Optional::Yes, + "The initial camera positive relative to the focus object." }, { "Rotation", new DoubleVector4Verifier, - "The initial camera rotation expressed as a quaternion.", - Optional::Yes + Optional::Yes, + "The initial camera rotation expressed as a quaternion." } }), + Optional::Yes, "Definitions of the camera starting parameters, such as focus, location, and " - "orientation.", - Optional::Yes + "orientation." }, { "Modules", new TableVerifier({ - { "*", new StringAnnotationVerifier( + { + "*", + new StringVerifier, + Optional::No, "Loadable module folders. This means that they either have to point " "to a folder that contains a ModuleFile or a folder which contains " "other folders that eventually contain ModuleFile. This second " "recursive approach is useful for grouping modules into logical " "units." - )} + } }), + Optional::No, "This is the list of modules that will be loaded into the initial scene. The " "values in this table have to correspond to folders relative to the " "ScenePath key. The order in which the modules are loaded is the same as the " diff --git a/src/scene/scenegraphnode_doc.inl b/src/scene/scenegraphnode_doc.inl index 2766c91ee4..038d6c001e 100644 --- a/src/scene/scenegraphnode_doc.inl +++ b/src/scene/scenegraphnode_doc.inl @@ -37,33 +37,33 @@ documentation::Documentation SceneGraphNode::Documentation() { { "Name", new StringVerifier, + Optional::No, "The name of this scenegraph node. This name must be unique among all scene " "graph nodes that are loaded in a specific scene. If a duplicate is detected " "the loading of the node will fail, as will all childing that depend on the " - "node.", - Optional::No + "node." }, { "Parent", new StringAnnotationVerifier( "Must be a name for another scenegraph node, or 'Root'" ), + Optional::No, "This names the parent of the currently specified scenegraph node. The " "parent must not have been defined earlier, but must exist at loading time, " "or the scenegraph node creation will fail. A special parent 'Root' is " - "available that denotes the root of the scenegraph.", - Optional::No + "available that denotes the root of the scenegraph." }, { "Renderable", new ReferencingVerifier("renderable"), + Optional::Yes, "The renderable that is to be created for this scenegraph node. A renderable " "is a component of a scenegraph node that will lead to some visual result on " "the screen. The specifics heavily depend on the 'Type' of the renderable. " "If no Renderable is specified, this scenegraph node is an internal node and " "can be used for either group children, or apply common transformations to a " - "group of children.", - Optional::Yes + "group of children." }, { "Transform", @@ -71,33 +71,33 @@ documentation::Documentation SceneGraphNode::Documentation() { { "Translation", new ReferencingVerifier("core_transform_translation"), + Optional::Yes, "This node describes a translation that is applied to the scenegraph " "node and all its children. Depending on the 'Type' of the " "translation, this can either be a static translation or a " - "time-varying one.", - Optional::Yes + "time-varying one." }, { "Rotation", new ReferencingVerifier("core_transform_rotation"), + Optional::Yes, "This nodes describes a rotation that is applied to the scenegraph " "node and all its children. Depending on the 'Type' of the rotation, " - "this can either be a static rotation or a time-varying one.", - Optional::Yes + "this can either be a static rotation or a time-varying one." }, { "Scale", new ReferencingVerifier("core_transform_scaling"), + Optional::Yes, "This node describes a scaling that is applied to the scenegraph " "node and all its children. Depending on the 'Type' of the scaling, " - "this can either be a static scaling or a time-varying one.", - Optional::Yes + "this can either be a static scaling or a time-varying one." } }), + Optional::Yes, "This describes a set of transformations that are applied to this scenegraph " "node and all of its children. There are only three possible values " - "corresponding to a 'Translation', a 'Rotation', and a 'Scale'.", - Optional::Yes + "corresponding to a 'Translation', a 'Rotation', and a 'Scale'." }, } }; diff --git a/src/scene/translation.cpp b/src/scene/translation.cpp index 9dc3eb3931..7bbfc23149 100644 --- a/src/scene/translation.cpp +++ b/src/scene/translation.cpp @@ -47,11 +47,11 @@ documentation::Documentation Translation::Documentation() { { KeyType, new StringAnnotationVerifier("Must name a valid Translation type"), + Optional::No, "The type of translation that is described in this element. " "The available types of translations depend on the " "configuration of the application and can be written to disk " - "on application startup into the FactoryDocumentation.", - Optional::No + "on application startup into the FactoryDocumentation." } }, Exhaustive::No diff --git a/src/scripting/scriptscheduler.cpp b/src/scripting/scriptscheduler.cpp index 5b7db34bef..601fec5bf3 100644 --- a/src/scripting/scriptscheduler.cpp +++ b/src/scripting/scriptscheduler.cpp @@ -61,36 +61,37 @@ documentation::Documentation ScriptScheduler::Documentation() { { KeyTime, new TimeVerifier, + Optional::No, "The time at which, when the in game time passes it, the two " "scripts will be executed. If the traversal is forwards (towards " "+ infinity), the ForwardScript will be executed, otherwise the " - "BackwardScript will be executed instead.", - Optional::No + "BackwardScript will be executed instead." }, { KeyUniversalScript, new LuaScriptVerifier, + Optional::Yes, "The Lua script that will be executed when the specified time is " "passed independent of its direction. This script will be " "executed before the specific scripts if both versions are " - "specified", - Optional::Yes + "specified" }, { KeyForwardScript, new LuaScriptVerifier, + Optional::Yes, "The Lua script that is executed when OpenSpace passes the time " - "in a forward direction.", - Optional::Yes + "in a forward direction." }, { KeyBackwardScript, new LuaScriptVerifier, + Optional::Yes, "The Lua script that is executed when OpenSpace passes the time " - "in a backward direction.", - Optional::Yes + "in a backward direction." } - }) + }), + Optional::No } }, Exhaustive::Yes diff --git a/src/util/task.cpp b/src/util/task.cpp index 891614c1c2..2efc36d0cb 100644 --- a/src/util/task.cpp +++ b/src/util/task.cpp @@ -41,11 +41,11 @@ documentation::Documentation Task::documentation() { { "Type", new StringAnnotationVerifier("A valid Task created by a factory"), + Optional::No, "This key specifies the type of Task that gets created. It has to be one" "of the valid Tasks that are available for creation (see the " "FactoryDocumentation for a list of possible Tasks), which depends on " - "the configration of the application", - Optional::No + "the configration of the application" } } }; diff --git a/src/util/timerange.cpp b/src/util/timerange.cpp index 7c74baeb79..bcae0aefb6 100644 --- a/src/util/timerange.cpp +++ b/src/util/timerange.cpp @@ -46,14 +46,14 @@ documentation::Documentation TimeRange::Documentation() { { KeyStart, new StringAnnotationVerifier("A string representing a valid date"), - "The start date of the time range", - Optional::No + Optional::No, + "The start date of the time range" }, { KeyEnd, new StringAnnotationVerifier("A string representing a valid date"), - "The end date of the time range", - Optional::No + Optional::No, + "The end date of the time range" } }, Exhaustive::Yes