Hi Anthony,

I would suggest you use osg::PosititionAttitudeTransform as it has
separate fields for position, scale and rotation (attitude).

Robert.

On Fri, Jul 16, 2010 at 8:22 AM, Anthony Face <[email protected]> wrote:
> Hello,
>
> i would like to use MatrixTransform to rotate an objet but i do not succed !
>
> this object already have a scale and a translation associeted.
>
>
> i would like a function like:
>
> Code:
> void Objet3D::rotateTo(double angle, double x,double y, double z){/* code */}
>
>
>
> i tried:
>
> Code:
>
> Matrix mr,mt,ms;
> mt.makeTranslate(getMatrix().getTrans());
> ms.makeScale(getMatrix().getScale());
> setMatrix(ms*mr*mt);
>
>
>
> but rotation dont work (something happend but not what i want).
>
> and
>
> Code:
>
> Matrix mr;
> mr.makeRotate(Quat(angle,x,y,z));
> setMatrix(mr*getMatrix());
>
>
>
> but same aproximatly result.
>
> i have to rotate my item only once every 20/50 frame (depends on fps)
>
> <I realy need  rotateTo and not rotateBy>
>
> i need your help, it can be something idio but ... need help :(
>
> ------------------------
>  (http://www.hordes.fr?ref=litllechicken)
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=30057#30057
>
>
>
>
>
> _______________________________________________
> 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