Skip to main content

gltforge_unity_core/
unity_submesh.rs

1use crate::unity_indices::UnityIndices;
2
3/// A single glTF primitive converted to a Unity sub-mesh.
4/// Indices are pre-offset to reference the shared vertex array on [`crate::unity_mesh::UnityMesh`].
5pub struct UnitySubMesh {
6    /// Triangle indices with winding order reversed for Unity's left-handed convention.
7    /// Absolute offsets into the parent [`UnityMesh::vertices`] array.
8    pub indices: UnityIndices,
9
10    /// The glTF material index for this sub-mesh, if the primitive referenced one.
11    pub material_index: Option<u32>,
12}