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: boolInclude vertex normals in output
write_texcoords: boolInclude texture coordinates in output
write_materials: boolGenerate 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 new() -> ObjWriteOptions
pub fn new() -> ObjWriteOptions
Create new options with defaults
Sourcepub fn with_normals(self, write_normals: bool) -> ObjWriteOptions
pub fn with_normals(self, write_normals: bool) -> ObjWriteOptions
Enable/disable normal writing
Sourcepub fn with_texcoords(self, write_texcoords: bool) -> ObjWriteOptions
pub fn with_texcoords(self, write_texcoords: bool) -> ObjWriteOptions
Enable/disable texture coordinate writing
Sourcepub fn with_materials(self, write_materials: bool) -> ObjWriteOptions
pub fn with_materials(self, write_materials: bool) -> ObjWriteOptions
Enable/disable material file generation
Sourcepub fn with_comment<S>(self, comment: S) -> ObjWriteOptions
pub fn with_comment<S>(self, comment: S) -> ObjWriteOptions
Add a comment to the header
Sourcepub fn with_object_name<S>(self, name: S) -> ObjWriteOptions
pub fn with_object_name<S>(self, name: S) -> ObjWriteOptions
Set object name
Sourcepub fn with_group_name<S>(self, name: S) -> ObjWriteOptions
pub fn with_group_name<S>(self, name: S) -> ObjWriteOptions
Set group name
Sourcepub fn with_material_name<S>(self, name: S) -> ObjWriteOptions
pub fn with_material_name<S>(self, name: S) -> ObjWriteOptions
Set material name
Sourcepub fn with_mtl_filename<S>(self, filename: S) -> ObjWriteOptions
pub fn with_mtl_filename<S>(self, filename: S) -> ObjWriteOptions
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 (const: unstable) · 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
Source§impl Default for ObjWriteOptions
impl Default for ObjWriteOptions
Source§fn default() -> ObjWriteOptions
fn default() -> ObjWriteOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ObjWriteOptions
impl RefUnwindSafe for ObjWriteOptions
impl Send for ObjWriteOptions
impl Sync for ObjWriteOptions
impl Unpin for ObjWriteOptions
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.