Exemple #1
0
        private void SetSource()
        {
            List <Source>   sources      = SourceObjects.OrderBy(e => e.ID).ToList();
            List <Matrix2d> matrixList   = sources.Select(e => e.IDmatrix).ToList();
            Matrix2d        sourceMatrix = Matrix2d.MergeMatrix(matrixList, "");

            EnvimetMatrix.Add("sourceMatrix", sourceMatrix);
        }
Exemple #2
0
        private void SetPlant2d()
        {
            List <Plant2d>  plants      = Plant2dObjects.OrderBy(e => e.ID).ToList();
            List <Matrix2d> matrixList  = plants.Select(e => e.IDmatrix).ToList();
            Matrix2d        plantMatrix = Matrix2d.MergeMatrix(matrixList, "");

            EnvimetMatrix.Add("plantMatrix", plantMatrix);
        }
Exemple #3
0
        private void SetDefaultMatrix(Grid grid)
        {
            Matrix2d matrix     = new Matrix2d(grid.Size.NumX, grid.Size.NumY, "0");
            Matrix2d matrixSoil = new Matrix2d(grid.Size.NumX, grid.Size.NumY, Material.DEFAULT_SOIL);

            EnvimetMatrix.Add("topMatrix", matrix);
            EnvimetMatrix.Add("bottomMatrix", matrix);
            EnvimetMatrix.Add("idMatrix", matrix);
            EnvimetMatrix.Add("terrainMatrix", matrix);
            EnvimetMatrix.Add("soilMatrix", matrixSoil);
        }