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

◆ to_line_vertex()

Nodes::LineVertex MayaFlux::Kinesis::to_line_vertex ( const SampleResult s,
glm::vec2  thickness_range = { 1.0F, 2.0F } 
)
inlinenoexcept

Project SampleResult to LineVertex.

Parameters
sSource sample
thickness_rangeMin/max line thickness; scalar linearly interpolates within it
Returns
LineVertex with all fields populated from sample

Definition at line 133 of file VertexSampler.hpp.

135 { 1.0F, 2.0F }) noexcept
136{
137 return {
138 .position = s.position,
139 .color = s.color,
140 .thickness = glm::mix(thickness_range.x, thickness_range.y, s.scalar),
141 .uv = glm::vec2(0.0F),
142 .normal = s.normal,
143 .tangent = s.tangent,
144 };
145}
float scalar
Normalised scalar; maps to size (PointVertex) or thickness (LineVertex)

Referenced by to_line_vertices().

+ Here is the caller graph for this function: