Maths: Camera Position From AABB?

Miscellaneous Forums/General Discussion/Maths: Camera Position From AABB?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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.