Class Fixation

java.lang.Object
adaptlil.data_classes.Fixation

public class Fixation extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
     
    private int
     
    private boolean
     
    private double
     
    private double
     
    private double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Fixation(double x, double y, double duration)
     
    Fixation(double x, double y, double startTime, double duration, boolean isValid)
     
    Fixation(double x, double y, double startTime, double duration, boolean isValid, int id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the duration of the fixation
    static Fixation
    getFixationFromCSVLine(int durationColIndex, int xColIndex, int yColIndex, int idColIndex, int timestampColIndex, String[] fixationLine)
    Constructs a fixation object through specification of the array indices of the fixationLine argument
    int
    Returns the id of the fixation (default -1)
    Get the fixation in terms of a 2D-Cartesian point
    double
    Returns the startTime of the fixation
    double
    Get x-coordinate of the fixation in terms of point on the screen.
    double
    Get y-coordinate of the fixation in terms of point on the screen.
    interpolate(Fixation firstFixation, Fixation nextFixation, int nSteps)
    Performs Linear interpolation nSteps Fixation elements between the first Fixation and the next Fixation
    boolean
    Flag set by gazepoint to signify that this Fixation packet may be corrupt.
    void
    setDuration(double duration)
    Setter for the duration of the fixation
    void
    setId(int id)
    Setter for the id of the fixation
    void
    setStartTime(double startTime)
    Setter for the StartTime of the fixation
    void
    Setter for the isValid flag (signifies if the packet is corrupt)
    void
    setX(double x)
    Set X coordinate (fraction of screen-width)
    void
    setY(double y)
    Set y coordinate (fraction of screen-height)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      private double x
    • y

      private double y
    • startTime

      private double startTime
    • duration

      private double duration
    • id

      private int id
    • isValid

      private boolean isValid
  • Constructor Details

    • Fixation

      public Fixation()
    • Fixation

      public Fixation(double x, double y, double startTime, double duration, boolean isValid, int id)
    • Fixation

      public Fixation(double x, double y, double startTime, double duration, boolean isValid)
    • Fixation

      public Fixation(double x, double y, double duration)
      Parameters:
      x - The x coordinate of the fixation (fraction of screen width)
      y - The y coordinate of the fixation (fraction of screen height)
      duration - Duration of the fixation
  • Method Details

    • getFixationFromCSVLine

      public static Fixation getFixationFromCSVLine(int durationColIndex, int xColIndex, int yColIndex, int idColIndex, int timestampColIndex, String[] fixationLine)
      Constructs a fixation object through specification of the array indices of the fixationLine argument
      Parameters:
      durationColIndex -
      xColIndex -
      yColIndex -
      idColIndex -
      timestampColIndex -
      fixationLine - Array of strings representing a single row in a CSV file
      Returns:
    • interpolate

      public Fixation[] interpolate(Fixation firstFixation, Fixation nextFixation, int nSteps)
      Performs Linear interpolation nSteps Fixation elements between the first Fixation and the next Fixation
      Parameters:
      firstFixation -
      nextFixation -
      nSteps -
      Returns:
    • getPoint

      public Point2D.Double getPoint()
      Get the fixation in terms of a 2D-Cartesian point
      Returns:
    • getX

      public double getX()
      Get x-coordinate of the fixation in terms of point on the screen.
      Returns:
      Returns x coordinate in range [0-1] where 0.5 is the middle of the screen on the x-axis
    • getY

      public double getY()
      Get y-coordinate of the fixation in terms of point on the screen.
      Returns:
      Returns y coordinate in range [0-1] where 0.5 is the middle of the screen on the y-axis
    • getStartTime

      public double getStartTime()
      Returns the startTime of the fixation
      Returns:
    • getDuration

      public double getDuration()
      Returns the duration of the fixation
      Returns:
    • getId

      public int getId()
      Returns the id of the fixation (default -1)
      Returns:
    • isValid

      public boolean isValid()
      Flag set by gazepoint to signify that this Fixation packet may be corrupt.
      Returns:
    • setX

      public void setX(double x)
      Set X coordinate (fraction of screen-width)
      Parameters:
      x -
    • setY

      public void setY(double y)
      Set y coordinate (fraction of screen-height)
      Parameters:
      y -
    • setStartTime

      public void setStartTime(double startTime)
      Setter for the StartTime of the fixation
      Parameters:
      startTime -
    • setDuration

      public void setDuration(double duration)
      Setter for the duration of the fixation
      Parameters:
      duration -
    • setId

      public void setId(int id)
      Setter for the id of the fixation
      Parameters:
      id -
    • setValid

      public void setValid(Boolean valid)
      Setter for the isValid flag (signifies if the packet is corrupt)
      Parameters:
      valid -