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"; }
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); }
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); }
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); }
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); }
void SetDepthCase(DepthCase DepthCase) { ViveSR_DualCameraImageCapture.ChangeDepthCase(DepthCase); switches_status[(int)ControlMode.DepthCase - sliders.Count].text = ViveSR_DualCameraImageCapture.DepthCase == DepthCase.DEFAULT ? "Default" : "Close Range"; }