Add documentation for Video classes (closes #2732)

This commit is contained in:
Alexander Bock
2023-06-09 11:25:52 +02:00
parent 1b18db9c2e
commit bb9a3e375d
8 changed files with 49 additions and 3 deletions

View File

@@ -45,6 +45,8 @@ public:
void render(const RenderData& data, RendererTasks& rendererTask) override;
void update(const UpdateData& data) override;
static documentation::Documentation Documentation();
protected:
virtual void bindTexture() override;

View File

@@ -76,7 +76,8 @@ public:
virtual void decode(SyncBuffer* syncBuffer) override;
virtual void postSync(bool isMaster) override;
documentation::Documentation Documentation();
static documentation::Documentation Documentation();
private:
// Libmpv keys
enum class MpvKey : uint64_t {

View File

@@ -56,6 +56,8 @@ public:
Tile::Status tileStatus(const TileIndex& tileIndex) override final;
TileDepthTransform depthTransform() override final;
static documentation::Documentation Documentation();
private:
void internalInitialize() override final;
void internalDeinitialize() override final;

View File

@@ -29,6 +29,17 @@
namespace openspace {
documentation::Documentation RenderableVideoPlane::Documentation() {
documentation::Documentation doc = RenderablePlane::Documentation();
doc.name = "RenderableVideoPlane";
doc.id = "video_renderablevideoplane";
documentation::Documentation vp = VideoPlayer::Documentation();
doc.entries.insert(doc.entries.end(), vp.entries.begin(), vp.entries.end());
return doc;
}
RenderableVideoPlane::RenderableVideoPlane(const ghoul::Dictionary& dictionary)
: RenderablePlane(dictionary)
, _videoPlayer(dictionary)

View File

@@ -131,7 +131,13 @@ namespace {
namespace openspace {
documentation::Documentation RenderableVideoSphere::Documentation() {
return codegen::doc<Parameters>("renderable_video_sphere");
documentation::Documentation doc =
codegen::doc<Parameters>("renderable_video_sphere");
documentation::Documentation vp = VideoPlayer::Documentation();
doc.entries.insert(doc.entries.end(), vp.entries.begin(), vp.entries.end());
return doc;
}
RenderableVideoSphere::RenderableVideoSphere(const ghoul::Dictionary& dictionary)

View File

@@ -37,6 +37,17 @@
namespace openspace {
documentation::Documentation ScreenSpaceVideo::Documentation() {
documentation::Documentation doc = ScreenSpaceRenderable::Documentation();
doc.name = "ScreenSpaceVideo";
doc.id = "video_screenspacevideo";
documentation::Documentation vp = VideoPlayer::Documentation();
doc.entries.insert(doc.entries.end(), vp.entries.begin(), vp.entries.end());
return doc;
}
ScreenSpaceVideo::ScreenSpaceVideo(const ghoul::Dictionary& dictionary)
: ScreenSpaceRenderable(dictionary)
, _videoPlayer(dictionary)

View File

@@ -41,6 +41,13 @@ namespace {
namespace openspace::globebrowsing {
documentation::Documentation VideoTileProvider::Documentation() {
documentation::Documentation doc = VideoPlayer::Documentation();
doc.name = "VideoTileProvider";
doc.id = "video_videotileprovider";
return doc;
}
VideoTileProvider::VideoTileProvider(const ghoul::Dictionary& dictionary)
: _videoPlayer(dictionary)
{

View File

@@ -81,7 +81,13 @@ void VideoModule::internalInitialize(const ghoul::Dictionary& dict) {
}
std::vector<documentation::Documentation> VideoModule::documentations() const {
return std::vector<documentation::Documentation>();
return {
RenderableVideoPlane::Documentation(),
RenderableVideoSphere::Documentation(),
ScreenSpaceVideo::Documentation(),
globebrowsing::VideoTileProvider::Documentation(),
VideoPlayer::Documentation()
};
}
} // namespace openspace