Given a 3D mesh, and a camera in the 3D space, how do I position the 3D mesh to be within the BoundingFrustum of the camera? That is, how do I calculate the distance of the camera to be set in such a way that the object always fits on screen regardless of the resolution.
The "hack-ish" way I have this setup right now is a constant for the distance of the camera when the aspect ratio is 1 (resolution width == height), and then multiply this constant by the aspect ratio of the device. But this method is only good if you know what the object is going to be from the start and already measured its distance from the target camera.