Esempio n. 1
0
        static public List <Slice2D> ComplexSliceAll(List <Vector2D> slice, Slice2DLayer layer = null)
        {
            List <Slice2D> result = new List <Slice2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Slice2D sliceResult = id.ComplexSlice(slice);
                if (sliceResult.GetGameObjects().Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }
Esempio n. 2
0
        static public List <Slice2D> LinearCutSliceAll(LinearCut linearCut, Slice2DLayer layer = null)
        {
            List <Slice2D> result = new List <Slice2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Slice2D sliceResult = id.LinearCutSlice(linearCut);
                if (sliceResult.GetGameObjects().Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }
Esempio n. 3
0
        ///// Merger2D ALL
        static public List <Merge2D> ComplexMergeAll(List <Vector2D> slice, Slice2DLayer layer = null)
        {
            List <Merge2D> result = new List <Merge2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Merge2D sliceResult = id.ComplexMerge(slice);
                if (sliceResult.polygons.Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }
Esempio n. 4
0
        static public List <Slice2D> ExplodeAll(Slice2DLayer layer = null, int explosionSlices = 0)
        {
            List <Slice2D> result = new List <Slice2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Slice2D sliceResult = id.Explode(explosionSlices);
                if (sliceResult.GetGameObjects().Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }
Esempio n. 5
0
        static public List <Slice2D> ExplodeInPointAll(Vector2D point, Slice2DLayer layer = null)
        {
            List <Slice2D> result = new List <Slice2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Slice2D sliceResult = id.ExplodeInPoint(point);
                if (sliceResult.GetGameObjects().Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }
Esempio n. 6
0
        static public List <Slice2D> PointSliceAll(Vector2D slice, float rotation, Slice2DLayer layer = null)
        {
            List <Slice2D> result = new List <Slice2D> ();

            if (layer == null)
            {
                layer = Slice2DLayer.Create();
            }

            foreach (Slicer2D id in GetListLayer(layer))
            {
                Slice2D sliceResult = id.PointSlice(slice, rotation);
                if (sliceResult.GetGameObjects().Count > 0)
                {
                    result.Add(sliceResult);
                }
            }

            return(result);
        }