[osg-users] getProjectionRectangle

#POH CHENG GUAN# timpcg at pmail.ntu.edu.sg
Sat Sep 15 07:56:46 PDT 2007


Hi Robert,
 
Thanks, got it working.
 
Regards,
CG

________________________________

From: osg-users-bounces at lists.openscenegraph.org on behalf of Robert Osfield
Sent: Fri 9/14/2007 5:29 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] getProjectionRectangle



Hi CG,

The core OSG uses osg::Viewport rather than ProjectionRectangle,
Viewport is a direct mapping to OpenGL's glViewport.   You can get the
Viewport from the Camera i.e.

  viewer.getCamera()->getViewport();

The ProjectionRectangle is really just a viewport, but Don decided he
didn't like the use of the word viewport for glViewport and that
ProjectionRectangle was somehow more intuitive.

The core OSG by contrast follows OpenGL naming.

Robert.

On 9/14/07, #POH CHENG GUAN# <timpcg at pmail.ntu.edu.sg> wrote:
> Hi,
>
> In version 1.2, I used the Producer's function: getProjectionRectangle to get my projected x, y, width and height for picking purpose. In version 2, how do I get the projected x, y, width and height?
>
> Regards,
> CG
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4871 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070915/6debbb84/attachment-0003.bin>


More information about the osg-users mailing list