MayaFlux 1.0.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 677 of file Logic.cpp.

678{
679 auto view = history_linearized_view();
680
681 if (m_gpu_compatible) {
690
692 for (size_t i = 0; i < m_history_count; ++i)
693 m_context_gpu.gpu_float_buffer[i] = m_history_linear[i] ? 1.0F : 0.0F;
694
695 m_context_gpu.m_gpu_data = std::span<const float>(m_context_gpu.gpu_float_buffer);
696 } else {
700 m_context.m_history = view;
705 }
706}
glm::vec3 value
std::span< bool > m_history
History of boolean states.
Definition Logic.hpp:121
LogicMode m_mode
Current computational model.
Definition Logic.hpp:119
LogicOperator m_operator
Current boolean operator.
Definition Logic.hpp:120
const std::vector< double > * m_coefficients
The node's coefficient array, set by the node each tick.
Definition Logic.hpp:127
EdgeType m_edge_type
Type of transition being monitored.
Definition Logic.hpp:124
bool m_edge_detected
Whether a state transition was detected.
Definition Logic.hpp:123
double m_threshold
Decision boundary for binary quantization.
Definition Logic.hpp:122
std::vector< uint8_t > m_history_linear
Linear view of history for easy access.
Definition Logic.hpp:717
EdgeType m_edge_type
Type of edge to detect.
Definition Logic.hpp:707
double m_threshold
Threshold for boolean conversion.
Definition Logic.hpp:704
std::vector< double > m_coefficients
Coefficient array handed to coefficient-aware functions.
Definition Logic.hpp:718
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:695
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:708
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:701
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:694
std::span< bool > history_linearized_view()
Definition Logic.cpp:831
std::span< const float > m_gpu_data
double value
Current sample value.
Definition Node.hpp:63
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:450

References MayaFlux::Nodes::Generator::LogicContextGpu::gpu_float_buffer, history_linearized_view(), MayaFlux::Nodes::Generator::LogicContext::m_coefficients, m_coefficients, 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::GpuVectorData::m_gpu_data, MayaFlux::Nodes::Generator::LogicContext::m_history, m_history_count, m_history_linear, MayaFlux::Nodes::Generator::LogicContext::m_mode, m_mode, MayaFlux::Nodes::Generator::LogicContext::m_operator, m_operator, MayaFlux::Nodes::Generator::LogicContext::m_threshold, m_threshold, value, 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: