Re: [osg-users] If I have a Vec3f, and I want to rotate it, do I use osg::Matrixf::rotate?

2008-11-20 Thread Paul Martz
> probably a dumb question...but...
> 
> If I have a Vec3f, and I want to rotate it, do I use 
> osg::Matrixf::rotate? 

That will just create a rotation matrix. You'll still need to do the
multiplication to transform the vector.

Here's what you want, except I use a Quat instead of a Matrix:

osg::Vec3 v( x, y, z );
osg::Quat q( angle, osg::Vec3( axisX, axisY, axisZ ) );
v = q * v;

   -Paul

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] If I have a Vec3f, and I want to rotate it, do I use osg::Matrixf::rotate?

2008-11-20 Thread Ed

probably a dumb question...but...

If I have a Vec3f, and I want to rotate it, do I use 
osg::Matrixf::rotate? 


Ed
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org