Example #1
0
        public override IntersectionList LocalIntersect(Ray ray)
        {
            var intersections = new IntersectionList();

            foreach (var shape in Shapes)
            {
                intersections.AddRange(shape.Intersect(ray));
            }

            return(intersections);
        }
Example #2
0
        public IntersectionList Intersect(Ray ray)
        {
            var intersections = new IntersectionList();

            foreach (var shape in Shapes)
            {
                var shapsesIntersections = shape.Intersect(ray);
                intersections.AddRange(shapsesIntersections);
            }

            return(intersections);
        }