Hi All,
I have a 2D window that shows a 3D OpenGL scene. I need to be able to
zoom up on sections of this scene by drawing a box around the
requested area. Problem here is that I can't change the perspective
by moving the camera forward as I need to maintain the view that was
available un-zoomed (ie can't move in front of objects). So what I
have done is to move my camera and target 3D positions by an offset
calculated from the old target to the center of the zoom box and then
change the field of view so it fits the largest extent in the box.
(Yeah, all in one breath) Problem is that to find the offset (And the
size of the zoom box) I need to project onto a plane which I currently
have at the target position. If an Object resides in front of this
target then the positions and size are wrong. So what I really need
to do (And my question finally) is to find the proper position for the
plane on which I project. Any Ideas??? Or any better way anyone can
think of to implement this functionality??? Anything would be GREATLY
appreciated. What I have works up to the extent that I've described.
Thanks,
Steve Goyette