Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="gazePoint">The location of the fixation. See also <seealso cref="Tobii.EyeTracking.GazePoint"/>.</param>
 /// <param name="sequentialId">The sequential ID of the fixation.</param>
 /// <param name="timestamp">The timestamp of the frame the event was received, in seconds (<see cref="UnityEngine.Time.time"/>).</param>
 /// <param name="eventType">The event type of the original fixation event.</param>
 public FixationPoint(GazePoint gazePoint, FixationDataEventType eventType, double sequentialId, float timestamp)
 {
     GazePoint    = gazePoint;
     SequentialId = sequentialId;
     EventType    = eventType;
     Timestamp    = timestamp;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FixationEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Specifies the kind of fixation event that occurred.</param>
 /// <param name="x">X coordinate of the gaze point in physical pixels.</param>
 /// <param name="y">Y coordinate of the gaze point in physical pixels.</param>
 /// <param name="timestamp">Timestamp in milliseconds.</param>
 public FixationEventArgs(FixationDataEventType eventType, double x, double y, double timestamp)
 {
     EventType = eventType;
     X         = x;
     Y         = y;
     Timestamp = timestamp;
 }
 public void Fixation(FixationDataEventType t, int x, int y, double timeStamp)
 {
     Fixation fx = null;
     switch (t)
     {
         case FixationDataEventType.Begin:
             fx = new Fixation(new Point(x, y), eFixationPhase.start);
             controlState.EyeRequest(fx);
             break;
         case FixationDataEventType.End:
             fx = new Fixation(new Point(x,y),eFixationPhase.finished );
             controlState.EyeRequest(fx);
             break;
     }
 }
Ejemplo n.º 4
0
        public void Fixation(FixationDataEventType t, int x, int y, double timeStamp)
        {
            Fixation fx = null;

            switch (t)
            {
            case FixationDataEventType.Begin:
                fx = new Fixation(new Point(x, y), eFixationPhase.start);
                controlState.EyeRequest(fx);
                break;

            case FixationDataEventType.End:
                fx = new Fixation(new Point(x, y), eFixationPhase.finished);
                controlState.EyeRequest(fx);
                break;
            }
        }
Ejemplo n.º 5
0
        private static object GetEventTypeAsString(FixationDataEventType eventType)
        {
            if (eventType == FixationDataEventType.Begin)
            {
                return("begin");
            }

            if (eventType == FixationDataEventType.Data)
            {
                return("data");
            }

            if (eventType == FixationDataEventType.End)
            {
                return("end");
            }

            return(string.Empty);
        }
Ejemplo n.º 6
0
        private Fixation CreateFixation(FixationDataEventType fixationDataEventType, int x, int y)
        {
            Fixation fx = null;

            switch (fixationDataEventType)
            {
            case FixationDataEventType.Begin:
                fx = new Fixation(new Point(x, y), eFixationPhase.start);
                break;

            case FixationDataEventType.End:
                fx = new Fixation(new Point(x, y), eFixationPhase.finished);
                break;

            case FixationDataEventType.Data:
                fx = new Fixation(new Point(x, y), eFixationPhase.data);
                break;
            }
            return(fx);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="gazePoint">The location of the fixation. See also <seealso cref="EyeXGazePoint"/>.</param>
 /// <param name="timestamp">The timestamp of the fixation.</param>
 /// <param name="eventType">The event type of the original fixation event.</param>
 public EyeXFixationPoint(EyeXGazePoint gazePoint, double timestamp, FixationDataEventType eventType)
 {
     GazePoint = gazePoint;
     Timestamp = timestamp;
     EventType = eventType;
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="gazePoint">The location of the fixation. See also <seealso cref="EyeXGazePoint"/>.</param>
 /// <param name="timestamp">The timestamp of the fixation.</param>
 /// <param name="eventType">The event type of the original fixation event.</param>
 public EyeXFixationPoint(EyeXGazePoint gazePoint, double timestamp, FixationDataEventType eventType)
 {
     GazePoint = gazePoint;
     Timestamp = timestamp;
     EventType = eventType;
 }
Ejemplo n.º 9
0
 private Fixation CreateFixation(FixationDataEventType fixationDataEventType, int x, int y)
 {
     Fixation fx = null;
     switch (fixationDataEventType)
     {
         case FixationDataEventType.Begin:
             fx = new Fixation(new Point(x, y), eFixationPhase.start);
             break;
         case FixationDataEventType.End:
             fx = new Fixation(new Point(x, y), eFixationPhase.finished);
             break;
         case FixationDataEventType.Data:
             fx = new Fixation(new Point(x, y), eFixationPhase.data);
             break;
     }
     return fx;
 }