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

◆ process_batch()

void MayaFlux::Nodes::Network::MeshNetwork::process_batch ( unsigned int  num_samples)
overridevirtual

Process the network for the given number of samples.

Parameters
num_samplesNumber of samples/frames to process

Subclasses implement their specific processing logic:

  1. Update internal state (physics, relationships, etc.)
  2. Process individual nodes
  3. Apply inter-node interactions
  4. Aggregate outputs if needed

Called by NodeGraphManager during token processing.

Implements MayaFlux::Nodes::Network::NodeNetwork.

Definition at line 104 of file MeshNetwork.cpp.

105{
106 if (!is_enabled() || m_slots.empty())
107 return;
108
109 if (m_sort_dirty)
110 rebuild_sort();
111
112 for (unsigned int frame = 0; frame < num_samples; ++frame) {
113 if (m_operator) {
114 if (auto* mesh_op = dynamic_cast<MeshOperator*>(m_operator.get()))
115 mesh_op->set_slots(m_slots, m_sorted_indices);
116 m_operator->process(static_cast<float>(frame));
117 } else {
119 }
120
121 if (m_operator_chain) {
122 for (const auto& op : m_operator_chain->operators()) {
123 if (auto* mesh_op = dynamic_cast<MeshOperator*>(op.get()))
124 mesh_op->set_slots(m_slots, m_sorted_indices);
125 op->process(static_cast<float>(frame));
126 }
127 }
128 }
129
130 for (const auto& slot : m_slots) {
131 if (slot.node)
132 slot.node->compute_frame();
133 }
134}
std::vector< uint32_t > m_sorted_indices
Processing order: indices into m_slots, parents before children.
bool m_sort_dirty
Set when add_slot() changes the DAG and a re-sort is needed.
std::shared_ptr< NetworkOperator > m_operator
bool is_enabled() const
Check if network is enabled.
std::shared_ptr< OperatorChain > m_operator_chain

References MayaFlux::Nodes::Network::NodeNetwork::is_enabled(), m_operator, MayaFlux::Nodes::Network::NodeNetwork::m_operator_chain, m_slots, m_sort_dirty, m_sorted_indices, propagate_world_transforms(), and rebuild_sort().

+ Here is the call graph for this function: