pub struct SceneMesh {
pub name: String,
pub mesh: MeshBuffers,
pub material: Option<PbrMaterial>,
pub translation: [f32; 3],
}Expand description
A named mesh entry in a multi-mesh scene.
Fields§
§name: StringDisplay name for this mesh in the scene hierarchy.
mesh: MeshBuffers§material: Option<PbrMaterial>§translation: [f32; 3]Translation offset [x, y, z] from scene origin.
Implementations§
Source§impl SceneMesh
impl SceneMesh
pub fn new(name: impl Into<String>, mesh: MeshBuffers) -> Self
pub fn with_material(self, m: PbrMaterial) -> Self
pub fn with_translation(self, t: [f32; 3]) -> Self
Auto Trait Implementations§
impl Freeze for SceneMesh
impl RefUnwindSafe for SceneMesh
impl Send for SceneMesh
impl Sync for SceneMesh
impl Unpin for SceneMesh
impl UnsafeUnpin for SceneMesh
impl UnwindSafe for SceneMesh
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> 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