|
Algorithm 1 QR code mapping to VR canvas. |
-
Input:
InputQR[x,y] coordinates of a QR code tracked by Vuforia.
-
Output:
Position[x,y] ▹ Pointer position on canvas
-
let n be a top left corner position[x,y] of a QR image
-
let m be a bottom right corner position[x,y] of a QR image
-
if QR code IS tracked by Vuforia then
-
let , , , be the 4 boundaries of the pointer canvas
-
= Unity.ScreenPointToLocalPointInRectangle(n,m,InputQR,canvas);
-
▹ Mapping from QR coords to a point in the VR canvas
-
if () and () then
-
position[x,y] = [] ▹ Updates pointer position on the canvas
-
end if
-
else if QR code IS NOT tracked by Vuforia then
-
position[x,y] = [] ▹ Pointer is set to canvas center
-
end if
|