[osg-users] zoom and orthographic projections

Paul MARTZ pmartz at skew-matrix.com
Thu Mar 26 07:42:01 PDT 2009


TrackballManipulator doesn't support zoom, it only supports moving the  
viewpoint forwards & backwards, which has no visible effect in ortho.  
You'll need to create an event handler and have it modify the camera  
projection matrix.

Paul Martz
Skew Matrix Software


On Mar 26, 2009, at 8:35 AM, Cory Riddell <cory at codeware.com> wrote:

> I'm calling osg::Camera::setProjectionMatrixAsOrtho() and I'm  
> getting an
> orthographic projection (this is, if I look directly at the face of a
> cube in wireframe, all I see is a square). I can rotate and pan, but
> zoom isn't working (I'm dragging the right mouse button).
>
> I want to allow the user to toggle between perspective and  
> orthographic
> projections. Obviously I need to do more than just set the projection
> matrix, but I'm not sure where to start looking for clues. I've been
> searching on setProjectionMatrixAsOrtho. What should I be looking for?
>
> Thanks,
> Cory Riddell
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list