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

Non-owning read view over a pair of DataVariant streams representing interleaved vertex bytes and a flat uint32_t index array. More...

#include <MeshAccess.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::MeshAccess:

Public Member Functions

uint32_t face_count () const noexcept
 Number of triangles (index_count / 3).
 
bool has_submeshes () const noexcept
 True when submesh region data is present.
 
std::span< const uint32_t > indices () const noexcept
 Span over the raw index array.
 
bool is_valid () const noexcept
 True when both vertex and index data are non-empty.
 
uint32_t vertex_count () const noexcept
 Number of vertices derived from vertex_bytes and layout stride.
 
std::span< const std::byte > vertices () const noexcept
 Span over the raw vertex bytes.
 

Public Attributes

uint32_t index_count = 0
 
const uint32_t * index_ptr = nullptr
 
VertexLayout layout
 
std::optional< RegionGroupsubmeshes
 
size_t vertex_bytes = 0
 
const void * vertex_ptr = nullptr
 

Detailed Description

Non-owning read view over a pair of DataVariant streams representing interleaved vertex bytes and a flat uint32_t index array.

Parallel to VertexAccess and TextureAccess: describes what the data IS in memory terms with no knowledge of Vulkan, Portal, or concrete vertex structs (MeshVertex). The layout field carries full semantic description via VertexLayout::for_meshes(), including stride and attribute offsets.

Ownership contract: the two DataVariant instances and the optional RegionGroup must outlive this struct. MeshAccess holds raw pointers and spans into their storage.

Zero-copy: both vertex_ptr and index_ptr point directly into the storage of their respective DataVariant. No conversion buffer is needed because MeshInsertion always writes the canonical 60-byte interleaved format before producing a MeshAccess.

Submesh structure: when the source file contains multiple meshes, submeshes holds a RegionGroup named "submeshes". Each Region maps to one MeshSubrange and carries name, material_name, and vertex_offset as attributes. Single-mesh files leave submeshes as nullopt; the entire index buffer is one contiguous range.

Definition at line 60 of file MeshAccess.hpp.


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