|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Declares the layers of a Chimera, in order, and starts feeding them. More...
#include <Chimera.hpp>
Collaboration diagram for MayaFlux::Kriya::ChimeraBuilder:Classes | |
| struct | Action |
Public Member Functions | |
| ChimeraBuilder (std::shared_ptr< Buffers::TextureArrayBuffer > buffer, std::shared_ptr< BufferPipeline > pipeline) | |
| ChimeraBuilder & | enters_after (double seconds) |
| Seconds after start() before the layer begins to be fed. | |
| ChimeraBuilder & | every (double seconds, std::function< void(Chimera &)> action) |
| Call an action on the running Chimera every this many seconds. | |
| ChimeraBuilder & | every_n_frames (uint32_t frames) |
| Refresh a ring or GPU image layer every this many frames. | |
| ChimeraBuilder & | fit (Portal::Graphics::FitMode mode) |
| Fit frames of another extent into this layer in this way, instead of the buffer's. | |
| ChimeraBuilder & | from (const std::string &path) |
| Fill the layer once with an image file, loaded now as RGBA. | |
| ChimeraBuilder & | from (Kakshya::ImageData image) |
| Fill the layer once with a still image. | |
| ChimeraBuilder & | from (std::shared_ptr< Core::VKImage > image) |
| Feed the layer by copying a GPU image every frame. | |
| ChimeraBuilder & | from (std::shared_ptr< Kakshya::DynamicVideoStream > ring) |
| Feed the layer from a ring that is being recorded. | |
| ChimeraBuilder & | from (std::shared_ptr< Kakshya::TextureCollection > collection, double frame_rate=0.0) |
| Feed the layer from a texture collection that is being appended to. | |
| ChimeraBuilder & | from_pipeline () |
| Feed the layer from the stream the pipeline records, read when start() runs. | |
| std::shared_ptr< Buffers::TextureArrayBuffer > | get_buffer () const |
| The array buffer whose layers the builder feeds, for its mode, weights or push constants. | |
| std::shared_ptr< BufferPipeline > | get_pipeline () const |
| The pipeline the builder records into. | |
| ChimeraBuilder & | lag (double seconds) |
| Read the ring this many seconds behind its write head, at least two frames. | |
| ChimeraBuilder & | lag (Kinesis::TimeMap seconds) |
| Read the ring behind its write head by a lag that varies with time, in seconds since the layer entered. | |
| ChimeraBuilder & | layer () |
| Open the next layer. | |
| ChimeraBuilder & | layer_data () |
| Create the per-layer buffer the shader reads as layerData. | |
| ChimeraBuilder & | level (double weight) |
| Weight passed to the shader for the layer. | |
| ChimeraBuilder & | params (const glm::vec4 &values) |
| Params for the layer in the buffer's per-layer data, such as placement. | |
| ChimeraBuilder & | record (BufferOperation &&operation) |
| Add an operation to the builder's pipeline, ahead of the feeding. | |
| ChimeraBuilder & | render (Portal::Graphics::RenderConfig config) |
| Draw the buffer this way once start() runs. | |
| ChimeraBuilder & | smooth (bool enable=true) |
| Blend the two frames around a ring position, so slow or varying time does not step. | |
| ChimeraBuilder & | speed (double ratio) |
| Play a layer without a lag at this multiple of the ring's frame rate. | |
| Chimera | start () |
| Start feeding every declared layer on the frame clock. | |
| ChimeraBuilder & | use_pipeline (std::shared_ptr< BufferPipeline > pipeline) |
| Replace the builder's pipeline with one made elsewhere. | |
Private Member Functions | |
| Chimera::Layer & | current () |
Private Attributes | |
| std::vector< Action > | m_actions |
| std::shared_ptr< Buffers::TextureArrayBuffer > | m_buffer |
| std::vector< Chimera::Layer > | m_layers |
| std::shared_ptr< BufferPipeline > | m_pipeline |
| std::optional< Portal::Graphics::RenderConfig > | m_render |
Declares the layers of a Chimera, in order, and starts feeding them.
layer() opens a new layer and the calls after it describe that layer. A call made before any layer() describes the first.
The builder holds one BufferPipeline, the one it was given or one it was made with, so what is recorded and what is assembled read as one chain:
Definition at line 190 of file Chimera.hpp.