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

◆ to_point_vertex()

PointVertex MayaFlux::Kakshya::to_point_vertex ( const Vertex s,
glm::vec2  size_range = { 8.0F, 12.0F } 
)
inlinenoexcept

Project raw Vertex to PointVertex.

Parameters
sSource vertex
size_rangeMin/max point size; scalar linearly interpolates within it
Returns
PointVertex with all fields populated from vertex

Definition at line 182 of file VertexFormats.hpp.

184 { 8.0F, 12.0F }) noexcept
185{
186 return {
187 .position = s.position,
188 .color = s.color,
189 .size = glm::mix(size_range.x, size_range.y, s.scalar),
190 .uv = glm::vec2(0.0F),
191 .normal = s.normal,
192 .tangent = s.tangent,
193 };
194}
float scalar
Normalised scalar; maps to size / thickness / weight at offset 24.

Referenced by MayaFlux::Nodes::Network::ParticleNetwork::generate_single_vertex(), and to_point_vertices().

+ Here is the caller graph for this function: