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

◆ update_context()

void MayaFlux::Nodes::Generator::Logic::update_context ( double  value)
overrideprotectedvirtual

Updates the context with the latest sample value.

Parameters
valueThe current generated sample

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

Definition at line 478 of file Logic.cpp.

479{
480 auto view = history_linearized_view();
481
482 if (m_gpu_compatible) {
483 m_context_gpu.value = value;
490 } else {
491 m_context.value = value;
494 m_context.m_history = view;
498 }
499}
std::span< bool > m_history
History of boolean states.
Definition Logic.hpp:109
LogicMode m_mode
Current computational model.
Definition Logic.hpp:107
LogicOperator m_operator
Current boolean operator.
Definition Logic.hpp:108
EdgeType m_edge_type
Type of transition being monitored.
Definition Logic.hpp:112
bool m_edge_detected
Whether a state transition was detected.
Definition Logic.hpp:111
double m_threshold
Decision boundary for binary quantization.
Definition Logic.hpp:110
EdgeType m_edge_type
Type of edge to detect.
Definition Logic.hpp:579
double m_threshold
Threshold for boolean conversion.
Definition Logic.hpp:576
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:567
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:580
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:566
std::span< bool > history_linearized_view()
Definition Logic.cpp:636
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 history_linearized_view(), m_context, m_context_gpu, MayaFlux::Nodes::Generator::LogicContext::m_edge_detected, m_edge_detected, MayaFlux::Nodes::Generator::LogicContext::m_edge_type, m_edge_type, MayaFlux::Nodes::Node::m_gpu_compatible, MayaFlux::Nodes::Generator::LogicContext::m_history, MayaFlux::Nodes::Generator::LogicContext::m_mode, m_mode, MayaFlux::Nodes::Generator::LogicContext::m_operator, m_operator, MayaFlux::Nodes::Generator::LogicContext::m_threshold, m_threshold, 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: