pub struct Material {Show 22 fields
pub name: String,
pub ambient: Option<ColorType>,
pub diffuse: Option<ColorType>,
pub specular: Option<ColorType>,
pub emissive_coefficient: Option<ColorType>,
pub specular_exponent: Option<f32>,
pub disolve: Option<DisolveType>,
pub transparancy: Option<f32>,
pub transmission_factor: Option<ColorType>,
pub sharpness: Option<f32>,
pub index_of_refraction: Option<f32>,
pub illumination_mode: Option<u32>,
pub texture_map_ambient: Option<ColorCorrectedMap>,
pub texture_map_diffuse: Option<ColorCorrectedMap>,
pub texture_map_specular: Option<ColorCorrectedMap>,
pub shininess_map: Option<NonColorCorrectedMap>,
pub disolve_map: Option<NonColorCorrectedMap>,
pub displacement_map: Option<NonColorCorrectedMap>,
pub decal: Option<NonColorCorrectedMap>,
pub bump_map: Option<BumpMap>,
pub reflection_map: Option<ReflectionMap>,
pub anti_alias_map: Option<bool>,
}Expand description
Defines a single material.
Fields§
§name: StringThe name of the material.
Corresponds to newmtl in the specification.
ambient: Option<ColorType>The ambient reflectivity value.
Corresponds to Ka in the specification.
diffuse: Option<ColorType>The diffuse reflectivity value
Corresponds to Kd in the specification.
specular: Option<ColorType>The specular reflectivity value
Corresponds to Ks in the specification.
emissive_coefficient: Option<ColorType>The Emission Coefficient
Corresponds to Ke in the specification.
specular_exponent: Option<f32>The specular exponent.
Corresponds to Ns in the specification.
disolve: Option<DisolveType>The disolve.
Corresponds to d in the specification.
transparancy: Option<f32>Transparancy.
Corresponds to Tr in the specification.
transmission_factor: Option<ColorType>Transmission factor.
Corresponds to Tf in the specification.
sharpness: Option<f32>Corresponds to sharpness in the specification.
index_of_refraction: Option<f32>Corresponds to Ni in the specification.
illumination_mode: Option<u32>Corresponds to illum in the specification.
texture_map_ambient: Option<ColorCorrectedMap>Corresponds to map_Ka in the specification.
texture_map_diffuse: Option<ColorCorrectedMap>Corresponds to map_Kd in the specification.
texture_map_specular: Option<ColorCorrectedMap>Corresponds to map_Ks in the specification.
shininess_map: Option<NonColorCorrectedMap>Corresponds to map_Ns in the specification.
disolve_map: Option<NonColorCorrectedMap>Corresponds to map_d in the specification.
displacement_map: Option<NonColorCorrectedMap>Corresponds to disp in the specification.
decal: Option<NonColorCorrectedMap>Corresponds to decal in the specification.
bump_map: Option<BumpMap>Corresponds to bump in the specification.
reflection_map: Option<ReflectionMap>Corresponds to refl in the specification.
anti_alias_map: Option<bool>Enables/Disables anti-aliasing of textures in THIS material only.
Corresponds to map_aat in the specification.
Trait Implementations§
impl StructuralPartialEq for Material
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)