Compute Eye/ Camera location as GeoPoint

classic Classic list List threaded Threaded
3 messages Options
Earthican Earthican
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Compute Eye/ Camera location as GeoPoint

I'm after an algorithm/ function to return where osgEarth's map camera is as a GeoPoint.

Thanks for any help you can offer.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compute Eye/ Camera location as GeoPoint

You can call

  Camera::getViewMatrixAsLookAt(eye, center, up);

The "eye" will be in world coords. So then:

  GeoPoint point;
  post.fromWorld(srs, eye);

Hope this helps.
Glenn Waldron / Pelican Mapping
Earthican Earthican
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compute Eye/ Camera location as GeoPoint

That was just what I needed.

Many thanks, once again.
Loading...