Re: [osg-users] How to change "field of view"(FOV), distance.

2017-08-22 Thread Maxim Senin
Hi, thanks guys!!! Task resolved! ... Thank you! Cheers, Maxim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71490#71490 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] How to change "field of view"(FOV), distance.

2017-08-21 Thread Gianni Ambrosio
Hi Arfaa, here is my implementation: Code: bool ViewerWidget::setMainCameraFieldOfView(double iFov) { osg::Camera* camera = mainView()->getCamera(); double fovy, aspectRatio, zNear, zFar; bool result = camera->getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar); if (true

Re: [osg-users] How to change "field of view"(FOV), distance.

2017-08-18 Thread Johny Canes
Hi, Code: double fovy, aspectRatio, zNear, zFar; _camera->getProjectionMatrix().getPerspective(fovy, aspectRatio, zNear, zFar); double aspect = (double)scrw / (double)scrh;