<div dir="ltr"><div>Solved:</div><div><br></div><div>https://github.com/eco-info/osgCookbook/blob/master/outros/terreno1/terreno1.cpp<br></div><br>On Wednesday, January 16, 2019 at 2:04:12 PM UTC-2, Rodrigo Dias wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Thank you, Glenn, but this part was already solved.
<br>
<br>About sending the camera's coordinates to screen text, I've found a solution elsewhere:
<br>
<br>
<br>Code:
<br> Vec3f eye;
<br> while ( !viewer.done() ) {
<br> eye = viewer.getCamera()-><wbr>getInverseViewMatrix().<wbr>getTrans();
<br> text1-><wbr>setText((L"Heading: " + to_wstring(eye.x())).c_str());
<br> text2-><wbr>setText((L"Pitch: " + to_wstring(eye.y())).c_str());
<br> text3-><wbr>setText((L"Roll: " + to_wstring(eye.z())).c_str())<wbr>;
<br> viewer.frame()<wbr>;
<br> }
<br>
<br>
<br>
<br>
<br>or
<br>
<br>
<br>Code:
<br> Vec3f eye, center, up;
<br> while ( !viewer.done() ) {
<br> viewer.<wbr>getCamera()-><wbr>getViewMatrixAsLookAt( eye, center, up );
<br> text1-><wbr>setText((L"Heading: " + to_wstring(eye.x())).c_str());
<br> text2-><wbr>setText((L"Pitch: " + to_wstring(eye.y())).c_str());
<br> text3-><wbr>setText((L"Roll: " + to_wstring(eye.z())).c_str())<wbr>;
<br> viewer.frame()<wbr>;
<br> }
<br>
<br>
<br>
<br>
<br>Now the numbers change as I move the scene around using TrackballManipulator. However, the keys don't change any number when I use FirstPersonManipulator. I tried to look at the source code for examples:
<br>
<br>
<br>> grep -nrw . -e 'FirstPersonManipulator' --include=*.cpp
<br>
<br>
<br>but this only returns lines from osgGA/FirstPersonManipulator.<wbr>cpp
<br>
<br>How can I know how to use FirstPersonManipulator without a program that uses it?
<br>
<br>------------------
<br>Read this topic online here:
<br><a href="http://forum.openscenegraph.org/viewtopic.php?p=75499#75499" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75499%2375499\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFOyT_dFL54t-cM_4Au_HXzwIG7cw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75499%2375499\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFOyT_dFL54t-cM_4Au_HXzwIG7cw';return true;">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=75499#<wbr>75499</a>
<br>
<br>
<br>
<br>
<br>
<br>______________________________<wbr>_________________
<br>osg-users mailing list
<br><a href="mailto:osg-users@lists.openscenegraph.org" target="_blank" rel="nofollow" onmousedown="this.href='mailto:osg-users@lists.openscenegraph.org';return true;" onclick="this.href='mailto:osg-users@lists.openscenegraph.org';return true;">osg-users@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/f227f01f-072c-42f6-8057-8b4673ebe590%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/f227f01f-072c-42f6-8057-8b4673ebe590%40googlegroups.com</a>.<br />