Example #1
0
        /// <summary>
        /// Copies this three-dimensional array to another
        /// </summary>
        public void CopyTo(IArray3 <T> array, int offsetX, int offsetY, int offsetZ)
        {
            var otherItems = array.GetItems();

            for (int y = 0; y < sizeY; y++)
            {
                var itemsZ      = items[y];
                var otherItemsZ = otherItems[y + offsetY];

                for (int z = 0; z < sizeZ; z++)
                {
                    Array.Copy(itemsZ[z], 0, otherItemsZ[z + offsetZ], offsetX, sizeX);
                }
            }
        }
Example #2
0
        /// <summary>
        /// Copies this three-dimensional array to another
        /// </summary>
        public void CopyTo(IArray3 <T> array)
        {
            var otherItems = array.GetItems();

            for (int y = 0; y < sizeY; y++)
            {
                var itemsZ      = items[y];
                var otherItemsZ = otherItems[y];

                for (int z = 0; z < sizeZ; z++)
                {
                    Array.Copy(itemsZ[z], 0, otherItemsZ[z], 0, sizeX);
                }
            }
        }