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

◆ update_context()

void MayaFlux::Nodes::Generator::Stochastics::Random::update_context ( double  value)
overrideprotectedvirtual

Updates the context object with the current node state.

Parameters
valueThe current sample value

This method is responsible for updating the NodeContext object with the latest state information from the node. It is called internally whenever a new output value is produced, ensuring that the context reflects the current state of the node for use in callbacks.

Reimplemented from MayaFlux::Nodes::Generator::Generator.

Definition at line 128 of file Stochastic.cpp.

129{
130 if (m_gpu_compatible) {
131 m_context_gpu.value = value;
137 } else {
138 m_context.value = value;
144 }
145}
double m_amplitude
Base amplitude of the generator.
Utils::distribution m_type
Current probability distribution algorithm.
double m_normal_spread
Variance parameter for normal distribution.
double m_current_start
Lower bound of the current output range.
double m_current_end
Upper bound of the current output range.
Utils::distribution distribution_type
Current distribution type.
double normal_spread
Current variance parameter for normal distribution.
double amplitude
Current amplitude scaling factor.
double range_start
Current lower bound of the range.
double range_end
Current upper bound of the range.
double value
Current sample value.
Definition Node.hpp:40
bool m_gpu_compatible
Flag indicating if the node supports GPU processing This flag is set by derived classes to indicate w...
Definition Node.hpp:383

References MayaFlux::Nodes::Generator::Stochastics::StochasticContext::amplitude, MayaFlux::Nodes::Generator::Stochastics::StochasticContext::distribution_type, MayaFlux::Nodes::Generator::Generator::m_amplitude, m_context, m_context_gpu, m_current_end, m_current_start, MayaFlux::Nodes::Node::m_gpu_compatible, m_normal_spread, m_type, MayaFlux::Nodes::Generator::Stochastics::StochasticContext::normal_spread, MayaFlux::Nodes::Generator::Stochastics::StochasticContext::range_end, MayaFlux::Nodes::Generator::Stochastics::StochasticContext::range_start, and MayaFlux::Nodes::NodeContext::value.

Referenced by notify_tick().

+ Here is the caller graph for this function: