[osg-users] osg::Camera setProjectionMatrixAsFrustum() not working as expected

2009-03-02 Thread Bill Sause
Hello,

I am trying to create a mirror view of a scene and my first instinct was to 
just negate the left and right parameters of the osg::Camera 
setProjectionMatrixAsFrustum() call; however, this is causing all of the models 
to appear inverted instead of mirrored. When I mirror the scene horizontally to 
create an upside-down view (by negating both the left and right, and top and 
bottom parameters), everything looks fine. Is there something I'm missing?

Thanks,

Bill

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=7799#7799





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Camera setProjectionMatrixAsFrustum() not working as expected

2009-03-02 Thread Robert Osfield
Hi Bill,

You most likely a hitting up againt backface culling culling the wrong
faces because you've inverted the windings by swapping the coords.
You'll either need to disable back face culling or swap the face that
is used for back face culling.  This topic has already been discussed
today so please search the archives.

Robert.

On Mon, Mar 2, 2009 at 8:42 PM, Bill Sause osgfo...@tevs.eu wrote:
 Hello,

 I am trying to create a mirror view of a scene and my first instinct was to 
 just negate the left and right parameters of the osg::Camera 
 setProjectionMatrixAsFrustum() call; however, this is causing all of the 
 models to appear inverted instead of mirrored. When I mirror the scene 
 horizontally to create an upside-down view (by negating both the left and 
 right, and top and bottom parameters), everything looks fine. Is there 
 something I'm missing?

 Thanks,

 Bill

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=7799#7799





 ___
 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