Hi David,

I'm experimenting using the a scene graph projected in Ortho mode using the 
setProjectionMatrixAsOrtho function on the camera and while using the 
TerrainManipulator on the camera I noticed that the pan is working, but zoom is 
not! In fact, the only way that I could affect any kind of zoom was to narrow 
the POV on the camera (that realty is not a zoom).

Well in fact yes... Zoom, in "camera-speak", is making the FOV of the camera smaller/larger. What the normal manipulators do to zoom is to move the camera itself, i.e. dolly in/out in "camera-speak". You may have seen the "dolly in zoom out" effect in movies, where the camera dollies in while doing a zoom out with the lens at the same time, and I use that expression to help me remember the difference between the two.

http://en.wikipedia.org/wiki/Dolly_zoom

http://en.wikipedia.org/wiki/File:Contra-zoom_aka_dolly_zoom_animation.gif

But to get back to your question, this is an FAQ... Since with an ortho camera moving the camera forward or back will have no visible effect (apart from when you start hitting your near/far planes), you won't be able to zoom with the normal camera manipulators in an ortho view. You will have to make your own manipulator or use another way of changing the camera's left/right and top/bottom clipping planes, effectively the camera's field of view (though in ortho it's not a frustum, but a box).

I kind of wish (and I've expressed this wish in threads that asked the same question before, but haven't had time to do anything about it) that the OSG camera manipulators supported affecting other parameters of the camera than just its view matrix. As it is, you'll have to affect the projection matrix yourself directly, i.e. your camera manipulator will have to know about the camera(s) it's affecting, which defeats the nice loose coupling that we have between camera manipulator and camera otherwise.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to