Exemple #1
0
    public Slice2D LinearSlice(Pair2f slice)
    {
        Polygon colliderPolygon = GetPolygonToSlice();

        if (colliderPolygon != null)
        {
            Slice2D sliceResult = Slicer2D.LinearSlice(colliderPolygon, slice);
            sliceResult.AddGameObjects(PerformResult(sliceResult.polygons));

            return(sliceResult);
        }

        return(Slice2D.Create());
    }