FixationDetection - accessibilitysoftwarehub/OpenSourceWindowsGazeControl GitHub Wiki

General Information

Name: FixationDetection

Description: This class is to encapsulate the required logic to detect an user eyes fixation on a point of the screen from the behaviors provided by the eyeX engine.

Purpose: To enable code to be run when a user fixates on location on the screen. The last fixation coordinates can be passed retrieved once a fixation has occurred.

Full Description:

Note:

Method Descriptions

detectFixation This method of is run on gaze events, checks if it is the beginning or end of a fixation and runs appropriate code.

runActionWhenTimerReachesLimit Reset Fixation detection to waiting state and raise flag with state manager that the fixation detection has competed, once a fixation stream runs from a start state without being interrupted by a end state before the fixation timer completes. This is run by the FixationTomer elapsed event.

fixationTimeOut Method run on timeOutTimer elapse event. Used to reset FixationDetection back to its initial waiting state if a user does not successfully fixate on the screen before the time specified by FixationTimeOutLength. it also signals to the State manager that con fixation completed by raising the SystemFlags.timeOut flag.

StartDetectingFixation This method has the Action that will be run once a fixation is confirmed passed in and stored in SelectedFicationAction. It also sets the state to RunningFixationDetection, which sets logic in RunSelectedActionAtFixation to run on fixationPointDataStream.Next events.

getXY Public method for classes using FixationDetection to get the most recent coordinates of a fixation.

calculateFixationProgressPercent Calculates progress through current fixation,the call method to raise an event containing the current progress percentage.

onFixationProgressEvent Raises event to advertise current fixations progress.