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

◆ resolve()

void MayaFlux::Evolve::Impl::resolve ( const std::shared_ptr< Buffers::VolumeGridBuffer > &  volume,
Buffers::VolumeGridBuffer::FlowConfig &  config 
) const
inline

Fill unresolved refs of a flow config from the volume.

Parameters
volumeVolume being wired.
configFlow config, edited in place.

Velocity, pressure and divergence are always required, so an unnamed one is declared as "velocity", "pressure" and "divergence". Scratch is required only when viscosity is above zero. Carried and buoyancy refs carry the caller's own names and are declared only if the volume does not hold them.

Definition at line 144 of file Evolve.cpp.

147 {
148 config.velocity = resolve_vector(volume, config.velocity, "velocity");
149 config.pressure = resolve_scalar(volume, config.pressure, "pressure", false);
150 config.divergence = resolve_scalar(volume, config.divergence, "divergence", true);
151
152 if (config.viscosity > 0.0F) {
153 config.scratch = resolve_vector(volume, config.scratch, "scratch");
154 }
155
156 for (auto& carried : config.carried) {
157 carried.field = resolve_scalar(volume, carried.field, {}, false);
158 }
159
160 if (config.buoyancy) {
161 config.buoyancy->temperature = resolve_scalar(volume, config.buoyancy->temperature, {}, false);
162 config.buoyancy->density = resolve_scalar(volume, config.buoyancy->density, {}, false);
163 }
164 }

References MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::buoyancy, MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::carried, MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::divergence, MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::pressure, MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::scratch, MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::velocity, and MayaFlux::Buffers::VolumeGridBuffer::FlowConfig::viscosity.

Referenced by build_flow().

+ Here is the caller graph for this function: