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

◆ set_influence()

template<typename T >
void MayaFlux::Nexus::Emitter::set_influence ( typename Influence< T >::Producer  producer,
typename Influence< T >::Target  target 
)
inline

Set the one target of an influence of any type.

Template Parameters
TType the producer returns; whatever the target takes.
Parameters
producerBuilds the value from the influence context.
targetTakes the value and decides what it affects.

An Emitter has a single target: setting another replaces it. Runs on every invoke after the influence function, independent of the render processor target. Not part of encoded state.

Definition at line 242 of file Emitter.hpp.

243 {
244 auto influence = std::make_shared<Influence<T>>(std::move(producer));
245 influence->add_target(std::move(target));
246 m_influence = [influence](const InfluenceContext& ctx) { influence->invoke(ctx); };
247 }