pub struct IoMtlWriter<W: Write, F: ObjFloat = f64> { /* private fields */ }Expand description
File-backed MtlWriter. Mirrors IoObjWriter.
Implementations§
Source§impl<W: Write, F: ObjFloat> IoMtlWriter<W, F>
impl<W: Write, F: ObjFloat> IoMtlWriter<W, F>
pub fn new(writer: W) -> Self
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume the writer and return the underlying sink.
Trait Implementations§
Source§impl<W: Write, F: ObjFloat> MtlWriter<F> for IoMtlWriter<W, F>
impl<W: Write, F: ObjFloat> MtlWriter<F> for IoMtlWriter<W, F>
fn write_comment<S: AsRef<str>>(&mut self, comment: S) -> Result<()>
fn write_new_material<S: AsRef<str>>(&mut self, name: S) -> Result<()>
fn write_ambient(&mut self, r: F, g: Option<F>, b: Option<F>) -> Result<()>
fn write_diffuse(&mut self, r: F, g: Option<F>, b: Option<F>) -> Result<()>
fn write_specular(&mut self, r: F, g: Option<F>, b: Option<F>) -> Result<()>
fn write_emissive(&mut self, r: F, g: Option<F>, b: Option<F>) -> Result<()>
fn write_specular_exponent(&mut self, value: F) -> Result<()>
fn write_optical_density(&mut self, value: F) -> Result<()>
fn write_dissolve(&mut self, value: F) -> Result<()>
fn write_transparency(&mut self, value: F) -> Result<()>
fn write_illumination_model(&mut self, value: u32) -> Result<()>
fn write_map<S: AsRef<str>>(&mut self, kind: MapKind, args: S) -> Result<()>
Auto Trait Implementations§
impl<W, F> Freeze for IoMtlWriter<W, F>where
W: Freeze,
impl<W, F> RefUnwindSafe for IoMtlWriter<W, F>where
W: RefUnwindSafe,
F: RefUnwindSafe,
impl<W, F> Send for IoMtlWriter<W, F>
impl<W, F> Sync for IoMtlWriter<W, F>
impl<W, F> Unpin for IoMtlWriter<W, F>
impl<W, F> UnsafeUnpin for IoMtlWriter<W, F>where
W: UnsafeUnpin,
impl<W, F> UnwindSafe for IoMtlWriter<W, F>where
W: UnwindSafe,
F: UnwindSafe,
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