Hello Venkat,

On 01/31/2013 03:48 AM, Venkat (OpenSG) wrote:
> I am able to use an orthographic camera with simple scene manager,
> however the zoom in/out does not work though rotation works correctly.
> I see that the projection matrix returned by the orthographic camera has
> the z-translation component zero, this I believe that this is the reason
> for the zoom issue.  What would the best way to implement zoom in/out?
>
> The only way I can think of is to store an external variable for the
> zoom factor and set the camera horizontal/vertical size before draw but
> I was hoping to avoid that and use the built-in navigator functionality.

the built-in navigators don't really perform a zoom, they translate the 
camera along the z axis. With a perspective projection that looks 
similar to narrowing the field of view.
Of course with an orthographic camera moving the camera closer/farther 
from the scene has no effect (ignoring near/far clipping), so it always 
looks the same. To get a zoom effect you need to make the viewing volume 
smaller (so that a smaller world volume is projected to the same screen 
size -> zoom) by changing the ortho camera's horizontalSize, 
verticalSize fields. For a perspective camera you'd change the field of 
view instead.

        Cheers,
                Carsten


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to