MayaFlux 0.5.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 32 of file TopologyGeneratorNode.cpp.

36 : GeometryWriterNode(static_cast<uint32_t>(max_points * max_points))
38 , m_custom_func(std::move(custom_func))
39 , m_max_points(max_points)
40 , m_auto_connect(auto_connect)
41{
42 const auto& stride = sizeof(LineVertex);
43 set_vertex_stride(stride);
44
45 auto layout = Kakshya::VertexLayout::for_lines(stride);
46 layout.vertex_count = 0;
47 set_vertex_layout(layout);
48
49 m_points.reserve(max_points);
50 m_vertices.reserve(max_points * max_points);
51 m_connections.reserve(max_points * max_points);
52
54 "Created TopologyGeneratorNode with custom function");
55}
#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< 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: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_connections, m_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: