MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
AssemblyNetwork.cpp
Go to the documentation of this file.
1#include "AssemblyNetwork.hpp"
3
5
7 : m_operator(std::make_unique<AssemblyOperator>())
8{
11 m_operator_chain = std::make_shared<OperatorChain>();
12
14 "Created empty AssemblyNetwork");
15}
16
17void AssemblyNetwork::process_batch(unsigned int num_samples)
18{
19 if (!is_enabled() || !m_operator) {
20 return;
21 }
22
23 for (unsigned int frame = 0; frame < num_samples; ++frame) {
24 m_operator->process(0.0F);
25 }
26
27 if (m_operator_chain && !m_operator_chain->empty()) {
28 for (unsigned int frame = 0; frame < num_samples; ++frame) {
29 m_operator_chain->process(0.0F, m_operator.get());
30 }
31 }
32}
33
35{
36 return m_operator ? m_operator->item_count() : 0;
37}
38
39} // namespace MayaFlux::Nodes::Network
#define MF_INFO(comp, ctx,...)
std::unique_ptr< AssemblyOperator > m_operator
void process_batch(unsigned int num_samples) override
Process the network for the given number of samples.
size_t get_node_count() const override
Get the number of nodes in the network.
Holds an unordered set of independent geometry items, rendered as one milled draw.
virtual void set_topology(Topology topology)
Set the network's topology.
bool is_enabled() const
Check if network is enabled.
std::shared_ptr< OperatorChain > m_operator_chain
void set_output_mode(OutputMode mode)
Set the network's output routing mode.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
@ INDEPENDENT
No connections, nodes process independently.
@ GRAPHICS_BIND
State available for visualization (read-only)