Пример #1
0
        }                                                                 // RejectCell(myCubeGrid.WorldToGridInteger(metresPosition)); }

        /// <summary>
        /// Perform a vector rejection of every occupied cell from DirectionNorm and store the results in rejectionCells.
        /// </summary>
        private void rejectAll()
        {
            VRage.Exceptions.ThrowIf <ArgumentNullException>(DirectionNorm == null, "DirectionNorm");
            rejectionCells = new MyUniqueList <Vector3>();

            ReadOnlyList <IMySlimBlock> immutable;

            using (lock_SlimBlocks.AcquireSharedUsing())
                immutable = SlimBlocks.immutable();

            CentreRejection = RejectMetres(Centre);
            foreach (IMySlimBlock slim in immutable)
            {
                slim.ForEachCell((cell) => {
                    Vector3 rejection = RejectMetres(cell * myCubeGrid.GridSize);
                    rejectionCells.Add(rejection);
                    return(false);
                });
            }
        }