I thought I understood this just fine, but I apparently don't. I have a model that is half the size it needs to be. So, I need to scale it by 2.0 in all directions.
It is also in the wrong position, so I need to translate it out to (1000, 2000, 3000); Once it is translated, I need to rotate it. This involves quats, but for simplicities sake, lets say the rotations are 10,20,30. Order is irrelevant, since I am just trying to print these things for now. So, I have a matrix transform. I set the matrix by: Mt->setMatrix(osg::Matrix::scale( scalevec) * osg::Matrix::rotate( rotquat) * osg::Matrix::trans (transvec)); Seems fine. Then, if I print out the values, I get some goofiness. Using the matrix getScale(), getTrans(), getRot() routines, I get them and print out values. Trans is fine. Rot and scale are goofy. This doesn't entirely surprise me, since the order of operations is dependent. In the scene graph, it looks wrong. If I use a position attitude transform, and explicitly set the trans, rot, scale separately, then it works. Before, I would have had a series of matricies that looks like this: Scenegraph root ->trans->rot->scale->model; What's the right way to do this? I'm thinking a translate -> rotate -> -translate is involved somehow. BTW if the scale is 1.0 in all directions, this works just fine. Thanks... Chris _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

