public class EyeTribe extends Object implements IGazeListener, ITrackerStateListener, ICalibrationProcessHandler
Constructor and Description |
---|
EyeTribe(PApplet theParent) |
EyeTribe(PApplet theParent,
int calibrationPointInterval,
int calibrationPointDuration)
a Constructor, usually called in the setup() method in your sketch to
initialize and start the library.
|
Modifier and Type | Method and Description |
---|---|
void |
calibrate(PVector[] calibrationPoints) |
void |
dispose() |
boolean |
isTracking() |
boolean |
isTrackingEyes() |
boolean |
isTrackingGaze() |
void |
onCalibrationProcessing()
Called when all calibration points have been collected and calibration
processing begins.
|
void |
onCalibrationProgress(double progress)
Called every time tracking of a single calibration points has completed.
|
void |
onCalibrationResult(CalibrationResult calibResult)
Called when processing of calibration points and calibration as a whole
has completed.
|
void |
onCalibrationStarted()
Called when a calibration process has been started.
|
void |
onGazeUpdate(GazeData gazeData)
A notification call back indicating that a new GazeData frame is available.
|
void |
onScreenStatesChanged(int screenIndex,
int screenResolutionWidth,
int screenResolutionHeight,
float screenPhysicalWidth,
float screenPhysicalHeight)
A notification call back indicating that main screen index has changed.
|
void |
onTrackerStateChanged(int trackerState)
A notification call back indicating that state of connected Tracker device has changed.
|
static String |
version()
return the version of the library.
|
public static final String VERSION
public EyeTribe(PApplet theParent)
public EyeTribe(PApplet theParent, int calibrationPointInterval, int calibrationPointDuration)
theParent
- public void dispose()
public static String version()
public boolean isTracking()
public boolean isTrackingGaze()
public boolean isTrackingEyes()
public void onGazeUpdate(GazeData gazeData)
IGazeListener
onGazeUpdate
in interface IGazeListener
public void onTrackerStateChanged(int trackerState)
ITrackerStateListener
onTrackerStateChanged
in interface ITrackerStateListener
trackerState
- the current state of the physical Tracker devicepublic void onScreenStatesChanged(int screenIndex, int screenResolutionWidth, int screenResolutionHeight, float screenPhysicalWidth, float screenPhysicalHeight)
ITrackerStateListener
onScreenStatesChanged
in interface ITrackerStateListener
screenIndex
- the currently valid screen indexscreenResolutionWidth
- screen resolution width in pixelsscreenResolutionHeight
- screen resolution height in pixelsscreenPhysicalWidth
- physical screen width in metersscreenPhysicalHeight
- physical screen height in meterspublic void calibrate(PVector[] calibrationPoints)
public void onCalibrationStarted()
onCalibrationStarted
in interface ICalibrationProcessHandler
public void onCalibrationProgress(double progress)
onCalibrationProgress
in interface ICalibrationProcessHandler
progress
- 'normalized' progress [0..1.0d]public void onCalibrationProcessing()
onCalibrationProcessing
in interface ICalibrationProcessHandler
public void onCalibrationResult(CalibrationResult calibResult)
onCalibrationResult
in interface ICalibrationProcessHandler
calibResult
- the result of the calibration processProcessing library EyeTribeProcessing by Jorge C. S. Cardoso. (c) 2015