public bool InitializeWithLicense(string licenseKey, bool enableAdvanced)
        {
            var createInfo = new StreamEngineTracker_Description();

            if (!string.IsNullOrEmpty(licenseKey))
            {
                createInfo.License = new[] { licenseKey };
            }

            try
            {
                _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
                _streamEngineTracker   = new StreamEngineTracker(createInfo);

                // Subscribe to relevant streams
                var startInfo = new StreamEngineTrackerStartInfo();
                if (enableAdvanced)
                {
                    startInfo.WearableAdvancedDataCallback = OnAdvancedWearableData;
                }
                else
                {
                    startInfo.WearableDataCallback = OnWearableData;
                }
                _streamEngineTracker.Start(startInfo);

                return(true);
            }
            catch (Exception e)
            {
                Debug.Log(e.Message);
                return(false);
            }
        }
Example #2
0
        public void Destroy()
        {
            if (_streamEngineTracker != null)
            {
                _streamEngineTracker.Destroy();
                _streamEngineTracker = null;
            }

            if (_hmdToWorldTransformer != null)
            {
                _hmdToWorldTransformer.Destroy();
                _hmdToWorldTransformer = null;
            }
        }
        public bool Initialize(FieldOfUse fieldOfUse, StreamEngineTracker streamEngineTracker)
        {
            try
            {
                if (streamEngineTracker == null)
                {
                    _streamEngineTracker = new StreamEngineTracker(fieldOfUse);
                }
                else
                {
                    _streamEngineTracker = streamEngineTracker;
                }

                _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
            }
            catch (System.Exception)
            {
                return(false);
            }

            return(true);
        }
Example #4
0
 private bool Initialize(StreamEngineTracker streamEngineTracker)
 {
     _streamEngineTracker   = streamEngineTracker;
     _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
     return(true);
 }
Example #5
0
 public TobiiProvider(StreamEngineTracker streamEngineTracker, HmdToWorldTransformer hmdToWorldTransformer)
 {
     _streamEngineTracker   = streamEngineTracker;
     _hmdToWorldTransformer = hmdToWorldTransformer;
 }
Example #6
0
 public TobiiProvider()
 {
     _streamEngineTracker   = new StreamEngineTracker();
     _hmdToWorldTransformer = new HmdToWorldTransformer(historyCapacity: 5);
 }
Example #7
0
 public TobiiProvider()
 {
     _streamEngineTracker   = new StreamEngineTracker();
     _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
 }