Esempio n. 1
0
        private void StartPlayback()
        {
            currentTime          = 0;
            currentFrameIndex    = 0;
            recordingForPlayback = JsonUtility.FromJson <CalibrationRecording>(File.ReadAllText(indexFilePath));
            ApplyFrame(currentFrameIndex);

            CompositionManager        compositionManager = GetCompositionManager();
            HolographicCameraObserver networkManager     = GetHolographicCameraObserver();

            previousCalibrationData = compositionManager.CalibrationData;
            compositionManager.EnableHolographicCamera(networkManager.transform, calibrationDataForPlayback);

            testCube = GameObject.CreatePrimitive(PrimitiveType.Cube);
            testCube.transform.localScale    = Vector3.one * DeviceInfoObserver.arUcoMarkerSizeInMeters;
            testCube.transform.localPosition = new Vector3(0.0f, 0.0f, 0.05f);
        }
Esempio n. 2
0
        private void UpdateIndexFileForPlayback()
        {
            isIndexFileParsed = false;

            try
            {
                if (File.Exists(indexFilePath))
                {
                    recordingForPlayback = JsonUtility.FromJson <CalibrationRecording>(File.ReadAllText(indexFilePath));
                    isIndexFileParsed    = true;
                }
            }
            catch (Exception ex)
            {
                Debug.LogWarning($"Unexpected exception parsing file {indexFilePath}: {ex.ToString()}");
            }
        }