예제 #1
0
        //--------------------------------------------------------------------
        // MonoBehaviour Messages
        //--------------------------------------------------------------------

        private void Awake()
        {
#if UNITY_EDITOR
            _gameViewBoundsProvider = CreateEditorScreenHelper();
#else
            _gameViewBoundsProvider = new UnityPlayerGameViewBoundsProvider();
#endif
            _gazeFocus = new GazeFocus();

            _gazePointDataProvider = new GazePointDataProvider(this);
            _headPoseDataProvider  = new HeadPoseDataProvider();
        }
예제 #2
0
        private bool TryGetLastGazePoints(
            out IEnumerable <global::Tobii.Framework.GazePoint> gazePoints)
        {
            if (!IsInitialized)
            {
                gazePoints = new List <global::Tobii.Framework.GazePoint>();
                return(false);
            }

            gazePoints = GazePointDataProvider
                         .GetDataPointsSince(_lastHandledGazePoint).ToList();
            UpdateLastHandledGazePoint(gazePoints);

            return(gazePoints.Any());
        }