Пример #1
0
    /// <summary>
    /// Draw a GUI.Box at the user's gaze point.
    /// </summary>
    public void OnGUI()
    {
#if UNITY_EDITOR
        if (_oldGazePointMode != gazePointMode)
        {
            _gazePointProvider.Stop();
            _oldGazePointMode  = gazePointMode;
            _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);
            _gazePointProvider.Start();
        }
#endif
        var gazePoint = _gazePointProvider.Last;
        //filter nan values.
        if (!System.Single.IsNaN(gazePoint.Screen.x))
        {
            //update
            if (trackObserver_eye != null)
            {
                trackObserver_eye.updateEyeTrack(gazePoint);
                ScenedataCapt.storeTrackPoint(gazePoint);
                DrawGUI(gazePoint, pointSize, pointColor);
            }
            if (trackObserver_eyemouse != null)
            {
                trackObserver_eyemouse.updateEyeTrack(gazePoint);
                ScenedataCapt.storeTrackPoint(gazePoint);
                DrawGUI(gazePoint, pointSize, pointColor);
            }
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     _eyeXHost          = EyeXHost.GetInstance();
     _gazePointProvider = _eyeXHost.GetGazePointDataProvider
                              (Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
     _gazePointProvider.Start();
 }
Пример #3
0
 void Start()
 {
     host   = EyeXHost.GetInstance();
     gaze   = host.GetGazePointDataProvider(Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
     player = gameObject.GetComponentInParent <PlayerController>();
     gaze.Start();
 }
Пример #4
0
    void Awake()
    {
        eyexHost = EyeXHost.GetInstance();
        gazePointDataProvider   = eyexHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
        eyePositionDataProvider = eyexHost.GetEyePositionDataProvider();

        timeTillWallSoundStarts = 0.0f;         //3.0f;
        timeEyesAreClosed       = 0.0f;
        blinkingLightCounter    = 0.0f;

        wakeupSoundPlayed             = false;
        openFirstDoorAnimationStarted = false;
        wallTriggerStarted            = false;
        waitForEyeClose = false;

        // load the blinking lights
        blinkingLights = new ArrayList();
        blinkingLights.Add(GameObject.Find("Panel_01"));
        blinkingLights.Add(GameObject.Find("Panel_02"));
        blinkingLights.Add(GameObject.Find("Panel_03"));
        blinkingLights.Add(GameObject.Find("Panel_04"));
        blinkingLights.Add(GameObject.Find("Panel_05"));
        blinkingLights.Add(GameObject.Find("Panel_06"));

        // set a deafult name for lastGazedWallLightName
        this.lastGazedWallLightName = "";
    }
Пример #5
0
    void Awake()
    {
        eyexHost = EyeXHost.GetInstance();
        gazePointDataProvider   = eyexHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
        eyePositionDataProvider = eyexHost.GetEyePositionDataProvider();

        timeTillFirstDoorOpens    = 0.0f;       //9.0f;
        timeTillWallSoundStarts   = 0.0f;       //3.0f;
        timeTillWakeupSoundStarts = 0.0f;       //2.0f;
        timeEyesAreClosed         = 0.0f;
        blinkingLightCounter      = 0.0f;

        wakeupSoundPlayed             = false;
        openFirstDoorAnimationStarted = false;
        wallTriggerStarted            = false;
        wallSoundPlayed = false;


        // load the blinking lights
        blinkingLights = new ArrayList();
        blinkingLights.Add(GameObject.Find("Panel_Colored_01"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_02"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_03"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_04"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_05"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_06"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_07"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_08"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_09"));
        currentBlinkingLightRemoved = false;

        Debug.Log("Awake: " + this.ToString());
    }
Пример #6
0
 protected void Awake()
 {
     Debug.Log("awake");
     this.eyexHost        = EyeXHost.GetInstance();
     this.dataProvider    = eyexHost.GetEyePositionDataProvider();
     this.eyesOpenedQueue = new Queue <EyesOpened> ();
 }
Пример #7
0
    void Start()
    {
        host = EyeXHost.GetInstance();
        //eyePos = host.GetEyePositionDataProvider();
        gazePos = host.GetGazePointDataProvider(Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
        gazePos.Start();

        ResetHealth();
    }
Пример #8
0
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);

#if UNITY_EDITOR
        _oldGazePointMode = gazePointMode;
#endif
    }
Пример #9
0
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);

        #if UNITY_EDITOR
        _oldFixationDataMode = fixationDataMode;
        #endif
    }
    public void Awake()
    {
        ScenedataCapt = new sceneTrackdata();

        _eyeXHost          = EyeXHost.GetInstance();
        _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);

#if UNITY_EDITOR
        _oldGazePointMode = gazePointMode;
#endif
    }
Пример #11
0
    /// <summary>
    /// Draw a GUI.Box at the user's gaze point.
    /// </summary>
    public void OnGUI()
    {
#if UNITY_EDITOR
        if (_oldGazePointMode != gazePointMode)
        {
            _gazePointProvider.Stop();
            _oldGazePointMode = gazePointMode;
            _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);
            _gazePointProvider.Start();
        }
#endif

        var gazePoint = _gazePointProvider.Last;
        DrawGUI(gazePoint, pointSize, pointColor, string.Empty);
    }
Пример #12
0
	// Use this for initialization
	void Start ()
    {
		_eyeXHost = EyeXHost.GetInstance ();
		_gazePointProvider = _eyeXHost.GetGazePointDataProvider (Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
		onEnable ();
        _tr = transform;
        GameObject[] _tempCalStats = GameObject.FindGameObjectsWithTag("Stats");
        if (_tempCalStats.Length > 1)
        {
            for (int i = 1; i < _tempCalStats.Length; i++)
            {
                Destroy(_tempCalStats[i]);
            }
        }

        _calStats = _tempCalStats[0].GetComponent<CalibrationStats>();
        _calStats._calibrationSize = 0;
	}
Пример #13
0
    /// <summary>
    /// Draw a GUI.Box at the user's fixation point.
    /// </summary>
    public void OnGUI()
    {
#if UNITY_EDITOR
        if (_oldFixationDataMode != fixationDataMode)
        {
            _fixationDataProvider.Stop();
            _oldFixationDataMode = fixationDataMode;
            _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);
            _fixationDataProvider.Start();
        }
#endif

        var fixationPoint = _fixationDataProvider.Last;
        if (fixationPoint.IsValid)
        {
            if (FixationDataEventType.Begin == fixationPoint.EventType)
            {
                _fixationCount++;
            }

            DrawGUI(fixationPoint.GazePoint, pointSize, pointColor, _fixationCount.ToString());
        }
    }
Пример #14
0
 // Use this for initialization
 void Awake()
 {
     _eyeXHost             = EyeXHost.GetInstance();
     _gazePointProvider    = _eyeXHost.GetGazePointDataProvider(gazePointMode);
     userPresenceComponent = GetComponent <UserPresenceComponent>();
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetFixationDataProvider(fixationDataMode);
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetGazePointDataProvider(gazePointDataMode);
 }
 protected void Awake()
 {
     _eyexHost     = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetGazePointDataProvider(gazePointDataMode);
 }
        public override void OnEnter()
        {
            _dataProvider = EyeXHost.GetInstance().GetGazePointDataProvider(lightlyFiltered.Value?GazePointDataMode.LightlyFiltered:GazePointDataMode.Unfiltered);

            _dataProvider.Start();
        }
Пример #19
0
 public void Awake()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _gazePointProvider = _eyeXHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetEyePositionDataProvider();
 }
Пример #21
0
        public override void OnEnter()
        {
            _dataProvider = EyeXHost.GetInstance().GetGazePointDataProvider(lightlyFiltered.Value?GazePointDataMode.LightlyFiltered:GazePointDataMode.Unfiltered);

            _dataProvider.Start();
        }