示例#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);
        }
示例#2
0
        private void SetTerrain()
        {
            List <Terrain>  terrain       = TerrainObjects.OrderBy(e => e.ID).ToList();
            List <Matrix2d> matrixList    = terrain.Select(e => e.IDmatrix).ToList();
            Matrix2d        terrainMatrix = Matrix2d.MergeMatrix(matrixList, "0");

            EnvimetMatrix["terrainMatrix"] = terrainMatrix;
        }
示例#3
0
        private void SetSoil()
        {
            List <Soil>     soils      = SoilObjects.OrderBy(e => e.ID).ToList();
            List <Matrix2d> matrixList = soils.Select(e => e.IDmatrix).ToList();
            Matrix2d        soilMatrix = Matrix2d.MergeMatrix(matrixList, Material.DEFAULT_SOIL);

            EnvimetMatrix["soilMatrix"] = soilMatrix;
        }
示例#4
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);
        }
示例#5
0
        private void SetBuilding()
        {
            List <Building> buildings        = BuildingObjects.OrderBy(b => b.ID).ToList();
            List <Matrix2d> topMatrixList    = buildings.Select(b => b.TopMatrix).ToList();
            List <Matrix2d> bottomMatrixList = buildings.Select(b => b.BottomMatrix).ToList();
            List <Matrix2d> idMatrixList     = buildings.Select(b => b.IDmatrix).ToList();

            Matrix2d topMatrix    = Matrix2d.MergeMatrix(topMatrixList, "0");
            Matrix2d bottomMatrix = Matrix2d.MergeMatrix(bottomMatrixList, "0");
            Matrix2d idMatrix     = Matrix2d.MergeMatrix(idMatrixList, "0");

            EnvimetMatrix["topMatrix"]    = topMatrix;
            EnvimetMatrix["bottomMatrix"] = bottomMatrix;
            EnvimetMatrix["idMatrix"]     = idMatrix;
        }