MayaFlux 0.4.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 644 of file GeometryPrimitives.cpp.

648{
649 if (positions.size() != colors.size()) {
650 return {};
651 }
652
653 std::vector<Nodes::LineVertex> vertices;
654 vertices.reserve(positions.size());
655
656 for (size_t i = 0; i < positions.size(); ++i) {
657 vertices.push_back({ .position = positions[i],
658 .color = colors[i],
659 .thickness = default_thickness });
660 }
661
662 return vertices;
663}

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: