Beispiel #1
0
        void SetValue(ControlMode controlMode, int Value)
        {
            if (!(controlMode == ControlMode.WhiteBalance && !isWhiteBalanceManual))
            {
                ViveSR_DualCameraImageCapture.CameraQualityInfo camInfo = new ViveSR_DualCameraImageCapture.CameraQualityInfo();
                int result = ViveSR_DualCameraImageCapture.GetCameraQualityInfo(ToCameraQuality(controlMode), ref camInfo);

                if (result != (int)Error.WORK)
                {
                    return;
                }

                if (camInfo.Value != Value)
                {
                    isDefault = false;
                    switches_status[(int)ControlMode.Preset - sliders.Count].text = "Custom";
                    camInfo.Value = Value;

                    ViveSR_DualCameraImageCapture.SetCameraQualityInfo(ToCameraQuality(controlMode), camInfo);
                }
            }
        }
Beispiel #2
0
        void SetDefaultSliderValue(ControlMode controlMode)
        {
            switch (controlMode)
            {
            case ControlMode.WhiteBalanceMode:
                SetWhiteBalanceMode(false);
                break;

            case ControlMode.Preset:
                break;

            default:
                ViveSR_DualCameraImageCapture.CameraQualityInfo camInfo = new ViveSR_DualCameraImageCapture.CameraQualityInfo();
                ViveSR_DualCameraImageCapture.GetCameraQualityInfo(ToCameraQuality(controlMode), ref camInfo);

                sliders[(int)controlMode].maxValue = GetValue(controlMode, ValueToGet.Max);
                sliders[(int)controlMode].minValue = GetValue(controlMode, ValueToGet.Min);
                sliders[(int)controlMode].value    = camInfo.Value = GetValue(controlMode, ValueToGet.DefaultValue);

                ViveSR_DualCameraImageCapture.SetCameraQualityInfo(ToCameraQuality(controlMode), camInfo);
                break;
            }
        }
Beispiel #3
0
        void SetWhiteBalanceMode(bool isManual)
        {
            if (isWhiteBalanceManual != isManual)
            {
                isWhiteBalanceManual = isManual;

                ViveSR_DualCameraImageCapture.CameraQualityInfo camInfo = new ViveSR_DualCameraImageCapture.CameraQualityInfo();
                ViveSR_DualCameraImageCapture.GetCameraQualityInfo(ViveSR_DualCameraImageCapture.CameraQuality.WHITE_BALANCE, ref camInfo);

                switches_status[0].text = isManual ? "Manual" : "Auto";
                sliders[(int)ControlMode.WhiteBalance].interactable = isManual;
                foreach (Button btn in whiteBalanceButtons)
                {
                    btn.interactable = isManual;
                }
                camInfo.Mode = isManual ? 2 : 1;
                if (isManual)
                {
                    switches_status[(int)ControlMode.Preset - sliders.Count].text = "Custom";
                    isDefault = false;
                }
                ViveSR_DualCameraImageCapture.SetCameraQualityInfo(ViveSR_DualCameraImageCapture.CameraQuality.WHITE_BALANCE, camInfo);
            }
        }