mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Merge branch 'master' into feature/horizons-framework
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <modules/atmosphere/atmospheremodule.h>
|
||||
|
||||
#include <modules/atmosphere/rendering/renderableatmosphere.h>
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
@@ -40,4 +41,9 @@ void AtmosphereModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
fRenderable->registerClass<RenderableAtmosphere>("RenderableAtmosphere");
|
||||
}
|
||||
|
||||
std::vector<documentation::Documentation> AtmosphereModule::documentations() const {
|
||||
return {
|
||||
RenderableAtmosphere::Documentation()
|
||||
};
|
||||
}
|
||||
} // namespace openspace
|
||||
|
||||
@@ -35,6 +35,8 @@ public:
|
||||
|
||||
AtmosphereModule();
|
||||
|
||||
std::vector<documentation::Documentation> documentations() const override;
|
||||
|
||||
private:
|
||||
void internalInitialize(const ghoul::Dictionary&) override;
|
||||
};
|
||||
|
||||
@@ -197,11 +197,16 @@ std::vector<documentation::Documentation> BaseModule::documentations() const {
|
||||
DashboardItemDistance::Documentation(),
|
||||
DashboardItemFramerate::Documentation(),
|
||||
DashboardItemMission::Documentation(),
|
||||
DashboardItemParallelConnection::Documentation(),
|
||||
DashboardItemPropertyValue::Documentation(),
|
||||
DashboardItemSimulationIncrement::Documentation(),
|
||||
DashboardItemSpacing::Documentation(),
|
||||
DashboardItemText::Documentation(),
|
||||
DashboardItemVelocity::Documentation(),
|
||||
|
||||
RenderableBoxGrid::Documentation(),
|
||||
RenderableCartesianAxes::Documentation(),
|
||||
RenderableDisc::Documentation(),
|
||||
RenderableGrid::Documentation(),
|
||||
RenderableLabels::Documentation(),
|
||||
RenderableModel::Documentation(),
|
||||
@@ -210,8 +215,8 @@ std::vector<documentation::Documentation> BaseModule::documentations() const {
|
||||
RenderablePlaneImageLocal::Documentation(),
|
||||
RenderablePlaneImageOnline::Documentation(),
|
||||
RenderablePlaneTimeVaryingImage::Documentation(),
|
||||
RenderablePrism::Documentation(),
|
||||
RenderableRadialGrid::Documentation(),
|
||||
RenderableDisc::Documentation(),
|
||||
RenderableSphere::Documentation(),
|
||||
RenderableSphericalGrid::Documentation(),
|
||||
RenderableTimeVaryingSphere::Documentation(),
|
||||
@@ -241,8 +246,8 @@ std::vector<documentation::Documentation> BaseModule::documentations() const {
|
||||
TimeFrameInterval::Documentation(),
|
||||
TimeFrameUnion::Documentation(),
|
||||
|
||||
SceneGraphLightSource::Documentation(),
|
||||
CameraLightSource::Documentation(),
|
||||
SceneGraphLightSource::Documentation()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,12 @@ namespace {
|
||||
|
||||
namespace openspace {
|
||||
|
||||
documentation::Documentation DashboardItemMission::Documentation() {
|
||||
documentation::Documentation doc = DashboardTextItem::Documentation();
|
||||
doc.id = "base_dashboarditem_mission";
|
||||
return doc;
|
||||
}
|
||||
|
||||
DashboardItemMission::DashboardItemMission(const ghoul::Dictionary& dictionary)
|
||||
: DashboardTextItem(dictionary, 15.f)
|
||||
{}
|
||||
|
||||
@@ -39,6 +39,8 @@ public:
|
||||
void render(glm::vec2& penPosition) override;
|
||||
|
||||
glm::vec2 size() const override;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
|
||||
namespace openspace {
|
||||
|
||||
documentation::Documentation DashboardItemParallelConnection::Documentation() {
|
||||
documentation::Documentation doc = DashboardTextItem::Documentation();
|
||||
doc.id = "base_dashboarditem_parallelconnection";
|
||||
return doc;
|
||||
}
|
||||
|
||||
DashboardItemParallelConnection::DashboardItemParallelConnection(
|
||||
const ghoul::Dictionary& dictionary)
|
||||
: DashboardTextItem(dictionary)
|
||||
|
||||
@@ -39,6 +39,8 @@ public:
|
||||
void render(glm::vec2& penPosition) override;
|
||||
|
||||
glm::vec2 size() const override;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <modules/fieldlinessequence/fieldlinessequencemodule.h>
|
||||
|
||||
#include <modules/fieldlinessequence/rendering/renderablefieldlinessequence.h>
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
@@ -65,4 +66,10 @@ void FieldlinesSequenceModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
factory->registerClass<RenderableFieldlinesSequence>("RenderableFieldlinesSequence");
|
||||
}
|
||||
|
||||
std::vector<documentation::Documentation> FieldlinesSequenceModule::documentations() const {
|
||||
return {
|
||||
RenderableFieldlinesSequence::Documentation()
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -35,6 +35,8 @@ public:
|
||||
|
||||
FieldlinesSequenceModule();
|
||||
|
||||
std::vector<documentation::Documentation> documentations() const override;
|
||||
|
||||
static std::string DefaultTransferFunctionFile;
|
||||
|
||||
private:
|
||||
|
||||
@@ -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,12 @@ void GalaxyModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
fTask->registerClass<MilkywayPointsConversionTask>("MilkywayPointsConversionTask");
|
||||
}
|
||||
|
||||
std::vector<documentation::Documentation> GalaxyModule::documentations() const {
|
||||
return {
|
||||
RenderableGalaxy::Documentation(),
|
||||
MilkywayConversionTask::Documentation(),
|
||||
MilkywayPointsConversionTask::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,
|
||||
@@ -75,37 +75,45 @@ namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo VolumeRenderingEnabledInfo = {
|
||||
"VolumeRenderingEnabled",
|
||||
"Volume Rendering",
|
||||
"" // @TODO Missing documentation
|
||||
"If this value is enabled, the volume rendering component of the galaxy "
|
||||
"rendering is turned on. Otherwise, the volume rendering is skipped"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo StarRenderingEnabledInfo = {
|
||||
"StarRenderingEnabled",
|
||||
"Star Rendering",
|
||||
"" // @TODO Missing documentation
|
||||
"If this value is enabled, the point-based star rendering component of the "
|
||||
"galaxy rendering is turned on. Otherwise, the volume rendering is skipped"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo StepSizeInfo = {
|
||||
"StepSize",
|
||||
"Step Size",
|
||||
"" // @TODO Missing documentation
|
||||
"Determines the distance between steps taken in the volume rendering. The lower "
|
||||
"the number is, the better the rendering looks, but also takes more "
|
||||
"computational resources to render"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo AbsorptionMultiplyInfo = {
|
||||
"AbsorptionMultiply",
|
||||
"Absorption Multiplier",
|
||||
"" // @TODO Missing documentation
|
||||
"A unit-less scale factor for the probability of dust absorbing a light "
|
||||
"particle. The amount of absorption determines the spectrum of the light that is "
|
||||
"emitted from the galaxy"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo EmissionMultiplyInfo = {
|
||||
"EmissionMultiply",
|
||||
"Emission Multiplier",
|
||||
"" // @TODO Missing documentation
|
||||
"A unit-less scale factor for the amount of light being emitted by dust in the "
|
||||
"galaxy."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo RotationInfo = {
|
||||
"Rotation",
|
||||
"Euler rotation",
|
||||
"" // @TODO Missing documentation
|
||||
"The internal rotation of the volume rendering in Euler angles",
|
||||
openspace::properties::Property::Visibility::Developer
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo StarRenderingMethodInfo = {
|
||||
@@ -118,15 +126,17 @@ namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo EnabledPointsRatioInfo = {
|
||||
"EnabledPointsRatio",
|
||||
"Enabled points",
|
||||
"" // @TODO Missing documentation
|
||||
"The ratio of point-like stars that are rendered to produce the overall galaxy "
|
||||
"image. At a value of 0, no stars are rendered, at a value of 1 all points "
|
||||
"contained in the dataset are rendered. The specific value chosen is a "
|
||||
"compromise between image fidelity and rendering performance."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo DownscaleVolumeRenderingInfo =
|
||||
{
|
||||
"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,13 +239,17 @@ namespace {
|
||||
|
||||
namespace openspace {
|
||||
|
||||
documentation::Documentation RenderableGalaxy::Documentation() {
|
||||
return codegen::doc<Parameters>("galaxy_renderablegalaxy");
|
||||
}
|
||||
|
||||
RenderableGalaxy::RenderableGalaxy(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _volumeRenderingEnabled(VolumeRenderingEnabledInfo, true)
|
||||
, _starRenderingEnabled(StarRenderingEnabledInfo, true)
|
||||
, _stepSize(StepSizeInfo, 0.01f, 0.001f, 0.05f, 0.001f)
|
||||
, _absorptionMultiply(AbsorptionMultiplyInfo, 40.f, 0.0f, 200.0f)
|
||||
, _emissionMultiply(EmissionMultiplyInfo, 200.f, 0.0f, 1000.0f)
|
||||
, _absorptionMultiply(AbsorptionMultiplyInfo, 40.f, 0.f, 200.0f)
|
||||
, _emissionMultiply(EmissionMultiplyInfo, 200.f, 0.f, 1000.0f)
|
||||
, _starRenderingMethod(
|
||||
StarRenderingMethodInfo,
|
||||
properties::OptionProperty::DisplayType::Dropdown
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -107,7 +107,7 @@ void MilkywayConversionTask::perform(const Task::ProgressCallback& onProgress) {
|
||||
rawWriter.write(sampleFunction, onProgress);
|
||||
}
|
||||
|
||||
documentation::Documentation MilkywayConversionTask::documentation() {
|
||||
documentation::Documentation MilkywayConversionTask::Documentation() {
|
||||
return documentation::Documentation();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
std::string description() override;
|
||||
void perform(const Task::ProgressCallback& onProgress) override;
|
||||
|
||||
static documentation::Documentation documentation();
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::string _inFilenamePrefix;
|
||||
|
||||
@@ -90,7 +90,7 @@ void MilkywayPointsConversionTask::perform(const Task::ProgressCallback& progres
|
||||
out.close();
|
||||
}
|
||||
|
||||
documentation::Documentation MilkywayPointsConversionTask::documentation() {
|
||||
documentation::Documentation MilkywayPointsConversionTask::Documentation() {
|
||||
return documentation::Documentation();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
std::string description() override;
|
||||
void perform(const Task::ProgressCallback& progressCallback) override;
|
||||
|
||||
static documentation::Documentation documentation();
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::string _inFilename;
|
||||
|
||||
@@ -483,7 +483,15 @@ std::vector<documentation::Documentation> GlobeBrowsingModule::documentations()
|
||||
globebrowsing::LayerAdjustment::Documentation(),
|
||||
globebrowsing::LayerManager::Documentation(),
|
||||
globebrowsing::GlobeTranslation::Documentation(),
|
||||
globebrowsing::GlobeRotation::Documentation(),
|
||||
globebrowsing::RenderableGlobe::Documentation(),
|
||||
globebrowsing::DefaultTileProvider::Documentation(),
|
||||
globebrowsing::ImageSequenceTileProvider::Documentation(),
|
||||
globebrowsing::SingleImageProvider::Documentation(),
|
||||
globebrowsing::SizeReferenceTileProvider::Documentation(),
|
||||
globebrowsing::TemporalTileProvider::Documentation(),
|
||||
globebrowsing::TileProviderByIndex::Documentation(),
|
||||
globebrowsing::TileProviderByLevel::Documentation(),
|
||||
GlobeLabelsComponent::Documentation(),
|
||||
RingsComponent::Documentation(),
|
||||
ShadowComponent::Documentation()
|
||||
|
||||
@@ -74,7 +74,7 @@ documentation::Documentation LayerAdjustment::Documentation() {
|
||||
}
|
||||
|
||||
LayerAdjustment::LayerAdjustment()
|
||||
: properties::PropertyOwner({ "adjustment" })
|
||||
: properties::PropertyOwner({ "Adjustment" })
|
||||
, _chromaKeyColor(ChromaKeyColorInfo, glm::vec3(0.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _chromaKeyTolerance(ChromaKeyToleranceInfo, 0.f, 0.f, 1.f)
|
||||
, _typeOption(TypeInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
|
||||
@@ -185,7 +185,6 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
std::string name = layerName;
|
||||
removePropertySubOwner(it->get());
|
||||
(*it)->deinitialize();
|
||||
_layers.erase(it);
|
||||
properties::PropertyOwner* layerGroup = it->get()->owner();
|
||||
properties::PropertyOwner* layerManager = layerGroup->owner();
|
||||
properties::PropertyOwner* globe = layerManager->owner();
|
||||
@@ -195,6 +194,7 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
layerGroup->identifier(),
|
||||
it->get()->identifier()
|
||||
);
|
||||
_layers.erase(it);
|
||||
update();
|
||||
if (_onChangeCallback) {
|
||||
_onChangeCallback(nullptr);
|
||||
|
||||
@@ -98,6 +98,16 @@ Layer* LayerManager::addLayer(layergroupid::GroupID groupId,
|
||||
try {
|
||||
return _layerGroups[groupId]->addLayer(layerDict);
|
||||
}
|
||||
catch (const documentation::SpecificationError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
for (const documentation::TestResult::Offense& o : e.result.offenses) {
|
||||
LERRORC(o.offender, ghoul::to_string(o.reason));
|
||||
}
|
||||
for (const documentation::TestResult::Warning& w : e.result.warnings) {
|
||||
LWARNINGC(w.offender, ghoul::to_string(w.reason));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
return nullptr;
|
||||
|
||||
@@ -76,6 +76,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation DefaultTileProvider::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_defaulttileprovider");
|
||||
}
|
||||
|
||||
DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary)
|
||||
: _filePath(FilePathInfo, "")
|
||||
, _tilePixelSize(TilePixelSizeInfo, 32, 32, 2048)
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
void initAsyncTileDataReader(TileTextureInitData initData);
|
||||
|
||||
|
||||
@@ -61,6 +61,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation ImageSequenceTileProvider::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_imagesequencetileprovider");
|
||||
}
|
||||
|
||||
ImageSequenceTileProvider::ImageSequenceTileProvider(const ghoul::Dictionary& dictionary)
|
||||
: _index(IndexInfo, 0)
|
||||
, _currentImage(CurrentImageInfo)
|
||||
|
||||
@@ -43,6 +43,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::unique_ptr<DefaultTileProvider> _currentTileProvider = nullptr;
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation SingleImageProvider::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_singleimageprovider");
|
||||
}
|
||||
|
||||
SingleImageProvider::SingleImageProvider(const ghoul::Dictionary& dictionary)
|
||||
: _filePath(FilePathInfo)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include <modules/globebrowsing/src/tileprovider/tileprovider.h>
|
||||
|
||||
namespace openspace { struct Documentation; }
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
class SingleImageProvider : public TileProvider {
|
||||
@@ -41,6 +43,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
properties::StringProperty _filePath;
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation SizeReferenceTileProvider::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_sizereferencetileprovider");
|
||||
}
|
||||
|
||||
SizeReferenceTileProvider::SizeReferenceTileProvider(const ghoul::Dictionary& dictionary)
|
||||
: TextTileProvider(tileTextureInitData(layergroupid::GroupID::ColorLayers, false))
|
||||
{
|
||||
|
||||
@@ -40,6 +40,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
Ellipsoid _ellipsoid;
|
||||
};
|
||||
|
||||
@@ -165,6 +165,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation TemporalTileProvider::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_temporaltileprovider");
|
||||
}
|
||||
|
||||
TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary)
|
||||
: _initDict(dictionary)
|
||||
, _useFixedTime(UseFixedTimeInfo, false)
|
||||
|
||||
@@ -54,6 +54,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
enum class Mode {
|
||||
Prototype,
|
||||
|
||||
@@ -116,7 +116,7 @@ void TileProvider::deinitializeDefaultTile() {
|
||||
DefaultTileTexture = nullptr;
|
||||
}
|
||||
|
||||
TileProvider::TileProvider() : properties::PropertyOwner({ "tileProvider" }) {}
|
||||
TileProvider::TileProvider() : properties::PropertyOwner({ "TileProvider" }) {}
|
||||
|
||||
void TileProvider::initialize() {
|
||||
ZoneScoped
|
||||
|
||||
@@ -51,6 +51,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation TileProviderByIndex::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_tileproviderbyindex");
|
||||
}
|
||||
|
||||
TileProviderByIndex::TileProviderByIndex(const ghoul::Dictionary& dictionary) {
|
||||
ZoneScoped
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::unordered_map<TileIndex::TileHashKey, std::unique_ptr<TileProvider>> _providers;
|
||||
std::unique_ptr<TileProvider> _defaultTileProvider;
|
||||
|
||||
@@ -41,6 +41,10 @@ namespace {
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
documentation::Documentation TileProviderByLevel::Documentation() {
|
||||
return codegen::doc<Parameters>("globebrowsing_tileproviderbylevel");
|
||||
}
|
||||
|
||||
TileProviderByLevel::TileProviderByLevel(const ghoul::Dictionary& dictionary) {
|
||||
ZoneScoped
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
int maxLevel() override final;
|
||||
float noDataValueAsFloat() override final;
|
||||
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::vector<int> _providerIndices;
|
||||
std::vector<std::unique_ptr<TileProvider>> _levelTileProviders;
|
||||
|
||||
@@ -124,6 +124,9 @@ void SpaceModule::internalDeinitializeGL() {
|
||||
|
||||
std::vector<documentation::Documentation> SpaceModule::documentations() const {
|
||||
return {
|
||||
HorizonsTranslation::Documentation(),
|
||||
KeplerTranslation::Documentation(),
|
||||
planetgeometry::PlanetGeometry::Documentation(),
|
||||
RenderableConstellationBounds::Documentation(),
|
||||
RenderableFluxNodes::Documentation(),
|
||||
RenderableHabitableZone::Documentation(),
|
||||
@@ -132,13 +135,10 @@ std::vector<documentation::Documentation> SpaceModule::documentations() const {
|
||||
RenderableSmallBody::Documentation(),
|
||||
RenderableStars::Documentation(),
|
||||
RenderableTravelSpeed::Documentation(),
|
||||
planetgeometry::SimpleSphereGeometry::Documentation(),
|
||||
SpiceRotation::Documentation(),
|
||||
SpiceTranslation::Documentation(),
|
||||
KeplerTranslation::Documentation(),
|
||||
TLETranslation::Documentation(),
|
||||
HorizonsTranslation::Documentation(),
|
||||
planetgeometry::PlanetGeometry::Documentation(),
|
||||
planetgeometry::SimpleSphereGeometry::Documentation()
|
||||
TLETranslation::Documentation()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
|
||||
void update(const UpdateData& data) override;
|
||||
static documentation::Documentation Documentation();
|
||||
private:
|
||||
|
||||
private:
|
||||
properties::StringProperty _nodelineId;
|
||||
properties::IntProperty _distanceUnit;
|
||||
properties::StringProperty _customUnitDescriptor;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <modules/vislab/vislabmodule.h>
|
||||
|
||||
#include <modules/vislab/rendering/renderabledistancelabel.h>
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/misc/templatefactory.h>
|
||||
@@ -40,4 +41,10 @@ void VisLabModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
renderableFactory->registerClass<RenderableDistanceLabel>("RenderableDistanceLabel");
|
||||
}
|
||||
|
||||
std::vector<documentation::Documentation>VisLabModule::documentations() const {
|
||||
return {
|
||||
RenderableDistanceLabel::Documentation()
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -35,6 +35,9 @@ public:
|
||||
|
||||
VisLabModule();
|
||||
|
||||
std::vector<documentation::Documentation> documentations() const override;
|
||||
|
||||
|
||||
private:
|
||||
void internalInitialize(const ghoul::Dictionary&) override;
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace {
|
||||
|
||||
namespace openspace::volume {
|
||||
|
||||
documentation::Documentation GenerateRawVolumeTask::documentation() {
|
||||
documentation::Documentation GenerateRawVolumeTask::Documentation() {
|
||||
return codegen::doc<Parameters>("generate_raw_volume_task");
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
GenerateRawVolumeTask(const ghoul::Dictionary& dictionary);
|
||||
std::string description() override;
|
||||
void perform(const Task::ProgressCallback& progressCallback) override;
|
||||
static documentation::Documentation documentation();
|
||||
static documentation::Documentation Documentation();
|
||||
|
||||
private:
|
||||
std::filesystem::path _rawVolumeOutputPath;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <modules/volume/rendering/renderabletimevaryingvolume.h>
|
||||
#include <modules/volume/tasks/generaterawvolumetask.h>
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/util/task.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
@@ -46,7 +47,13 @@ void VolumeModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
auto tFactory = FactoryManager::ref().factory<Task>();
|
||||
ghoul_assert(tFactory, "No task factory existed");
|
||||
tFactory->registerClass<GenerateRawVolumeTask>("GenerateRawVolumeTask");
|
||||
}
|
||||
|
||||
std::vector<documentation::Documentation> VolumeModule::documentations() const {
|
||||
return {
|
||||
RenderableTimeVaryingVolume::Documentation(),
|
||||
GenerateRawVolumeTask::Documentation()
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
VolumeModule();
|
||||
|
||||
void internalInitialize(const ghoul::Dictionary&) override;
|
||||
|
||||
std::vector<documentation::Documentation> documentations() const override;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user