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

◆ add_points()

void MayaFlux::Nodes::GpuSync::TopologyGeneratorNode::add_points ( std::span< const LineVertex points)

Append several points, regenerating connections once.

Parameters
pointsPoints to append, oldest first.

add_point() regenerates the graph on every call when auto_connect is set, which for the cubic modes makes building a graph point by point cost one rebuild per point. This pays for one.

Definition at line 85 of file TopologyGeneratorNode.cpp.

86{
87 if (points.empty()) {
88 return;
89 }
90
91 for (const auto& pt : points) {
92 m_points.insert(m_points.begin(), pt);
93 if (m_points.size() > m_max_points) {
94 m_points.pop_back();
95 }
96 }
97
98 if (m_auto_connect) {
100 }
101
102 m_geometry_dirty = true;
103 m_vertex_data_dirty = true;
104}
std::vector< glm::vec2 > * points
bool m_vertex_data_dirty
Flag: vertex data or layout changed since last GPU upload.
void regenerate_topology()
Manually trigger connection regeneration.
std::vector< LineVertex > m_points
Points, newest first: index 0 is the most recently added.

References m_auto_connect, m_geometry_dirty, m_max_points, m_points, MayaFlux::Nodes::GpuSync::GeometryWriterNode::m_vertex_data_dirty, points, and regenerate_topology().

+ Here is the call graph for this function: