void NewHeightMap(int heightmapwidth, int heightmapheight)
        {
            TerrainModel terrain = MetaverseClient.GetInstance().worldstorage.terrainmodel;

            terrain.HeightMapWidth    = heightmapwidth;
            terrain.HeightMapHeight   = heightmapheight;
            terrain.Map               = new double[terrain.HeightMapWidth, terrain.HeightMapHeight];
            terrain.HeightmapFilename = "";
            terrain.OnTerrainModified();
        }
Exemple #2
0
 void on_btnAddStage_clicked(object o, EventArgs e)
 {
     //MapTextureStage maptexturestage = GetSelectedMapTextureStage();
     //if (maptexturestage != null)
     //{
     MetaverseClient.GetInstance().worldstorage.terrainmodel.texturestages.Add(new MapTextureStageModel(MapTextureStageModel.OperationType.Blend));
     terrain.OnTerrainModified();
     //}
 }
        public void LoadSm3(string filename)
        {
            terrain.tdfparser = TdfParser.FromFile(filename);
            TdfParser.Section terrainsection = terrain.tdfparser.RootSection.SubSection("map/terrain");
            string            tdfdirectory   = Path.GetDirectoryName(Path.GetDirectoryName(filename));

            LoadTextureStages(tdfdirectory, terrainsection);
            LoadHeightMap(tdfdirectory, terrainsection);
            terrain.OnTerrainModified();
            MainTerrainWindow.GetInstance().InfoMessage("SM3 load completed");
        }