PDA

View Full Version : 'Framing' a bounding volume



CatAtWork
04-14-2004, 09:21 PM
Most DCC applications allow you to select an object and make it fill the viewport.

Is there a standard, or at least efficient and stable way of doing this?

A method I think might be reasonable:

Perform a look-at

Solve M*v=v', where v is a vertex of say, a bounding box, and v' is near a corner of the viewport.

Transform the camera by M.

This is probably going to yield a 'duh!' solution, but it's something I've never put much thought into.

Thanks.

jebus
04-15-2004, 03:06 AM
that's more or less how i do it. i get the bounding box around the volumne then adjust the near/far clipplanes to accomodate it.