MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::VertexAccess Struct Reference

Memory-compatible view of channel data assembled into full 60-byte vertices. More...

#include <VertexAccess.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::VertexAccess:

Public Member Functions

bool was_converted () const noexcept
 True when data_ptr points into conversion_buffer rather than the original variant storage.
 

Public Attributes

size_t byte_count = 0
 
std::vector< std::byte > conversion_buffer
 Conversion buffer.
 
const void * data_ptr = nullptr
 
VertexLayout layout
 

Detailed Description

Memory-compatible view of channel data assembled into full 60-byte vertices.

Mirrors TextureAccess: describes what the data IS in memory terms — pointer, byte count, and a VertexLayout — with no knowledge of Vulkan, Portal, or concrete vertex structs (PointVertex, LineVertex, MeshVertex).

A vertex is always the canonical 60-byte record: position (vec3, 12) | color (vec3, 12) | scalar (float, 4) | uv (vec2, 8) | normal (vec3, 12) | tangent (vec3, 12)

Zero-copy path: single vector<uint8_t> channel of N*60 bytes. data_ptr points directly into variant storage; conversion_buffer is empty.

Assembly path: one or more typed channels supplied in canonical field order. Slot 0 = position (vec3), slot 1 = color (vec3), slot 2 = scalar (float), slot 3 = uv (vec2), slot 4 = normal (vec3), slot 5 = tangent (vec3). Missing trailing slots are filled from VertexAccessConfig defaults. Assembled bytes are held in conversion_buffer; data_ptr points into it.

Source element size is taken from the supplied variant type. A vec4 color channel (16 bytes) copies 12 bytes into the color field; the alpha is discarded. A float scalar channel (4 bytes) maps exactly. Oversized elements are truncated; undersized elements are zero-padded within the field.

Definition at line 48 of file VertexAccess.hpp.


The documentation for this struct was generated from the following file: