예제 #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);
                }
            }
        }
예제 #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);
                }
            }
        }
예제 #3
0
 /// <summary>
 /// Returns true if array fits into this array
 /// </summary>
 public bool IsFits(IArray3 <T> array, int offsetX, int offsetY, int offsetZ)
 {
     return(offsetX >= 0 && array.SizeX + offsetX <= sizeX && offsetY >= 0 && array.SizeY + offsetY <= sizeY && offsetZ >= 0 && array.SizeZ + offsetZ <= sizeZ);
 }
예제 #4
0
 /// <summary>
 /// Returns true if array fits into this array
 /// </summary>
 public bool IsFits(IArray3 <T> array)
 {
     return(array.SizeX <= sizeX && array.SizeY <= sizeY && array.SizeZ <= sizeZ);
 }