/// <summary> /// Constructor /// </summary> public FloodLevel(string LayerName, MFW3D.WorldWindow worldWindow) : base(LayerName) { this.world = worldWindow.CurrentWorld; this.drawArgs = worldWindow.DrawArgs; this.FloodColor = Color.DarkBlue; this.FloodElevation = 0; }
/// <summary> /// Constructor /// </summary> public AtmosphereLayer(string LayerName, string pluginPath, MFW3D.WorldWindow worldWindow) : base(LayerName) { this.pluginPath = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), @"Plugins\Atmosphere\"); this.world = worldWindow.CurrentWorld; this.drawArgs = worldWindow.DrawArgs; this.RenderPriority = RenderPriority.SurfaceImages; ReadSettings(); }
public TerrainManagerForm(WorldWindow ww, MenuItem menuItem) { InitializeComponent(); parentMenuItem = menuItem; m_worldWindow = ww; m_updateTimer.Elapsed += new ElapsedEventHandler(m_updateTimerElapsed); m_updateTimer.Start(); }
/// <summary> /// Initializes a new instance of the <see cref= "T:WorldWind.PlaceBuilder"/> class. /// </summary> /// <param name="ww"></param> public PlaceBuilder(WorldWindow ww) { // // Required for Windows Form Designer support // InitializeComponent(); this.worldWindow = ww; }
public WMSBrowserNG(WorldWindow ww) { // // Required for Windows Form Designer support // InitializeComponent(); this.worldWindow = ww; }
/// <summary> /// Initializes a new instance of the <see cref= "T:WorldWind.PathMaker"/> class. /// </summary> /// <param name="ww"></param> public PathMaker(WorldWindow ww) { InitializeComponent(); this.worldWindow = ww; }
public BMNG(MFW3D.WorldWindow worldWindow) { // // Required for Windows Form Designer support // InitializeComponent(); int lastSelectedDatasetIndex = 1; try { using (StreamReader reader = new StreamReader(Path.GetDirectoryName(Application.ExecutablePath) + "\\Plugins\\BlueMarble\\settings.txt")) { lastSelectedDatasetIndex = MFW3D.World.Settings.BmngVersion; } } catch { } comboBoxBmngVersion.SelectedIndex = lastSelectedDatasetIndex; m_WorldWindow = worldWindow; m_RenderableList.ShowOnlyOneLayer = true; bool foundImagesObject = false; lock (m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.SyncRoot) { foreach (MFW3D.Renderable.RenderableObject ro in m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects) { if (ro is MFW3D.Renderable.RenderableObjectList && (ro.Name == "Images")) // SF FIX: don't add to layers called 'xxxx images'! { MFW3D.Renderable.RenderableObjectList imagesList = ro as MFW3D.Renderable.RenderableObjectList; imagesList.ChildObjects.Insert(0, m_RenderableList); foundImagesObject = true; break; } } } if (!foundImagesObject) { m_WorldWindow.CurrentWorld.RenderableObjects.Add(m_RenderableList); } m_BlueMarbleBase = new MFW3D.Renderable.ImageLayer( "Blue Marble Base Image", m_WorldWindow.CurrentWorld, 0, null, -90, 90, -180, 180, 1.0f, null); m_BlueMarbleBase.ImageUrl = "http://worldwind.arc.nasa.gov/downloads/land_shallow_topo_2048.dds"; MFW3D.ImageStore ia = new MFW3D.NltImageStore("106", "http://nww.terraserver-usa.com/nwwtile.ashx"); ia.DataDirectory = null; ia.LevelZeroTileSizeDegrees = 36.0; ia.LevelZeroTileSizeDegrees = 4; ia.ImageExtension = "jpg"; ia.CacheDirectory = String.Format("{0}\\Blue Marble", m_WorldWindow.Cache.CacheDirectory); MFW3D.ImageStore[] ias = new MFW3D.ImageStore[1]; ias[0] = ia; m_BlueMarbleTiled = new MFW3D.Renderable.QuadTileSet( "Blue Marble Tiled", m_WorldWindow.CurrentWorld, 0, 90, -90, -180, 180, true, ias ); m_BlueMarbleTiled.ServerLogoFilePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\Data\\Icons\\Interface\\meatball.png"; m_BlueMarbleList = new MFW3D.Renderable.RenderableObjectList("Blue Marble"); m_BlueMarbleList.IsOn = false; m_BlueMarbleList.Add(m_BlueMarbleBase); m_BlueMarbleList.Add(m_BlueMarbleTiled); m_ShadedList = new MFW3D.Renderable.RenderableObjectList("BMNG"); m_ShadedList.ShowOnlyOneLayer = true; m_ShadedList.IsOn = false; for (int i = 0; i < 12; i++) { m_ImageLayers[0, i] = new MFW3D.Renderable.ImageLayer( String.Format("Base Image - {0}.2004", i + 1), m_WorldWindow.CurrentWorld, 0, null, -90, 90, -180, 180, 1.0f, null); m_ImageLayers[0, i].ImageUrl = String.Format("{0}world.topo.2004{1:D2}.jpg", m_BmngBaseImageUrl, i + 1); MFW3D.NltImageStore imageStore = new MFW3D.NltImageStore(String.Format("bmng.topo.2004{0:D2}", i + 1), "http://worldwind25.arc.nasa.gov/tile/tile.aspx"); imageStore.DataDirectory = null; imageStore.LevelZeroTileSizeDegrees = 36.0; imageStore.LevelCount = 5; imageStore.ImageExtension = "jpg"; imageStore.CacheDirectory = String.Format("{0}\\BMNG\\{1}", m_WorldWindow.Cache.CacheDirectory, String.Format("BMNG (Shaded) Tiled - {0}.2004", i + 1)); ias = new MFW3D.ImageStore[1]; ias[0] = imageStore; m_QuadTileLayers[0, i] = new MFW3D.Renderable.QuadTileSet( String.Format("Tiled - {0}.2004", i + 1), m_WorldWindow.CurrentWorld, 0, 90, -90, -180, 180, true, ias); m_QuadTileLayers[0, i].ServerLogoFilePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\Data\\Icons\\Interface\\meatball.png"; m_RenderableLayers[0, i] = new MFW3D.Renderable.RenderableObjectList(String.Format("{0}.2004", i + 1)); m_RenderableLayers[0, i].IsOn = false; m_RenderableLayers[0, i].Add(m_ImageLayers[0, i]); m_RenderableLayers[0, i].Add(m_QuadTileLayers[0, i]); m_ShadedList.Add(m_RenderableLayers[0, i]); } m_ShadedBathyList = new MFW3D.Renderable.RenderableObjectList("BMNG (Bathymetry)"); m_ShadedBathyList.ShowOnlyOneLayer = true; m_ShadedBathyList.IsOn = false; for (int i = 0; i < 12; i++) { m_ImageLayers[1, i] = new MFW3D.Renderable.ImageLayer( String.Format("Base Image - {0}.2004", i + 1), m_WorldWindow.CurrentWorld, 0, String.Format("{0}\\Data\\Earth\\BmngBathy\\world.topo.bathy.2004{1:D2}.jpg", Path.GetDirectoryName(Application.ExecutablePath), i + 1), -90, 90, -180, 180, 1.0f, null); // m_ImageLayers[1, i].ImageUrl = String.Format("{0}world.topo.bathy.2004{1:D2}.jpg", m_BmngBaseImageUrl, i+1); MFW3D.NltImageStore imageStore = new MFW3D.NltImageStore(String.Format("bmng.topo.bathy.2004{0:D2}", i + 1), "http://worldwind25.arc.nasa.gov/tile/tile.aspx"); imageStore.DataDirectory = null; imageStore.LevelZeroTileSizeDegrees = 36.0; imageStore.LevelCount = 5; imageStore.ImageExtension = "jpg"; imageStore.CacheDirectory = String.Format("{0}\\BMNG\\{1}", m_WorldWindow.Cache.CacheDirectory, String.Format("BMNG (Shaded + Bathymetry) Tiled - {0}.2004", i + 1)); ias = new MFW3D.ImageStore[1]; ias[0] = imageStore; m_QuadTileLayers[1, i] = new MFW3D.Renderable.QuadTileSet( String.Format("Tiled - {0}.2004", i + 1), m_WorldWindow.CurrentWorld, 0, 90, -90, -180, 180, true, ias); m_QuadTileLayers[0, i].ServerLogoFilePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\Data\\Icons\\Interface\\meatball.png"; m_RenderableLayers[1, i] = new MFW3D.Renderable.RenderableObjectList(String.Format("{0}.2004", i + 1)); m_RenderableLayers[1, i].IsOn = false; m_RenderableLayers[1, i].Add(m_ImageLayers[1, i]); m_RenderableLayers[1, i].Add(m_QuadTileLayers[1, i]); m_ShadedBathyList.Add(m_RenderableLayers[1, i]); } /* m_UnShadedList = new WorldWind.Renderable.RenderableObjectList("BMNG (UnShaded)"); * m_UnShadedList.ShowOnlyOneLayer = true; * m_UnShadedList.IsOn = false; * * for(int i = 0; i < 12; i++) * { * m_ImageLayers[2, i] = new WorldWind.Renderable.ImageLayer( * String.Format("Base Image - {0}.2004 un", i+1), * m_WorldWindow.CurrentWorld, * 0, * null, * -90, 90, -180, 180, 1.0f, m_WorldWindow.CurrentWorld.TerrainAccessor); * * m_ImageLayers[2, i].ImageUrl = String.Format("{0}world.2004{1:D2}.jpg", m_BmngBaseImageUrl, i+1); * m_ImageLayers[2, i].IsOn = false; * * m_QuadTileLayers[2, i] = new WorldWind.Renderable.QuadTileSet( * String.Format("Tiled - {0}.2004", i+1), * m_WorldWindow.CurrentWorld, * 0, * 90, -90, -180, 180, m_WorldWindow.CurrentWorld.TerrainAccessor, * new WorldWind.ImageAccessor( * null, 512, 36.0, 5, "jpg", * String.Format("{0}\\BMNG\\{1}", m_WorldWindow.Cache.CacheDirectory, String.Format("BMNG (UnShaded) Tiled - {0}.2004", i+1)), * new WorldWind.ImageTileService( * String.Format("bmng.2004{0:D2}", i+1), "http://worldwind28.arc.nasa.gov/TestWebApp/WebForm1.aspx", * Path.GetDirectoryName(Application.ExecutablePath) + "\\Data\\Icons\\Interface\\meatball.png") * )); * * m_RenderableLayers[2, i] = new WorldWind.Renderable.RenderableObjectList(String.Format("{0}.2004", i+1)); * m_RenderableLayers[2, i].IsOn = false; * * m_RenderableLayers[2, i].Add(m_ImageLayers[1, i]); * m_RenderableLayers[2, i].Add(m_QuadTileLayers[1, i]); * m_UnShadedList.Add(m_RenderableLayers[2, i]); * }*/ m_RenderableList.Add(m_BlueMarbleList); m_RenderableList.Add(m_ShadedList); m_RenderableList.Add(m_ShadedBathyList); // m_RenderableList.Add(m_UnShadedList); this.trackBarMonth.Value = System.DateTime.Now.Month - 1; timer = new Timer(); timer.Interval = 1000; timer.Tick += new EventHandler(timer_Tick); timer.Start(); }