Exemplo n.º 1
0
    public void StopVisualizingGaze()
    {
        OnUpdate -= VisualizeGaze;

        _markerLeftEye.SetActive(false);
        _markerRightEye.SetActive(false);
        _markerGazeCenter.SetActive(false);
        _gaze3D.SetActive(false);

//		PupilTools.UnSubscribeFrom("gaze");
    }
Exemplo n.º 2
0
    public void StartVisualizingGaze()
    {
        OnUpdate += VisualizeGaze;

        bool isCalibrationMode2D = Settings.calibration.currentCalibrationMode == Calibration.CalibMode._2D;

        _markerLeftEye.SetActive(isCalibrationMode2D);
        _markerLeftEye.SetMaterialColor(Color.blue);
        _markerRightEye.SetActive(isCalibrationMode2D);
        _markerRightEye.SetMaterialColor(Color.red);
        _markerGazeCenter.SetActive(isCalibrationMode2D);
        _markerGazeCenter.SetMaterialColor(Color.magenta);
        _gaze3D.SetActive(!isCalibrationMode2D);
        if (isCalibrationMode2D)
        {
            PupilTools.SubscribeTo("gaze");
        }
        else
        {
            PupilTools.SubscribeTo("pupil.");
        }
    }
Exemplo n.º 3
0
    public static void StopCalibration()
    {
        Settings.calibration.initialized = false;
        Settings.dataProcess.state       = PupilSettings.EStatus.Idle;
        Settings.connection.sendRequestMessage(new Dictionary <string, object> {
            { "subject", "calibration.should_stop" }
        });

        calibrationMarker.SetActive(false);

        //		SetDetectionMode (currentCalibrationType.name);

        if (OnCalibrationEnded != null)
        {
            OnCalibrationEnded();
        }
        else
        {
            print("No 'calibration ended' delegate set");
        }
    }