Hi,
the above code doesn't work. After some experiments a found a solution/ I make
matrix invert. Неre working code:
osg::PositionAttitudeTransform* Transf;// this is transform of my object
Transf-setPosition(osg::Vec3(100,200,300));
osg::Quat quad;
osg::Matrix matrix;
matrix.makeLookAt(
Hi, All
I have direction vector , how can I convert it to rotation quat? As I know I
need also Up vector, I can take Z_AXIS.
So I need formula to convert direction and Up vectors into Attitude quat.
Thank you!
Cheers,
Sergey
--
Read this topic online here:
Hi Sergey;
osg::Quat quad;
osg::Matrix matrix;
matrix.makeLookAt(headVector, directionVector, upVector);
matrix.get(quad);
Hope this helps.
Regards.
2009/5/21 Sergey Bocharov osgfo...@tevs.eu
Hi, All
I have direction vector , how can I convert it to rotation quat? As I know
On Thu, May 21, 2009 at 10:42 AM, Ümit Uzun umituzu...@gmail.com wrote:
Hi Sergey;
osg::Quat quad;
osg::Matrix matrix;
matrix.makeLookAt(headVector, directionVector, upVector);
matrix.get(quad);
A small tweak to the above is required. makeLookAt takes a eye point,
center
Hi, Robert , Ümit
So if I have object with coordinates (100,200,300) and want it to turn to point
(10,20,30) I must make this :
osg::PositionAttitudeTransform* Transf;// this is transform of my object
Transf-setPosition(osg::Vec3(100,200,300));
osg::Quat quad;
osg::Matrix
5 matches
Mail list logo