Пример #1
0
        // For when photo taking is manually stopped (clean up)
        public static void OnStoppedPhotoMode(PhotoCapture.PhotoCaptureResult result)
        {
            if (Constants.DebugStrings.DebugFlag)
            {
                // ERROR TESTING REMOVE?
                Debug.Log(Constants.DebugStrings.PhotoCaptured);
            }

            // Disable the ability to take screenshots until the photo capture mode is started again
            Interactions.DisableVoiceCommand(Constants.Commands.VoiceCommandsEnum.RoomScreenshot);
            Interactions.DisableGesture(Constants.Commands.GesturesEnum.RoomScreenshot);

            // Destroy the photo capture object for memory management
            photoCaptureObject.Dispose();
            photoCaptureObject = null;

            if (Constants.DebugStrings.DebugFlag)
            {
                // ERROR TESTING ADD THIS TEXT TO DEBUG STRINGS
                Debug.Log("Photo capture mode ended successfully.");
            }

            // Let manager know texture capture is finished
            GameObject.Find("TextureManager").GetComponent <TextureManager>().Trigger_TextureCaptureFinished();
            // ERROR TESTING REMOVE
            //TextureManager.Trigger_TextureCaptureFinished();

            // ERROR TESTING UNHOOK AND RELOCATE
            //CentralProcessor.GenerateTexturePrefab();

            // Destroy the temporary DisplayManager helper
            DisplayManager.DestroyDisplay();
        }
Пример #2
0
        // Use this for initialization
        void Awake()
        {
            // Enable Hololens commands for starting and stopping texture capture
            Interactions.EnableVoiceCommand(Constants.Commands.VoiceCommandsEnum.BeginRoomTexture);
            Interactions.EnableVoiceCommand(Constants.Commands.VoiceCommandsEnum.EndRoomTexture);

            RoomMeshLoaded         += TextureManager_RoomMeshLoaded;
            TextureCaptureFinished += TextureManager_TextureCaptureFinished;

            CentralProcessor.UpdateRenderMethodUsed(true);
        }
Пример #3
0
        // For when starting to capture photos
        public static void OnPhotoModeStarted(PhotoCapture.PhotoCaptureResult result)
        {
            if (result.success)
            {
                // Enable gestures which call the Capture() method, which takes screenshots and saves them as textures
                Interactions.EnableVoiceCommand(Constants.Commands.VoiceCommandsEnum.RoomScreenshot);
                Interactions.EnableGesture(Constants.Commands.GesturesEnum.RoomScreenshot);
            }
            else
            {
                if (Constants.DebugStrings.DebugFlag)
                {
                    Debug.Log(Constants.DebugStrings.PhotoCaptureModeInitFailed);
                }

                // ERROR TESTING - do i want this to be an exception thrown? do i want to have it retry several times?
            }
        }