Struct tobj::Material
[−]
[src]
pub struct Material {
pub name: String,
pub ambient: [f32; 3],
pub diffuse: [f32; 3],
pub specular: [f32; 3],
pub shininess: f32,
pub dissolve: f32,
pub ambient_texture: String,
pub diffuse_texture: String,
pub specular_texture: String,
pub normal_texture: String,
pub dissolve_texture: String,
pub unknown_param: HashMap<String, String>,
}A material that may be referenced by one or more meshes. Standard MTL attributes are supported
and any unrecognized ones will be stored as Strings in the unknown_param HashMap
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
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
unknown_param: HashMap<String, String>
Key value pairs of any unrecognized parameters encountered while parsing the material