Commit c2755b86 authored by Emma Broman's avatar Emma Broman
Browse files

Documentation updates (closes #1846)

* Add some missing renderables
* Tiny refactor of documentation identifiers and log category keys
parent 26f5ce4c
Showing with 36 additions and 12 deletions
+36 -12
......@@ -27,6 +27,7 @@
#include <modules/galaxy/rendering/renderablegalaxy.h>
#include <modules/galaxy/tasks/milkywayconversiontask.h>
#include <modules/galaxy/tasks/milkywaypointsconversiontask.h>
#include <openspace/documentation/documentation.h>
#include <openspace/rendering/renderable.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/assert.h>
......@@ -47,4 +48,10 @@ void GalaxyModule::internalInitialize(const ghoul::Dictionary&) {
fTask->registerClass<MilkywayPointsConversionTask>("MilkywayPointsConversionTask");
}
std::vector<documentation::Documentation> GalaxyModule::documentations() const {
return {
RenderableGalaxy::Documentation()
};
}
} // namespace openspace
......@@ -35,6 +35,8 @@ public:
GalaxyModule();
std::vector<documentation::Documentation> documentations() const override;
private:
void internalInitialize(const ghoul::Dictionary&) override;
};
......
......@@ -55,7 +55,7 @@
namespace {
constexpr int8_t CurrentCacheVersion = 1;
constexpr const char* _loggerCat = "Renderable Galaxy";
constexpr const char* _loggerCat = "RenderableGalaxy";
enum StarRenderingMethod {
Points,
......@@ -125,8 +125,7 @@ namespace {
{
"Downscale",
"Downscale Factor Volume Rendering",
"This value set the downscaling factor"
" when rendering the current volume."
"This value sets the downscaling factor when rendering the current volume."
};
constexpr openspace::properties::Property::PropertyInfo NumberOfRayCastingStepsInfo =
......@@ -229,6 +228,10 @@ namespace {
namespace openspace {
documentation::Documentation RenderableGalaxy::Documentation() {
return codegen::doc<Parameters>("galaxy_renderablegalaxy");
}
RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _volumeRenderingEnabled(VolumeRenderingEnabledInfo, true)
......
......@@ -54,6 +54,8 @@ public:
void render(const RenderData& data, RendererTasks& tasks) override;
void update(const UpdateData& data) override;
static documentation::Documentation Documentation();
private:
void renderPoints(const RenderData& data);
void renderBillboards(const RenderData& data);
......
......@@ -73,7 +73,7 @@ namespace {
namespace openspace {
documentation::Documentation RenderableCrawlingLine::Documentation() {
return codegen::doc<Parameters>("newhorizons_renderable_crawlingline");
return codegen::doc<Parameters>("spacecraftinstruments_renderablecrawlingline");
}
RenderableCrawlingLine::RenderableCrawlingLine(const ghoul::Dictionary& dictionary)
......
......@@ -196,7 +196,7 @@ namespace {
namespace openspace {
documentation::Documentation RenderableFov::Documentation() {
return codegen::doc<Parameters>("newhorizons_renderable_fieldofview");
return codegen::doc<Parameters>("spacecraftinstruments_renderablefieldofview");
}
RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary)
......
......@@ -90,7 +90,7 @@ namespace {
namespace openspace {
documentation::Documentation RenderableModelProjection::Documentation() {
return codegen::doc<Parameters>("newhorizons_renderable_modelprojection");
return codegen::doc<Parameters>("spacecraftinstruments_renderablemodelprojection");
}
RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& dictionary)
......
......@@ -45,6 +45,7 @@ namespace {
constexpr const char* _loggerCat = "RenderablePlaneProjection";
constexpr const char* GalacticFrame = "GALACTIC";
// @TODO (emmbr 2022-01-20) Add documentation
struct [[codegen::Dictionary(RenderablePlaneProjection)]] Parameters {
std::optional<std::string> spacecraft;
std::optional<std::string> instrument;
......@@ -58,6 +59,10 @@ namespace {
namespace openspace {
documentation::Documentation RenderablePlaneProjection::Documentation() {
return codegen::doc<Parameters>("spacecraftinstruments_renderableorbitdisc");
}
RenderablePlaneProjection::RenderablePlaneProjection(const ghoul::Dictionary& dict)
: Renderable(dict)
{
......
......@@ -56,6 +56,8 @@ public:
void render(const RenderData& data, RendererTasks& rendererTask) override;
void update(const UpdateData& data) override;
static documentation::Documentation Documentation();
private:
void loadTexture();
void updatePlane(const Image& img, double currentTime);
......
......@@ -162,7 +162,7 @@ namespace {
namespace openspace {
documentation::Documentation RenderablePlanetProjection::Documentation() {
return codegen::doc<Parameters>("newhorizons_renderable_planetprojection");
return codegen::doc<Parameters>("spacecraftinstruments_renderableplanetprojection");
}
RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& dict)
......
......@@ -143,7 +143,7 @@ namespace {
namespace openspace {
documentation::Documentation RenderableShadowCylinder::Documentation() {
return codegen::doc<Parameters>("newhorizons_renderable_shadowcylinder");
return codegen::doc<Parameters>("spacecraftinstruments_renderableshadowcylinder");
}
RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dictionary)
......
......@@ -61,12 +61,12 @@ void SpacecraftInstrumentsModule::internalInitialize(const ghoul::Dictionary&) {
auto fRenderable = FactoryManager::ref().factory<Renderable>();
ghoul_assert(fRenderable, "No renderable factory existed");
fRenderable->registerClass<RenderableShadowCylinder>("RenderableShadowCylinder");
fRenderable->registerClass<RenderableCrawlingLine>("RenderableCrawlingLine");
fRenderable->registerClass<RenderableFov>("RenderableFov");
fRenderable->registerClass<RenderableModelProjection>("RenderableModelProjection");
fRenderable->registerClass<RenderablePlaneProjection>("RenderablePlaneProjection");
fRenderable->registerClass<RenderablePlanetProjection>("RenderablePlanetProjection");
fRenderable->registerClass<RenderableModelProjection>("RenderableModelProjection");
fRenderable->registerClass<RenderableShadowCylinder>("RenderableShadowCylinder");
auto fDecoder = FactoryManager::ref().factory<Decoder>();
fDecoder->registerClass<InstrumentDecoder>("Instrument");
......@@ -85,9 +85,12 @@ std::vector<documentation::Documentation>
SpacecraftInstrumentsModule::documentations() const
{
return {
RenderableCrawlingLine::Documentation(),
RenderableFov::Documentation(),
RenderableModelProjection::Documentation(),
RenderablePlaneProjection::Documentation(),
RenderablePlanetProjection::Documentation(),
RenderableShadowCylinder::Documentation(),
ProjectionComponent::Documentation()
};
}
......
......@@ -162,7 +162,7 @@ namespace {
namespace openspace {
documentation::Documentation ProjectionComponent::Documentation() {
return codegen::doc<Parameters>("newhorizons_projectioncomponent");
return codegen::doc<Parameters>("spacecraftinstruments_projectioncomponent");
}
ProjectionComponent::ProjectionComponent()
......
......@@ -32,7 +32,7 @@
#include <ghoul/logging/logmanager.h>
namespace {
constexpr const char* _loggerCat = "Renderable ToyVolume";
constexpr const char* _loggerCat = "RenderableToyVolume";
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment