Move camera to fit 3D scene
- by Burre
Hi there.
I'm looking for an algorithm to fit a bounding box inside a viewport (in my case a DirectX scene). I know about algorithms for centering a bounding sphere in a orthographic camera but would need the same for a bounding box and a perspective camera.
I have most of the data:
I have the up-vector for the camera
I have the center point of…