protected virtual void addVegetation(TgcTerrainEditor editor) { editor.addVegetation(Mesh); if (SoundEnabled) { playSound(); } Mesh = null; }
private void openFileVegetation_FileOk(object sender, CancelEventArgs e) { if (terrainEditor.HasVegetation) { if (MessageBox.Show("¿Remover vegetacion actual?", "El terreno ya tiene vegetacion", MessageBoxButtons.YesNo) == DialogResult.Yes) { terrainEditor.clearVegetation(); } else { MessageBox.Show("Por ahora no se pueden importar modelos con nombres iguales a los ya cargados, de darse ese caso, las instancias viejas se eliminaran.", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } } terrainEditor.addVegetation(InstancesManager.Instance.import(openFileVegetation.FileName)); terrainEditor.removeDisposedVegetation(); terrainEditor.updateVegetationY(); }
protected virtual void addVegetation(TgcTerrainEditor editor) { editor.addVegetation(Mesh); if (SoundEnabled) playSound(); Mesh = null; }