Ejemplo n.º 1
0
 def intersect(self, ray):
     hit = Hit(self, ray, None, None)
     for o in self.objs:
         hit = hit.union(o.intersect(ray))
     if hit.entry < hit.exit:
         return hit
     return None
Ejemplo n.º 2
0
 def intersect(self, ray):
     hit = Hit(self, ray, float('-inf'), float('-inf'))
     for o in self.objs:
         hit = hit.union(o.intersect(ray))
     if hit.entry < hit.exit:
         return hit
     return None
Ejemplo n.º 3
0
    def intersect(self, ray):
	hit = Hit(self, ray, None, None)
	for o in self.objs:
	    hit = hit.union(o.intersect(ray))
	if hit.entry < hit.exit:
	    return hit
	return None