From the Viewer header file...

        /** Execute a main frame loop.
          * Equivalent to while (!viewer.done()) viewer.frame();
          * Also calls realize() if the viewer is not already realized,
          * and installs trackball manipulator if one is not already assigned.
          */
        virtual int run();

If you don't want a TrackballManipulator, you'll need to *not* use 
Viewer::run().
   -Paul


On 11/28/2011 9:35 PM, Juan Fernando Herrera J. wrote:
Hi,

I want to set the modelview matrix with
viewer.getCamera()->setViewMatrix(modelViewMatrix) like in the
following code:

int main(int argc, char **argv)
{
     osgViewer::Viewer viewer;
     osg::Node* rootNode = createRootNode();
     viewer.setSceneData(rootNode);
     return viewer.run();
}

Later, in an osg::NodeCallback,  I perform:

     viewer.getCamera()->setViewMatrix(modelViewMatrix);

But the modelview matrix isn't modified at all.

On the other hand,
viewer.getCamera()->setProjectionMatrix(projectionMatrix) seems to
work.

What should I do to the viewer in order for setViewMatrix() to work?

Thank you!

Cheers,
Juan
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




--
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to