Hi Rômulo,

You can simply via the Camera::setProjectionMatrixAsOrtho(...) method.
Have a look at the include/osg/Camera header.  Also have a look at
gluOrtho docs online to understand the parameters used and mean as the
OSG uses a 1:1 mapping in terminology and implementation.

Robert.

On 6 March 2017 at 00:51, Rômulo Cerqueira <[email protected]> wrote:
> Hi,
>
> I like to change the current perspective view of my camera to an orthogonal 
> projection, keeping the same position. How can I do this?
>
> My current code of perspective camera:
>
>
> Code:
>
> _viewer->getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
> _viewer->getCamera()->setProjectionMatrixAsPerspective(fovY * 180.0 / M_PI, 
> aspectRatio, 0.1, 1000);
>
>
>
>
>
> ...
>
> Thank you!
>
> Cheers,
> Rômulo
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70409#70409
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to