pub struct Material { /* private fields */ }Expand description
A material is a construct that describes the color and distortion of the surface of a model.
Implementations§
Source§impl Material
impl Material
pub fn into_set(&self, queue: Arc<Queue>) -> (Material, [Arc<Texture>; 4])
Sourcepub fn from_mtllib(
path: &str,
gfx_queue: Arc<Queue>,
) -> HashMap<String, (Arc<Self>, Box<dyn GpuFuture>)>
pub fn from_mtllib( path: &str, gfx_queue: Arc<Queue>, ) -> HashMap<String, (Arc<Self>, Box<dyn GpuFuture>)>
Parse an mtl file
Sourcepub fn from_mtlblock(
block: &str,
path: &str,
gfx_queue: Arc<Queue>,
) -> (String, (Arc<Material>, Box<dyn GpuFuture>))
pub fn from_mtlblock( block: &str, path: &str, gfx_queue: Arc<Queue>, ) -> (String, (Arc<Material>, Box<dyn GpuFuture>))
Parse an mtl block.
pub fn set_illumination_model(&mut self, illum: Option<u8>) -> Result<(), ()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
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> Content for T
impl<T> Content for T
Source§fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
Source§fn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().