Struct truster::material::Material [−][src]
pub struct Material { pub color: Color, pub ambient: f64, pub diffuse: f64, pub specular: f64, pub shininess: f64, }
Expand description
Material with lighting properties. Give it to a shape to change its appearance.
Fields
color: Color
ambient: f64
diffuse: f64
specular: f64
shininess: f64
Implementations
Shades the object. Returns the color they would emit at position
. light
is the light
that is lighting the scene. eye
is the direction of the ‘eye’ that is looking at the
scene. normal
is the normal vector of the shape that the material is on at position
.
in_shadow
should be true if position
is in a shadow of light
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Material
impl UnwindSafe for Material
Blanket Implementations
Mutably borrows from an owned value. Read more