Beispiel #1
0
        public VECTOR3D?transformScreenToD3D(System.Windows.Point point)
        {
            Vector3?result = Helpler.GetProjectPoint3D(new Vector2((float)point.X, (float)point.Y), earth.camera, earth.global.ScreenWidth, earth.global.ScreenHeight, 0, earth.earthManager.earthpara);

            if (result == null)
            {
                return(null);
            }
            else
            {
                Vector3 v = (Vector3)result;
                return(new VECTOR3D(v.X, v.Y, v.Z));
            }
        }
Beispiel #2
0
        ///<summary>获取指定屏幕点经纬坐标</summary>
        public System.Windows.Point?getGeoCoordinate(float x, float y)
        {
            Vector3?vectmp = Helpler.GetProjectPoint3D(new Vector2(x, y), this, earth.global.ScreenWidth, earth.global.ScreenHeight, 0, earth.earthManager.earthpara);

            if (vectmp == null)
            {
                return(null);
            }
            else
            {
                Vector3 vec = (Vector3)vectmp;
                System.Windows.Media.Media3D.Point3D jwh = Helpler.PointToJWH(new System.Windows.Media.Media3D.Point3D(vec.X, vec.Y, vec.Z), earth.earthManager.earthpara);
                System.Windows.Point pnt = new System.Windows.Point(jwh.Y, jwh.X);
                return(pnt);
            }
        }