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

◆ apply_vertex_colors()

MAYAFLUX_API std::vector< Kakshya::Vertex > MayaFlux::Kinesis::apply_vertex_colors ( const std::vector< glm::vec3 > &  positions,
const std::vector< glm::vec3 > &  colors,
float  scalar 
)

Convert positions to LineVertex with per-vertex colors.

Definition at line 645 of file GeometryPrimitives.cpp.

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

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: