Exemplo n.º 1
0
        public override void Init()
        {
            var loader         = new TgcSceneLoader();
            var sceneOriginal  = loader.loadSceneFromFile(MediaDir + "ModelosTgc\\Iglesia\\Iglesia-TgcScene.xml");
            var sceneOriginal2 = loader.loadSceneFromFile(MediaDir + "ModelosTgc\\Iglesia\\Iglesia-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\CajaVerde\\" + "CajaVerde-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Avion\\" + "Avion-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Iglesia\\" + "Iglesia-TgcScene.xml");
            //TgcScene sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");
            //TgcScene sceneOriginal2 = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");

            var destFolder   = MediaDir + "PruebaExporter";
            var unifiedScene = new TgcScene("PruebaExporter", destFolder);

            unifiedScene.Meshes.AddRange(sceneOriginal.Meshes);
            unifiedScene.Meshes.AddRange(sceneOriginal2.Meshes);

            var exporter = new TgcSceneExporter();
            //string fileSaved = exporter.exportSceneToXml(unifiedScene, destFolder);
            //string fileSaved = exporter.exportAndAppendSceneToXml(unifiedScene, destFolder);

            var r = exporter.exportAndAppendSceneToXml(sceneOriginal, destFolder);

            sceneRecover = loader.loadSceneFromFile(r.filePath);
        }
Exemplo n.º 2
0
        public override void Init()
        {
            var loader         = new TgcSceneLoader();
            var sceneOriginal  = loader.loadSceneFromFile(MediaDir + "ModelosTgc\\Iglesia\\Iglesia-TgcScene.xml");
            var sceneOriginal2 = loader.loadSceneFromFile(MediaDir + "ModelosTgc\\Iglesia\\Iglesia-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\CajaVerde\\" + "CajaVerde-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Avion\\" + "Avion-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Iglesia\\" + "Iglesia-TgcScene.xml");
            //TgcScene sceneOriginal = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");
            //TgcScene sceneOriginal2 = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");

            var destFolder = MediaDir + "PruebaExporter";

            if (!Directory.Exists(destFolder))
            {
                Directory.CreateDirectory(destFolder);
            }

            var unifiedScene = new TgcScene("PruebaExporter", destFolder);

            unifiedScene.Meshes.AddRange(sceneOriginal.Meshes);
            unifiedScene.Meshes.AddRange(sceneOriginal2.Meshes);

            var exporter = new TgcSceneExporter();
            //string fileSaved = exporter.exportSceneToXml(unifiedScene, destFolder);
            //string fileSaved = exporter.exportAndAppendSceneToXml(unifiedScene, destFolder);

            var r = exporter.exportAndAppendSceneToXml(sceneOriginal, destFolder);

            sceneRecover = loader.loadSceneFromFile(r.filePath);

            Camera.SetCamera(new TGCVector3(-30f, 80f, -100f), new TGCVector3(0f, 75f, 180f));
        }
Exemplo n.º 3
0
        public override void init()
        {
            Device d3dDevice = GuiController.Instance.D3dDevice;

            TgcSceneLoader loader         = new TgcSceneLoader();
            TgcScene       sceneOriginal  = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Iglesia\\" + "Iglesia-TgcScene.xml");
            TgcScene       sceneOriginal2 = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Iglesia\\" + "Iglesia-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\CajaVerde\\" + "CajaVerde-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Avion\\" + "Avion-TgcScene.xml");
            //sceneOriginal = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Iglesia\\" + "Iglesia-TgcScene.xml");
            //TgcScene sceneOriginal = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");
            //TgcScene sceneOriginal2 = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");

            string   destFolder   = GuiController.Instance.ExamplesDir + "\\" + "PruebaExporter";
            TgcScene unifiedScene = new TgcScene("PruebaExporter", destFolder);

            unifiedScene.Meshes.AddRange(sceneOriginal.Meshes);
            unifiedScene.Meshes.AddRange(sceneOriginal2.Meshes);



            TgcSceneExporter exporter = new TgcSceneExporter();

            //string fileSaved = exporter.exportSceneToXml(unifiedScene, destFolder);
            //string fileSaved = exporter.exportAndAppendSceneToXml(unifiedScene, destFolder);

            TgcSceneExporter.ExportResult r = exporter.exportAndAppendSceneToXml(sceneOriginal, destFolder);

            sceneRecover = loader.loadSceneFromFile(r.filePath);
        }