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

◆ TopologyGeneratorNode() [2/2]

MayaFlux::Nodes::GpuSync::TopologyGeneratorNode::TopologyGeneratorNode ( CustomConnectionFunction  custom_func,
bool  auto_connect = true,
size_t  max_points = 256 
)

Create with custom connection function.

Parameters
custom_funcUser-provided topology generation
auto_connectAuto-regenerate flag
max_pointsMaximum capacity

Definition at line 55 of file TopologyGeneratorNode.cpp.

59 : GeometryWriterNode(static_cast<uint32_t>(max_points * max_points))
61 , m_custom_func(std::move(custom_func))
62 , m_max_points(max_points)
63 , m_auto_connect(auto_connect)
64{
66
67 const auto& stride = sizeof(LineVertex);
68 set_vertex_stride(stride);
69
70 auto layout = Kakshya::VertexLayout::for_lines(stride);
71 layout.vertex_count = 0;
72 set_vertex_layout(layout);
73
74 m_points.reserve(max_points);
75 m_vertices.reserve(max_points * max_points);
76 m_connections.reserve(max_points * max_points);
77
79 "Created TopologyGeneratorNode with custom function");
80}
#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< std::pair< size_t, size_t > > m_connections
std::vector< LineVertex > m_points
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_LIST, m_connections, m_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: