See http://www.openscenegraph.org/projects/osg/wiki/Community/Contractors for a 
list of users who provide OSG services and paid technical support 


Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__________________________________________________________

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of GMD 
GammerMaxyandex.ru
Sent: Wednesday, November 05, 2008 7:45 AM
To: [email protected]; Robert Osfield
Subject: Re: [osg-users] How should I reset position/rotation/scale 
usingMatrixTransform?

Thanks Robert,
PositionAttitudeTransform works as I nedded. But can I reset matrix 
transformation using MatrixTransform? 

Robert, answer please, is there any paied technical support of OSG which can 
helps me do some things with OSG or give advices about how can I realize some 
of my ideas better? If there is some thing like this could you give me they 
contacts. 

Thanks, Max. 


05.11.08, 13:17, "Robert Osfield" <[EMAIL PROTECTED]>:

> Hi ??? Please use the mailing list convention of signing with the name 
> you wish to be addressed with, Might I recommend you use 
> osg::PositionAttitudeTransform?  This manages the potioning, scaling, 
> rotation and pivot point all as separate variables so there is no need 
> to try an decompose a Matrix into its part and recombine.
> Robert.
> On Wed, Nov 5, 2008 at 5:47 AM, GMD GammerMaxyandex.ru 
> <[EMAIL PROTECTED]> wrote:
> > Hi. I have question about MatrixTransform.
> > How should I reset position/rotation/scale using MatrixTransform?
> > [code]
> > {
> > osg::Matrix mat;
> > osg::Vec3d _Trans = MyMatrixTransform->getMatrix().getTrans();
> > osg::Quat _Rotate =MyMatrixTransform->getMatrix().getRotate();
> > osg::Vec3d _Scale = MyMatrixTransform->getMatrix().getScale();
> > MyMatrixTransform->setMatrix(osg::Matrix::scale(1.0f,1.0f,1.0f) *
> > osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f)*
> > osg::Matrix::translate(0.0f,0.0f,0.0f));
> > mat = osg::Matrix::scale(1.0f,1.0f,1.0f) * 
> > osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f) * 
> > osg::Matrix::translate(0.0f,0.0f,0.0f);
> > if (!scale) mat.preMult (osg::Matrix::scale(_Scale)); if (!rotate) 
> > mat.preMult (osg::Matrix::rotate(_Rotate)); if (!position) 
> > mat.preMult (osg::Matrix::translate(_Trans));
> > MyMatrixTransform->setMatrix (mat);
> > }
> > [/code]
> >
> > After that rotation ( 
> > MyMatrixTransform->getMatrix().preMult(osg::Matrix::rotate(angle3,osg::Vec3d(0,0,1)));
> >  ) depends from scale (when scale is 10.0, rotation (angle3 = 0.2) visually 
> > works like angle3=0).
> >
> > How should I reset position/rotation/scale correctly?
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap
> > h.org
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org

--
Яндекс.Открытки. От всей души http://cards.yandex.ru/ 
_______________________________________________
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