Hi
attitude is osg::Quat, and it does not have routines to transform it with matrix. You can use something like this:
osg::Matrix world(osg::computeLocalToWorld(node->getParentalNodePaths()[0]));
//world.setTrans(osg::Vec3()); <- not sure if this makes any difference
world.preMultRotate(node->getAttitude());
osg::Quat result(world.getRotate());
Cheers,
Sergey.
11.01.2013, 08:35, "michael kapelko" <[email protected]>:
Hi.I have one PAT node as child of another one.I've implemented retrieval of its position in world coordinates this way:node->getPosition() * osg::computeLocalToWorld(node->getParentalNodePaths()[0])This works fine.I've tried the same for rotation:node->getAttitude() * osg::computeLocalToWorld(node->getParentalNodePaths()[0]);But this doesn't even compile.Can anybody tell me how to get node rotation in world coordinates?Thanks.,_______________________________________________
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

