[osg-users] Change Perspective to Orthogonal View

Rômulo Cerqueira romulogcerqueira at gmail.com
Sun Mar 5 16:51:39 PST 2017


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








More information about the osg-users mailing list