Prashant Saxena wrote:
> Hi,
>
> How to implement 'zoom' when designing an orthographic view base
> application. I would prefer if there is a way where we can move camera
> in/out on screen axis to perform zoom. It's similar to commercial 3D
> application like Maya or 3ds max where you an move the orthographic
> camera.
>
> I have tried using 'glScale' but it doesn't meet my requirements.
> 'glOrtho' doesn't support camera position. Do I have to go for
> 'glPerspective' ?
Haven't done much ortho work, but the theory is this:
glScale( )
glTranslate( )
With the negative position of the camera before you start drawing your
scene. The glPerspective/glOrtho stuff is configuring the internals of
your camera. The model-view matrix is where you should configure your
viewing-position.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|