Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: zoom by rubberband box

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2000
    Location
    Daytona Beach, Florida, USA
    Posts
    6

    zoom by rubberband box

    I've got a scene rendered and using gluPerspective and gluLookAt for projection and navigation. I am using a "rubberband box" to isolate a square portion of the screen and would like to zoom in on the boxed area. The box returns it's position and size in pixels.

    Is there a way to convert pixel coordinates to eye and point coordinates?

    Thanks for any help!

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    204

    Re: zoom by rubberband box

    I'm using an orthographic view and doing the same thing, dunno if this will help or not...

    I don't do any conversions into coordinates as such. I get the size of the box as a percentage of the toatl screen, calculate the center of the box as a percentage of the total screen, then use glScale and glTranslate to get that position zoomed into the window.

    HTH,
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •