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

◆ to_point_vertex()

Nodes::PointVertex MayaFlux::Kinesis::to_point_vertex ( const SampleResult s,
glm::vec2  size_range = { 8.0F, 12.0F } 
)
inlinenoexcept

Project SampleResult to PointVertex.

Parameters
sSource sample
size_rangeMin/max point size range; scalar linearly interpolates within it
Returns
PointVertex with position, color, and size derived from sample

Definition at line 108 of file VertexSampler.hpp.

110 { 8.0F, 12.0F }) noexcept
111{
112 return {
113 .position = s.position,
114 .color = s.color,
115 .size = glm::mix(size_range.x, size_range.y, s.scalar)
116 };
117}
float scalar
Normalised scalar; maps to size (PointVertex) or thickness (LineVertex)

Referenced by MayaFlux::Nodes::Network::ParticleNetwork::generate_single_vertex(), and to_point_vertices().

+ Here is the caller graph for this function: