[osg-users] How to get the camera's roll pitch and heading?
Trajce Nikolov NICK
trajce.nikolov.nick at gmail.com
Sat Apr 1 03:51:48 PDT 2017
Hi Judy,
you do something like this:
osg::Matrixd mx = view->getCamera()->getInverseViewMatrix();
osg::Quad q = mx.getRotate();
and you can use hpr = fromQuat(q)
fromQuat can be found here
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-Base/Mathematics.cpp
On Sat, Apr 1, 2017 at 10:39 AM, Judy <515415812 at qq.com> wrote:
> Hi Robert,
> As a beginner of openscenegraph,I have an urgent question that how to get
> the camera's heading pitch and yaw ?
> could you give me some suggestion about this question?
> Best regards!
> Judy Fan.
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
--
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170401/5a83ec1f/attachment-0003.htm>
More information about the osg-users
mailing list