I'm trying to do the kind of "fit everything into the camera" stuff that 3d modelling software does. Essentially, I have an axis-aligned bounding box (defined by two vectors) which contains everything I want to look at, and I have a camera direction (defined by a single vector) which describes where the camera should point. Now I want to position the camera such that orienting it in the given direction will include everything in the bounding box, no more and no less.
EDIT: Forgot to mention that it's an isometric perspective that I'm wanting. It's just not axis aligned.
I have no idea how to go about it though.
EDIT: Forgot to mention that it's an isometric perspective that I'm wanting. It's just not axis aligned.
I have no idea how to go about it though.