The
window.pick command performs a pick operation on a sub-window.
Also, perhaps the
window.isCulled command will be helpful. That returns whether an object is culled by the windows view frustum. However, an object may not be visible because it's obscured by another object and still be in the view frustum.