Autofit visible models to screen
#3
(12-11-2015, 10:52 AM)abenedik Wrote: You can check the "Scene editor" sample that comes with Ab3d.PowerToys library - it contains a sample code that can be used to achieve "Fit to view" functionality.

But because this works on scene's bounding box, you should not expect that your models with be shown from edge to edge - there will almost always be an empty margin around your scene.

I already have that code implemented in my solution :) And it works good but it is exactly the problem you mentioned. Some times the models are quite large or the minimum resolution is set, so it is important that the model fits to the bounds and nothing is hidden, even with different camera settings.

Is it possible that the camera makes a 2D projection from its look direction to calculate the bounding box of the visible area?
  


Messages In This Thread
Autofit visible models to screen - by jwa - 12-11-2015, 09:14 AM
RE: Autofit visible models to screen - by jwa - 12-11-2015, 11:27 AM
RE: Autofit visible models to screen - by jwa - 12-14-2015, 02:16 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)