Hi,

It sound normal for me to have a y rotation for result.
Make a little drawing, you will see that.

Vincent.

2008/12/22 hemanth korrapati <[email protected]>

> hi all,
>
> I want to rotate a point which is on x-axis by 45 degrees w.r.t z-axis
> and 45 degrees w.r.t x-axis. So I am using the following code
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>        osg::Matrixd mat;
>
>  
> mat.setRotate(osg::Quat(osg::DegreesToRadians(45.0),osg::Vec3d(.0,0.0,1.0))*osg::Quat(osg::DegreesToRadians(45.0),osg::Vec3d(1.0,0.0,0.0)));
>        osg::Vec3 temp(2000,0.0,0.0);
>        temp=mat*temp;
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> After this I see that only the point is rotated across y-axis(i.e the
> first rotation)  but not along x-axis. (only one rotation performed)
> also it rotates in the negative direction.
>
> dows anyone know why these things happen ?
> _______________________________________________
> 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