pub struct ObjWriteOptions {
pub write_normals: bool,
pub write_texcoords: bool,
pub write_materials: bool,
pub comments: Vec<String>,
pub object_name: Option<String>,
pub group_name: Option<String>,
pub material_name: Option<String>,
pub mtl_filename: Option<String>,
}
Expand description
OBJ writer options
Fields§
§write_normals: bool
Include vertex normals in output
write_texcoords: bool
Include texture coordinates in output
write_materials: bool
Generate and write MTL material file
comments: Vec<String>
Comments to include in the header
object_name: Option<String>
Object name
group_name: Option<String>
Group name
material_name: Option<String>
Material name for the mesh
mtl_filename: Option<String>
MTL file name (if different from OBJ name)
Implementations§
Source§impl ObjWriteOptions
impl ObjWriteOptions
Sourcepub fn with_normals(self, write_normals: bool) -> Self
pub fn with_normals(self, write_normals: bool) -> Self
Enable/disable normal writing
Sourcepub fn with_texcoords(self, write_texcoords: bool) -> Self
pub fn with_texcoords(self, write_texcoords: bool) -> Self
Enable/disable texture coordinate writing
Sourcepub fn with_materials(self, write_materials: bool) -> Self
pub fn with_materials(self, write_materials: bool) -> Self
Enable/disable material file generation
Sourcepub fn with_comment<S: Into<String>>(self, comment: S) -> Self
pub fn with_comment<S: Into<String>>(self, comment: S) -> Self
Add a comment to the header
Sourcepub fn with_object_name<S: Into<String>>(self, name: S) -> Self
pub fn with_object_name<S: Into<String>>(self, name: S) -> Self
Set object name
Sourcepub fn with_group_name<S: Into<String>>(self, name: S) -> Self
pub fn with_group_name<S: Into<String>>(self, name: S) -> Self
Set group name
Sourcepub fn with_material_name<S: Into<String>>(self, name: S) -> Self
pub fn with_material_name<S: Into<String>>(self, name: S) -> Self
Set material name
Sourcepub fn with_mtl_filename<S: Into<String>>(self, filename: S) -> Self
pub fn with_mtl_filename<S: Into<String>>(self, filename: S) -> Self
Set MTL filename
Trait Implementations§
Source§impl Clone for ObjWriteOptions
impl Clone for ObjWriteOptions
Source§fn clone(&self) -> ObjWriteOptions
fn clone(&self) -> ObjWriteOptions
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 ObjWriteOptions
impl Debug for ObjWriteOptions
Auto Trait Implementations§
impl Freeze for ObjWriteOptions
impl RefUnwindSafe for ObjWriteOptions
impl Send for ObjWriteOptions
impl Sync for ObjWriteOptions
impl Unpin for ObjWriteOptions
impl UnwindSafe for ObjWriteOptions
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.