Пример #1
0
        private void MissileMenuItem_Click(object sender, EventArgs e)
        {
            GSORoute route = new GSORoute();

            route.Add(116.601, 39.902, 100);
            route.Add(116.602, 39.902, 150);
            route.Add(116.603, 39.902, 200);
            route.Add(116.603, 39.902, 200);
            route.Add(116.603, 39.902, 200);
            route.Add(116.603, 39.902, 200);
            route.Add(116.604, 39.902, 250);
            route.Add(116.605, 39.902, 300);
            route.Add(116.606, 39.902, 250);
            route.Add(116.607, 39.902, 200);
            route.Add(116.608, 39.902, 150);
            route.Add(116.609, 39.902, 100);
            route.Speed = 500;
            route.RotateSpeed = 200;
            route.AltitudeMode = EnumAltitudeMode.Absolute;
            route.CircleRoute=false;

            GSOGeoModel geoModel = new GSOGeoModel();
            geoModel.FilePath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/model/aim9.3ds";
            geoModel.SetScale(30, 30, 30);

            GSOGeoDynamicRoute geoDynamicRoute = new GSOGeoDynamicRoute();
            geoDynamicRoute.TimerInterval = 20;
            geoDynamicRoute.Route = route;
            geoDynamicRoute.ActorGeometry = geoModel;
            geoDynamicRoute.Play();

            GSOFeature feature = new GSOFeature();
            feature.Geometry = geoDynamicRoute;
            GSOLabel gsoLabel = new GSOLabel();
            gsoLabel.Text = "爱国者";
            feature.Label = gsoLabel;

            globeControl1.Globe.MemoryLayer.AddFeature(feature);

            GSOCameraState cameraState = new GSOCameraState();
            cameraState.Longitude = 116.605;
            cameraState.Latitude = 39.902;
            cameraState.Altitude = 100;
            cameraState.Tilt = 85;
            cameraState.Heading = 0;
            globeControl1.Globe.FlyToCameraState(cameraState);
        }
Пример #2
0
        private void CopterMenuItem_Click(object sender, EventArgs e)
        {
            GSORoute route = new GSORoute();
            route.Add(116.601, 39.901, 1000);
            route.Add(116.603, 39.901, 1000);
            route.Add(116.605, 39.901, 1000);
            route.Add(116.605, 39.901, 1000);
            route.Add(116.605, 39.901, 1000);
            route.Add(116.605, 39.901, 1000);
            route.Add(116.605, 39.903, 1000);
            route.Add(116.605, 39.905, 1000);
            route.Add(116.605, 39.907, 1000);
            route.Speed = 200;
            route.RotateSpeed = 50;
            route.AltitudeMode = EnumAltitudeMode.Absolute;
            route.CircleRoute = true;

            GSOGeoModel geoModel = new GSOGeoModel();
            geoModel.FilePath = Path.GetDirectoryName(Application.ExecutablePath) + "/Resource/model/客机.3ds";
            geoModel.RotateZ = -90;
            geoModel.SetScale(0.1, 0.1, 0.1);
            GSOGeoDynamicRoute geoDynamicRoute = new GSOGeoDynamicRoute();
            geoDynamicRoute.TimerInterval = 20;
            geoDynamicRoute.Route = route;
            geoDynamicRoute.ActorGeometry = geoModel;
            geoDynamicRoute.Play();

            GSOFeature feature = new GSOFeature();
            feature.Geometry = geoDynamicRoute;
            GSOLabel gsoLabel = new GSOLabel();
            gsoLabel.Text = "国航A9";
            feature.Label = gsoLabel;

            globeControl1.Globe.MemoryLayer.AddFeature(feature);

            GSOCameraState cameraState = new GSOCameraState();
            cameraState.Longitude = 116.601;
            cameraState.Latitude = 39.901;
            cameraState.Altitude = 2500;
            cameraState.Tilt = 0;
            cameraState.Heading = 0;
            globeControl1.Globe.FlyToCameraState(cameraState);
        }