Esempio n. 1
0
 public bool RequestVisualize()
 {
     if (m_latestModelTemporaryfile == null)
     {
         return(false);
     }
     try
     {
         VisualizationController.Visualize(m_latestModelTemporaryfile, LatestModelTemporaryFileFormat);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        public async Task <DateTime> RequestGenerateAsync(Dispatcher uiDispatcher)
        {
            m_latestModel = await GenerationControler.GenerateAsync(ViewModel, uiDispatcher);

            var generationEndTimestamp = DateTime.Now;

            VisualizationController.OpenVisualizers();
            LatestModelTemporaryFileFormat = ModelFormat.OBJ;
            Task.Run(() => m_latestModelTemporaryfile?.Dispose());
            await Task.Run(() => {
                ExportController.ExportInStream(m_latestModel,
                                                new ExportParameters {
                    ModelFormat = LatestModelTemporaryFileFormat
                },
                                                out m_latestModelTemporaryfile);
                RequestVisualize();
            });

            return(generationEndTimestamp);
        }
Esempio n. 3
0
        public void RequestVisualizeAsset(AssetsViewModel assetsViewModel, string assetGroupName, int assetIdx)
        {
            if (!assetsViewModel.CorrectlyParsedManifest)
            {
                return;
            }
            var asset = assetsViewModel.AssetsLoader
                        .AssetGroups[assetGroupName]
                        .Assets[assetIdx];
            var assetStream = asset.OpenAssetFile();

            try
            {
                VisualizationController.Visualize(assetStream, asset.FileFormat);
            }
            catch
            {
            }
            assetStream?.Close();
            assetStream?.Dispose();
        }
Esempio n. 4
0
 public bool StartService()
 {
     return(VisualizationController.InitializeService());
     //VisualizationController.StartVisualizers(new[] { "WpfVisualizer.exe" });
 }
Esempio n. 5
0
 public void Dispose()
 {
     VisualizationController.Dispose();
 }