On Thu, May 8, 2008 at 6:53 AM, ahmed nawar <[EMAIL PROTECTED]> wrote: > Dear all, > > I have (x, y, z, h, p, r) For an object. > I use them as follwing > positionAttitudeTransform->setPosition(osg::Vec3(x, y, z)); > positionAttitudeTransform->setAttitude(DOSGUtil::euler_to_quat( h,p,r)) ; > > How can i build a second "positionAttitudeTransform" contain the > inverse of the first one so when i but the first under the second the > node will return to origin.
It'd much easier to use a second Transform as a MatrixTransform, then just get the matrix from the first PositionAttitudeTransform and invert it. However, perhaps just fixing the scene graph so that you don't nest components the way you have, the fact you are needing to do this screams out to me that your scene graph is inappropriately structured, and you should move the nested subgraph out to be a sibling of the upper PAT. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org