Hi.
I am making a program using jmonkey to preview the meshes contained into a filetype. Each file has a mesh of diferent sizes and positions, I want to make my program focus the mesh contained in the file trying to view it in a way that the mesh uses almost all the space in the viewport.
I would like to know if there is a mathematical way to make this, and achieve to preview the meshes using as much space in the screen as possible.