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.Cameraas
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);