MayaFlux 0.5.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 81 of file PathGeneratorNode.cpp.

85 : GeometryWriterNode(static_cast<uint32_t>(samples_per_segment * 10))
87 , m_custom_func(std::move(custom_func))
88 , m_max_control_points(max_control_points)
89 , m_samples_per_segment(samples_per_segment)
90 , m_tension(0.5)
91{
92 const auto& stride = sizeof(LineVertex);
93 set_vertex_stride(stride);
94
95 auto layout = Kakshya::VertexLayout::for_lines(stride);
96 layout.vertex_count = 0;
97 set_vertex_layout(layout);
98
99 m_control_points.reserve(max_control_points);
100 m_vertices.reserve(samples_per_segment * max_control_points);
101
103 "Created PathGeneratorNode with custom function");
104}
#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)
std::vector< LineVertex > m_control_points
Control points, newest first: index 0 is the most recently added.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
Kakshya::LineVertex LineVertex
Definition VertexSpec.hpp:8
static VertexLayout for_lines(uint32_t stride=60)
Factory: layout for LineVertex (position, color, thickness, uv, normal, tangent)

References MayaFlux::Kakshya::VertexLayout::for_lines(), m_control_points, 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: