Ejemplo n.º 1
0
        /// <summary>
        /// Loads a fitting scene representation from the bundled assets.
        /// </summary>
        /// <returns></returns>
        public IEnumerator LoadSceneRepresentationCoroutine()
        {
            yield return(StartCoroutine(PMColorTextureArray.LoadProcessedTextureArrayCoroutine()));

            yield return(StartCoroutine(PMGlobalTextureMap.LoadProcessedTextureMapsCoroutine()));

            yield return(StartCoroutine(PMGlobalMeshEF.LoadProcessedGlobalMeshCoroutine()));

            yield return(StartCoroutine(PMDepthTextureArray.LoadDepthTextureArrayCoroutine()));

            numberOfSourceCameras = PMColorTextureArray.colorData.depth;
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        protected override IEnumerator ExecuteMethodCoroutine()
        {
            // If the mesh to store does not exist, exit.
            if (_globalMeshPathAbsolute == string.Empty || !File.Exists(_globalMeshPathAbsolute))
            {
                Debug.LogError(GeneralToolkit.FormatScriptMessage(typeof(GlobalMeshEF), "Global mesh was not found at path: " + _globalMeshPathAbsolute + "."));
                yield break;
            }
            // Save the mesh as an asset.
            yield return(StartCoroutine(SaveGlobalMeshAsAssetCoroutine()));

            // If activated, compute a texture array of depth maps, corresponding to each source camera viewing the mesh.
            if (PMDepthTextureArray.shouldExecute)
            {
                yield return(StartCoroutine(PMDepthTextureArray.ExecuteAndDisplayLog()));
            }
            // If activated, compute a global texture map for the mesh based on the source color date.
            if (PMGlobalTextureMap.shouldExecute)
            {
                yield return(StartCoroutine(PMGlobalTextureMap.ExecuteAndDisplayLog()));
            }
        }