Re: [osg-users] Orphographic Camera View?

2009-04-26 Thread Michael Bosse'
You need to take into account the aspect ratio of the display format,
I believe, if i understand what you are asking..

It is only necessary to make war with five things: with the maladies
of the body, with the ignorances of the mind, with the passions of the
body, with the seditions of the city, with the discords of families.
- Tacitus

The desire for safety stands against every great and noble
enterprise. - Tacitus

Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety. - Benjamin
Franklin

Numquam ponenda est pluralitas sine necessitate. - William of Ockham



On Sat, Apr 25, 2009 at 6:59 PM, Paul gaffe...@gmail.com wrote:
 Im using the following code for orthographic projection:

 Code:

 // set the projection matrix
    camera-setProjectionMatrix(osg::Matrix::ortho(-2.0, 2.0, -2.0, 2.0, 0.0, 
 1.0));

    // set the view matrix
    camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
    camera-setViewMatrix(osg::Matrix::identity());



 When I resize the window I would like the scene to stretch and not resize, So 
 if the window is twice as wide as it is high the i would like the scene to 
 stretch twice as wide too. Any ideas?

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





 ___
 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


Re: [osg-users] Orphographic Camera View?

2009-04-25 Thread Paul
Thanks, i did do a search through the source, but i spelled it wrong.
Thanks again. lol

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





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


Re: [osg-users] Orphographic Camera View?

2009-04-25 Thread Paul
Im using the following code for orthographic projection:

Code:

// set the projection matrix
camera-setProjectionMatrix(osg::Matrix::ortho(-2.0, 2.0, -2.0, 2.0, 0.0, 
1.0));

// set the view matrix
camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera-setViewMatrix(osg::Matrix::identity());



When I resize the window I would like the scene to stretch and not resize, So 
if the window is twice as wide as it is high the i would like the scene to 
stretch twice as wide too. Any ideas?

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





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