SR Research Support Site
Functions
Extract extended data from samples and events

Functions

INT32 eyelink_initialize_mapping (float left, float top, float right, float bottom)
 
INT32 eyelink_href_to_gaze (float *xp, float *yp, FSAMPLE *sample)
 
INT32 eyelink_gaze_to_href (float *xp, float *yp, FSAMPLE *sample)
 
float eyelink_href_angle (float x1, float y1, float x2, float y2)
 
void eyelink_href_resolution (float x, float y, float *xres, float *yres)
 

Detailed Description

Function Documentation

INT32 eyelink_gaze_to_href ( float *  xp,
float *  yp,
FSAMPLE sample 
)

Apply gaze->href to point (xp, yp). This function requires HREFPT data in FSAMPLE. The function eyelink_initialize_mapping() should be called before calling this function.

Parameters
xpX point to apply gaze->href.
ypY point to apply gaze->href.
sampleSample.
Returns
0 if OK, -1 if there is a math error, -2 if the tracker does not support this operation.
float eyelink_href_angle ( float  x1,
float  y1,
float  x2,
float  y2 
)

Convenient function to calculate the href angle.

Parameters
x1Point 1 x.
y1Point 1 y.
x2Point 2 x.
y2Point 2 y.
void eyelink_href_resolution ( float  x,
float  y,
float *  xres,
float *  yres 
)

Convenient function to calculate the href resolution.

Parameters
xX value of point.
yY value of point.
xresPointer to return the x resolution.
yresPointer to return the y resolution.
INT32 eyelink_href_to_gaze ( float *  xp,
float *  yp,
FSAMPLE sample 
)

Apply href->gaze to point (xp, yp). This function requires HREFPT data in FSAMPLE. The function eyelink_initialize_mapping() should be called before calling this function.

Parameters
xpX point to apply href->gaze.
ypY point to apply href->gaze.
sampleSample.
Returns
0 if OK, -1 if there is a math error, -2 if the tracker does not support this operation.
INT32 eyelink_initialize_mapping ( float  left,
float  top,
float  right,
float  bottom 
)

Function to initialize the gaze to href and href to gaze mapping. This function should be called before calling eyelink_href_to_gaze() or eyelink_gaze_to_href().

Parameters
leftLeft pixel value (normally 0).
topTop pixel value (normally 0).
rightRight pixel value (width of the display).
bottomBottom pixel value (height of the display).
Returns
-1 if the tracker does not support the commands, href_point_eye set_href_point

Copyright ©2002-2023, SR Research Ltd.