From: Adam G. <ag...@in...> - 2005-08-25 16:53:11
|
I am writing a program that allows a user to view terrain in 3D. I am using a derivative of Plot3D, which uses the built-in ability to shift (pan) the view. The Plot3D::setViewportShift(), which handles the shifting, function states that the function "Performs shifting along screen axes. The values are limited to the interval [-1..1]. The shift moves points inside a sphere, which encloses the unscaled and unzoomed data by multiples of the spheres diameter."=20 =20 When shifting a view that has not been zoomed, this works great. However, if the user zooms in on the view and then attempts to shift, they hit an invisible "wall" when trying to shift to the end of the zoomed view because the Plot3D::setViewportShift() does not take zooming into effect a limits the shifting from -1 to 1. The result is the inability to view some portions of the terrain when zoomed in because the shift prevents shifting far enough to see it. This is easy to reproduce: Load up the mesh2 example, zoom in on one of the shapes and then attempt to shift it off the screen. It won't work because of this limitation. =20 Is there a reason that this [-1..1] limitation is in effect? Is there a way to workaround this so that I can allow users to see all parts of the terrain when zoomed in by shifting? Any help would be much appreciated. Thank you. |