Hello,
I'm trying to export a 3D scene from a non-Irrlicht program where zooming is performed by changing view width and height (model units). So, I export the position of camera & target, view width & height and near & far values and import into my own program built with Irrlicht.
So in Irrlicht I call buildProjectionMatrixPerspectiveLH where I need to multiply the first parameters (view height and width) with a zoom factor (my camera zooms by changing the field of view, so that's my zoom factor).
The problem is, how can I calculate the equivalent zoom factor? I want the objects in the scene to be rendered as they were in the original program. Well, it's pointing in the right direction but I need to make it zoom properly.
The difference I see is that when the near clipping plane distance is adjusted in the original program it doesn't affect the zoom (rendering using gluPerspective), but in Irrlicht there are visible zoom changes if I modify the near value. It seems like the behaviour of glFrustum, but I can't find glFrustum in Irrlicht source code. Same with gluPerspective. (Maybe someone can explain how perspective works in Irrlicht OpenGL driver? Which part of the source code?).
Any ideas? Thanks for reading...