Class BestPointOfGaze

java.lang.Object
adaptlil.data_classes.BestPointOfGaze

public class BestPointOfGaze extends Object
  • Field Summary

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

    Constructors
    Constructor
    Description
     
    BestPointOfGaze(double x, double y, boolean isValid)
    Construct BestPointofGaze data class object.
  • Method Summary

    Modifier and Type
    Method
    Description
    getBestPointOfGaze(int bpogxIndex, int bpogyIndex, int bpogvIndex, String[] cells)
    Constructs BestPointOfGaze Object through the strings of an array.
    double
    Gets the X coordinate for the best point of gaze (where the user is looking on the screen)
    double
    Gets the Y coordinate for the best point of gaze (where the user is looking on the screen)
    interpolate(BestPointOfGaze firstBestPointOfGaze, BestPointOfGaze nextBestPointOfGaze, int nSteps)
    Performs Linear interpolation nSteps BestPointOfGaze elements between the first BestPointofGaze and the next BestPointofGaze
    boolean
    Flag set by gazepoint to signal the BestPointOfGaze packet is corrupted.
    void
    setValid(boolean valid)
    Set to true to signal there is an issue with BestPointOfGaze packet.
    void
    setX(double x)
    Set the x coordinate of best point of gaze.
    void
    setY(double y)
    Set the Y coordinate of best point of gaze.

    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
    • isValid

      private boolean isValid
  • Constructor Details

    • BestPointOfGaze

      public BestPointOfGaze()
    • BestPointOfGaze

      public BestPointOfGaze(double x, double y, boolean isValid)
      Construct BestPointofGaze data class object. Best point of gaze is the area between where the left and right eye are looking. If only the left eye is available this object will represent the left eye and vice versa for the right eye.
      Parameters:
      x -
      y -
      isValid -
  • Method Details

    • getBestPointOfGaze

      public static BestPointOfGaze getBestPointOfGaze(int bpogxIndex, int bpogyIndex, int bpogvIndex, String[] cells)
      Constructs BestPointOfGaze Object through the strings of an array. In this case, an excel line.
      Parameters:
      bpogxIndex -
      bpogyIndex -
      bpogvIndex -
      cells -
      Returns:
    • interpolate

      public BestPointOfGaze[] interpolate(BestPointOfGaze firstBestPointOfGaze, BestPointOfGaze nextBestPointOfGaze, int nSteps)
      Performs Linear interpolation nSteps BestPointOfGaze elements between the first BestPointofGaze and the next BestPointofGaze
      Parameters:
      firstBestPointOfGaze -
      nextBestPointOfGaze -
      nSteps - Number of BestPointofGaze packets to interpolate between.
      Returns:
    • getX

      public double getX()
      Gets the X coordinate for the best point of gaze (where the user is looking on the screen)
      Returns:
      returns scale [0-1] where 0.5 represents the middle of the screen on the x axis
    • setX

      public void setX(double x)
      Set the x coordinate of best point of gaze.
      Parameters:
      x - Keep within range 0-1.
    • getY

      public double getY()
      Gets the Y coordinate for the best point of gaze (where the user is looking on the screen)
      Returns:
      returns scale [0-1] where 0.5 represents the middle of the screen on the Y axis.
    • setY

      public void setY(double y)
      Set the Y coordinate of best point of gaze.
      Parameters:
      y - Keep within range 0-1.
    • isValid

      public boolean isValid()
      Flag set by gazepoint to signal the BestPointOfGaze packet is corrupted.
      Returns:
    • setValid

      public void setValid(boolean valid)
      Set to true to signal there is an issue with BestPointOfGaze packet.