Ejemplo n.º 1
0
        //!
        //! calculate the camera positional offset and store in user preferences
        //!
        public void saveCameraOffset()
        {
            switch (currentCameraView)
            {
            case View.PERSP:
                // nothing
                break;

            case View.TOP:
                VPETSettings.Instance.cameraOffsetTop = Camera.main.transform.position - new Vector3(-15f, 10f, 5f);
                break;

            case View.FRONT:
                VPETSettings.Instance.cameraOffsetFront = Camera.main.transform.position - new Vector3(-15f, 5f, 14f);
                break;

            case View.RIGHT:
                VPETSettings.Instance.cameraOffsetRight = Camera.main.transform.position - new Vector3(-22.9f, 5f, 4.7f);
                break;

            case View.LEFT:
                VPETSettings.Instance.cameraOffsetLeft = Camera.main.transform.position - new Vector3(-7.4f, 5f, 4.7f);
                break;

            case View.BOTTOM:
                VPETSettings.Instance.cameraOffsetLeft = Camera.main.transform.position - new Vector3(-15f, -1.88f, 2.24f);
                break;
            }

            VPETSettings.mapValuesToPreferences();
        }
Ejemplo n.º 2
0
        public void hideConfigWidget()
        {
            // must be first
            configWidget.Hide();

            // copy values from config widget to global settings
            VPETSettings.mapValuesFromObject(configWidget);

            // save global settings in preferences
            VPETSettings.mapValuesToPreferences();
        }
Ejemplo n.º 3
0
        public void hideConfigWidget()
        {
            // must be first
            configWidget.Hide();

            // copy values from config widget to global settings TODO: obsolete!?
            VPETSettings.mapValuesFromObject(configWidget);

            // save global settings in preferences TODO: save it directly, see next line
            VPETSettings.mapValuesToPreferences();

            // save config widget settings to prferences
            VPETSettings.mapValuesToPreferences(configWidget);

            UI.OnUIChanged.Invoke();
        }
Ejemplo n.º 4
0
        public void acceptKeyConfig()
        {
            GameObject arKeyWidget = GameObject.Find("GUI/Canvas/ARKeyWidget");

            GameObject.Find("GUI/Canvas/ARColorPlane").SetActive(false);
            arKeyWidget.SetActive(false);
            // save values to preferences
            VPETSettings.mapValuesToPreferences(configWidget);
            drawConfigWidget();
            arKeyVideoPlane.SetActive(false);
            //reset chroma keying settings
#if USE_AR
            mainController.ToggleARMatteMode(configWidget.mattModeOn);
            mainController.ToggleARKeyMode(configWidget.keyModeOn);
#endif
        }