pub struct MeshDescriptor {
pub vertices: Vec<[f32; 4]>,
pub normals: Vec<[f32; 3]>,
pub uvs: Vec<[f32; 2]>,
pub tangents: Vec<[f32; 4]>,
pub material_ids: Vec<i32>,
pub materials: Option<MaterialList>,
pub meshes: Vec<VertexMesh>,
pub skeleton: Option<SkeletonDescriptor>,
pub bounds: Aabb,
pub name: String,
}Fields§
§vertices: Vec<[f32; 4]>§normals: Vec<[f32; 3]>§uvs: Vec<[f32; 2]>§tangents: Vec<[f32; 4]>§material_ids: Vec<i32>§materials: Option<MaterialList>Mesh descriptors do not have a material list when they are part of a scene
meshes: Vec<VertexMesh>§skeleton: Option<SkeletonDescriptor>§bounds: Aabb§name: StringImplementations§
Source§impl MeshDescriptor
impl MeshDescriptor
pub fn new_indexed( indices: Vec<[u32; 3]>, original_vertices: Vec<[f32; 4]>, original_normals: Vec<[f32; 3]>, original_uvs: Vec<[f32; 2]>, skeleton: Option<SkeletonDescriptor>, material_ids: Vec<i32>, materials: Option<MaterialList>, name: Option<String>, ) -> Self
pub fn new( vertices: Vec<[f32; 4]>, normals: Vec<[f32; 3]>, uvs: Vec<[f32; 2]>, skeleton: Option<SkeletonDescriptor>, material_ids: Vec<i32>, materials: Option<MaterialList>, name: Option<String>, ) -> Self
pub fn scale(&self, scaling: f32) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn empty() -> Self
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Number of bytes required to store vertices, normals, uvs and tangents
pub fn as_bytes(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for MeshDescriptor
impl Clone for MeshDescriptor
Source§fn clone(&self) -> MeshDescriptor
fn clone(&self) -> MeshDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MeshDescriptor
impl Debug for MeshDescriptor
Source§impl Default for MeshDescriptor
impl Default for MeshDescriptor
Auto Trait Implementations§
impl Freeze for MeshDescriptor
impl RefUnwindSafe for MeshDescriptor
impl Send for MeshDescriptor
impl Sync for MeshDescriptor
impl Unpin for MeshDescriptor
impl UnwindSafe for MeshDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more