Hi Whu, Reading your post is very difficult as there is no spacing. Could you please just post one question at a time.
Robert. On 23 September 2014 13:49, whu <[email protected]> wrote: > Dear All, > I used the stereo mode in my osg project, and the result was fine. > The code segment is the same as in the osg learning material: > *osg::DisplaySettings* mydis = new osg::DisplaySettings;* > * mydis->setStereoMode(osg::DisplaySettings::QUAD_BUFFER);* > * mydis->setEyeSeparation(0.07f);* > * mydis->setStereo(true);* > * mydis->setScreenHeight(traits->height);* > * mydis->setScreenWidth(traits->width);* > * viewer.setDisplaySettings(mydis);* > Here I got some questions, and I want some suggestions. > 1) how to fetch the ritght-eye image and the left-eye image at the same > time? > I used the code as below to fetch the image. > At the begining of the program, I used > *viewer->getCamera()->attach(osg::Camera::COLOR_BUFFER, > image.get() );* > then when use *osgDB::writeImageFile( *image, capturePNG ); *after the > frame() function. > I can get the image, but I try to get the right-eye and the left-eye image > just running the program once. > By setting the right-eye and left-eye mode twice one by one, may cause > some problems, especially when I used callback(s). > Can someone give me suggestions ? > 2) the differences between the mouse wheel and the right key when trying > to focus near to the object. > In the stereo mode as above, using* viewer->setCameraManipulator(new > osgGA::TrackballManipulator);* > when I try to focus on the object, I used the mouse wheel, it worked well; > but when I used the right key, problems come. > It looked as if the *EyeSeparation *was changed at the same time*(may not > the reason) *, seemed bigger then the original value, this caused > physical discomfort. > I am little confused. > This caused my third questions. > I used * viewer->getCameraManipulator()->getMatrix();* to rember my > interest views. > But when I used viewer->getCameraManipulator()->setByMatrix(myMatrix) to > "recovery" the view, problems come. > The above code can change the view , but it also changed the > *EyeSeparation(may > not the reason) when I operate as *described *in the 2) .* > * This is not my *expectation*.* > * Waitting for your kind answers.* > * Thanks very much.* > * whu.* > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

