David Goering schrieb: > Hey, > I tried what you told me, here is the code: > > osg::Matrix rot = rot.rotate(osg::DegreesToRadians(45.0),1.0,0.0,0.0); > osg::Matrix sca = sca.scale (1.0,1.0,1.0); > osg::Matrix m = rot * sca; > arTransform->setMatrix(m); > osg::Vec3f vec = arTransform->getMatrix().getTrans(); > double x = vec.x(); > double y = vec.y(); > double z = vec.z(); > > But when I do this, x,y and z values are all 0. > Am I doing something wrong or misunderstanding something ?
yes, of course they are all zero. You combine a rotation with a scale transformation. This never gives any translation part, and that's what you get with getTrans(). So you must have misunderstood something. What did you expect to get? regards Ralph _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

