|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::optional< VertexAccess > MayaFlux::Kakshya::as_point_vertex_access | ( | const DataVariant & | variant, |
| const VertexAccessConfig & | config = {} |
||
| ) |
Convert DataVariant to point-vertex-compatible bytes.
Output layout matches VertexLayout::for_points(): stride 28, position (vec3, offset 0), color (vec3, offset 12), size (float, offset 24), uv (vec2, offset 28), normal (vec3, offset 36), tangent (vec3, offset 48). Compatible with point.vert.spv without any user-defined shaders.
All accepted DataVariant types produce a position per element: GLM types map position directly; scalar and integer types produce a waveform (x=normalised index, y=value, z=0). Color and size are filled from config defaults throughout.
| variant | Source data. |
| config | Default attribute values (color, size). |
Definition at line 302 of file VertexAccess.cpp.
References MayaFlux::Kakshya::VertexAccess::byte_count, MayaFlux::Kakshya::VertexAccess::conversion_buffer, count, MayaFlux::Kakshya::VertexAccess::data_ptr, MayaFlux::Kakshya::VertexLayout::for_points(), MayaFlux::Journal::Kakshya, MayaFlux::Kakshya::VertexAccess::layout, MF_ERROR, MayaFlux::Journal::Runtime, and MayaFlux::Kakshya::VertexLayout::vertex_count.
Referenced by MayaFlux::Buffers::GeometryWriteProcessor::processing_function().
Here is the call graph for this function:
Here is the caller graph for this function: