You can make a quaternion from euler angles like this:
osg::Quat q = osg::Quat( pitch, osg::Vec3d(1,0,0),
roll, osg::Vec3d(0,1,0),
yaw, osg::Vec3d(0,0,1));
Then multiply your vector by the quat:
osg::Vec3d rotated = vector * q;
On 09/06/10 6:16 PM, John Galt wrote:
Hi,
How do I rotate a vector by certain Roll, Pitch, Yaw angles?
Let us say I have a vector osg::Vec3d vector = new osg::Vec3d(10,10,5);
How do I rotate this?
Thank you!
Cheers,
John
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28759#28759
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org