View Full Version : Fitting scene to camera
I need to tightly fit a scene to the camera while maintaining the camera direction. How can this be achieved?
Thanx in advance
01-06-2001, 08:57 AM
I'm not sure, but maybe you could send the corners of a bounding box of your scene through glRasterPos3f (?) .... this should give the screen coordinates of the corners.
Then you find the rectangle bounding the 3D box on the screen.
Then you scale the scene or zoom (?) by the factor that the rectangle needs to be enlarged to fill the entire screen space.
I'm not sure that this works, just an idea. . .
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.