コード例 #1
0
        private void UpdateLayerView()
        {
            for (int i = 0; i < Layers.Count(); i++)
            {
                Layers[i].Name     = GetName(Layers[i].LayerType, i);
                Layers[i].Position = i;
            }

            if (Layers.Count != 0)
            {
                ShowLayerDetails(Layers[Layers.Count - 1]);
            }
            else
            {
                ShowLayerAdding();
            }

            terrainEngine.ResetTerrainEngine();
        }
コード例 #2
0
        public void UpdateTerrainSize(int terrainSize)
        {
            switch (terrainSize)
            {
            case 16:
                Res16   = false;
                Res32   = true;
                Res64   = true;
                Res128  = true;
                Res512  = true;
                Res1024 = true;
                Res2048 = true;
                Res4096 = true;
                break;

            case 32:
                Res16   = true;
                Res32   = false;
                Res64   = true;
                Res128  = true;
                Res512  = true;
                Res1024 = true;
                Res2048 = true;
                Res4096 = true;
                break;

            case 64:
                Res16   = true;
                Res32   = true;
                Res64   = false;
                Res128  = true;
                Res512  = true;
                Res1024 = true;
                Res2048 = true;
                Res4096 = true;
                break;

            case 128:
                Res16   = true;
                Res32   = true;
                Res64   = true;
                Res128  = false;
                Res512  = true;
                Res1024 = true;
                Res2048 = true;
                Res4096 = true;
                break;

            case 512:
                Res16   = true;
                Res32   = true;
                Res64   = true;
                Res128  = true;
                Res512  = false;
                Res1024 = true;
                Res2048 = true;
                Res4096 = true;
                break;

            case 1024:
                Res16   = true;
                Res32   = true;
                Res64   = true;
                Res128  = true;
                Res512  = true;
                Res1024 = false;
                Res2048 = true;
                Res4096 = true;
                break;

            case 2048:
                Res16   = true;
                Res32   = true;
                Res64   = true;
                Res128  = true;
                Res512  = true;
                Res1024 = true;
                Res2048 = false;
                Res4096 = true;
                break;

            case 4096:
                Res16   = true;
                Res32   = true;
                Res64   = true;
                Res128  = true;
                Res512  = true;
                Res1024 = true;
                Res2048 = true;
                Res4096 = false;
                break;
            }
            TerrainModel.TerrainSize = terrainSize;
            Viewport.InitModel();
            Viewport.InitDefaultViewportSettings();
            TerrainEngine.ResetTerrainEngine();
        }