Example #1
0
        public void MatchUIWithSRWorksSetting()
        {
            Default_Values.Clear();

            for (int i = 0; i < sliders.Count; i++)
            {
                Default_Values.Add(GetValue((ControlMode)i, ValueToGet.Value));
            }

            int result = SRWorkModule_API.GetDepthParameterBool((int)DepthCmd.ENABLE_REFINEMENT, ref refinement_setting);

            if (result == (int)Error.WORK)
            {
                ViveSR_DualCameraImageCapture.DepthRefinement = refinement_setting;
            }
            else
            {
                Debug.LogWarning("Depth refinemenet call status: " + (Error)result);
            }

            Default_isDepthRefinementOn = ViveSR_DualCameraImageCapture.DepthRefinement;
            Default_isEdgeEnhanceOn     = ViveSR_DualCameraImageCapture.DepthEdgeEnhance;
            Default_DepthCase           = ViveSR_DualCameraImageCapture.DepthCase;

            for (int i = 0; i < sliders.Count; i++)
            {
                sliders[i].value = GetValue((ControlMode)i, ValueToGet.Value);
            }
            switches_status[(int)ControlMode.Refinement - sliders.Count].text  = Default_isDepthRefinementOn ? "On" : "Off";
            switches_status[(int)ControlMode.EdgeEnhance - sliders.Count].text = Default_isEdgeEnhanceOn ? "On" : "Off";
            switches_status[(int)ControlMode.DepthCase - sliders.Count].text   = Default_DepthCase == DepthCase.DEFAULT ? "Default" : "Close Range";
        }
Example #2
0
        public static int ChangeDepthCase(DepthCase depthCase)
        {
            int result = SRWorkModule_API.SetDepthParameterInt((int)DepthCmd.CHANGE_DEPTH_CASE, (int)depthCase);

            if (result == (int)Error.WORK)
            {
                DepthCase = depthCase;
            }
            return(result);
        }
Example #3
0
        public static int SetDefaultDepthCase(DepthCase depthCase)
        {
            int result = SRWorkModule_API.SetDepthParameterInt((int)DepthParam.DEPTH_USING_CASE, (int)depthCase);

            if (result == (int)Error.WORK)
            {
                DepthCase = depthCase;
            }
            return(result);
        }
Example #4
0
        public static int ChangeDepthCase(DepthCase depthCase)
        {
            int result = ViveSR_Framework.SetCommandInt(ViveSR_Framework.MODULE_ID_DEPTH, (int)DepthCmd.CHANGE_DEPTH_CASE, (int)depthCase);

            if (result == (int)Error.WORK)
            {
                DepthCase = depthCase;
            }
            return(result);
        }
Example #5
0
        public static int SetDefaultDepthCase(DepthCase depthCase)
        {
            int result = ViveSR_Framework.SetParameterInt(ViveSR_Framework.MODULE_ID_DEPTH, (int)DepthParam.DEPTH_USING_CASE, (int)depthCase);

            if (result == (int)Error.WORK)
            {
                DepthCase = depthCase;
            }
            return(result);
        }
Example #6
0
 void SetDepthCase(DepthCase DepthCase)
 {
     ViveSR_DualCameraImageCapture.ChangeDepthCase(DepthCase);
     switches_status[(int)ControlMode.DepthCase - sliders.Count].text = ViveSR_DualCameraImageCapture.DepthCase == DepthCase.DEFAULT ? "Default" : "Close Range";
 }