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

◆ PathGeneratorNode() [2/2]

MayaFlux::Nodes::GpuSync::PathGeneratorNode::PathGeneratorNode ( CustomPathFunction  custom_func,
Eigen::Index  samples_per_segment = 32,
size_t  max_control_points = 64 
)

Create path generator with custom interpolation function.

Parameters
custom_funcUser-provided interpolation function
samples_per_segmentVertices per segment
max_control_pointsMaximum control points in history

Definition at line 80 of file PathGeneratorNode.cpp.

84 : GeometryWriterNode(static_cast<uint32_t>(samples_per_segment * 10))
86 , m_custom_func(std::move(custom_func))
87 , m_control_points(max_control_points)
88 , m_samples_per_segment(samples_per_segment)
89 , m_tension(0.5)
90{
91 const auto& stride = sizeof(LineVertex);
92 set_vertex_stride(stride);
93
94 auto layout = Kakshya::VertexLayout::for_lines(stride);
95 layout.vertex_count = 0;
96 set_vertex_layout(layout);
97
98 m_vertices.reserve(samples_per_segment * max_control_points);
99
101 "Created PathGeneratorNode with custom function");
102}
#define MF_DEBUG(comp, ctx,...)
GeometryWriterNode(uint32_t initial_capacity=1024)
Constructor.
void set_vertex_layout(const Kakshya::VertexLayout &layout)
Set cached vertex layout.
void set_vertex_stride(size_t stride)
Set vertex stride (bytes per vertex)
Memory::HistoryBuffer< LineVertex > m_control_points
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
static VertexLayout for_lines(uint32_t stride=36)
Factory: Create layout for line primitives (position, color, thickness)

References MayaFlux::Kakshya::VertexLayout::for_lines(), m_vertices, MF_DEBUG, MayaFlux::Journal::NodeProcessing, MayaFlux::Journal::Nodes, MayaFlux::Nodes::GpuSync::GeometryWriterNode::set_vertex_layout(), and MayaFlux::Nodes::GpuSync::GeometryWriterNode::set_vertex_stride().

+ Here is the call graph for this function: