How to Calculate X/Y Min/Max For Current Area of the Scene

Would someone be able to provide documentation or guidance on how to calculate the current xMin, xMax, yMin, yMax values of the section of a scene being viewed on the screen?

Here is what I am attempting to do…

My scene is full-screen at 1920 by 1200 in dimensions. Thus the following are examples of the values I expect to see for each scenario

Example 1:
Origin is at center of screen and no zooming has occurred after startup. Therefor the I would expect the following values to be:

  • xMin = -960
  • xMax = +960
  • yMin = -600
  • yMax = +600

Example 2
Origin is at center of screen. I zoom inward once using the mouse wheel. Therefor I would expect the following values to be:

  • xMin = -960 plus the offset of the zoom inward
  • xMax = +960 minus the offset of the zoom inward
  • yMin = -600 plus the offset of the zoom inward
  • yMax = +600 minus the offset of the zoom inward

Example 3
Origin is at center of screen. I zoom outward once using the mouse wheel. Therefor I would expect the following values to be:

  • xMin = -960 minus the offset of the zoom inward
  • xMax = +960 plus the offset of the zoom inward
  • yMin = -600 minus the offset of the zoom inward
  • yMax = +600 plus the offset of the zoom inward

Any assistance would greatly appreciated.