Пример #1
0
        //DOKU
        public FixGridBox[] SurroundingBoxes3x3(FixGridBox box)
        {
            int x = box.PosInGridX;
            int y = box.PosInGridY;
            int z = box.PosInGridZ;

            return(SurroundingBoxes3x3(x, y, z));
        }
Пример #2
0
        //DOKU
        public FixGridBox[] NeighbourLayers(FixGridBox box, string layernames)
        {
            int x = box.PosInGridX;
            int y = box.PosInGridY;
            int z = box.PosInGridZ;

            return(NeighbourLayers(x, y, z, layernames, true));
        }
Пример #3
0
        /// <summary>
        /// Create empty GridBoxes of a FixGrid structure.
        /// </summary>
        protected void CreateBoxes()
        {
            Boxes = new FixGridBox[Xdiv, Ydiv, Zdiv];

            for (int x = 0; x < Xdiv; x++)
            {
                for (int y = 0; y < Ydiv; y++)
                {
                    for (int z = 0; z < Zdiv; z++)
                    {
                        Boxes[x, y, z] = new FixGridBox(x, y, z,
                                                        Xmin + x * XBoxWidth,
                                                        Ymin + y * YBoxWidth,
                                                        Zmin + z * ZBoxWidth,
                                                        Xmin + (x + 1) * XBoxWidth,
                                                        Ymin + (y + 1) * YBoxWidth,
                                                        Zmin + (z + 1) * ZBoxWidth,
                                                        null);
                    }
                }
            }
        }