Exemplo n.º 1
0
 private function getNaturalColor(Thing $thing, Vector $pos, Vector $norm, Vector $reflectDir, Scene $scene)
 {
     $natColor = Color::$black;
     foreach ($scene->lights() as $item) {
         $natColor = self::addLight($natColor, $item, $pos, $scene, $thing, $reflectDir, $norm);
     }
     return $natColor;
 }