fn lighting(
        &self,
        light: &PointLight,
        world_point: &Tuple,
        eyev: &Tuple,
        normalv: &Tuple,
        in_shadow: bool,
    ) -> Color {
        let object_point = self.world_to_object(&world_point);

        self.material()
            .lighting(light, &object_point, world_point, eyev, normalv, in_shadow)
    }
// Divergence from the book design. Having the lighting method here avoids going back and forth
// between Shape and Material, and makes World#shade_hit cleaner.
//
Divergence from the book design. Having the lighting method here avoids going back and forth
between Shape and Material, and makes World#shade_hit cleaner.
Divergence from the book design . Having the lighting method here avoids going back and forth between Shape and Material and makes World#shade_hit cleaner .
fn lighting(
        &self,
        light: &PointLight,
        world_point: &Tuple,
        eyev: &Tuple,
        normalv: &Tuple,
        in_shadow: bool,
    ) -> Color {
        let object_point = self.world_to_object(&world_point);
        self.material()
            .lighting(light, &object_point, world_point, eyev, normalv, in_shadow)
    }
fn lighting ( & self , light : & PointLight , world_point : & Tuple , eyev : & Tuple , normalv : & Tuple , in_shadow : bool , ) -> Color { let object_point = self . world_to_object ( & world_point ) ; self . material ( ) . lighting ( light , & object_point , world_point , eyev , normalv , in_shadow ) }
Divergence from the book design.
Divergence from the book design .
&self
light
&PointLight
world_point
&Tuple
eyev
&Tuple
normalv
&Tuple
in_shadow
bool