Skip to main content
. 2022 Mar 5;22(5):2040. doi: 10.3390/s22052040
Algorithm 3 Strategy 3: Predictions with head gaze and threshold on eye-gaze angle.
Input: Hand position Ph∈R3, Gaze direction vector Gd∈R3, hand threshold λd, head gaze threshold α.
Output: Best point P∗ in the set of Pi, i=1…16.
 function ST3(Ph,Gd,Pprev)
     pbh← best point position from the KD tree.
 3:     if (||((Pbh,Ph)||<λd) then
           P∗←Pbh
     else
 6:         build a list of points P in the view frustum of HMD with αi<α.
          if P=∅ then
             P∗←Pprev
 9:         else
             pnext← point with min(αi) from the list P.
             P∗←Pnext
 12:         end if
     end if
     Pprev←P∗
 15: end function