Пример #1
0
        Given_a_set_of_intersections_produce_a_subset_of_only_those_intersections_that_conform_to_the_operation_of_the_current_CSG_object(
            CsgOperation operation,
            int intersectionIndex1,
            int intersectionIndex2)
        {
            var left          = new Sphere();
            var right         = new Cube();
            var csg           = new CsgShape(operation, left, right);
            var intersections = new IntersectionList((1, left), (2, right), (3, left), (4, right));
            var filtered      = csg.FilterIntersections(intersections);

            filtered.Should()
            .HaveCount(2)
            .And.ContainInOrder(intersections[intersectionIndex1], intersections[intersectionIndex2]);
        }