[osg-users] How to get eye positions in passive stereo?

Jurgen Schulze jpschulze at gmail.com
Thu Nov 1 13:23:20 PDT 2007


Hi,

We are trying to figure out at what positions the eyes are in stereo mode.
The scene gets rendered correctly, but the following code returns the same
exact positions for leftEye and rightEye:

osg::Camera* camLeft  = _renderStageLeft->getCamera();
                osg::Camera* camRight = _renderStageRight->getCamera();
                Vec3 leftEye, rightEye, center, up;
                camLeft->getViewMatrixAsLookAt(leftEye, center, up);
                camRight->getViewMatrixAsLookAt(rightEye, center, up);

                osg::notify(osg::DEBUG_INFO) << "Left eye: "  << leftEye[0]
<< ", "  << leftEye[1] << ", "  << leftEye[2] << std::endl;
                osg::notify(osg::DEBUG_INFO) << "Right eye: " << rightEye[0]
<< ", " << rightEye[1] << ", " << rightEye[2] << std::endl;


How can we get the correct positions, which should be 1 IOD apart from each
other?

Jurgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071101/cae20b70/attachment.html 


More information about the osg-users mailing list