| 查看: 804 | 回复: 2 | ||
[求助]
ArcGlobe二次开发,鼠标拾取点转换成地理坐标错误
|
2楼2013-11-12 21:58:55
【答案】应助回帖
|
(1) WindowToGeographic() function was introduced for a fast and rough estimate of a geographic location that can then be used, for example, for accumulating the geographic extent of the 3D view as defined by a window; or as a faster (and rougher) substitute for standard Locate() when doing picking. (2) It appears that a safe mode from within an AfterDraw() handler, is 'useZBufferValue = true' -- because otherwise Locate() is used and will draw the whole frame again in our 'internal' transformation and scaling for precision. (3) Regarding precision: (a) when useZBufferValue is true, we directly read from the Z-Buffer the depth component and then use gluUnProject() to get x, y, z coordinates. The precision of Z-Buffer depth values varies with "how far you zoom in or out" and is not that precise anyway. (b) when useZBufferValue is false, we use Locate() which uses a 'Pick-Render' pass to calculate the intersection with the mesh at the current LOD as defined by the view -- so again the precision varies with the current view parameters. - Note that the precision of the altitude (i.e. elevation) component can be improved by additionally calling IGlobeDisplay::GetSurfaceElevation(); with bGetMaxResolution argument set to true. (4) Currently we are not using a "mesh-ray intersection algorithm " which would work for us only when no elevation data is present -- the case that can probably be easily calculated on the client side anyway. |
3楼2013-11-12 22:02:11













回复此楼