[−][src]Struct tobj::Material
A material that may be referenced by one or more meshes. Standard MTL attributes are supported.
Any unrecognized parameters will be stored as key-value pairs in the unknown_param
HashMap
,
which maps the unknown parameter to the value set for it.
Fields
name: String
Material name as specified in the MTL file
ambient: [f32; 3]
Ambient color of the material
diffuse: [f32; 3]
Diffuse color of the material
specular: [f32; 3]
Specular color of the material
shininess: f32
Material shininess attribute
dissolve: f32
Dissolve attribute is the alpha term for the material. Referred to as dissolve since that's what the MTL file format docs refer to it as
optical_density: f32
Optical density also known as index of refraction. Called optical_density in the MTL specc. Takes on a value between 0.001 and 10.0. 1.0 means light does not bend as it passed through the object.
ambient_texture: String
Name of the ambient texture file for the material. No path is pre-pended to the texture file names specified in the MTL file
diffuse_texture: String
Name of the diffuse texture file for the material. No path is pre-pended to the texture file names specified in the MTL file
specular_texture: String
Name of the specular texture file for the material. No path is pre-pended to the texture file names specified in the MTL file
normal_texture: String
Name of the normal map texture file for the material. No path is pre-pended to the texture file names specified in the MTL file
dissolve_texture: String
Name of the alpha map texture file for the material. No path is pre-pended to the texture file names specified in the MTL file. Referred to as dissolve to match the MTL file format specification
illumination_model: Option<u8>
The illumnination model to use for this material. The different illumnination models are specified in http://paulbourke.net/dataformats/mtl/
unknown_param: HashMap<String, String>
Key value pairs of any unrecognized parameters encountered while parsing the material
Methods
impl Material
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,