MayaFlux 0.4.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; scalar linearly interpolates within it
Returns
PointVertex with all fields populated from sample

Definition at line 113 of file VertexSampler.hpp.

115 { 8.0F, 12.0F }) noexcept
116{
117 return {
118 .position = s.position,
119 .color = s.color,
120 .size = glm::mix(size_range.x, size_range.y, s.scalar),
121 .uv = glm::vec2(0.0F),
122 .normal = s.normal,
123 .tangent = s.tangent,
124 };
125}
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: