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

◆ add_path()

void MayaFlux::Nodes::Network::PathOperator::add_path ( const std::vector< LineVertex > &  control_vertices,
Kinesis::InterpolationMode  mode 
)

Add a new path with given control points and properties.

Parameters
control_pointsVector of control points for the path.
modeInterpolation mode for the path.

Definition at line 57 of file PathOperator.cpp.

60{
61 if (control_vertices.empty()) {
63 "Cannot add path with zero control vertices");
64 return;
65 }
66
67 auto path = std::make_shared<GpuSync::PathGeneratorNode>(
68 mode,
70 1024);
71
72 path->set_control_points(control_vertices);
73 path->set_path_thickness(m_default_thickness);
74 path->compute_frame();
75
76 m_paths.push_back(std::move(path));
77
79 "Added path #{} with {} control vertices, {} generated vertices",
80 m_paths.size(), control_vertices.size(),
81 m_paths.back()->get_generated_vertex_count());
82}
#define MF_WARN(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::vector< std::shared_ptr< GpuSync::PathGeneratorNode > > m_paths
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.

References m_default_samples_per_segment, m_default_thickness, m_paths, MF_DEBUG, MF_WARN, MayaFlux::Journal::NodeProcessing, and MayaFlux::Journal::Nodes.

Referenced by initialize(), and initialize_paths().

+ Here is the caller graph for this function: