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);
            }
        }
示例#2
0
 public void Destroy()
 {
     if (_streamEngineTracker != null)
     {
         _streamEngineTracker.Destroy();
         _streamEngineTracker = null;
     }
 }
示例#3
0
        public void Destroy()
        {
            if (_streamEngineTracker != null)
            {
                _streamEngineTracker.Destroy();
                _streamEngineTracker = null;
            }

            if (_hmdToWorldTransformer != null)
            {
                _hmdToWorldTransformer.Destroy();
                _hmdToWorldTransformer = null;
            }
        }
        public void Destroy()
        {
            if (_streamEngineTracker != null)
            {
                _streamEngineTracker.Destroy();
            }

            if (_hmdRuntime != null)
            {
                _hmdRuntime.Destroy();
            }

            _streamEngineTracker = null;
            _hmdRuntime          = 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);
        }
示例#6
0
 private bool Initialize(StreamEngineTracker streamEngineTracker)
 {
     _streamEngineTracker   = streamEngineTracker;
     _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
     return(true);
 }
示例#7
0
 public TobiiProvider(StreamEngineTracker streamEngineTracker, HmdToWorldTransformer hmdToWorldTransformer)
 {
     _streamEngineTracker   = streamEngineTracker;
     _hmdToWorldTransformer = hmdToWorldTransformer;
 }
示例#8
0
 public TobiiProvider()
 {
     _streamEngineTracker   = new StreamEngineTracker();
     _hmdToWorldTransformer = new HmdToWorldTransformer(historyCapacity: 5);
 }
示例#9
0
 public TobiiProvider()
 {
     _streamEngineTracker   = new StreamEngineTracker();
     _hmdToWorldTransformer = new HmdToWorldTransformer(estimatedEyeTrackerLatency_s: 0.012f);
 }
 public TobiiOpenVRProvider(IHmdRuntime hmdRuntime)
 {
     _streamEngineTracker = new StreamEngineTracker();
     _hmdRuntime          = hmdRuntime;
 }
 public TobiiOpenVRProvider()
 {
     _streamEngineTracker = new StreamEngineTracker();
     _hmdRuntime          = new OpenVrRuntime();
 }