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

◆ update_control_point()

void MayaFlux::Nodes::GpuSync::PathGeneratorNode::update_control_point ( size_t  index,
const LineVertex &  vertex 
)

Update specific control point with full LineVertex data.

Parameters
indexControl point index (0 = newest)
vertexNew LineVertex data

Definition at line 270 of file PathGeneratorNode.cpp.

271{
272 if (index >= m_control_points.size()) {
274 "Control point index {} out of range (count: {})",
275 index, m_control_points.size());
276 return;
277 }
278
279 m_control_points[index] = vertex;
280
281 const bool windowed = m_mode != Kinesis::InterpolationMode::LINEAR
283 && m_control_points.size() >= 4;
284
285 if (windowed) {
286 const size_t windows = m_control_points.size() - 3;
287 const size_t first = index >= 3 ? index - 3 : 0;
288 const size_t last = std::min(index, windows - 1);
289
291 m_dirty_segment_start = first;
292 m_dirty_segment_end = last;
293 } else {
296 }
297 } else {
300 }
301
302 m_geometry_dirty = true;
303 m_path_dirty = true;
304}
#define MF_ERROR(comp, ctx,...)
uint32_t index
Definition VKDevice.cpp:122
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.

References MayaFlux::Kinesis::CUSTOM, index, INVALID_SEGMENT, MayaFlux::Kinesis::LINEAR, m_control_points, m_dirty_segment_end, m_dirty_segment_start, m_geometry_dirty, m_mode, m_path_dirty, MF_ERROR, MayaFlux::Journal::NodeProcessing, and MayaFlux::Journal::Nodes.