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

◆ on_attach()

void MayaFlux::Buffers::LogicProcessor::on_attach ( const std::shared_ptr< Buffer > &  buffer)
overridevirtual

Called when the processor is attached to a buffer.

Parameters
bufferThe buffer this processor is being attached to

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 358 of file LogicProcessor.cpp.

359{
360 if (m_logic) {
361 m_logic->reset();
362 }
363
364 for (const auto& node : m_plane_nodes) {
365 node->reset();
366 }
367 m_previous_cells.clear();
368
369 m_last_held_value = 0.0;
370 m_last_logic_value = 0.0;
371}
std::vector< std::shared_ptr< Nodes::Generator::Logic > > m_plane_nodes
One clone of the node per bit plane.
double m_last_held_value
Last held value for HOLD_ON_FALSE and SAMPLE_AND_HOLD.
std::vector< uint8_t > m_previous_cells
Last automaton result, kept when memory is on.
std::shared_ptr< Nodes::Generator::Logic > m_logic
Logic node for processing.
double m_last_logic_value
Previous logic value for change detection.

References m_last_held_value, m_last_logic_value, m_logic, m_plane_nodes, and m_previous_cells.