Hi Bjorn,

The orientation of the view would normally come under the
View::getCamera()'s ViewMatrix, usually it's the job of the
CameraManipulators to do this, so you could implement the local offsets
using a custom CameraManipulator written specifically for the OcculusRift.

Alternatively you could you track the view matrix offset and apply this to
the left/right slave camera view offsets, so that it automatically gets
handled regardless of the the CameraManipulator applied to the viewer.

Does this make sense?
Robert.


On 26 September 2013 14:25, Björn Blissing <bjorn.bliss...@vti.se> wrote:

>
> robertosfield wrote:
> > Hi Jan,
> >
> > I just had a quick look over the osgoculusviewer code and first thought
> is that it should be possible to convert the code across to the new a
> osgViewer::ViewConfig subclass which could sit alongside the new
> include/osgViewer/config configurations.  The implementation would use a
> series of View slave Camera's and would make support available to any OSG
> viewer application that assigns the OculusRift config.
> >
> > Robert.
> >
> >
>
>
> Hi Robert,
>
> I am trying to convert the code to the osgViewer::ViewConfig concept. I am
> halfway there, but I seem to have reached a small bump in the road. I get
> the screen correctly setup with slave cameras. But I am unsure how to
> handle the orientation changes detected by the Oculus Rift unit.
>
> In the previous solution we used a subclass of osg::Group that contained a
> traverse method responsible for getting the orientation from the Rift and
> modifying the slave cameras.
>
> http://github.com/bjornblissing/osgoculusviewer/blob/master/src/hmdcamera.cpp#L43
>
> But this approach seem to fail with the osgViewer::ViewConfig since the
> traverse method only gets called during setup.
>
> Do you have any suggestions how to best implement this?
>
> Regards
> Björn
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=56495#56495
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to