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

◆ to_mesh_vertex()

MeshVertex MayaFlux::Kakshya::to_mesh_vertex ( const Vertex s,
glm::vec2  weight_range = { 0.0F, 1.0F } 
)
inlinenoexcept

Project raw Vertex to MeshVertex.

Parameters
sSource vertex
Returns
MeshVertex with all fields populated from vertex

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 224 of file VertexFormats.hpp.

226 { 0.0F, 1.0F }) noexcept
227{
228 return {
229 .position = s.position,
230 .color = s.color,
231 .weight = glm::mix(weight_range.x, weight_range.y, s.scalar),
232 .uv = glm::vec2(0.0F),
233 .normal = s.normal,
234 .tangent = s.tangent,
235 };
236}
float scalar
Normalised scalar; maps to size / thickness / weight at offset 24.

Referenced by to_mesh_vertices().

+ Here is the caller graph for this function: