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

◆ apply_vertex_colors()

std::vector< Nodes::LineVertex > MayaFlux::Kinesis::apply_vertex_colors ( const std::vector< glm::vec3 > &  positions,
const std::vector< glm::vec3 > &  colors,
float  default_thickness 
)

Convert positions to LineVertex with per-vertex colors.

Definition at line 634 of file GeometryPrimitives.cpp.

638{
639 if (positions.size() != colors.size()) {
640 return {};
641 }
642
643 std::vector<Nodes::LineVertex> vertices;
644 vertices.reserve(positions.size());
645
646 for (size_t i = 0; i < positions.size(); ++i) {
647 vertices.push_back({ .position = positions[i],
648 .color = colors[i],
649 .thickness = default_thickness });
650 }
651
652 return vertices;
653}

References apply_vertex_colors().

Referenced by apply_vertex_colors().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: