Hi,

In our application, I need to get the cameraViewMatrix in the
updateTraversal. I have done that with an update callback.
But I think I have the ViewMatrix of the last frame, not the current frame,
because of some graphics problems.

I have look in Viewer::updateTraversal() and I have found that the
updateTraversal is done before the camera matrix is set by the manipulator,
see the code :

void Viewer::updateTraversal()
{
    ......
    if (getSceneData())
    {
        getSceneData()->accept(*_updateVisitor);
    }
    .......
    if (_cameraManipulator.valid())
    {
        setFusionDistance( getCameraManipulator()->getFusionDistanceMode(),
                            getCameraManipulator()->getFusionDistanceValue()
);

        _camera->setViewMatrix(_cameraManipulator->getInverseMatrix());
    }
    ......
}

Is this intend ?
I have try to set the camera matrix from the manipulator before the
traversalUpdate and everything works fine.

I wan't to know if there is resons for this specific order, or if we could
set the camera matrix from the manipulator before the traversalUpdate. If
so, I could submit this change to osg-submissions.

Regards.

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

Reply via email to