Class Mesh

Class Hierarchy

Mesh stores the geometry data for rendering Model3D nodes. A mesh has one or more clusters. Each cluster has material and primitives. Primitives are typically triangles stored as vertex data and index data.

You can load a mesh resource from a kzb file or use the Mesh::create() function to create a mesh.

After you create a Mesh with the constructor, Kanzi uploads all primitive data to GPU memory instead of storing the data in CPU memory in the Mesh.

To upload data to a mesh's buffers, prefer to upload via kzgfx commands or the CommandRecorder. To map these buffers, use the Mesh::CreateInfo::cpuAccessFlag property to set their access to gfx::AccessFlag::Write and call gfx::mapBuffer().

See also
Since Kanzi 4.1.0 removed Mesh::mapVertexData, Mesh::mapIndexData, Mesh::mapInstanceData, and Mesh::MappedBuffer.

Inherits properties and message types from MeshMetadata.