183{
184 if (!op) {
186 "Cannot set null operator");
187 return;
188 }
189
191 const char* new_name = op->get_type_name().data();
192
194 "Switching operator: '{}' → '{}'",
195 old_name, new_name);
196
197 std::vector<PointVertex> vertices;
198
199 if (
auto* old_graphics =
dynamic_cast<PhysicsOperator*
>(
m_operator.get())) {
200 vertices = old_graphics->extract_vertices();
201
203 "Extracted {} vertices from old operator",
204 vertices.size());
205 }
else if (
auto* old_field =
dynamic_cast<FieldOperator*
>(
m_operator.get())) {
206 vertices = old_field->extract_point_vertices();
207
209 "Extracted {} vertices from old FieldOperator",
210 vertices.size());
213 }
214
215 if (auto* new_graphics = dynamic_cast<PhysicsOperator*>(op.get())) {
216 new_graphics->initialize(vertices);
217
218 if (auto* physics = dynamic_cast<PhysicsOperator*>(op.get())) {
220 }
221
223 "Initialized new graphics operator with {} points",
224 vertices.size());
225 }
226
227 if (auto* new_field = dynamic_cast<FieldOperator*>(op.get())) {
228 new_field->initialize(vertices);
229
231 "Initialized new FieldOperator with {} points",
232 vertices.size());
233 }
234
236
237 if (
auto* physics =
dynamic_cast<PhysicsOperator*
>(
m_operator.get())) {
239 physics->enable_spatial_interactions(should_interact);
240 }
241
243 "Operator switched successfully to '{}'", new_name);
244}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
Topology get_topology() const
Get the current topology.
Kinesis::SamplerBounds m_bounds
std::vector< PointVertex > generate_initial_vertices()
std::unique_ptr< NetworkOperator > m_operator
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
@ SPATIAL
Dynamic proximity-based (nodes within radius interact)