穿梭在GLOBE坐标之间

GLOBE的坐标分为三大类:

1)window窗口坐标,这个是鼠标获取的窗口位置坐标,是动态的,一个地理位置,并不对应一个绝对的窗口位置。

2)地理坐标:这个是经度、维度以及幅度,是GLOBE内部API调用的

3)opengl绘画坐标:这个是给OPENGL API调用的坐标。

//Declaring the GlobeViewUtil.
private IGlobeViewUtil m_globeViewUtil = null;

//Cast GlobeViewUtil from the globe camera.
m_globeViewUtil = sceneViewer.Camera as IGlobeViewUtil;

//Convert a geographic coordinate to geocentric.
m_ipGlobeViewUtil.GeographicToGeocentric(longitude, latitude, altitudeMeters, 
out X, out Y, out Z);

//Convert geocentric to geographic.
m_ipGlobeViewUtil.GeocentricToGeographic(X, Y, Z, 
out longitude, out latitude, out altitudeMeters);

//Convert geocentric to window.
int winX, winY;
m_globeViewUtil.GeocentricToWindow(x, y, z, out winX, out winY);

//Convert window to geographic.
m_globeViewUtil.WindowToGeographic(m_globeDisplay, m_sceneViewer, X, Y, true, 
out lon, out lat, out alt);
22 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值