[osg-users] Mirrored camera

Ufuk ufuk.osg at gmail.com
Mon Mar 2 06:50:41 PST 2009


Hi Joakim,

in examples osgcamera, in function:
void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool
multipleScreens)

i tried this code sample:


if (i != 2)
            viewer.addSlave(camera.get(),
osg::Matrix::scale(aspectRatioScale, 1.0,
1.0)*osg::Matrix::translate(translate_x, 0.0, 0.0), osg::Matrix() );
        else
            viewer.addSlave(camera.get(), osg::Matrix::scale(-1.0 *
aspectRatioScale, 1.0, 1.0)*osg::Matrix::translate(translate_x, 0.0, 0.0),
osg::Matrix() );

camera which has id 2 become mirrored.

is it something that you want?


On Mon, Mar 2, 2009 at 4:46 PM, Joakim Simonsson <joakim at autosim.no> wrote:

> On Mon, 02 Mar 2009 15:37:07 +0100, Mathias Fröhlich <
> M.Froehlich at science-computing.de> wrote:
>
>
>> Hi,
>>
>> On Monday 02 March 2009 15:24, Joakim Simonsson wrote:
>>
>>> Is it possible to use two cameras, where one is mirrored, that share the
>>> same scene?
>>>
>> You should be able to have that attached either to the camera itself, the
>> mirrored one (is this true, or are the StateSets at the camera something
>> special - I dont remember by heart?).
>>
>
> I tried to attach that stateattribute to the mirrored camera only. But it
> does not seem to work.
>
>  Or attach a group to the camera that is
>> not shared , apply that state at this group and attach the shared graph to
>> those two groups.
>>
>
> I'll go for the group approach.
>
>
> Thanks for your help.
>
>
> --
> Joakim
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Ufuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090302/97270eaf/attachment-0003.htm>


More information about the osg-users mailing list