using System; using System.Windows; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tobii.Research; namespace TrackerBridge { public class GazeDataProcessor { readonly float screenHeight; readonly float screenWidth; public GazeDataProcessor() { screenHeight = Convert.ToSingle(SystemParameters.PrimaryScreenHeight); screenWidth = Convert.ToSingle(SystemParameters.PrimaryScreenWidth); } public GazeData Extract(GazeDataEventArgs e) { GazeData data = new GazeData(e.LeftEye.GazePoint.PositionOnDisplayArea.X * screenWidth, e.LeftEye.GazePoint.PositionOnDisplayArea.Y * screenHeight, e.RightEye.GazePoint.PositionOnDisplayArea.X * screenWidth, e.RightEye.GazePoint.PositionOnDisplayArea.Y * screenHeight, e.DeviceTimeStamp, e.SystemTimeStamp); return data; } } }