Function getViewDirectionFromViewpoint