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

◆ to_line_vertex()

LineVertex MayaFlux::Kakshya::to_line_vertex ( const Vertex s,
glm::vec2  thickness_range = { 1.0F, 2.0F } 
)
inlinenoexcept

Project raw Vertex to LineVertex.

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

Definition at line 202 of file VertexFormats.hpp.

204 { 1.0F, 2.0F }) noexcept
205{
206 return {
207 .position = s.position,
208 .color = s.color,
209 .thickness = glm::mix(thickness_range.x, thickness_range.y, s.scalar),
210 .uv = glm::vec2(0.0F),
211 .normal = s.normal,
212 .tangent = s.tangent,
213 };
214}
float scalar
Normalised scalar; maps to size / thickness / weight at offset 24.

Referenced by to_line_vertices().

+ Here is the caller graph for this function: