View Full Version : generate zoom all extents matrix
can anyone give me an idea of how yoou would go about calculating a modelview matrix, that you could multiply that would zoom to the extents/all of a loaded model.
currently loading vrml and 3ds models
You have a bounding radius of the model and the camera's fov, just solve what the distance is for one side of the right angle triangle.
that's the half-triangle in the camera's frustum, btw. All you need is right-angle trigonmetry to solve it.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.