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

◆ update_context()

void MayaFlux::Nodes::Generator::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 53 of file Nodes/Generators/Random.cpp.

54{
57 }
58
59 if (m_gpu_compatible) {
60 m_context_gpu.value = value;
66 } else {
67 m_context.value = value;
73 }
74}
Algorithm get_algorithm() const
Gets current algorithm.
double m_amplitude
Base amplitude of the generator.
double normal_spread
Current variance parameter for normal distribution.
double amplitude
Current amplitude scaling factor.
double range_end
Current upper bound of the range.
double range_start
Current lower bound of the range.
Kinesis::Stochastic::Algorithm distribution_type
Current distribution type.
Kinesis::Stochastic::Stochastic m_generator
Core stochastic generator instance.
double m_normal_spread
Variance parameter for normal distribution.
Kinesis::Stochastic::Algorithm m_type
Current probability distribution algorithm.
double m_current_start
Lower bound of the current output range.
double m_current_end
Upper bound of the current output 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:386

References MayaFlux::Nodes::Generator::RandomContext::amplitude, MayaFlux::Nodes::Generator::RandomContext::distribution_type, MayaFlux::Kinesis::Stochastic::Stochastic::get_algorithm(), MayaFlux::Nodes::Generator::Generator::m_amplitude, m_context, m_context_gpu, m_current_end, m_current_start, m_generator, MayaFlux::Nodes::Node::m_gpu_compatible, m_normal_spread, m_type, MayaFlux::Nodes::Generator::RandomContext::normal_spread, MayaFlux::Nodes::Generator::RandomContext::range_end, MayaFlux::Nodes::Generator::RandomContext::range_start, and MayaFlux::Nodes::NodeContext::value.

Referenced by notify_tick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: