Ejemplo n.º 1
0
        private static GazeDataValidity AlignToRightEyeValidity(this EyeGazeDataValidity validity)
        {
            int rightEyeValidity = ((byte)(validity & EyeGazeDataValidity.Valid) << 4)
                                   | ((byte)(validity & EyeGazeDataValidity.Probably) << 2)
                                   | ((byte)(validity & EyeGazeDataValidity.Unknown));

            return((GazeDataValidity)rightEyeValidity & GazeDataValidity.RightEyeMask);
        }
Ejemplo n.º 2
0
 public EyeGazeData
 (
     EyeGazeDataValidity validity,
     Point2 gazePoint2D,
     Point3 gazePoint3D,
     Point3 eyePosition3D,
     Point3 eyePosition3DRelative,
     double pupilDiameter
 )
 {
     Validity              = validity;
     GazePoint2D           = gazePoint2D;
     GazePoint3D           = gazePoint3D;
     EyePosition3D         = eyePosition3D;
     EyePosition3DRelative = eyePosition3DRelative;
     PupilDiameter         = pupilDiameter;
 }
Ejemplo n.º 3
0
        public static UXI.GazeToolkit.EyeValidity ToToolkit(this EyeGazeDataValidity validity)
        {
            switch (validity)
            {
            case EyeGazeDataValidity.Probably:
                return(UXI.GazeToolkit.EyeValidity.Probably);

            case EyeGazeDataValidity.Unknown:
                return(UXI.GazeToolkit.EyeValidity.Unknown);

            case EyeGazeDataValidity.Valid:
                return(UXI.GazeToolkit.EyeValidity.Valid);

            case EyeGazeDataValidity.Invalid:
            default:
                return(UXI.GazeToolkit.EyeValidity.Invalid);
            }
        }
Ejemplo n.º 4
0
 public static GazeDataValidity MergeToEyeValidity(this EyeGazeDataValidity leftEyeValidity, EyeGazeDataValidity rightEyeValidity)
 {
     return((leftEyeValidity.ToLeftEyeValidity() | rightEyeValidity.AlignToRightEyeValidity()) & GazeDataValidity.AllMask);
 }
Ejemplo n.º 5
0
 private static GazeDataValidity ToLeftEyeValidity(this EyeGazeDataValidity validity)
 {
     return((GazeDataValidity)validity & GazeDataValidity.LeftEyeMask);
 }
Ejemplo n.º 6
0
 public static bool HasEye(this EyeGazeDataValidity validity)
 {
     return((validity & HasEyeMask) != EyeGazeDataValidity.Invalid);
 }