MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ operator()() [3/4]

auto MayaFlux::Evolve::operator() ( const std::shared_ptr< Buffers::VolumeGridBuffer > &  volume,
const Buffers::VolumeGridBuffer::FlowConfig &  flow,
const RenderConfig &  render 
) -> std::shared_ptr<Buffers::VolumeGridBuffer>
inline

Set the incompressible flow stages going over a volume and attach rendering.

Parameters
volumeUnregistered volume. Built with a SurfaceConfig if it is to be drawn.
flowFlow parameters. Required refs left with an empty name (velocity, pressure, divergence, and scratch when viscosity is above zero) are declared on the volume under default names. A named ref the volume does not yet hold is declared, with the slot count its role needs. A ref issued by another volume is left for setup_flow to reject.
renderRender target. target_window is required.
Returns
The volume, or nullptr if it is null or the target window is null.

Registers the volume in the graphics domain, which establishes its chain, then builds the flow stages and attaches rendering. The stages setup_flow builds are reachable afterwards through the volume's processing chain by type.

Definition at line 197 of file Evolve.hpp.

202 {
203 if (!build_flow(volume, flow, render)) {
204 return nullptr;
205 }
206 MF_LIVE_EXPOSE_AUTO(volume);
207 return volume;
208 }
#define MF_LIVE_EXPOSE_AUTO(ptr)
Auto-expose variant that deduces the key prefix from the shared_ptr element type.
bool build_flow(const std::shared_ptr< Buffers::VolumeGridBuffer > &volume, const Buffers::VolumeGridBuffer::FlowConfig &flow, const RenderConfig &render)
Resolve refs, register, build the flow stages and render a volume.
Definition Evolve.cpp:289

References MF_LIVE_EXPOSE_AUTO.