Exemple #1
0
 def local_intersect(self, ray: Ray):
     total_xs = Intersections()
     for obj in self.objects:
         xs = obj.intersect(ray)
         total_xs.extend(xs)
     total_xs.sort()
     for x in total_xs:
         print(x)
     return total_xs
Exemple #2
0
 def intersect(self, ray):
     xs = Intersections()
     for obj in self.objects:
         xs.extend(obj.intersect(ray))
     xs.sort()
     return xs