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

◆ to_mesh_vertex()

Nodes::MeshVertex MayaFlux::Kinesis::to_mesh_vertex ( const SampleResult s,
glm::vec2  weight_range = { 0.0F, 1.0F } 
)
inlinenoexcept

Project SampleResult to MeshVertex.

Parameters
sSource sample
Returns
MeshVertex with all fields populated from sample

MeshVertex doesn't have a size/thickness field, so scalar is passed through as weight for potential use in shader-based deformation or other effects.

Definition at line 155 of file VertexSampler.hpp.

157 { 0.0F, 1.0F }) noexcept
158{
159 return {
160 .position = s.position,
161 .color = s.color,
162 .weight = glm::mix(weight_range.x, weight_range.y, s.scalar),
163 .uv = glm::vec2(0.0F),
164 .normal = s.normal,
165 .tangent = s.tangent,
166 };
167}
float scalar
Normalised scalar; maps to size (PointVertex) or thickness (LineVertex)

Referenced by to_mesh_vertices().

+ Here is the caller graph for this function: