Is your goal to determine what object(s) are in the center or central area of the viewport? If so, then the easiest solution is to use
window.pick or
window.pickRect. To get the object directly in the center use the pick command with pos value of [0.5,0.5]. The coordinates used in the pickRect command depend on how much of the window you're interested in getting objects from.