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

Owning CPU-side representation of a loaded or generated mesh. More...

#include <MeshData.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::MeshData:

Public Member Functions

std::optional< MeshAccessaccess () const
 Produce a non-owning MeshAccess view over this data.
 
uint32_t face_count () const noexcept
 Number of triangles (index count / 3).
 
bool is_valid () const noexcept
 True when both variants are non-empty and layout stride is set.
 
uint32_t vertex_count () const noexcept
 Number of vertices derived from vertex byte count and layout stride.
 

Static Public Member Functions

static MeshData empty ()
 Construct an empty MeshData with the canonical 60-byte mesh layout.
 

Public Attributes

DataVariant index_variant
 vector<uint32_t>: triangle index list
 
VertexLayout layout
 
std::optional< RegionGroupsubmeshes
 
DataVariant vertex_variant
 vector<uint8_t>: interleaved vertex bytes
 

Detailed Description

Owning CPU-side representation of a loaded or generated mesh.

MeshData is the named owner of the two DataVariant streams that a mesh consists of: interleaved vertex bytes (vector<uint8_t>) and a flat uint32_t index array (vector<uint32_t>). It is the handoff type between IO (ModelReader) and GPU (MeshBuffer), and the input type for any future mesh container (procedural, Yantra-generated, or deformed).

Relationship to the accessor layer:

Submesh structure follows the established Region convention: a single RegionGroup named "submeshes" holds one Region per submesh, each carrying index_start, index_count, vertex_offset, name, and material_name as attributes.

MeshData is not a container. It has no processing state, no read head, no processor chain. For per-cycle mesh mutation use MeshWriterNode. For offline or procedural generation feeding into MeshBuffer, construct a MeshData and pass it in.

Definition at line 33 of file MeshData.hpp.


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