|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Mapped< std::shared_ptr< Kakshya::PlotContainer > > MayaFlux::Portal::Forma::Plot::place | ( | Surface & | surface, |
| std::shared_ptr< Buffers::FormaBuffer > | buf, | ||
| SeriesSpec | spec, | ||
| std::shared_ptr< Kakshya::PlotContainer > | container | ||
| ) |
Place a plot element onto a Surface using a pre-built FormaBuffer.
Constructs a Mapped<shared_ptr<PlotContainer>> from the geometry function carried by spec, registers the element on surface's layer, and runs one initial sync so the first frame has valid geometry. Sets force_redraw_on_sync so geometry regenerates on every sync() call the container pointer is stable across frames but its data changes each frame.
Buffer construction and scheduling are the caller's responsibility. Use Portal::Forma::create_buffer(surface.window(), spec.capacity_for(N), spec.topology) to build the buffer, and schedule_metro to drive sync() at the desired rate.
| surface | Surface to register the element on. |
| buf | Pre-built, registered FormaBuffer sized for this encoding. Use spec.capacity_for(N) and spec.topology to construct it. |
| spec | Result of a SeriesBuilder terminal. Carries the geometry function, topology, and capacity arithmetic for this encoding. Raw GeometryFn callers are responsible for calling container->process_default() inside their function; SeriesBuilder terminals call it internally. |
| container | PlotContainer with series bound and marked ready for processing. Becomes the initial MappedState value. |
Definition at line 81 of file Plot.cpp.
References MayaFlux::Portal::Forma::Layer::add(), MayaFlux::Portal::Forma::Mapped< T >::element, MayaFlux::Portal::Forma::Plot::SeriesSpec::fn, MayaFlux::Portal::Forma::Element::id, MayaFlux::Portal::Forma::Layer::Slot::id(), and MayaFlux::Portal::Forma::Surface::layer().
Referenced by MayaFlux::Portal::Forma::plot().
Here is the call graph for this function:
Here is the caller graph for this function: