void Start()
        {
            blinker1.SetActive(false);
            blinker2.SetActive(false);

            Debug.Log("Starting Virtually Real Realignment");
            cameraRig = FindObjectOfType <EyeSkillsCameraRig>();

            NetworkManager.instance.RegisterScene("Eye Straightening", "How long can the participant hold fusion as we straighten up their world?");
            NetworkManager.instance.RegisterButton("start", "Start/Re-start straightening", "Start/Re-start straightening the eye from the misaligned position");
            NetworkManager.instance.RegisterButton("store", "Store best fusion loss angle", "Store the greatest angle at which fusion was lost");
            //NetworkManager.instance.RegisterButton("stop", "Stop straightening", "Pause the straightening at the point fusion was lost");
            NetworkManager.instance.RegisterFloat("degree", -45f, 45f, 1f, "Misalignment", "Angle between the eyes.");

            practitionerMode = (PlayerPrefs.GetString("EyeSkills.practitionerMode") == "1") ? true : false;

            //Pick up user calibration
            esInput = EyeSkillsInput.instance;
            FetchEyeCalibration();

            originalSuppressionRatio = cameraRig.config.binocularSuppressionRatio;
            cameraRig.config.leastMisalignmentBeforeFusionLost = 180f; //Make our initial "best" as bad as can be.
            ResetEyeMisalignment();
            userWantsStraightening = true;                             //This will case the camera to roate in the Update phase - ought to be a coroutine really.
        }
Example #2
0
        void Start()
        {
            // TODO : Specify a CSS sheet to use then give class names. Can use some default CSS or make custom layouts.
            NetworkManager.instance.RegisterScene("Monocular Suppression", "Can the participant see with both eyes?");
            NetworkManager.instance.RegisterButton("instructions", "Instructions", "Have the scene instructions read to you");
            NetworkManager.instance.RegisterButton("leftEye", "Left Eye", "Switch to the left eye");
            NetworkManager.instance.RegisterButton("rightEye", "Right Eye", "Switch to the right eye");
            NetworkManager.instance.RegisterButton("incBrightness", "Increase Brightness", "Increase object brightness");
            NetworkManager.instance.RegisterButton("decBrightness", "Decrease Brightness", "Decrease object brightness");
            NetworkManager.instance.RegisterButton("incDistance", "Increase Distance", "Increase object distance (make the object smaller)");
            NetworkManager.instance.RegisterButton("decDistance", "Decrease Distance", "Decrease object distance (make the object larger)");

            esInput = EyeSkillsInput.instance;

            Debug.Log("Start - fetch esInput " + esInput);
            audioManager = AudioManager.instance;

            //Setup our initial occluders
            model.leftOccluder.PickRandom();
            model.rightOccluder.PickRandom();

            //Now lets setup those occluders with their initial settings.
            model.leftOccluder.alterLuminance((float)initialBrightnessInPercent / 100, true);
            model.leftOccluder.AlterDistance((float)startingDistance, true);

            model.rightOccluder.alterLuminance((float)initialBrightnessInPercent / 100, true);
            model.rightOccluder.AlterDistance((float)startingDistance, true);

            model.SwitchToRightEye();
            sayString("rightEyeActive");
            model.PickRandomOccluder();
        }
        void Start()
        {
            cameraRig = FindObjectOfType <EyeSkillsCameraRig>();

            audioManager = AudioManager.instance;
            NetworkManager.instance.RegisterScene("Detect Aniseikonia", "What scaling and position are needed to fuse?");
            NetworkManager.instance.RegisterButton("unlockRight", "Unlock right eye", "Unlock the right eye");
            NetworkManager.instance.RegisterButton("unlockLeft", "Unlock left eye", "Unlock the left eye");
            NetworkManager.instance.RegisterButton("lock", "Lock both", "Lock both eyes");
            NetworkManager.instance.RegisterButton("change", "Change observables", "Change Fixation Object");
            NetworkManager.instance.RegisterButton("enlarge", "Enlarge observable", "Enlarge the fixation object");
            NetworkManager.instance.RegisterButton("shrink", "Shrink observable", "Shrink the fixation object");
            NetworkManager.instance.RegisterButton("save", "Save misalignment", "Save misalignment angle");
            NetworkManager.instance.RegisterFloat("degree", -45f, 45f, 1f, "Misalignment", "Angle between the eyes.");

            //audioManager.Say("ChooseStrabismicEye");

            //if (EyeSkills.UserCalibrationManager.instance.userCalibration.leftEyeIsStrabismic)
            //    lockRightEye();
            //else if (EyeSkills.UserCalibrationManager.instance.userCalibration.rightEyeIsStrabismic)
            //lockLeftEye();

            esInput = EyeSkillsInput.instance;

            observables.AlterDistanceLeft((float)startingDistance, true);
            observables.AlterDistanceRight((float)startingDistance, true);

            StartCoroutine(followMisalignmentAngle());
        }
Example #4
0
        public void Start()
        {
            cameraRig = FindObjectOfType <EyeSkillsCameraRig>();
            esInput   = EyeSkillsInput.instance;

            audioManager = AudioManager.instance;
            //audioManager.Say("ChooseStrabismicEye");

            if (cameraRig.config.leftEyeIsStrabismic)
            {
                audioManager.Say("LeftStrabismic");
                unlockLeftEye();
            }
            else
            {
                audioManager.Say("RightStrabismic");
                unlockRightEye();
            }

            practitionerMode = (PlayerPrefs.GetString("EyeSkills.practitionerMode") == "1") ? true : false;

            NetworkManager.instance.RegisterScene("Detect Eye Misalignment", "To what degree are the participants eyes misaligned?");
            NetworkManager.instance.RegisterButton("unlockRight", "Unlock right eye", "Right eye is strabismic");
            NetworkManager.instance.RegisterButton("unlockLeft", "Unlock left eye", "Left eye is strabismic");
            NetworkManager.instance.RegisterButton("save", "Save misalignment", "Save misalignment angle");
            NetworkManager.instance.RegisterFloat("degree", -45f, 45f, 1f, "Misalignment", "Angle between the eyes.");

            StartCoroutine(trackAndReportEyeMisalignment());
        }
        public void Start()
        {
            esInput = EyeSkillsInput.instance;

            audioManager = AudioManager.instance;

            practitionerMode = (PlayerPrefs.GetString("EyeSkills.practitionerMode") == "1") ? true : false;
            //setCurrentPart(parts[0]);
        }
Example #6
0
        void Start()
        {
            NetworkManager.instance.RegisterButton("inConflict", "Add Conflict", "Put the eyes into conflict");
            NetworkManager.instance.RegisterButton("outOfConflict", "Remove Conflict", "Remove conflict");
            NetworkManager.instance.RegisterButton("save", "Save ratio", "Save the luminance ratio between the eyes");
            NetworkManager.instance.RegisterFloat("brightnessRatio", -1f, 1f, 0.05f, "Luminance ratio", "Brightness ratio between the eyes.");

            ignoreStillnessSensor = (PlayerPrefs.GetString("EyeSkills.practitionerMode") == "1") ? true : false;

            ratioController = new EyeSkillsVRHeadsetInput(trackedCamera);
            esInput         = EyeSkillsInput.instance;
            cameraRig       = cameraRigObject.GetComponent <EyeSkillsCameraRig>();
            brightnessRatio = 0;
            model.IntoConflict();
            AudioManager.instance.Say("inConflict");
            model.Show(true);
        }