Пример #1
0
    public static RenderScene Merge(RenderScene a, RenderScene b)
    {
        if (a == null && b == null)
        {
            return(RenderScene.Empty);
        }
        if (a == null || a.Count <= 0)
        {
            return(b);
        }
        if (b == null || b.Count <= 0)
        {
            return(a);
        }

        var collection = new RenderObjectCollection(a.Count + b.Count);

        a.CopyTo(collection, 0);
        b.CopyTo(collection, a.Count);

        return(collection);
    }