예제 #1
0
    // Update is called once per frame
    void Update()
    {
        GStreamerCore.Time = Time.time;


        if (_cameraProfile != "" && !_camsInited && RobotConnector.IsConnected)
        {
            _initCameras();
            //_cameraProfile="";
        }


        //Offset Cameras using Keyboard
        if (Input.GetKey(KeyCode.LeftControl))
        {
            Configuration.CamSettings.PixelShiftLeft.x -= (Input.GetKeyDown(KeyCode.RightArrow)?0:1) - (Input.GetKeyDown(KeyCode.LeftArrow)?0:1);
            Configuration.CamSettings.PixelShiftLeft.y -= (Input.GetKeyDown(KeyCode.UpArrow)?0:1) - (Input.GetKeyDown(KeyCode.DownArrow)?0:1);
        }
        else if (Input.GetKey(KeyCode.RightControl))
        {
            Configuration.CamSettings.PixelShiftRight.x -= (Input.GetKeyDown(KeyCode.RightArrow)?0:1) - (Input.GetKeyDown(KeyCode.LeftArrow)?0:1);
            Configuration.CamSettings.PixelShiftRight.y -= (Input.GetKeyDown(KeyCode.UpArrow)?0:1) - (Input.GetKeyDown(KeyCode.DownArrow)?0:1);
        }
        if (false)
        {
            if (Input.GetKeyDown(KeyCode.V))
            {
                RobotConnector.Connector.SendData(TxKitEyes.ServiceName, "Stream", _stream.ToString());
                _stream = !_stream;
            }
        }

        if (_camsInited && false)
        {
            for (int i = 0; i < 2; ++i)
            {
                if (_camRendererParents [i] != null)
                {
                    _camRendererParents [i].transform.localRotation = Quaternion.Euler(Configuration.CamSettings.OffsetAngle + _camsImageOffset);
                }
            }
        }
        if (ParameterController != null)
        {
            ParameterController.UpdateValuesObject(_videoValues);
            _videoValues.SendData();
        }
    }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        GStreamerCore.Time = Time.time;


        if (_cameraProfile != "" && !_camsInited && RobotConnector.IsConnected)
        {
            _initCameras();
            //_cameraProfile="";
        }


        //Offset Cameras using Keyboard
        if (Input.GetKey(KeyCode.LeftControl))
        {
            Configuration.CamSettings.PixelShiftLeft.x -= (Input.GetKeyDown(KeyCode.RightArrow)?0:1) - (Input.GetKeyDown(KeyCode.LeftArrow)?0:1);
            Configuration.CamSettings.PixelShiftLeft.y -= (Input.GetKeyDown(KeyCode.UpArrow)?0:1) - (Input.GetKeyDown(KeyCode.DownArrow)?0:1);
        }
        else if (Input.GetKey(KeyCode.RightControl))
        {
            Configuration.CamSettings.PixelShiftRight.x -= (Input.GetKeyDown(KeyCode.RightArrow)?0:1) - (Input.GetKeyDown(KeyCode.LeftArrow)?0:1);
            Configuration.CamSettings.PixelShiftRight.y -= (Input.GetKeyDown(KeyCode.UpArrow)?0:1) - (Input.GetKeyDown(KeyCode.DownArrow)?0:1);
        }
        if (false)
        {
            if (Input.GetKeyDown(KeyCode.V))
            {
                RobotConnector.Connector.SendData(TxKitEyes.ServiceName, "Stream", _stream.ToString());
                _stream = !_stream;
            }
        }

        if (_imageProcessor != null)
        {
            _imageProcessor.ProcessMainThread(ref Output);
        }

        if (ParameterController != null)
        {
            ParameterController.UpdateValuesObject(_videoValues);
            _videoValues.SendData();
        }
    }