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

◆ generate_custom_path()

void MayaFlux::Nodes::GpuSync::PathGeneratorNode::generate_custom_path ( )
private

Definition at line 450 of file PathGeneratorNode.cpp.

451{
452 const size_t num_points = m_control_points.size();
453 size_t total_samples = m_samples_per_segment * (num_points - 1);
454
455 m_vertices.resize(total_samples);
456
457 for (Eigen::Index i = 0; i < total_samples; ++i) {
458 double t = static_cast<double>(i) / static_cast<double>(total_samples - 1);
459
460 auto ctrl_idx = std::min<size_t>(static_cast<size_t>(t * float(num_points - 1)), num_points - 1);
461 glm::vec3 color = m_force_uniform_color ? m_current_color : m_control_points[ctrl_idx].color;
462 float thickness = m_force_uniform_thickness ? m_current_thickness : m_control_points[ctrl_idx].thickness;
463
466 .color = color,
467 .thickness = thickness
468 };
469 }
470}
glm::vec3 color
Definition Decoder.cpp:97
std::vector< LineVertex > m_control_points
Control points, newest first: index 0 is the most recently added.
Kakshya::LineVertex LineVertex
Definition VertexSpec.hpp:9

References color, m_control_points, m_current_color, m_current_thickness, m_custom_func, m_force_uniform_color, m_force_uniform_thickness, m_samples_per_segment, m_vertices, and MayaFlux::Kakshya::LineVertex::position.

Referenced by generate_path_vertices().

+ Here is the caller graph for this function: