Skip to main content
gamedev.net
🔒 Locked

Autosizing

Started by Burnhard 0 replies 350+ views
Original Post
Burnhard
Burnhard
In Excel when you draw a 3d graph, if you rotate the graph arbitrarily you can see that it recalculates the extents of the graph so that it always fits within the view frustum. For my software, that would be the equivalent of moving the camera towards or away from the origin (it's look-at point).

So, given an arbitrarily oriented bounding box, centred at the origin and assuming the camera always looks at the origin, how do I compute the distance the camera needs to be away from the origin in order to completely contain the box in the viewport?

This sounds like a simple problem, but I'm not sure how to proceed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.