Beispiel #1
0
        //eventos del engine
        private void GazePoint(object sender, GazePointEventArgs gazePointEventArgs)
        {
            BeginInvoke(new Action(() =>
            {
                var handle = Handle;
                if (handle == null)
                {
                    // window not created yet. never mind.
                    return;
                }

                _trackStatus.OnGazeData(gazePointEventArgs.GazeDataReceived);
                distance2Controls(distanciaDev2USer.distance(gazePointEventArgs.GazeDataReceived));
                Invalidate();
            }));

            //if (saveEyeTrackerData)
            //{
            //    //Creo que ni gazeWeighted ni cursorFiltered se usan
            //    PointD gazeWeighted = eyetrackingFunctions.WeighGaze(gazePointEventArgs.GazeDataReceived);// creo que no se usa
            //    PointD cursorFiltered = CursorControl.filterData(gazeWeighted, false);// creo que no se usa los datos filtrados

            //    Program.datosCompartidos.LogEyeTrackerData.AddGazeDataItem2List(gazePointEventArgs.GazeDataReceived, gazeWeighted, cursorFiltered);
            //}
        }
        private void GazePoint(object sender, GazePointEventArgs gazePointEventArgs)
        {
            headData = wimuDevice.WimuData;
            headData.timeStampMiliSec = (double)PseudoTimeStampMiliSecImu++;


            BeginInvoke(new Action(() =>
            {
                var handle = Handle;
                if (handle == null)
                {
                    // window not created yet. never mind.
                    return;
                }

                _trackStatus.OnGazeData(gazePointEventArgs.GazeDataReceived);
                progressBar4Distance.Value = eyetrackingFunctions.distanceBetweenDev2User(gazePointEventArgs.GazeDataReceived);
                Invalidate();
                headData2Chart(headData);
            }));



            if (AppControlCursor)
            {
                PointD deltaCursor = head2deltaCursor.GetDeltaLocationFromHEADTracking();
                //PointD deltaCursor = new PointD(0, 0);
                PointD gazeWeighted           = eyetrackingFunctions.WeighGaze(gazePointEventArgs.GazeDataReceived); //valores normalizados
                PointD gazeFilteredNormalized = gazeFilter.filterGazeData(gazeWeighted);                             //valores normalizados
                PointD gazeFilteredPixels     = eyetrackingFunctions.normalized2Pixels(gazeFilteredNormalized);
                Point  cursorLocation         = (Point)fusionador.getCursorLocation(true, deltaCursor, gazeFilteredPixels);
                CursorControl.locateCursor(cursorLocation);
            }
        }
Beispiel #3
0
        private void GazePoint(object sender, GazePointEventArgs gazePointEventArgs)
        {
            headData = wimuDevice.WimuData;
            headData.timeStampMiliSec = (double)PseudoTimeStampMiliSecImu++;

            BeginInvoke(new Action(() =>
            {
                var handle = Handle;
                if (handle == null)
                {
                    // window not created yet. never mind.
                    return;
                }

                _trackStatus.OnGazeData(gazePointEventArgs.GazeDataReceived);
                progressBar4Distance.Value = eyetrackingFunctions.distanceBetweenDev2User(gazePointEventArgs.GazeDataReceived);
                Invalidate();
                headData2Chart(headData);
            }));

            if (AppControlCursor)
            {
                PointD deltaCursor = head2deltaCursor.GetDeltaLocationFromHEADTracking();
                //PointD deltaCursor = new PointD(0, 0);
                PointD gazeWeighted = eyetrackingFunctions.WeighGaze(gazePointEventArgs.GazeDataReceived);//valores normalizados
                PointD gazeFilteredNormalized = gazeFilter.filterGazeData(gazeWeighted);//valores normalizados
                PointD gazeFilteredPixels = eyetrackingFunctions.normalized2Pixels(gazeFilteredNormalized);
                Point cursorLocation = (Point)fusionador.getCursorLocation(true, deltaCursor, gazeFilteredPixels);
                CursorControl.locateCursor(cursorLocation);
            }
        }