[osg-users] adding object models in osgEarth best practices

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Thu May 2 23:34:32 PDT 2019


Hi David,

to set up a Quat with your hpr you can do something like this:
osg::Quat q;
q.makeRotate(h,osg::Vec3(0,0,1),p,osg::Vec3(1,0,0),r,osg::Vec3(0,1,0));

of course you can tune the order

Cheers,
Nick

On Thu, May 2, 2019 at 11:02 PM David Bobavid <david.bobavid at gmail.com>
wrote:

> Hi Eran,
>
> Ok, thanks! I'll look into that.
>
> Last question (I think) for now... I'm trying to set my cow's orientation.
> From what you have suggested previously, would I add another
> MatrixTransform node with the rotations set into it?
>
> Or should I add a PositionAttitudeTransform instead? If so, are there some
> helper classes that I can use that will create the Quat properly based on
> my heading, pitch and roll? I've been looking through the headers and
> cannot seem to find something that will help.
>
> Thank you again!
>
> Cheers,
> David
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75944#75944
>
>
>
>
>
> _______________________________________________
> 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/20190503/98d587ad/attachment.html>


More information about the osg-users mailing list