MayaFlux 1.0.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 705 of file GeometryPrimitives.cpp.

709{
710 if (positions.size() != colors.size()) {
711 return {};
712 }
713
714 std::vector<Kakshya::Vertex> vertices;
715 vertices.reserve(positions.size());
716
717 for (size_t i = 0; i < positions.size(); ++i) {
718 vertices.push_back({ .position = positions[i],
719 .color = colors[i],
720 .scalar = scalar });
721 }
722
723 return vertices;
724}
uint32_t scalar
std::vector< glm::vec3 > positions

References apply_vertex_colors(), positions, and scalar.

Referenced by apply_vertex_colors().

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