Пример #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());
        }