MayaFlux 1.0.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 110 of file TopologyGeneratorNode.cpp.

111{
112 if (points.empty()) {
113 return;
114 }
115
116 for (const auto& pt : points) {
117 m_points.insert(m_points.begin(), pt);
118 if (m_points.size() > m_max_points) {
119 m_points.pop_back();
120 }
121 }
122
123 if (m_auto_connect) {
125 }
126
127 m_geometry_dirty = true;
128 m_vertex_data_dirty = true;
129}
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: