Hallo,

Have a look at osgUtils SceneView and search for this:

        /** Callback for overidding the default method for compute the offset 
projection and view matrices.*/
        struct ComputeStereoMatricesCallback : public osg::Referenced
        {
            virtual osg::Matrixd computeLeftEyeProjection(const osg::Matrixd& 
projection) const = 0;
            virtual osg::Matrixd computeLeftEyeView(const osg::Matrixd& view) 
const = 0;

            virtual osg::Matrixd computeRightEyeProjection(const osg::Matrixd& 
projection) const = 0;
            virtual osg::Matrixd computeRightEyeView(const osg::Matrixd& view) 
const = 0;
        };

We subclassed from this and calculated all projections according to the
screen and headtracker informations, which worked fine independent of
the stereomode in use.

Hope this helps
Olaf Hasemann


Am Donnerstag, 2. September 2010 17:30 schrieb lucie lemonnier:
> Hi,
>
> I want to create a virtual reality application with OSG in an immersive
> environment (workbench cf. attached file) with head-tracking and
> stereoscopy, ... I want to implement the head-tracking with the
> stereoscopy. I get the values of position and orientation of the
> head-tracker with VRPN. How do I proceed to update the view? What should I
> update for the camera (view matrix, projection matrix, etc.) according to
> the data of the head-tracker? What should I change otherwise knowing that I
> must take into account the stereoscopy?
>
> Thank you!
>
> Cheers,
> lucie
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31278#31278
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/workbench_374.bmp
>
>
> _______________________________________________
> 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

Reply via email to