Exemplo n.º 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.
        }
Exemplo n.º 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;
            //}
        }
Exemplo n.º 3
0
 public void OnPickInfo(IAgUiPlugin3DPickEventArgs EventArgs, IAgUiPlugin3DNotifyContext Context)
 {
 }
Exemplo n.º 4
0
 public void OnMouseClick(IAgUiPlugin3DMouseEventArgs EventArgs, IAgUiPlugin3DNotifyContext Context)
 {
 }
Exemplo n.º 5
0
 public void OnPickInfo(IAgUiPlugin3DPickEventArgs eventArgs, IAgUiPlugin3DNotifyContext context)
 {
     throw new NotImplementedException();
 }