[osg-users] osg Coordinate system

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Sat Apr 29 01:58:43 PDT 2017


Hi,

Here you can find some snippets:
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-CIGI/IGPluginCIGI.cpp

but you rotate it normaly as in flat earth and then apply the
transofrmation for that geo location:

osg::Matrixd l2w;
osg::EllipsoidModel em;
em.computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat),osg::DegreesToRadians(lon),alt,l2w);

osg::Quat hpr;
osg::Matrixd finalMatrix = osg::Matrixd::rotate(hpr) * l2w;

On Sat, Apr 29, 2017 at 7:03 AM, Vinoth Rajendran <
vinothrajendran4pro at gmail.com> wrote:

> Hi,
>
> ...
>
> yaa,Now i am getting the Up Vector.But i unable to rotate correctly my
> object(entity) in scene with respect to Particular Axis.
>
>   if it is not geocentric(flat),if i want change the heading i can make
> rotate with respect to Z-axis,same pitch w.r.to X-Axis and Roll w.r.to
> Y-Axis.
>
>       But in geocentric how i can change heading,Pitch and Roll of my
> Entity ?
> Can anyone explain me please ?
>
> Thank you!
>
> Cheers,
> Vinoth
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70861#70861
>
>
>
>
>
> _______________________________________________
> 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/20170429/2bfa1656/attachment-0002.htm>


More information about the osg-users mailing list