Exemplo n.º 1
0
    /// <summary>
    /// 退出
    /// </summary>
    public void Quitting()
    {
        if (m_hasQuit)
        {
            return;
        }

        m_event.Quitting();
        m_hasQuit = true;

        if (Event.QuittingScreen2DEvent == null || Event.QuittingScreen2DEvent())
        {
            //GCSeries.FCore.SetScreen2D();
            RuntimeArgs runtimeArgs = Data.RuntimeArgs;
            runtimeArgs.SwitchScreenState(runtimeArgs.MainDevice, false);
            runtimeArgs.SwitchScreenState(runtimeArgs.ProjectionDevice, false);
#if !UNITY_EDITOR
            ShowWindow(Data.MainWindowHandle, 2);
#endif
        }

        if (Data.InitIsCloneProjection)
        {
            F3Device.Screen.ScreenHelper.SetProjection(F3Device.Screen.ScreenHelper.SDC_TOPOLOGY_CLONE);
        }
    }
Exemplo n.º 2
0
        /// <summary>
        /// 更新运行数据
        /// </summary>
        void SetRuntimArgs()
        {
            bool temp_is3D = false;

            switch (_curMode)
            {
            case ScreenManger.DualScreenMode.VR:
                temp_is3D = true;
                break;

            case ScreenManger.DualScreenMode.VR_2D:
                temp_is3D = false;
                break;

            case ScreenManger.DualScreenMode.AR_2D:
                temp_is3D = false;
                break;

            default:
                break;
            }

            RuntimeArgs arg = Global.Instance.Data.RuntimeArgs;

            arg.SwitchScreenState(arg.ProjectionDevice, temp_is3D);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void Init()
 {
     initIsCloneProjection = F3Device.DeviceManager.Instance.IsCloneProjection;
     ProjectionWindowListener();
     FindMainWindow();
     RuntimeArgs.Init();
     RuntimeArgs.DoProcess();
 }
Exemplo n.º 4
0
        protected virtual bool GetActiveState()
        {
            RuntimeArgs arg = Global.Instance.Data.RuntimeArgs;

            /*---- GC3000 ----*/
            if (arg.MainDevice is IFrame3Device)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 5
0
        public void TestInitialize()
        {
            IDiskIOHandler diskIOHandler = new DiskIOHandler();

            runtimeSettings = JsonConvert.DeserializeObject <RuntimeArgs>(diskIOHandler.FileReadAllText("runtimeConfig.Json"));
            runtimeSettings.DataSourceFileName = Path.Combine(Directory.GetCurrentDirectory(), runtimeSettings.DataSourceFileName);
            runtimeSettings.SourceDataFolder   = Path.Combine(Directory.GetCurrentDirectory(), runtimeSettings.SourceDataFolder);
            IServiceCollection services = new ServiceCollection();

            services.AddSingleton(runtimeSettings);
            services.MainInjection();
            this.serviceProvider = services.BuildServiceProvider();
        }
Exemplo n.º 6
0
        public override Touch GetTouch(int index)
        {
            if (TouchCount > index)
            {
                Touch       touch       = new Touch();
                RuntimeArgs runtimeArgs = Global.Instance.Data.RuntimeArgs;

                touch.position = new Vector2(_clientWininfo.TOUCHINPUT[index].X / 100f - runtimeArgs.ProjectionWindowRect.xMin,
                                             runtimeArgs.ProjectionWindowRect.yMax - _clientWininfo.TOUCHINPUT[index].Y / 100f);
                return(touch);
            }
            return(new Touch());
        }
        private DegreeToDecimalLatLongMapper CreateDegreeToDecimalLatLongMapper()
        {
            RuntimeArgs arg = new RuntimeArgs
            {
                DegreeToDecimalLatLongMapperSettings = new Dictionary <string, string>()
                {
                    { Constants.columnkey, Constants.columnkey },
                    { Constants.latitudeKey, Constants.latitudeKey },
                    { Constants.longitudeKey, Constants.longitudeKey }
                }
            };

            return(new DegreeToDecimalLatLongMapper(
                       arg));
        }
Exemplo n.º 8
0
        private static void Main(string[] args)
        {
            EtLogger logger = new EtLogger(new ConsoleProgressBar());

            logger.Log("=> Starting Custom CSV Et_Tool : ", EventLevel.LogAlways);
            IDiskIOHandler diskIOHandler   = new DiskIOHandler();
            RuntimeArgs    runtimeSettings = JsonConvert.DeserializeObject <RuntimeArgs>(diskIOHandler.FileReadAllText("runtimeConfig.Json"));

            IServiceCollection services = new ServiceCollection();

            services.AddSingleton(runtimeSettings);
            services.MainInjection();
            IServiceProvider serviceProvider = services.BuildServiceProvider();
            IET_Engine       engine          = serviceProvider.GetRequiredService <IET_Engine>();

            if (engine.RunDataAnalysis() && engine.InitializePrepocessing())
            {
                engine.PerformTransformation();
            }
            logger.LogInformation("Press Enter to Exit");
            Console.ReadLine();

            /*
             * 1. Load Configurations
             *      Get Emit Configuration
             *          [
             *          destination type
             *          destination colums
             *          ]
             *      Get Ingest Configuration
             *          [
             *          Load Main Data Source
             *          Load Lookups
             *          Load Transformation Lookups
             *          ]
             *
             * 2. Run Extraction Phase
             * 3. Run Transformation Phase
             * 4. Emit OutPut
             * 5. CheckSum Output , Input
             *
             */
        }
Exemplo n.º 9
0
        protected override void UpdateTransform()
        {
            RuntimeArgs arg = Global.Instance.Data.RuntimeArgs;

            if (!Application.isPlaying)
            {
                transform.position = mrSystem.transform.localToWorldMatrix.MultiplyPoint(defaultPosition * FCore.ViewerScale);
                return;
            }

            if (arg.MainIs3DShow)
            {
                FCore.PupilDistance = eyeDistance;
                if (Global.Instance.Data.IsGlassTracing)
                {
                    transform.position = FCore.glassPosition;
                }
                else
                {
                    transform.position = mrSystem.transform.localToWorldMatrix.MultiplyPoint(defaultPosition * FCore.ViewerScale);
                }
            }
            else
            {
                if (_currentIs3D && !m_2DLerping)
                {
                    StopAllCoroutines();
                    StartCoroutine(LerpReset2D());
                }
                else if (!m_2DLerping)
                {
                    transform.position  = mrSystem.transform.localToWorldMatrix.MultiplyPoint(defaultPosition * FCore.ViewerScale);
                    m_lastLocalPosition = mrSystem.transform.worldToLocalMatrix.MultiplyPoint(transform.position);
                }
            }

            mainCamera.transform.localPosition     = new Vector3(FCore.PupilDistance / -2.0f, 0.0f, 0.0f) * FCore.ViewerScale;
            secondlyCamera.transform.localPosition = new Vector3(FCore.PupilDistance / 2.0f, 0.0f, 0.0f) * FCore.ViewerScale;
        }
Exemplo n.º 10
0
        ////////////////////////////////////////////////////////////////////////
        // Protected Methods
        ////////////////////////////////////////////////////////////////////////

        protected override Pose ComputeWorldPose()
        {
            Ray outRay;

            if (Input.touchCount <= 0)
            {
                outRay = this.EventCamera.ScreenPointToRay(
                    Input.mousePosition);
            }
            else//区分触屏与鼠标
            {
                RuntimeArgs arg   = Global.Instance.Data.RuntimeArgs;
                Touch       touch = Input.GetTouch(0);

                if (!arg.MainDeviceIs3D || arg.MainDevice is F3Device.Device.IFrame3Device)
                {
                    //非3D模式或帧连续设备下不需要转坐标
                    outRay = this.EventCamera.ScreenPointToRay(touch.position);
                }
                else
                {
                    //左右画面下矫正触屏坐标
                    float xPosCorrected = touch.position.x;
                    if (xPosCorrected < Screen.width / 2)
                    {
                        xPosCorrected /= 2f;
                    }
                    else
                    {
                        xPosCorrected = xPosCorrected / 2f + Screen.width / 2;
                    }

                    outRay = this.EventCamera.ScreenPointToRay(new Vector2(xPosCorrected, touch.position.y));
                }
            }

            return(outRay.ToPose(this.EventCamera.transform.up));
        }
Exemplo n.º 11
0
 public DataCleanerConfig(RuntimeArgs runtimeArgs, IDiskIOHandler iOHandler)
 {
     this._cleanerConfigFileName = runtimeArgs.DefaultCleanerConfig;
     this._iOHandler             = iOHandler;
     this._cleanerConfigs        = JsonConvert.DeserializeObject <Dictionary <string, Dictionary <string, KeyValuePair <string, string> > > >(this._iOHandler.FileReadAllText(this._cleanerConfigFileName));
 }
Exemplo n.º 12
0
        float _percentY; //映射到视口区域的Y位置比例

        protected override Pose ComputeWorldPose()
        {
            RuntimeArgs runtimeArgs = Global.Instance.Data.RuntimeArgs;
            Ray         mouseRay;

            if (_clientWininfo.touchCount <= 0)//处理投屏鼠标
            {
                float clientX = _clientWininfo.mouseInfo.mousePosX;
                float clientY = (runtimeArgs.ProjectionWindowRect.yMax - runtimeArgs.ProjectionWindowRect.yMin) - _clientWininfo.mouseInfo.mousePosY;

                //计算在单个视口坐标相对比例
                _percentX = clientX / runtimeArgs.ProjectionWindowRect.width;
                _percentY = clientY / runtimeArgs.ProjectionWindowRect.height;

                if (float.IsInfinity(_percentX) || float.IsNaN(_percentX) ||
                    float.IsInfinity(_percentY) || float.IsNaN(_percentY))
                {
                    return(Pose.identity);
                }

                runtimeArgs = Global.Instance.Data.RuntimeArgs;
                Vector3 m_visualPosition;
                if (!runtimeArgs.ProjectionIs3DShow)
                {
                    m_visualPosition = new Vector3(this.EventCamera.scaledPixelWidth * _percentX, this.EventCamera.scaledPixelHeight * _percentY);
                }
                else//左右画面坐标处理
                {
                    float offset = 0f;
                    if (_percentX > 0.5f)
                    {
                        offset = -0.5f;
                    }

                    m_visualPosition = new Vector3(this.EventCamera.scaledPixelWidth * ((_percentX + offset) * 2f), this.EventCamera.scaledPixelHeight * _percentY);
                }

                mouseRay = this.EventCamera.ScreenPointToRay(m_visualPosition);
#if UNITY_EDITOR
                Debug.DrawLine(mouseRay.origin, mouseRay.direction * 100f, Color.blue);
#endif
            }
            else//处理投屏触摸
            {
                float clientX = _clientWininfo.TOUCHINPUT[0].X / 100f - runtimeArgs.ProjectionWindowRect.xMin;
                float clientY = runtimeArgs.ProjectionWindowRect.yMax - _clientWininfo.TOUCHINPUT[0].Y / 100f;

                //计算在单个视口坐标相对比例
                _percentX = clientX / runtimeArgs.ProjectionWindowRect.width;
                _percentY = clientY / runtimeArgs.ProjectionWindowRect.height;

                if (float.IsInfinity(_percentX) || float.IsNaN(_percentX) ||
                    float.IsInfinity(_percentY) || float.IsNaN(_percentY))
                {
                    return(Pose.identity);
                }

                runtimeArgs = Global.Instance.Data.RuntimeArgs;
                Vector3 m_visualPosition;

                m_visualPosition = new Vector3(this.EventCamera.scaledPixelWidth * _percentX, this.EventCamera.scaledPixelHeight * _percentY);
                //Debug.Log("****************" + runtimeArgs.ProjectionIs3DShow);

                mouseRay = this.EventCamera.ScreenPointToRay(m_visualPosition);
            }

            return(mouseRay.ToPose(this.EventCamera.transform.up));
        }
 public DegreeToDecimalLatLongMapper(RuntimeArgs runtimeArgs) => this._runtimeArgs = runtimeArgs;