pub struct MeshData {
pub name: Option<String>,
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub uvs: Vec<Vec<[f32; 2]>>,
pub submeshes: Vec<SubmeshData>,
}Expand description
A Unity-shaped mesh ready for export. All data is in Unity’s left-handed coordinate system; the build step inverts handedness to produce right-handed glTF output.
Fields§
§name: Option<String>Mesh name, or None to omit from the glTF output.
positions: Vec<[f32; 3]>Vertex positions. Tightly packed [x, y, z] floats (Unity space, X negated vs glTF).
normals: Vec<[f32; 3]>Vertex normals, same length as positions. Empty if the mesh has no normals.
uvs: Vec<Vec<[f32; 2]>>UV channels. uvs[k] holds all vertices for TEXCOORD_k (Unity bottom-left origin, V
will be flipped during the build step).
submeshes: Vec<SubmeshData>One sub-mesh per glTF primitive.
Auto Trait Implementations§
impl Freeze for MeshData
impl RefUnwindSafe for MeshData
impl Send for MeshData
impl Sync for MeshData
impl Unpin for MeshData
impl UnsafeUnpin for MeshData
impl UnwindSafe for MeshData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more