예제 #1
0
        public void ExportKerkythea(string leftFileName, string rightFileName)
        {
            var scb = Background as SolidColorBrush;

            var leftExporter = new KerkytheaExporter(leftFileName);

            if (scb != null)
            {
                leftExporter.BackgroundColor = scb.Color;
            }
            leftExporter.Reflections = true;
            leftExporter.Shadows     = true;
            leftExporter.SoftShadows = true;
            leftExporter.Width       = (int)LeftViewport.ActualWidth;
            leftExporter.Height      = (int)LeftViewport.ActualHeight;
            leftExporter.Export(LeftViewport);
            leftExporter.Close();

            var rightExporter = new KerkytheaExporter(rightFileName);

            if (scb != null)
            {
                rightExporter.BackgroundColor = scb.Color;
            }
            rightExporter.Reflections = true;
            rightExporter.Shadows     = true;
            rightExporter.SoftShadows = true;
            rightExporter.Width       = (int)RightViewport.ActualWidth;
            rightExporter.Height      = (int)RightViewport.ActualHeight;
            rightExporter.Export(RightViewport);
            rightExporter.Close();
        }
예제 #2
0
        private static void ExportKerkythea(Viewport3D view, string fileName, Color background, int width, int height)
        {
            var e = new KerkytheaExporter(fileName)
            {
                Width = width, Height = height, BackgroundColor = background
            };

            e.Export(view);
            e.Close();
        }
예제 #3
0
        private void ExportKerkythea_Click(object sender, RoutedEventArgs e)
        {
            var d = new SaveFileDialog();
            d.Filter = "Kerkythea files (*.xml)|*.xml";
            d.DefaultExt = ".xml";
            d.FileName = @"test.xml";
            //            if (!d.ShowDialog().Value) return;

            using (var exporter = new KerkytheaExporter(d.FileName))
            {
                var m1 = this.Resources["m1"] as Material;
                exporter.RegisterMaterial(m1, @"Materials\water.xml");
                exporter.Export(view1.Viewport);
            }
        }
예제 #4
0
        public void ExportToKerkythea(string fileName)
        {
            var exporter = new KerkytheaExporter(fileName);
            var scb      = (Background as SolidColorBrush);

            if (scb != null)
            {
                exporter.BackgroundColor = scb.Color;
            }
            exporter.Reflections = true;
            exporter.Shadows     = true;
            exporter.SoftShadows = true;
            exporter.Width       = (int)Viewport.ActualWidth;
            exporter.Height      = (int)Viewport.ActualHeight;
            exporter.Export(Viewport);
            exporter.Close();
        }
예제 #5
0
        public void ExportKerkythea(string leftFileName, string rightFileName)
        {
            var scb = Background as SolidColorBrush;

            var leftExporter = new KerkytheaExporter(leftFileName);
            if (scb != null)
                leftExporter.BackgroundColor = scb.Color;
            leftExporter.Reflections = true;
            leftExporter.Shadows = true;
            leftExporter.SoftShadows = true;
            leftExporter.Width = (int) LeftViewport.ActualWidth;
            leftExporter.Height = (int) LeftViewport.ActualHeight;
            leftExporter.Export(LeftViewport);
            leftExporter.Close();

            var rightExporter = new KerkytheaExporter(rightFileName);
            if (scb != null)
                rightExporter.BackgroundColor = scb.Color;
            rightExporter.Reflections = true;
            rightExporter.Shadows = true;
            rightExporter.SoftShadows = true;
            rightExporter.Width = (int) RightViewport.ActualWidth;
            rightExporter.Height = (int) RightViewport.ActualHeight;
            rightExporter.Export(RightViewport);
            rightExporter.Close();
        }
예제 #6
0
 public void ExportToKerkythea(string fileName)
 {
     var exporter = new KerkytheaExporter(fileName);
     var scb = (Background as SolidColorBrush);
     if (scb != null)
         exporter.BackgroundColor = scb.Color;
     exporter.Reflections = true;
     exporter.Shadows = true;
     exporter.SoftShadows = true;
     exporter.Width = (int)Viewport.ActualWidth;
     exporter.Height = (int)Viewport.ActualHeight;
     exporter.Export(Viewport);
     exporter.Close();
 }