[osg-users] [3rdparty] Use PNG as texture for terrain in osgEarth

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed May 13 14:05:40 PDT 2020


Solved:

https://github.com/eco-info/osgCookbook/blob/master/outros/terreno1/terreno1.cpp

On Wednesday, January 16, 2019 at 2:04:12 PM UTC-2, Rodrigo Dias wrote:
>
> Thank you, Glenn, but this part was already solved. 
>
> About sending the camera's coordinates to screen text, I've found a 
> solution elsewhere: 
>
>
> Code: 
>         Vec3f eye; 
>         while ( !viewer.done() ) { 
>                 eye = 
> viewer.getCamera()->getInverseViewMatrix().getTrans(); 
>                 text1->setText((L"Heading: " + 
> to_wstring(eye.x())).c_str()); 
>                 text2->setText((L"Pitch: " +   
> to_wstring(eye.y())).c_str()); 
>                 text3->setText((L"Roll: " +   
>  to_wstring(eye.z())).c_str()); 
>                 viewer.frame(); 
>         } 
>
>
>
>
> or 
>
>
> Code: 
>         Vec3f eye, center, up; 
>         while ( !viewer.done() ) { 
>                 viewer.getCamera()->getViewMatrixAsLookAt( eye, center, up 
> ); 
>                 text1->setText((L"Heading: " + 
> to_wstring(eye.x())).c_str()); 
>                 text2->setText((L"Pitch: " +   
> to_wstring(eye.y())).c_str()); 
>                 text3->setText((L"Roll: " +   
>  to_wstring(eye.z())).c_str()); 
>                 viewer.frame(); 
>         } 
>
>
>
>
> 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: 
>
>
> > grep -nrw . -e 'FirstPersonManipulator' --include=*.cpp 
>
>
> but this only returns lines from osgGA/FirstPersonManipulator.cpp 
>
> How can I know how to use FirstPersonManipulator without a program that 
> uses it? 
>
> ------------------ 
> Read this topic online here: 
> http://forum.openscenegraph.org/viewtopic.php?p=75499#75499 
>
>
>
>
>
> _______________________________________________ 
> osg-users mailing list 
> osg-users at lists.openscenegraph.org 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/f227f01f-072c-42f6-8057-8b4673ebe590%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200513/92eacffe/attachment.html>


More information about the osg-users mailing list