//===================================================================================================== // Functions //===================================================================================================== public void OnEnable() { controller = (ALPSController)target; deviceConfig = (controller.deviceConfig == null)? ALPSDevice.GetConfig(Device.DEFAULT):controller.deviceConfig; controller.deviceConfig = deviceConfig; ALPSCamera.deviceConfig = deviceConfig; ALPSBarrelMesh.deviceConfig = deviceConfig; ALPSCrosshairs.deviceConfig = deviceConfig; screenSize = deviceConfig.GetScreenOption(); }
//===================================================================================================== // Functions //===================================================================================================== public void OnEnable() { controller = (ALPSController)target; deviceConfig = (controller.deviceConfig == null)? ALPSDevice.GetConfig(Device.DEFAULT):controller.deviceConfig; controller.deviceConfig = deviceConfig; ALPSCamera.deviceConfig = deviceConfig; ALPSBarrelMesh.deviceConfig = deviceConfig; ALPSCrosshairs.deviceConfig = deviceConfig; screenSize = deviceConfig.GetScreenOption (); }
public frmRegisterScreen(ScreenOption option) { switch (option) { case ScreenOption.ViewRegister: //set the database connection and the Sql command to be used string conString = "Server = .\\sqlexpress; trusted_connection = yes; database=he_dados;"; SqlConnection con = new SqlConnection(conString); break; ... } }
public override void OnInspectorGUI() { //Device Device = (Device)EditorGUILayout.EnumPopup("Device:", Device); //IPD deviceConfig.IPD = EditorGUILayout.FloatField(new GUIContent("IPD", "Inter Pupilary Distance in millimeter. This must match the distance between the user's eyes"), deviceConfig.IPD); //Stereo distance deviceConfig.ILD = EditorGUILayout.FloatField(new GUIContent("ILD", "Inter Lens Distance in millimeter. This is the distance between both cameras and this should match the IPD. Can be tweaked to increase or decrease the stereo effect."), deviceConfig.ILD); //Field Of View deviceConfig.fieldOfView = EditorGUILayout.Slider("Vertical FOV", deviceConfig.fieldOfView, 1, 180); //Screen size screenSize = (ScreenOption)EditorGUILayout.EnumPopup("Screen size:", screenSize); if (screenSize == ScreenOption.FixedSize) { deviceConfig.Width = EditorGUILayout.IntField(new GUIContent("\twidth", "Width of the viewport in millimeter"), deviceConfig.Width); deviceConfig.Height = EditorGUILayout.IntField(new GUIContent("\theight", "Height of the viewport in millimeter"), deviceConfig.Height); deviceConfig.fixedSize = true; } else { deviceConfig.fixedSize = false; } //Barrel distortion deviceConfig.enableBarrelDistortion = EditorGUILayout.Toggle("Barrel distortion", deviceConfig.enableBarrelDistortion); if (deviceConfig.enableBarrelDistortion) { deviceConfig.k1 = EditorGUILayout.FloatField("\tk1", deviceConfig.k1); deviceConfig.k2 = EditorGUILayout.FloatField("\tk2", deviceConfig.k2); } //Chromatic correction deviceConfig.enableChromaticCorrection = EditorGUILayout.Toggle("Chromatic correction", deviceConfig.enableChromaticCorrection); if (deviceConfig.enableChromaticCorrection) { deviceConfig.chromaticCorrection = EditorGUILayout.FloatField("\tCorrection intensity", deviceConfig.chromaticCorrection); } //Crosshairs controller.crosshairsEnabled = EditorGUILayout.Toggle("Crosshair", controller.crosshairsEnabled); if (GUI.changed) { controller.ClearDirty(); EditorUtility.SetDirty(target); } }
public static void ConfirmScreen(Vector2IntData resolution, ScreenOption screenoption) { Screen.SetResolution(resolution.x, resolution.y, screenoption == ScreenOption.FullScreen); }
public override void OnInspectorGUI() { //Device Device = (Device)EditorGUILayout.EnumPopup("Device:",Device); //IPD deviceConfig.IPD = EditorGUILayout.FloatField (new GUIContent("IPD", "Inter Pupilary Distance in millimeter. This must match the distance between the user's eyes"),deviceConfig.IPD); //Stereo distance deviceConfig.ILD = EditorGUILayout.FloatField (new GUIContent("ILD","Inter Lens Distance in millimeter. This is the distance between both cameras and this should match the IPD. Can be tweaked to increase or decrease the stereo effect."),deviceConfig.ILD); //Field Of View deviceConfig.fieldOfView = EditorGUILayout.Slider ("Vertical FOV",deviceConfig.fieldOfView, 1, 180); //Screen size screenSize = (ScreenOption)EditorGUILayout.EnumPopup("Screen size:",screenSize); if (screenSize == ScreenOption.FixedSize) { deviceConfig.Width = EditorGUILayout.IntField (new GUIContent("\twidth", "Width of the viewport in millimeter"), deviceConfig.Width); deviceConfig.Height = EditorGUILayout.IntField (new GUIContent("\theight", "Height of the viewport in millimeter"), deviceConfig.Height); deviceConfig.fixedSize = true; } else { deviceConfig.fixedSize = false; } //Barrel distortion deviceConfig.enableBarrelDistortion = EditorGUILayout.Toggle ("Barrel distortion", deviceConfig.enableBarrelDistortion); if (deviceConfig.enableBarrelDistortion) { deviceConfig.k1 = EditorGUILayout.FloatField ("\tk1", deviceConfig.k1); deviceConfig.k2 = EditorGUILayout.FloatField ("\tk2", deviceConfig.k2); } //Chromatic correction deviceConfig.enableChromaticCorrection = EditorGUILayout.Toggle ("Chromatic correction",deviceConfig.enableChromaticCorrection); if (deviceConfig.enableChromaticCorrection) { deviceConfig.chromaticCorrection = EditorGUILayout.FloatField ("\tCorrection intensity", deviceConfig.chromaticCorrection); } //Crosshairs controller.crosshairsEnabled = EditorGUILayout.Toggle("Crosshair", controller.crosshairsEnabled); if (GUI.changed) { controller.ClearDirty(); EditorUtility.SetDirty(target); } }