pub struct MeshData<'a, V, T = TriangleList>where
T: Topology,{ /* private fields */ }
Expand description
A data struct for a mesh creation.
Implementations§
source§impl<'a, V, T> Data<'a, V, T>where
T: Topology,
impl<'a, V, T> Data<'a, V, T>where T: Topology,
sourcepub fn from_verts(verts: &'a [V]) -> Self
pub fn from_verts(verts: &'a [V]) -> Self
Creates a new MeshData
from given vertices.
source§impl<'a, V> Data<'a, V>
impl<'a, V> Data<'a, V>
sourcepub fn new(verts: &'a [V], indxs: &'a [[u16; 3]]) -> Option<Self>
pub fn new(verts: &'a [V], indxs: &'a [[u16; 3]]) -> Option<Self>
Creates a new MeshData
from given vertices and indices.
Returns Some
if a data length fits in u16
and all indices point to the data,
otherwise returns None
.
sourcepub fn from_quads(verts: &'a [V]) -> Option<Self>
pub fn from_quads(verts: &'a [V]) -> Option<Self>
Creates a new MeshData
from given quadrangles.
Returns Some
if a data length fits in u16
and is multiple by 4,
otherwise returns None
.