Authomatically zooming all the object in the scene

Is there any way to zoom out/move the camera in order to include in the visual representation all the object in the scene, without using right button mouse + move down/up?

I’ve found moveToFit() method of DirectCameraControl but I can’t find any example about how to use it and I wasn’t able to use it.

Thanks in advance for your kindness!