Commit 5ad83a85 authored by Julian Kosciessa's avatar Julian Kosciessa
Browse files

Commit 170707

parents
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
%_______________________________________________________________________
%
% select = selectTargets(screenInfo, xy, diamTar)
%_______________________________________________________________________
%
% puts the targets into correct coordinates for checking to see if a
% touch is within the boundaries of the targets. This function
% translates the coordinates, moves the center and inverts y, and
% changes from visual degrees to pixels.
%_______________________________________________________________________
%
% Input
%
% screenInfo | canvas configuration (struct)
% xy | ?
% diamTar | ?
%_______________________________________________________________________
%
% Output
%
% select | ?
%_______________________________________________________________________
%
function select = selectTargets(screenInfo, xy, diamTar)
temp = ones(size(xy));
temp = [screenInfo.center(1).*temp(:,1), screenInfo.center(2).*temp(:,2)];
tar_xy = [temp(:,1)+xy(:,1)*screenInfo.ppd/10, temp(:,2)-xy(:,2)*screenInfo.ppd/10];
select = [tar_xy(:,1), tar_xy(:,2), diamTar'/2*screenInfo.ppd/10];
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment