MayaFlux 1.0.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 35 of file PathGeneratorNode.cpp.

39 : GeometryWriterNode(static_cast<uint32_t>(samples_per_segment * 10))
41 , m_custom_func(std::move(custom_func))
42 , m_max_control_points(max_control_points)
43 , m_samples_per_segment(samples_per_segment)
44 , m_tension(0.5)
45{
47
48 const auto& stride = sizeof(LineVertex);
49 set_vertex_stride(stride);
50
51 auto layout = Kakshya::VertexLayout::for_lines(stride);
52 layout.vertex_count = 0;
53 set_vertex_layout(layout);
54
55 m_control_points.reserve(max_control_points);
56 m_vertices.reserve(samples_per_segment * max_control_points);
57
59 "Created PathGeneratorNode with custom function");
60}
#define MF_DEBUG(comp, ctx,...)
GeometryWriterNode(uint32_t initial_capacity=1024)
Constructor.
Portal::Graphics::PrimitiveTopology m_primitive_topology
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:9
static VertexLayout for_lines(uint32_t stride=60)
Factory: layout for LineVertex (position, color, thickness, uv, normal, tangent)

References MayaFlux::Kakshya::VertexLayout::for_lines(), MayaFlux::Portal::Graphics::LINE_STRIP, m_control_points, MayaFlux::Nodes::GpuSync::GeometryWriterNode::m_primitive_topology, 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: