Hi,

I want to move one of my nodes before the rendering starts. So I get the transformation matrix and do a translation like this:


    Matrix newMatrix;
    newMatrix.makeTranslate(5.0, 5.0, 5.0);

    Matrix matrix = myNode->asTransform()->asMatrixTransform()->getMatrix();
    matrix.postMult(newMatrix);

    myNode->asTransform()->asMatrixTransform()->setMatrix(matrix);


Afterwards I set the scene to the viewer and start the rendering:


    viewer.setSceneData(group); // 'myNode' is one child of 'group'
    viewer.realize();

    while ( !viewer.done() ) {
   
    viewer.sync();
        viewer.update();
        viewer.frame();
    }


The translation is still set to that transformation matrix, but the result is not visible on screen. Did I forget something? Do I have to update anything else?

regards,
Oliver
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to