Hi,

You're right !! cross product is null ...  I don't know why but now I know
where is the problem.

Thanks :)

   Vincent.

2008/3/13, Vican, Justin E. <[EMAIL PROTECTED]>:
>
>  What are the values of _NodeTranslation  and_NodeTranslationStart?  If
> that cross product returns a zero vector (0,0,0), a NULL rotation will be
> computed.
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Vincent
> Bourdier
> *Sent:* Thursday, March 13, 2008 12:55 PM
> *To:* osg
> *Subject:* [osg-users] Matrixf and Quat problem
>
>
>
> Hi,
>
> I am trying for hours to make a rotation with two vectors...
>
> The code is  :
>
>  osg::Matrixf MR = osg::Matrixf::identity();    //matrix rotation
> MR.rotate(angle*osg::PI/180.0, _NodeTranslation^_NodeTranslationStart);
> osg::Quat qrotation = osg::Quat();
> qrotation.set(MR);
> _rotation *= qrotation;
>
> cout<<"Rot : "<<qrotation.x()<<" "<<qrotation.y()<<" "<<qrotation.z()<<"
> "<<qrotation.w()<<endl;
>
>
>
> And in the console, the result is :
>
> Rot : 0 0 0 1
> Rot : 0 0 0 1
> Rot : 0 0 0 1
> ...
>
> I've checked 'angle' and it is a good value, always increasing...
>
> Is there any problem in my code ? Why the Quat doesn't change... ?
>
> Thanks,
>
> regard,
>    Vincent
>
> _______________________________________________
> 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

Reply via email to