示例#1
0
        private void Render(WorldWind.Renderable.RenderableObject renderable, WorldWind.Renderable.RenderPriority priority, DrawArgs drawArgs)
        {
            if (!renderable.IsOn || (renderable.Name != null && renderable.Name.Equals("Starfield")))
                return;

            try
            {
                if (priority == WorldWind.Renderable.RenderPriority.Icons && renderable is Icons)
                {
                    renderable.Render(drawArgs);
                }
                else if (renderable is WorldWind.Renderable.RenderableObjectList)
                {
                    WorldWind.Renderable.RenderableObjectList rol = (WorldWind.Renderable.RenderableObjectList)renderable;
                    for (int i = 0; i < rol.ChildObjects.Count; i++)
                    {
                        Render((WorldWind.Renderable.RenderableObject)rol.ChildObjects[i], priority, drawArgs);
                    }
                }
                // hack at the moment
                else if (priority == WorldWind.Renderable.RenderPriority.TerrainMappedImages)
                {
                    if (renderable.RenderPriority == WorldWind.Renderable.RenderPriority.SurfaceImages || renderable.RenderPriority == WorldWind.Renderable.RenderPriority.TerrainMappedImages)
                    {
                        renderable.Render(drawArgs);
                    }
                }
                else if (renderable.RenderPriority == priority)
                {
                    renderable.Render(drawArgs);
                }
            }
            catch (Exception ex)
            {
                Log.Write(ex);
            }
        }
示例#2
0
 private void RenderStars(DrawArgs drawArgs, WorldWind.Renderable.RenderableObject renderable)
 {
     if (renderable is RenderableObjectList)
     {
         RenderableObjectList rol = (RenderableObjectList)renderable;
         for (int i = 0; i < rol.ChildObjects.Count; i++)
         {
             RenderStars(drawArgs, (RenderableObject)rol.ChildObjects[i]);
         }
     }
     else if (renderable.Name != null && renderable.Name.Equals("Starfield"))
     {
         try
         {
             renderable.Render(drawArgs);
         }
         catch (Exception ex)
         {
             Log.Write(ex);
         }
     }
 }