public override IntersectionList LocalIntersect(Ray ray) { var intersections = new IntersectionList(); foreach (var shape in Shapes) { intersections.AddRange(shape.Intersect(ray)); } return(intersections); }
public IntersectionList Intersect(Ray ray) { var intersections = new IntersectionList(); foreach (var shape in Shapes) { var shapsesIntersections = shape.Intersect(ray); intersections.AddRange(shapsesIntersections); } return(intersections); }