Enum rtow::material::Material [] [src]

pub enum Material {
    Lambertian(Attenuation),
    Metal(AttenuationFuzziness),
    Dielectric(RefractiveIndex),
}

Variants

Matte.

Metal.

i.e. glass.

Trait Implementations

impl Debug for Material
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Material
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Scatterable for Material
[src]

[src]

Different materials scatter in different ways:

  • A Lambertian (matte) object reflects the ray along the direction of the normal vector, which is slightly altered by adding a random delta.
  • A Metal reflects the ray along a direction which is symmetrical to the normal vector. Depending on the fuzziness of the metal, a random delta may be added to this direction.
  • A Dielectric (i.e. glass) material can either reflect or refract the ray. The probability of each event depends on multiple factors, such as the refractive index and the angle of incidence. This probability is roughly approximated by the schlick polynomial.

Auto Trait Implementations

impl Send for Material

impl Sync for Material