コード例 #1
0
        public SRDCoreRenderer(SRDSystemDescription description)
        {
            _cachedFaceTracker      = new Dictionary <FaceTrackerSystem, ISRDFaceTracker>();
            _cachedEyeViewRenderer  = new Dictionary <EyeViewRendererSystem, ISRDEyeViewRenderer>();
            _cachedStereoCompositer = new Dictionary <StereoCompositerSystem, ISRDStereoCompositer>();

            _currSystemDesc = description;
        }
コード例 #2
0
        void Awake()
        {
            UpdateSettings();
            foreach (var cond in GetForceQuitConditions())
            {
                if (cond.IsForceQuit)
                {
                    ForceQuitWithAssertion(cond.ForceQuitMessage);
                }
            }

            if (SRDProjectSettings.IsRunWithoutSRDisplayMode())
            {
                _description = new SRDSystemDescription(FaceTrackerSystem.Mouse,
                                                        EyeViewRendererSystem.UnityRenderCam,
                                                        StereoCompositerSystem.PassThrough);
            }
            else
            {
                _description = new SRDSystemDescription(FaceTrackerSystem.SRD,
                                                        EyeViewRendererSystem.UnityRenderCam,
                                                        StereoCompositerSystem.SRD);
            }

            _srdCoreRenderer = new SRDCoreRenderer(_description);
            _srdCoreRenderer.OnSRDFaceTrackStateEvent += (bool result) =>
            {
#if DEVELOPMENT_BUILD
                //Debug.LogWarning("No data from FaceRecognition: See the DebugWindow with F10");
#endif
                if (OnFaceTrackStateEvent != null)
                {
                    OnFaceTrackStateEvent.Invoke(result);
                }
            };

            SRDSessionHandler.Instance.CreateSession();

            _srdCrosstalkCorrection = new SRDCrosstalkCorrection();
        }
コード例 #3
0
 public void UpdateSRDSystemsAndRefresh(SRDSystemDescription srdSystemDesc)
 {
     UpdateFaceTrackerAndRefresh(srdSystemDesc.faceTrackerSystem);
     UpdateEyeViewRendererAndRefresh(srdSystemDesc.eyeViewRendererSystem);
     UpdateStereoCompositerAndRefresh(srdSystemDesc.stereoCompositerSystem);
 }