Beispiel #1
0
        public void OnMouseClick(IAgUiPlugin3DMouseEventArgs eventArgs, IAgUiPlugin3DNotifyContext context)
        {
            Array       position = new object[] { eventArgs.X, eventArgs.Y };
            IAgScenario scenario = (IAgScenario)CommonData.StkRoot.CurrentScenario;
            IAgStkGraphicsSceneManager sceneManager = scenario.SceneManager;
            IAgStkGraphicsScene        scene        = scenario.SceneManager.Scenes[eventArgs.SceneID - 1];

            //object[] cartographic = (object[])scene.Camera.WindowToCartographic("Earth", ref position);
            //string latitudeString = cartographic.GetValue(0).ToString();
            //string longitudeString = cartographic.GetValue(1).ToString();
            //double altitude = double.Parse(cartographic.GetValue(1).ToString());

            //NOTE:
            //If the angle unit is set to HMS or DMS, latitude and longitude string might not be directly converted to doubles.
        }
Beispiel #2
0
        public void OnMouseClick(IAgUiPlugin3DMouseEventArgs EventArgs, IAgUiPlugin3DNotifyContext Context)
        {
            //IAgScenario scenario = (IAgScenario)CommonData.StkRoot.CurrentScenario;
            //IAgStkGraphicsSceneManager sceneManager = scenario.SceneManager;
            //IAgStkGraphicsScene scene = scenario.SceneManager.Scenes[EventArgs.SceneID - 1];


            //switch (m_globeEventType)
            //{
            //    case GlobeEventType.Location:
            //        Array position = new object[] { EventArgs.X, EventArgs.Y };
            //        object[] cartographic = (object[])scene.Camera.WindowToCartographic("Earth", ref position);
            //        string latitudeString = cartographic.GetValue(0).ToString();
            //        string longitudeString = cartographic.GetValue(1).ToString();
            //        double altitude = double.Parse(cartographic.GetValue(1).ToString());
            //        break;
            //    case GlobeEventType.Object:
            //        var objects = Context.PickRectangular(EventArgs.X-10,EventArgs.Y+10, EventArgs.X + 10, EventArgs.Y -10);
            //        List<string> objectPaths = new List<string>();
            //        foreach (string s in objects)
            //        {

            //        }
            //        DeleteObjects(objectPaths);
            //        break;
            //    case GlobeEventType.Globe:
            //        Context.RubberBandLineWidth = 2;
            //        Context.RubberBandColor = System.Drawing.Color.White;
            //        Context.ActivateRubberBandOnCentralBody();
            //        break;
            //    case GlobeEventType.Screen:
            //        Context.RubberBandLineWidth = 2;
            //        Context.RubberBandColor = System.Drawing.Color.Yellow;
            //        Context.ActivateRubberBand();
            //        break;
            //    case GlobeEventType.None:
            //        break;
            //    default:
            //        break;
            //}
        }
Beispiel #3
0
 public void OnMouseClick(IAgUiPlugin3DMouseEventArgs EventArgs, IAgUiPlugin3DNotifyContext Context)
 {
 }