<div dir="ltr"><div>I managed to do that inside the `handle` method:<br></div><div><br></div><div>    osg::Vec3d eyePos;<br>    osg::Matrix matrix = _viewer->getCameraManipulator()->getMatrix();<br>    eyePos = matrix.getTrans();<br>    lat = eyePos.y();<br>    lon = eyePos.x();<br>    alt = eyePos.z();<br><br></div><br>On Wednesday, August 22, 2012 at 3:21:20 PM UTC-3, Paul Leopard wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I want to query osgViewer to get the current camera position (Note: not the home position). As I move around in a scene I want to know the current coordinates of my eyepoint so that I can save it to a configuration file so that the next time I run my app I can read that position and set it as the home position.
<br>
<br>How can I simply get the current eye position (same coordinate frame as the home position is specified in).
<br>
<br>Thanks in advance,
<br>Paul
<br>
<br>------------------
<br>Read this topic online here:
<br><a href="http://forum.openscenegraph.org/viewtopic.php?p=49410#49410" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D49410%2349410\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6esnVV9JUPrzD0tgzy0KTEFFqyA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D49410%2349410\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6esnVV9JUPrzD0tgzy0KTEFFqyA';return true;">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=49410#<wbr>49410</a>
<br>
<br>
<br>
<br>
<br>
<br>______________________________<wbr>_________________
<br>osg-users mailing list
<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="WN_ujEq2RC8J" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a>
<br><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a>
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/d8156700-7b09-467c-8e69-ed9379b533ea%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/d8156700-7b09-467c-8e69-ed9379b533ea%40googlegroups.com</a>.<br />