pub struct IoObjWriter<W: Write, F: ObjFloat = f64> { /* private fields */ }Implementations§
Source§impl<W: Write, F: ObjFloat> IoObjWriter<W, F>
impl<W: Write, F: ObjFloat> IoObjWriter<W, F>
Sourcepub fn new(writer: W) -> Self
pub fn new(writer: W) -> Self
Creates a new OBJ writer with default formatting (full precision).
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> ObjWriter<F> for IoObjWriter<W, F>
impl<W: Write, F: ObjFloat> ObjWriter<F> for IoObjWriter<W, F>
fn write_comment<S: AsRef<str>>(&mut self, comment: S) -> Result<()>
fn write_object_name<S: AsRef<str>>(&mut self, name: S) -> Result<()>
fn write_vertex(&mut self, x: F, y: F, z: F, w: Option<F>) -> Result<()>
fn write_texture_coordinate( &mut self, u: F, v: Option<F>, w: Option<F>, ) -> Result<()>
fn write_normal(&mut self, nx: F, ny: F, nz: F) -> Result<()>
fn write_face( &mut self, vertex_indices: &[(usize, Option<usize>, Option<usize>)], ) -> Result<()>
Source§fn write_material_lib<S: AsRef<str>>(&mut self, names: &[S]) -> Result<()>
fn write_material_lib<S: AsRef<str>>(&mut self, names: &[S]) -> Result<()>
mtllib lib1.mtl lib2.mtl ... - reference one or more material libraries.Source§fn write_use_material<S: AsRef<str>>(&mut self, name: S) -> Result<()>
fn write_use_material<S: AsRef<str>>(&mut self, name: S) -> Result<()>
usemtl name - select a material from a previously declared library.Source§fn write_group<S: AsRef<str>>(&mut self, names: &[S]) -> Result<()>
fn write_group<S: AsRef<str>>(&mut self, names: &[S]) -> Result<()>
g name1 name2 ... - assign subsequent elements to one or more groups.Source§fn write_smoothing_group(&mut self, group: SmoothingGroup) -> Result<()>
fn write_smoothing_group(&mut self, group: SmoothingGroup) -> Result<()>
s 0|off|<n> - select a smoothing group for subsequent faces.Auto Trait Implementations§
impl<W, F> Freeze for IoObjWriter<W, F>where
W: Freeze,
impl<W, F> RefUnwindSafe for IoObjWriter<W, F>where
W: RefUnwindSafe,
F: RefUnwindSafe,
impl<W, F> Send for IoObjWriter<W, F>
impl<W, F> Sync for IoObjWriter<W, F>
impl<W, F> Unpin for IoObjWriter<W, F>
impl<W, F> UnsafeUnpin for IoObjWriter<W, F>where
W: UnsafeUnpin,
impl<W, F> UnwindSafe for IoObjWriter<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