Пример #1
0
		public VisualTree3DView(Visual visual)
		{
			DirectionalLight directionalLight1 = new DirectionalLight(Colors.White, new Vector3D(0, 0, 1));
			DirectionalLight directionalLight2 = new DirectionalLight(Colors.White, new Vector3D(0, 0, -1));

			double z = 0;
			Model3D model = this.ConvertVisualToModel3D(visual, ref z);

			Model3DGroup group = new Model3DGroup();
			group.Children.Add(directionalLight1);
			group.Children.Add(directionalLight2);
			group.Children.Add(model);
			this.zScaleTransform = new ScaleTransform3D();
			group.Transform = this.zScaleTransform;

			ModelVisual3D modelVisual = new ModelVisual3D();
			modelVisual.Content = group;

			Rect3D bounds = model.Bounds;
			double fieldOfView = 45;
			Point3D lookAtPoint = new Point3D(bounds.X + bounds.SizeX / 2, bounds.Y + bounds.SizeY / 2, bounds.Z + bounds.SizeZ / 2);
			double cameraDistance = 0.5 * bounds.SizeX / Math.Tan(0.5 * fieldOfView * Math.PI / 180);
			Point3D position = lookAtPoint - new Vector3D(0, 0, cameraDistance);
			Camera camera = new PerspectiveCamera(position, new Vector3D(0, 0, 1), new Vector3D(0, -1, 0), fieldOfView);

			this.zScaleTransform.CenterZ = lookAtPoint.Z;

			this.Children.Add(modelVisual);
			this.Camera = camera;
			this.ClipToBounds = false;
			this.Width = 500;
			this.Height = 500;

			this.trackballBehavior = new TrackballBehavior(this, lookAtPoint);
		}
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\Carousel.xaml"
                ((Bornander.UI.TabCarousel.Carousel)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.HandleSizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.Grid3D = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.MainCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.Ambient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 5:
                this.Directional = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 6:
                this.CarouselContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listBox = ((System.Windows.Controls.ListBox)(target));

            #line 18 "..\..\..\3DControl.xaml"
                this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.button5 = ((System.Windows.Controls.Button)(target));
                return;

            case 3:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.SenceGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 7:
                this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 8:
                this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

            case 9:
                this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 11:
                this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 12:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #4
0
 public override Visual3D ToAvalonObj()
 {
     ModelVisual3D model = new ModelVisual3D();
     DirectionalLight light = new DirectionalLight(System.Windows.Media.Color.FromArgb(clr.A, clr.R, clr.G, clr.B),
                                                   new Vector3D(direction.X, direction.Y, direction.Z));
     model.Content = light;
     return model;
 }
Пример #5
0
        public DirectionalLight setupDirectionalLights(System.Windows.Media.Color col)
        {
            d1 = new DirectionalLight();

            d1.Color = col;
            d1.Direction = new Vector3D(1, 1, 1);

            return d1;
        }
Пример #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.tbValues = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.btnGo = ((System.Windows.Controls.Button)(target));

            #line 25 "..\..\Window1.xaml"
                this.btnGo.Click += new System.Windows.RoutedEventHandler(this.btnGo_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.tbAccVals = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 5:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 6:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 7:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 8:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 9:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 10:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 11:
                this.slider1 = ((System.Windows.Controls.Slider)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #7
0
        public SceneViewModel()
        {
            scene = new Model3DGroup();

            ambientLight = new AmbientLight(Colors.DarkGray);
            directionalLight = new DirectionalLight(Colors.White, new Vector3D(-5, -5, -7));

            scene.Children.Add(ambientLight);
            scene.Children.Add(directionalLight);
        }
Пример #8
0
        public Cube(Viewport3D myViewport3D, float obesity)
        {

            this.up = ((PerspectiveCamera)myViewport3D.Camera).UpDirection;
            this.trans = new Transform3DGroup();
            this.scale = new ScaleTransform3D();
            this.translation = new TranslateTransform3D();
            this.rotation = new RotateTransform3D();
            this.axis = new AxisAngleRotation3D();

            this.obesity = obesity;   
            this.cube = new Model3DGroup();

            Point3D p0 = new Point3D(-1, -1, -1);
            Point3D p1 = new Point3D(1, -1, -1);
            Point3D p2 = new Point3D(1, -1, 1);
            Point3D p3 = new Point3D(-1, -1, 1);
            Point3D p4 = new Point3D(-1, 0, -1);
            Point3D p5 = new Point3D(1, 0, -1);
            Point3D p6 = new Point3D(1, 0, 1);
            Point3D p7 = new Point3D(-1, 0, 1);

            //front side triangles
            cube.Children.Add(CreateTriangleModel(p3, p2, p6));
            cube.Children.Add(CreateTriangleModel(p3, p6, p7));
            //right side triangles
            cube.Children.Add(CreateTriangleModel(p2, p1, p5));
            cube.Children.Add(CreateTriangleModel(p2, p5, p6));
            //back side triangles
            cube.Children.Add(CreateTriangleModel(p1, p0, p4));
            cube.Children.Add(CreateTriangleModel(p1, p4, p5));
            //left side triangles
            cube.Children.Add(CreateTriangleModel(p0, p3, p7));
            cube.Children.Add(CreateTriangleModel(p0, p7, p4));
            //top side triangles
            cube.Children.Add(CreateTriangleModel(p7, p6, p5));
            cube.Children.Add(CreateTriangleModel(p7, p5, p4));
            //bottom side triangles
            cube.Children.Add(CreateTriangleModel(p2, p3, p0));
            cube.Children.Add(CreateTriangleModel(p2, p0, p1));

            this.model = new ModelVisual3D();
            this.model.Content = cube;
            this.myDirectionalLight = new DirectionalLight();
            this.myDirectionalLight.Color = Colors.Green;
            this.myDirectionalLight.Direction = new Vector3D(-2, -3, 1);
            this.cube.Children.Add(myDirectionalLight);
            myViewport3D.Children.Add(model);

            trans.Children.Add(scale);
            trans.Children.Add(rotation);
            trans.Children.Add(translation);

            this.cube.Transform = trans;
        }
Пример #9
0
		public void AddLight(Color directColor, Vector3D direction, Color ambientColor)
		{
			AmbientLight al = new AmbientLight(ambientColor);
			DirectionalLight dl = new DirectionalLight(directColor, direction);
			ModelVisual3D ma = new ModelVisual3D();
			ModelVisual3D md = new ModelVisual3D();
			ma.Content = al;
			md.Content = dl;
			Children.Add(ma);
			Children.Add(md);
		}
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DirectionalLight DirLight1 = new DirectionalLight();
            DirLight1.Color = Colors.White;
            DirLight1.Direction = new Vector3D(1, 1, 1);


            PerspectiveCamera Camera1 = new PerspectiveCamera();
            Camera1.FarPlaneDistance = 8000;
            Camera1.NearPlaneDistance = 100;
            Camera1.FieldOfView = 10;
            Camera1.Position = new Point3D(160, 120, -1000);
            Camera1.LookDirection = new Vector3D(0, 0, 1);
            Camera1.UpDirection = new Vector3D(0, -1, 0);

            Model3DGroup modelGroup = new Model3DGroup();

            int i = 0;

            for (int y = 0; y < 240; y += s)
            {
                for (int x = 0; x < 320; x += s)
                {
                    points[i] = Triangle(x, y, s, new SolidColorBrush(Colors.White));
                    // points[i]=MCube(x,y);
                    points[i].Transform = new TranslateTransform3D(0, 0, 0);
                    modelGroup.Children.Add(points[i]);
                    i++;
                }
            }

            modelGroup.Children.Add(DirLight1);
            ModelVisual3D modelsVisual = new ModelVisual3D();
            modelsVisual.Content = modelGroup;
            Viewport3D myViewport = new Viewport3D();
            myViewport.IsHitTestVisible = false;
            myViewport.Camera = Camera1;
            myViewport.Children.Add(modelsVisual);
            canvas1.Children.Add(myViewport);

            myViewport.Height = canvas1.Height;
            myViewport.Width = canvas1.Width;
            Canvas.SetTop(myViewport, 0);
            Canvas.SetLeft(myViewport, 0);

            sensor = KinectSensor.KinectSensors[0];
            sensor.SkeletonStream.Enable();
            sensor.DepthStream.Enable(DepthImageFormat.Resolution320x240Fps30);
            sensor.DepthFrameReady += DepthFrameReady;
            sensor.Start();

        }
Пример #11
0
        public MyLights()
        {
            for (int i = 0; i < nbrDirLights; i++)
            {
                _dirLight[i] = new DirectionalLight();
                _dirLight[i].Color = _dirLightColor[i];
                _dirLight[i].Direction = _dirVector[i];
            }

            _ptLight.Position = new Point3D(-3, -7, 10);
            _ptLight.Color = System.Windows.Media.Brushes.White.Color;
            _ptLight.Range = 15.0;
            _ptLight.ConstantAttenuation = 3.0;
        }
Пример #12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Cube = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 2:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #13
0
        public Cube3D()
        {
            Canvas.SetLeft(this,0);
            Canvas.SetTop(this,0);
            this.Width=733;
            this.Height = 400;
            this.ClipToBounds = true;

            //add camera
            PerspectiveCamera myPCamera = new PerspectiveCamera();
            myPCamera.Position = new Point3D(0, 30, 90);
            myPCamera.LookDirection = new Vector3D(0, -20, -90);
            myPCamera.FieldOfView = 80;
            this.Camera = myPCamera;

            //add light
            ModelVisual3D mv3dLight = new ModelVisual3D();
            DirectionalLight myDirLight = new DirectionalLight();
            myDirLight.Color = Colors.White;
            myDirLight.Direction = new Vector3D(-2, -3, -1);
            mv3dLight.Content = myDirLight;
            this.Children.Add(mv3dLight);

            //add material and mesh geometry
            Viewport2DVisual3D vpMaterial = new Viewport2DVisual3D();
            DiffuseMaterial dm = new DiffuseMaterial();
            dm.Brush = Brushes.Transparent;
            vpMaterial.Material = dm;
            MeshGeometry3D vpg = new MeshGeometry3D();
            vpg.Positions.Add(new Point3D(-55,0,-30));
            vpg.Positions.Add(new Point3D(-55,0,30));
            vpg.Positions.Add(new Point3D(55,0,30));
            vpg.Positions.Add(new Point3D(55,0,-30));
            vpg.TextureCoordinates.Add(new Point(0,0));
            vpg.TextureCoordinates.Add(new Point(0,1));
            vpg.TextureCoordinates.Add(new Point(1,1));
            vpg.TextureCoordinates.Add(new Point(1,0));
            vpg.TriangleIndices.Add(0);
            vpg.TriangleIndices.Add(1);
            vpg.TriangleIndices.Add(2);
            vpg.TriangleIndices.Add(2);
            vpg.TriangleIndices.Add(3);
            vpg.TriangleIndices.Add(0);
            vpMaterial.Geometry = vpg;
            this.Children.Add(vpMaterial);

            this.Loaded += new RoutedEventHandler(OnLoad);
        }
Пример #14
0
        /// <summary>
        /// RenderKinectPointsTriangle - renders kinect point cloud data using triangle meshes
        /// </summary>
        /// <returns>rendered point cloud model</returns>
        public GeometryModel3D[] RenderKinectPointsTriangle()
        {
            DirectionalLight    DirLight1 = new DirectionalLight();
            PerspectiveCamera   Camera1 = new PerspectiveCamera();
            Model3DGroup        modelGroup = new Model3DGroup();
            ModelVisual3D       modelsVisual = new ModelVisual3D();
            Viewport3D          myViewport = new Viewport3D();

            //directional light
            DirLight1.Color = Colors.White;
            DirLight1.Direction = new Vector3D(1, 1, 1);

            //camera specification
            Camera1.FarPlaneDistance = 8000;
            Camera1.NearPlaneDistance = 100;
            Camera1.FieldOfView = 10;
            Camera1.Position = new Point3D(160, 120, -1000);
            Camera1.LookDirection = new Vector3D(0, 0, 1);
            Camera1.UpDirection = new Vector3D(0, -1, 0);

            //create triangle mesh
            int i = 0;
            for (int y = 0; y < 480; y += s)
            {
                for (int x = 0; x < 640; x += s)
                {
                    pts[i] = Triangle(x, y, s);
                    pts[i].Transform = new TranslateTransform3D(0, 0, 0);
                    modelGroup.Children.Add(pts[i]);
                    i++;
                }
            }

            modelGroup.Children.Add(DirLight1);
            modelsVisual.Content = modelGroup;
            myViewport.IsHitTestVisible = false;
            myViewport.Camera = Camera1;
            myViewport.Children.Add(modelsVisual);
            viewportCanvas.Children.Add(myViewport);

            myViewport.Height = viewportCanvas.Height;
            myViewport.Width = viewportCanvas.Width;
            Canvas.SetTop(myViewport, 0);
            Canvas.SetLeft(myViewport, 0);

            return pts;
        }
Пример #15
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myCube = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 3:
                this.light = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.stackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.viewport3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.AmbientContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.Ambient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 7:
                this.DirectionalContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 8:
                this.Directional = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 9:
                this.listBox = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\preMain.xaml"
                ((Gas_Simulator.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.MainViewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.Main = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.TopMostThing = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.LightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 6:
                this.slider1 = ((System.Windows.Controls.Slider)(target));

            #line 53 "..\..\preMain.xaml"
                this.slider1.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider1_ValueChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #18
0
        public Visualizer()
        {
            Camera = camera = new PerspectiveCamera(new Point3D(), new Vector3D(1, 0, 0), new Vector3D(0, 0, 1), 60);
            MouseMove += OnMouseMove;
            MouseWheel += OnMouseWheel;

            GeometryModel3D model = new GeometryModel3D();
            model.BackMaterial = new DiffuseMaterial(Brushes.Red);
            model.Material = new DiffuseMaterial(Brushes.Blue);
            model.Geometry = Meshes.Cylider;

            ModelVisual3D modelVisual3D = new ModelVisual3D();
            modelVisual3D.Content = model;

            ModelVisual3D lights = new ModelVisual3D();
            DirectionalLight light = new DirectionalLight(Colors.White, new Vector3D(-0.612372, -0.5, -0.612372));
            lights.Content = light;

            Children.Add(modelVisual3D);
            Children.Add(lights);
        }
Пример #19
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.my3Dgrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.mainViewPort = ((System.Windows.Controls.Viewport3D)(target));

            #line 10 "..\..\UserControl1.xaml"
                this.mainViewPort.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.mainViewPort_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 10 "..\..\UserControl1.xaml"
                this.mainViewPort.MouseMove += new System.Windows.Input.MouseEventHandler(this.mainViewPort_MouseMove);

            #line default
            #line hidden

            #line 10 "..\..\UserControl1.xaml"
                this.mainViewPort.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.mainViewPort_MouseWheel);

            #line default
            #line hidden
                return;

            case 3:
                this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.directionLightOfMainViewPort = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #20
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 21 "..\..\Trackport3D.xaml"
                ((_3DTools.Trackport3D)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);

            #line default
            #line hidden
                return;

            case 2:
                this.Viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.Camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 5:
                this.Headlight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 6:
                this.Root = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.CaptureBorder = ((System.Windows.Controls.Border)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #21
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 3:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 4:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 6:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 7:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 8:
                this.slider1 = ((System.Windows.Controls.Slider)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\MainWindow.xaml"
                ((WPFDreiDWuerfel.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.Oc = ((System.Windows.Media.Media3D.OrthographicCamera)(target));
                return;

            case 3:
                this.Dl = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #23
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((View.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.MainWindow_KeyDown);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                ((View.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.MainWindow_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));

            #line 15 "..\..\MainWindow.xaml"
                this.viewport.MouseMove += new System.Windows.Input.MouseEventHandler(this.Viewport_MouseMove);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.viewport.LostFocus += new System.Windows.RoutedEventHandler(this.viewport_LostFocus);

            #line default
            #line hidden
                return;

            case 3:
                this.cameraMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.lightAmbient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 5:
                this.lightKey = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 6:
                this.lightSide = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 7:
                this.lightPoint = ((System.Windows.Media.Media3D.PointLight)(target));
                return;

            case 8:
                this.modelBackground = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.modelFloor = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.modelPlayCursor = ((System.Windows.Media.Media3D.ModelUIElement3D)(target));
                return;

            case 11:
                this.rotatorPointer = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 12:
                this.translatorPointer = ((System.Windows.Media.Media3D.TranslateTransform3D)(target));
                return;

            case 13:
                this.groupPlayers3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.groupFood3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 15:

            #line 152 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.DockPanel)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Loaded);

            #line default
            #line hidden
                return;

            case 16:
                this.lblPlayerName = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.lblMass = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.lblFoodCount = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.lblPlayerCount = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.lblPlayerPosition = ((System.Windows.Controls.Label)(target));
                return;

            case 21:
                this.bttnDisconnect = ((System.Windows.Controls.Button)(target));

            #line 188 "..\..\MainWindow.xaml"
                this.bttnDisconnect.Click += new System.Windows.RoutedEventHandler(this.DisconnectButton_Clicked);

            #line default
            #line hidden
                return;

            case 22:
                this.txtbxMessages = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #24
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 5 "..\..\..\GameWindow.xaml"
     ((Menu.GameWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 5 "..\..\..\GameWindow.xaml"
     ((Menu.GameWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 55 "..\..\..\GameWindow.xaml"
     ((System.Windows.Shapes.Rectangle)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.RectMouseDown);
     
     #line default
     #line hidden
     return;
     case 3:
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
     
     #line 63 "..\..\..\GameWindow.xaml"
     this.textBlock1.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.TBMouseDown);
     
     #line default
     #line hidden
     return;
     case 4:
     this.wrapPanel1 = ((System.Windows.Controls.WrapPanel)(target));
     
     #line 68 "..\..\..\GameWindow.xaml"
     this.wrapPanel1.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.wrapPanel1_MouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 5:
     this.newcam = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 6:
     this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 7:
     this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 8:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 9:
     this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 11:
     this.DefaultGroup = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 12:
     this.Torus_064Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.Torus_064 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 14:
     this.Torus_063Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 15:
     this.Torus_063 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 16:
     this.Torus_062Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 17:
     this.Torus_062 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 18:
     this.Torus_061Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 19:
     this.Torus_061 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 20:
     this.Torus_060Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 21:
     this.Torus_060 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 22:
     this.Torus_059Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 23:
     this.Torus_059 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 24:
     this.Torus_058Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 25:
     this.Torus_058 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 26:
     this.Torus_057Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 27:
     this.Torus_057 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 28:
     this.Torus_056Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 29:
     this.Torus_056 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 30:
     this.Torus_055Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 31:
     this.Torus_055 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 32:
     this.Torus_054Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 33:
     this.Torus_054 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 34:
     this.Torus_053Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 35:
     this.Torus_053 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 36:
     this.Torus_052Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 37:
     this.Torus_052 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 38:
     this.Torus_051Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 39:
     this.Torus_051 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 40:
     this.Torus_050Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 41:
     this.Torus_050 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 42:
     this.Torus_049Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 43:
     this.Torus_049 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 44:
     this.Torus_048Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 45:
     this.Torus_048 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 46:
     this.Torus_047Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 47:
     this.Torus_047 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 48:
     this.Torus_046Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 49:
     this.Torus_046 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 50:
     this.Torus_045Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 51:
     this.Torus_045 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 52:
     this.Torus_044Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 53:
     this.Torus_044 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 54:
     this.Torus_043Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 55:
     this.Torus_043 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 56:
     this.Torus_042Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 57:
     this.Torus_042 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 58:
     this.Torus_041Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 59:
     this.Torus_041 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 60:
     this.Torus_040Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 61:
     this.Torus_040 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 62:
     this.Torus_039Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 63:
     this.Torus_039 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 64:
     this.Torus_038Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 65:
     this.Torus_038 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 66:
     this.Torus_037Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 67:
     this.Torus_037 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 68:
     this.Torus_036Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 69:
     this.Torus_036 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 70:
     this.Torus_035Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 71:
     this.Torus_035 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 72:
     this.Torus_034Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 73:
     this.Torus_034 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 74:
     this.Torus_033Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 75:
     this.Torus_033 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 76:
     this.Torus_032Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 77:
     this.Torus_032 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 78:
     this.Torus_031Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 79:
     this.Torus_031 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 80:
     this.Torus_030Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 81:
     this.Torus_030 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 82:
     this.Torus_029Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 83:
     this.Torus_029 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 84:
     this.Torus_028Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 85:
     this.Torus_028 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 86:
     this.Torus_027Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 87:
     this.Torus_027 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 88:
     this.Torus_026Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 89:
     this.Torus_026 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 90:
     this.Torus_025Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 91:
     this.Torus_025 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 92:
     this.Torus_024Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 93:
     this.Torus_024 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 94:
     this.Torus_023Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 95:
     this.Torus_023 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 96:
     this.Torus_022Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 97:
     this.Torus_022 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 98:
     this.Torus_021Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 99:
     this.Torus_021 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 100:
     this.Torus_020Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 101:
     this.Torus_020 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 102:
     this.Torus_019Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 103:
     this.Torus_019 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 104:
     this.Torus_018Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 105:
     this.Torus_018 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 106:
     this.Torus_017Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 107:
     this.Torus_017 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 108:
     this.Torus_016Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 109:
     this.Torus_016 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 110:
     this.Torus_015Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 111:
     this.Torus_015 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 112:
     this.Torus_014Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 113:
     this.Torus_014 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 114:
     this.Torus_013Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 115:
     this.Torus_013 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 116:
     this.Torus_012Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 117:
     this.Torus_012 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 118:
     this.Torus_011Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 119:
     this.Torus_011 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 120:
     this.Torus_010Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 121:
     this.Torus_010 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 122:
     this.Torus_009Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 123:
     this.Torus_009 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 124:
     this.Torus_008Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 125:
     this.Torus_008 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 126:
     this.Torus_007Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 127:
     this.Torus_007 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 128:
     this.Torus_006Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 129:
     this.Torus_006 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 130:
     this.Torus_005Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 131:
     this.Torus_005 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 132:
     this.Torus_004Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 133:
     this.Torus_004 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 134:
     this.Torus_003Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 135:
     this.Torus_003 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 136:
     this.Torus_002Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 137:
     this.Torus_002 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 138:
     this.Torus_001Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 139:
     this.Torus_001 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 140:
     this.Cube_015Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 141:
     this.Cube_015 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 142:
     this.Cube_014Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 143:
     this.Cube_014 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 144:
     this.Cube_013Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 145:
     this.Cube_013 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 146:
     this.Cube_012Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 147:
     this.Cube_012 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 148:
     this.Cube_011Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 149:
     this.Cube_011 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 150:
     this.Cube_010Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 151:
     this.Cube_010 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 152:
     this.Cube_009Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 153:
     this.Cube_009 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 154:
     this.Cube_008Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 155:
     this.Cube_008 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 156:
     this.Cube_007Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 157:
     this.Cube_007 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 158:
     this.Cube_006Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 159:
     this.Cube_006 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 160:
     this.Cube_005Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 161:
     this.Cube_005 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 162:
     this.Cube_004Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 163:
     this.Cube_004 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 164:
     this.Cube_003Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 165:
     this.Cube_003 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 166:
     this.Cube_002Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 167:
     this.Cube_002 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 168:
     this.Cube_001Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 169:
     this.Cube_001 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 170:
     this.CubeContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 171:
     this.Cube = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 172:
     this.MaterialContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 173:
     this.Material = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 174:
     this.groupBox1 = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 175:
     this.wrapPanel2 = ((System.Windows.Controls.WrapPanel)(target));
     return;
     case 176:
     this.Slider1 = ((System.Windows.Controls.Slider)(target));
     
     #line 5809 "..\..\..\GameWindow.xaml"
     this.Slider1.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.Slider1_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 177:
     this.button1 = ((System.Windows.Controls.Button)(target));
     
     #line 5810 "..\..\..\GameWindow.xaml"
     this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);
     
     #line default
     #line hidden
     return;
     case 178:
     this.stackPanel1 = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 179:
     this.button2 = ((System.Windows.Controls.Button)(target));
     
     #line 5822 "..\..\..\GameWindow.xaml"
     this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);
     
     #line default
     #line hidden
     return;
     case 180:
     this.button3 = ((System.Windows.Controls.Button)(target));
     
     #line 5835 "..\..\..\GameWindow.xaml"
     this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);
     
     #line default
     #line hidden
     return;
     case 181:
     this.button4 = ((System.Windows.Controls.Button)(target));
     
     #line 5848 "..\..\..\GameWindow.xaml"
     this.button4.Click += new System.Windows.RoutedEventHandler(this.button4_Click);
     
     #line default
     #line hidden
     return;
     case 182:
     this.button5 = ((System.Windows.Controls.Button)(target));
     
     #line 5861 "..\..\..\GameWindow.xaml"
     this.button5.Click += new System.Windows.RoutedEventHandler(this.button5_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #25
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.griddnnmm = ((System.Windows.Controls.Grid)(target));

            #line 10 "..\..\MainWindow.xaml"
                this.griddnnmm.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.grdm);

            #line default
            #line hidden
                return;

            case 2:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.camusernnn = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 5:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 7:
                this.diffuseennn = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 8:
                this.cangroupname = ((System.Windows.Media.Media3D.Transform3DGroup)(target));
                return;

            case 9:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 10:
                this.rotatey = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 11:
                this.rotatez = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 12:
                this.viewport3D12 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 13:
                this.camusermmm = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 14:
                this.dirLightMain2 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 15:
                this.MyModel2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.wtfrmodel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 17:
                this.tr = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 18:
                this.diffuseemmm = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 19:
                this.rotate2 = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 20:
                this.rotatey2 = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 21:
                this.rotatez2 = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 22:
                this.slider1 = ((System.Windows.Controls.Slider)(target));

            #line 146 "..\..\MainWindow.xaml"
                this.slider1.DataContextChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.cngs);

            #line default
            #line hidden
                return;

            case 23:
                this.slider1y = ((System.Windows.Controls.Slider)(target));
                return;

            case 24:
                this.slider1z = ((System.Windows.Controls.Slider)(target));
                return;

            case 25:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 26:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 27:
                this.label1_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 28:
                this.label1_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 29:
                this.slider1_Copy = ((System.Windows.Controls.Slider)(target));
                return;

            case 30:
                this.slider1y_Copy = ((System.Windows.Controls.Slider)(target));
                return;

            case 31:
                this.slider1z_Copy = ((System.Windows.Controls.Slider)(target));
                return;

            case 32:
                this.label_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 33:
                this.label_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 34:
                this.button = ((System.Windows.Controls.Button)(target));

            #line 179 "..\..\MainWindow.xaml"
                this.button.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 35:
                this.button_Copy = ((System.Windows.Controls.Button)(target));

            #line 180 "..\..\MainWindow.xaml"
                this.button_Copy.Click += new System.Windows.RoutedEventHandler(this.Button_Copy_Click);

            #line default
            #line hidden
                return;

            case 36:
                this.button_Copy1 = ((System.Windows.Controls.Button)(target));

            #line 181 "..\..\MainWindow.xaml"
                this.button_Copy1.Click += new System.Windows.RoutedEventHandler(this.Button_Copy1_Click);

            #line default
            #line hidden
                return;

            case 37:
                this.label_Copy2 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #26
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 2:
     this.textBox2 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 3:
     this.textBox3 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.viewport2 = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 5:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 6:
     this.FurnitureContainer3 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 7:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 8:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 9:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 10:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     case 11:
     this.canvas = ((System.Windows.Controls.Canvas)(target));
     return;
     case 12:
     this.label2 = ((System.Windows.Controls.Label)(target));
     
     #line 54 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.upclick);
     
     #line default
     #line hidden
     return;
     case 13:
     this.label3 = ((System.Windows.Controls.Label)(target));
     
     #line 59 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.downclick);
     
     #line default
     #line hidden
     return;
     case 14:
     this.button2 = ((System.Windows.Controls.Button)(target));
     
     #line 67 "..\..\..\..\DeviceMigrations\addwindow.xaml"
     this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.addusetrol = ((GloryView.RFID.DeviceMigrations.OldEquipment)(target));
                return;

            case 2:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.oldgrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.roomName = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.label3 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.comboBox1 = ((System.Windows.Controls.ComboBox)(target));

            #line 40 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox1_SelectionChanged);

            #line default
            #line hidden
                return;

            case 10:
                this.button3 = ((System.Windows.Controls.Button)(target));

            #line 49 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.button1 = ((System.Windows.Controls.Button)(target));

            #line 50 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.dataGrid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 13:
                this.viewport1 = ((System.Windows.Controls.Viewport3D)(target));

            #line 60 "..\..\..\..\DeviceMigrations\OldEquipment.xaml"
                this.viewport1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rightleftdown);

            #line default
            #line hidden
                return;

            case 14:
                this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 15:
                this.FurnitureContainer2 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

            case 16:
                this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 17:
                this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 18:
                this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 19:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #28
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.slider1 = ((System.Windows.Controls.Slider)(target));
                return;

            case 2:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 3:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 4:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 6:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.DefaultGroup = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.stitch_result_stitch_allContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.stitch_result_stitch_all = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 11:
                this.Material__28Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 12:
                this.Material__28 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 13:
                this.Material__29Container = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.Material__29 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #29
0
        public void setup()
        {
            this.myViewport3D.Width = 800;
            this.myViewport3D.Height = 600;
            this.models = new Model3DGroup();
            GeometryModel3D myGeometryModel = new GeometryModel3D();
            ModelVisual3D myModelVisual3D = new ModelVisual3D();
            // Defines the camera used to view the 3D object. In order to view the 3D object,
            // the camera must be positioned and pointed such that the object is within view 
            // of the camera.
            PerspectiveCamera myPCamera = new PerspectiveCamera();

            // Specify where in the 3D scene the camera is.
            myPCamera.Position = new Point3D(0, 0, 0);

            // Specify the direction that the camera is pointing.
            myPCamera.LookDirection = new Vector3D(0, 0, 1);
            myPCamera.UpDirection = new Vector3D(0, 1, 0);
            // Define camera's horizontal field of view in degrees.
            myPCamera.FieldOfView = 90;

            // Asign the camera to the viewport
            myViewport3D.Camera = myPCamera;
            // Define the lights cast in the scene. Without light, the 3D object cannot 
            // be seen. Note: to illuminate an object from additional directions, create 
            // additional lights.
            DirectionalLight myDirectionalLight = new DirectionalLight();
            myDirectionalLight.Color = Colors.White;
            myDirectionalLight.Direction = new Vector3D(-0.61, -0.5, -0.61);
            models.Children.Add(myDirectionalLight);
        }
        private void cameraButton_Click(object sender, RoutedEventArgs e)
        {
            Point3D position = new Point3D(
            Convert.ToDouble(cameraPositionXTextBox.Text),
            Convert.ToDouble(cameraPositionYTextBox.Text),
            Convert.ToDouble(cameraPositionZTextBox.Text)
    );
            Vector3D lookDirection = new Vector3D(
                Convert.ToDouble(lookAtXTextBox.Text),
                Convert.ToDouble(lookAtYTextBox.Text),
                Convert.ToDouble(lookAtZTextBox.Text)
            );

            PerspectiveCamera camera = (PerspectiveCamera)mainViewport.Camera;
            camera = graficos.setCamera(position, lookDirection);
            mainViewport.Camera = camera;
             Model3DGroup cube = new Model3DGroup();
            DirectionalLight myDirectionalLight = new DirectionalLight();
            myDirectionalLight.Color = Colors.Blue;
            myDirectionalLight.Direction = new Vector3D(-0.61, -0.5, -0.61);
            cube.Children.Add(myDirectionalLight);
            
           
        }
Пример #31
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((taken6.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.Window.Loaded += new System.Windows.RoutedEventHandler(this.winload);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                this.Window.KeyDown += new System.Windows.Input.KeyEventHandler(this.nhanphim);

            #line default
            #line hidden
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.background = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.tenmaygame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 5:
                this.canvasgamename = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.timecanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.ellipse1_Copy = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 8:
                this.lbltime = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.lblcountdown = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.ticketcanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 11:
                this.ellipse1 = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 12:
                this.lblscore = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.lblscore_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.coincanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 15:
                this.lblcoin = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.lblcoin_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.lblcoin_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.lblcoin_Copy2 = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.lblcoin_Copy3 = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.OMG_WHO_THE_HELL_CARES_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 21:
                this.SUPER_HOT_FIRE_OOOHHH_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 22:
                this.lblready = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.lblready1 = ((System.Windows.Controls.Label)(target));
                return;

            case 24:
                this.myhand = ((System.Windows.Controls.Canvas)(target));
                return;

            case 25:
                this.button = ((System.Windows.Controls.Canvas)(target));
                return;

            case 26:
                this.ellipse2 = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 27:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 28:
                this.image = ((System.Windows.Controls.Image)(target));
                return;

            case 29:
                this.odiem = ((System.Windows.Controls.Canvas)(target));
                return;

            case 30:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 31:
                this.amthanhtradiem_mp1 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 32:
                this.tblerr = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.demo_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 34:
                this.tblcountplay = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 35:
                this.lazer_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 36:
                this.amthanhtradiem_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 37:
                this.insertcoin_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 38:
                this.hinhtron = ((System.Windows.Controls.Canvas)(target));
                return;

            case 39:
                this.hinhgame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 40:
                this.vongtron = ((System.Windows.Controls.Image)(target));
                return;

            case 41:
                this.tblgroup11 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 42:
                this.tblgroup12 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 43:
                this.tblgroup13 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 44:
                this.tblgroup14 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 45:
                this.tblgroup31 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 46:
                this.tblgroup32 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 47:
                this.tblgroup6 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 48:
                this.tblgroup23 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 49:
                this.tblgroup22 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 50:
                this.tblgroup21 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 51:
                this.tblgroup4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 52:
                this.tblgroup5 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 53:
                this.tapthe = ((System.Windows.Controls.Canvas)(target));
                return;

            case 54:
                this.nfctap = ((System.Windows.Controls.Canvas)(target));
                return;

            case 55:
                this._6000 = ((System.Windows.Controls.Label)(target));
                return;

            case 56:
                this.checkicon = ((System.Windows.Controls.Canvas)(target));
                return;

            case 57:
                this.card = ((System.Windows.Controls.Canvas)(target));
                return;

            case 58:
                this.phinhan = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 59:
                this.perspectiveCamera1 = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 60:
                this.ModelContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 61:
                this.Model3 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 62:
                this.AmbientContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 63:
                this.Ambient4 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 64:
                this.DirectionalContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 65:
                this.Directional4 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 66:
                this.tam = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 67:
                this.Dao = ((System.Windows.Controls.Canvas)(target));
                return;

            case 68:
                this.canvas_dao = ((System.Windows.Controls.Canvas)(target));
                return;

            case 69:
                this.tamten = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 70:
                this.phitieu = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 71:
                this.perspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 72:
                this.phitieuModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 73:
                this.phitieuModel = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 74:
                this.AmbientContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 75:
                this.Ambient3 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 76:
                this.DirectionalContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 77:
                this.Directional3 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 78:
                this.INTRO_SOUND_EFFECT_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 79:
                this.Pollo_Loko_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 80:
                this.huongdangame = ((System.Windows.Controls.Canvas)(target));
                return;

            case 81:
                this.huongdangame1 = ((System.Windows.Controls.Image)(target));
                return;

            case 82:
                this.tbldemo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 83:
                this.bonusbong = ((System.Windows.Controls.Canvas)(target));
                return;

            case 84:
                this.lblbonus_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 85:
                this.lblbonus = ((System.Windows.Controls.Label)(target));
                return;

            case 86:
                this.lblbonus_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 87:
                this.YAY_mp3 = ((System.Windows.Controls.MediaElement)(target));
                return;

            case 88:
                this.counting = ((System.Windows.Controls.Canvas)(target));
                return;

            case 89:
                this.textBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 90:
                this.canvashopqua = ((System.Windows.Controls.Canvas)(target));
                return;

            case 91:
                this.tblhopqua = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #32
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Load1 = ((System.Windows.Controls.Button)(target));
     
     #line 7 "..\..\..\MainWindow.xaml"
     this.Load1.Click += new System.Windows.RoutedEventHandler(this.Button1_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.Load2 = ((System.Windows.Controls.Button)(target));
     
     #line 10 "..\..\..\MainWindow.xaml"
     this.Load2.Click += new System.Windows.RoutedEventHandler(this.Button2_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.FileName1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.FileName2 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.Output = ((System.Windows.Controls.TextBox)(target));
     return;
     case 6:
     this.display = ((System.Windows.Controls.Canvas)(target));
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.display.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Mouse_Wheel);
     
     #line default
     #line hidden
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.display.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Mouse_Up);
     
     #line default
     #line hidden
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.display.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Mouse_Down);
     
     #line default
     #line hidden
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.display.MouseMove += new System.Windows.Input.MouseEventHandler(this.Mouse_Move);
     
     #line default
     #line hidden
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.display.MouseLeave += new System.Windows.Input.MouseEventHandler(this.Mouse_Leave);
     
     #line default
     #line hidden
     return;
     case 7:
     this.myDisplay = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 8:
     this.myLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 9:
     this.PCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 10:
     this.Align = ((System.Windows.Controls.Button)(target));
     
     #line 29 "..\..\..\MainWindow.xaml"
     this.Align.Click += new System.Windows.RoutedEventHandler(this.Align_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     this.FullAtomToggle = ((System.Windows.Controls.CheckBox)(target));
     
     #line 30 "..\..\..\MainWindow.xaml"
     this.FullAtomToggle.Checked += new System.Windows.RoutedEventHandler(this.FullAtomToggle_Checked);
     
     #line default
     #line hidden
     
     #line 30 "..\..\..\MainWindow.xaml"
     this.FullAtomToggle.Unchecked += new System.Windows.RoutedEventHandler(this.FullAtomToggle_Unchecked);
     
     #line default
     #line hidden
     return;
     case 12:
     this.help = ((System.Windows.Controls.Button)(target));
     
     #line 32 "..\..\..\MainWindow.xaml"
     this.help.Click += new System.Windows.RoutedEventHandler(this.ShowHelp);
     
     #line default
     #line hidden
     return;
     case 13:
     this.about = ((System.Windows.Controls.Button)(target));
     
     #line 33 "..\..\..\MainWindow.xaml"
     this.about.Click += new System.Windows.RoutedEventHandler(this.ShowAbout);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #33
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Load1 = ((System.Windows.Controls.Button)(target));

            #line 7 "..\..\..\MainWindow.xaml"
                this.Load1.Click += new System.Windows.RoutedEventHandler(this.Button1_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.Load2 = ((System.Windows.Controls.Button)(target));

            #line 10 "..\..\..\MainWindow.xaml"
                this.Load2.Click += new System.Windows.RoutedEventHandler(this.Button2_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.FileName1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.FileName2 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.Output = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.display = ((System.Windows.Controls.Canvas)(target));

            #line 15 "..\..\..\MainWindow.xaml"
                this.display.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Mouse_Wheel);

            #line default
            #line hidden

            #line 15 "..\..\..\MainWindow.xaml"
                this.display.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Mouse_Up);

            #line default
            #line hidden

            #line 15 "..\..\..\MainWindow.xaml"
                this.display.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Mouse_Down);

            #line default
            #line hidden

            #line 15 "..\..\..\MainWindow.xaml"
                this.display.MouseMove += new System.Windows.Input.MouseEventHandler(this.Mouse_Move);

            #line default
            #line hidden

            #line 15 "..\..\..\MainWindow.xaml"
                this.display.MouseLeave += new System.Windows.Input.MouseEventHandler(this.Mouse_Leave);

            #line default
            #line hidden
                return;

            case 7:
                this.myDisplay = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 8:
                this.myLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 9:
                this.PCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 10:
                this.Align = ((System.Windows.Controls.Button)(target));

            #line 29 "..\..\..\MainWindow.xaml"
                this.Align.Click += new System.Windows.RoutedEventHandler(this.Align_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.FullAtomToggle = ((System.Windows.Controls.CheckBox)(target));

            #line 30 "..\..\..\MainWindow.xaml"
                this.FullAtomToggle.Checked += new System.Windows.RoutedEventHandler(this.FullAtomToggle_Checked);

            #line default
            #line hidden

            #line 30 "..\..\..\MainWindow.xaml"
                this.FullAtomToggle.Unchecked += new System.Windows.RoutedEventHandler(this.FullAtomToggle_Unchecked);

            #line default
            #line hidden
                return;

            case 12:
                this.help = ((System.Windows.Controls.Button)(target));

            #line 32 "..\..\..\MainWindow.xaml"
                this.help.Click += new System.Windows.RoutedEventHandler(this.ShowHelp);

            #line default
            #line hidden
                return;

            case 13:
                this.about = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\..\MainWindow.xaml"
                this.about.Click += new System.Windows.RoutedEventHandler(this.ShowAbout);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #34
0
        private void grid_Loaded(object sender, RoutedEventArgs e)
        {
            Model3DGroup mainGroup = new Model3DGroup();

            Rect bRect = new Rect();

            DirectionalLight dLight = new DirectionalLight();
            dLight.Direction = new Vector3D(1, -1, -1);
            dLight.Color = Colors.White;

            mainGroup.Children.Add(dLight);

            for (int i = 0; i < gMax; i++)
            {
                for (int j = 0; j < gMax; j++)
                {
                    float r = i / (float)gMax;
                    float g = j / (float)gMax;
                    int m = i > j ? i : j;
                    float b = 1 - (m/ (float)gMax);
                    Color color = new Color() { ScR = r, ScG = g, ScB = b, ScA = 1 };
                    //Color color = Colors.Brown;
                    groupGrid[i, j] = CreateHexagon(i, j, color);
                    mainGroup.Children.Add(groupGrid[i, j]);

                    Rect3D hexRect = groupGrid[i, j].Bounds;
                    double minX, maxX, minY, maxY;
                    minX = hexRect.X;
                    minY = hexRect.Y;
                    maxX = hexRect.X + hexRect.SizeX;
                    maxY = hexRect.Y + hexRect.SizeY;
                    if (minX < bRect.X) bRect.X = minX;
                    if (maxX > bRect.Right) bRect.Width = maxX - bRect.X;
                    if (minY < bRect.Y) bRect.Y = minY;
                    if (maxY > bRect.Top) bRect.Height = maxY - bRect.Y;
                }
            }

            SetViewPort(grid, bRect);

            ModelVisual3D model = new ModelVisual3D();
            model.Content = mainGroup;
            grid.Children.Add(model);
        }
Пример #35
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 29 "..\..\Container3DView.xaml"
                ((HeuristicLab.Problems.BinPacking.Views.Container3DView)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Container3DView_MouseMove);

            #line default
            #line hidden

            #line 29 "..\..\Container3DView.xaml"
                ((HeuristicLab.Problems.BinPacking.Views.Container3DView)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Container3DView_MouseDown);

            #line default
            #line hidden

            #line 29 "..\..\Container3DView.xaml"
                ((HeuristicLab.Problems.BinPacking.Views.Container3DView)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Container3DView_MouseUp);

            #line default
            #line hidden

            #line 30 "..\..\Container3DView.xaml"
                ((HeuristicLab.Problems.BinPacking.Views.Container3DView)(target)).MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Container3DView_OnMouseWheel);

            #line default
            #line hidden

            #line 31 "..\..\Container3DView.xaml"
                ((HeuristicLab.Problems.BinPacking.Views.Container3DView)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.Container3DView_OnMouseEnter);

            #line default
            #line hidden
                return;

            case 2:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 5:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.scale = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;

            case 7:
                this.rotateX = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 8:
                this.rotateY = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 9:
                this.scaleZoom = ((System.Windows.Media.Media3D.ScaleTransform3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #36
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listBox = ((System.Windows.Controls.ListBox)(target));

            #line 18 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.button5 = ((System.Windows.Controls.Button)(target));

            #line 28 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.button5.Click += new System.Windows.RoutedEventHandler(this.button5_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.button1 = ((System.Windows.Controls.Button)(target));

            #line 31 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click_1);

            #line default
            #line hidden
                return;

            case 6:
                this.label8 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.SenceGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 9:
                this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 10:
                this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
                return;

            case 11:
                this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 12:
                this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 13:
                this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 14:
                this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
                return;

            case 15:
                this.canvas1 = ((System.Windows.Controls.Canvas)(target));
                return;

            case 16:
                this.label2 = ((System.Windows.Controls.Label)(target));

            #line 58 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowupclick);

            #line default
            #line hidden
                return;

            case 17:
                this.label3 = ((System.Windows.Controls.Label)(target));

            #line 63 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdownclick);

            #line default
            #line hidden
                return;

            case 18:
                this.label4 = ((System.Windows.Controls.Label)(target));

            #line 68 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowleftclick);

            #line default
            #line hidden
                return;

            case 19:
                this.label5 = ((System.Windows.Controls.Label)(target));

            #line 73 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowrightclick);

            #line default
            #line hidden
                return;

            case 20:
                this.label6 = ((System.Windows.Controls.Label)(target));

            #line 78 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label6.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowaddclick);

            #line default
            #line hidden
                return;

            case 21:
                this.label7 = ((System.Windows.Controls.Label)(target));

            #line 83 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label7.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.arrowdelclick);

            #line default
            #line hidden
                return;

            case 22:
                this.label9 = ((System.Windows.Controls.Label)(target));

            #line 88 "..\..\..\..\DeviceMigrations\motor.xaml"
                this.label9.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rebackclick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #37
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((linearAlgebra.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.viewport3D = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 3:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 5:
                this.MyModel = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.cube = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 7:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 8:
                this.Color = ((System.Windows.Media.SolidColorBrush)(target));
                return;

            case 9:
                this.Model2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.cone = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 11:
                this.matDiffuseMain2 = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 12:
                this.Color2 = ((System.Windows.Media.SolidColorBrush)(target));
                return;

            case 13:
                this.textBox = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #38
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            DirectionalLight dirLight = new DirectionalLight();
            dirLight.Color = Colors.White;
            dirLight.Direction = new Vector3D(1, 1, 1);

            PerspectiveCamera camera1 = new PerspectiveCamera();
            camera1.FarPlaneDistance = 10000;
            camera1.NearPlaneDistance = 100;
            camera1.FieldOfView = 10;
            camera1.Position = new Point3D(160, 120, -1000);
            camera1.LookDirection = new Vector3D(0, 0, 1);
            camera1.UpDirection = new Vector3D(0, -1, 0);

            Model3DGroup group = new Model3DGroup();

            int i = 0;

            for (int y = 0; y < 480; y += s)
            {
                for (int x = 0; x < 640; x += s)
                {
                    points[i] = triangle(x, y, s);
                    points[i].Transform = new TranslateTransform3D(0, 0, 0);

                    group.Children.Add(points[i]);
                    i++;
                }
            }

            group.Children.Add(dirLight);
            ModelVisual3D modelsVisual = new ModelVisual3D();
            modelsVisual.Content = group;
            Viewport3D myViewport = new Viewport3D();
            myViewport.IsHitTestVisible = false;
            myViewport.Camera = camera1;
            myViewport.Children.Add(modelsVisual);
            canvas1.Children.Add(myViewport);

            myViewport.Height = canvas1.Height;
            myViewport.Width = canvas1.Width;
            Canvas.SetTop(myViewport, 0);
            Canvas.SetLeft(myViewport, 0);

            foreach (var potentialSensor in KinectSensor.KinectSensors)
            {
                if (potentialSensor.Status == KinectStatus.Connected)
                {
                    this.sensor = potentialSensor;
                    break;
                }
            }

            if (this.sensor != null)
            {
                this.sensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
                this.sensor.DepthFrameReady += this.SensorDepthFrameReady;
                try
                {
                    this.sensor.Start();
                }
                catch (IOException)
                {
                    this.sensor = null;
                }
            }

            int minDepth = this.minDepth;
            int maxDepth = this.maxDepth;
            KinectDepthData depthData = new KinectDepthData();
            List<Vector3D> filteredPointCloud = new List<Vector3D>();
            List<Vector> pixelLocs = new List<Vector>();
            List<Vector3D> pointCloudNormals = new List<Vector3D>();
            List<Vector3D> outlierCloud = new List<Vector3D>();
            PlaneFilter filter = new PlaneFilter();
            //pointCloudNormals = filter.GenerateSampledPointCloud(depthData, this.pixelData, pointCloudNormals, 200000);
            Point3DCollection collection = new Point3DCollection();
            foreach (Vector3D v in pointCloudNormals)
            {
                collection.Add(new Point3D(v.X, v.Y, v.Z));
            }

            //filter.GenerateFilteredPointCloud(pixelData, filteredPointCloud, pixelLocs, pointCloudNormals, outlierCloud, depthData);
        }
Пример #39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 21 "..\..\Trackport3D.xaml"
                ((Ajubaa.XamlModelViewer._3DTools.Trackport3D)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);

            #line default
            #line hidden
                return;

            case 2:
                this.ParentGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.BorderWithBackgrndColor = ((System.Windows.Controls.Border)(target));
                return;

            case 4:
                this.Viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 5:
                this.Camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 6:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 7:
                this.Headlight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.Root = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.CaptureBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.WireFrameOrSolidButton = ((System.Windows.Controls.Button)(target));

            #line 83 "..\..\Trackport3D.xaml"
                this.WireFrameOrSolidButton.Click += new System.Windows.RoutedEventHandler(this.WireFrameOrSolid);

            #line default
            #line hidden
                return;

            case 11:

            #line 126 "..\..\Trackport3D.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MovingView);

            #line default
            #line hidden
                return;

            case 12:

            #line 135 "..\..\Trackport3D.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Disappear);

            #line default
            #line hidden
                return;

            case 13:
                this.CreateButton = ((System.Windows.Controls.Button)(target));

            #line 144 "..\..\Trackport3D.xaml"
                this.CreateButton.Click += new System.Windows.RoutedEventHandler(this.SlowGeneration);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #40
0
        private void GenertateView(double a, double b, double c, double rx, double ry, double rz, double x1, double x2, double y1, double y2, double z1, double z2)
        {
            MyViewport.Camera = _perspectiveCamera1;
            //_perspectiveCamera1 = MakeCamera();
            Viewport3D2.Camera = _perspectiveCamera1;
            Eclip.Children.Add(Viewport3D2);

            ModelVisual3D modelVisual3D = new ModelVisual3D();
            Viewport3D2.Children.Add(modelVisual3D);

            Model3DGroup model3DGroup = new Model3DGroup();
            modelVisual3D.Content = model3DGroup;

            AmbientLight ambientLight = new AmbientLight();
            ambientLight.Color = Colors.Gray;
            model3DGroup.Children.Add(ambientLight);

            DirectionalLight directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("-1,-3,-2"));
            model3DGroup.Children.Add(directionalLight);

            directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("1,-2,3"));
            model3DGroup.Children.Add(directionalLight);

            AddEllipsoid(model3DGroup, Colors.Orange, a, b, c, rx, ry, rz);
            ConstructCube(x1, x2, y1, y2, z1, z2, model3DGroup);
        }
Пример #41
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.listBox = ((System.Windows.Controls.ListBox)(target));
     
     #line 18 "..\..\..\3DControl.xaml"
     this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.button5 = ((System.Windows.Controls.Button)(target));
     return;
     case 3:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.SenceGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 6:
     this.viewport = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 7:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 8:
     this.FurnitureContainer = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 9:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 11:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 12:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #42
0
        private void InitiateGroup()
        {
            AmbientLight ambientLight = new AmbientLight();
            ambientLight.Color = Colors.Gray;
            model3DGroup1.Children.Add(ambientLight);
            model3DGroup2.Children.Add(ambientLight);
            model3DGroup3.Children.Add(ambientLight);

            DirectionalLight directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("-1,-3,-2"));
            model3DGroup1.Children.Add(directionalLight);
            model3DGroup2.Children.Add(directionalLight);
            model3DGroup3.Children.Add(directionalLight);

            directionalLight = new DirectionalLight();
            directionalLight.Color = Colors.Gray;
            directionalLight.Direction = ((Vector3D)new Vector3DConverter().ConvertFromString("1,-2,3"));
            model3DGroup1.Children.Add(directionalLight);
            model3DGroup2.Children.Add(directionalLight);
            model3DGroup3.Children.Add(directionalLight);
        }
Пример #43
0
        public void LoadPreview3D()
        {
            PointCloudTileSource tileSource = CurrentTileSource;
            Jacere.Core.Geometry.Extent3D extent = tileSource.Extent;

            Model3DGroup modelGroup = new Model3DGroup();

            Model3DGroup modelSubGroup = new Model3DGroup();
            modelGroup.Children.Add(modelSubGroup);

            Model3DGroup modelStitchingGroup = new Model3DGroup();
            modelGroup.Children.Add(modelStitchingGroup);

            DirectionalLight lightSource = new DirectionalLight(System.Windows.Media.Colors.White, new Vector3D(-1, -1, -1));
            modelGroup.Children.Add(lightSource);

            ModelVisual3D model = new ModelVisual3D();
            model.Content = modelGroup;

            Jacere.Core.Geometry.Point3D centerOfMass = tileSource.CenterOfMass;
            Point3D lookatPoint = new Point3D(0, 0, 0);
            Point3D cameraPoint = new Point3D(0, extent.MinY - centerOfMass.Y, centerOfMass.Z - extent.MinZ + extent.RangeX);
            Vector3D lookDirection = lookatPoint - cameraPoint;
            lookDirection.Normalize();

            PerspectiveCamera camera = new PerspectiveCamera();
            camera.Position = cameraPoint;
            camera.LookDirection = lookDirection;
            camera.UpDirection = new Vector3D(0, 0, 1);
            camera.FieldOfView = 70;

            RenderOptions.SetEdgeMode(viewport, EdgeMode.Aliased);
            //viewport.ClipToBounds = false;
            //viewport.IsHitTestVisible = false;

            viewport.Camera = camera;
            viewport.Children.Add(model);

            m_tileModelCollection = modelSubGroup.Children;
            m_stitchingModelCollection = modelStitchingGroup.Children;

            m_backgroundWorker.RunWorkerAsync(CurrentTileSource);
        }
Пример #44
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.ViewPort = ((System.Windows.Controls.Viewport3D)(target));

            #line 13 "..\..\MainWindow.xaml"
                this.ViewPort.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ViewPort_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 14 "..\..\MainWindow.xaml"
                this.ViewPort.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.ViewPort_MouseLeftButtonUp);

            #line default
            #line hidden

            #line 14 "..\..\MainWindow.xaml"
                this.ViewPort.MouseMove += new System.Windows.Input.MouseEventHandler(this.ViewPort_MouseMove);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.ViewPort.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.ViewPort_MouseWheel);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.ViewPort.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ViewPort_MouseDown);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.ViewPort.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.ViewPort_MouseUp);

            #line default
            #line hidden

            #line 15 "..\..\MainWindow.xaml"
                this.ViewPort.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ViewPort_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 3:
                this.CAMERA = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 4:
                this.translacija = ((System.Windows.Media.Media3D.TranslateTransform3D)(target));
                return;

            case 5:
                this.myLight = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 7:
                this.model3dGroup = ((System.Windows.Media.Media3D.Model3DGroup)(target));
                return;

            case 8:
                this.Rotate = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 9:
                this.myAngleRotation = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 10:

            #line 80 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Unchecked += new System.Windows.RoutedEventHandler(this.CheckBox_Unchecked);

            #line default
            #line hidden

            #line 80 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);

            #line default
            #line hidden
                return;

            case 11:

            #line 81 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Unchecked += new System.Windows.RoutedEventHandler(this.CheckBox_Unchecked);

            #line default
            #line hidden

            #line 81 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);

            #line default
            #line hidden
                return;

            case 12:

            #line 82 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Unchecked += new System.Windows.RoutedEventHandler(this.CheckBox_Unchecked);

            #line default
            #line hidden

            #line 82 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #45
0
 //sets the properties for visual content for plot 3D
 private ModelVisual3D ModelVisual3D_Details()
 {
     ModelVisual3D md = new ModelVisual3D();
     DirectionalLight d = new DirectionalLight();
     d.Color = Colors.White;
     d.Direction = new Vector3D(-2, -3, -1);
     md.Content = d;
     return md;
 }
Пример #46
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\MainWindow.xaml"
                ((ThreeDFaces.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 7 "..\..\..\MainWindow.xaml"
                ((ThreeDFaces.MainWindow)(target)).StateChanged += new System.EventHandler(this.Window_StateChanged);

            #line default
            #line hidden
                return;

            case 2:

            #line 12 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.miEdit_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 14 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.miDelete_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 17 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.m_iMapping_Click);

            #line default
            #line hidden
                return;

            case 5:

            #line 18 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.m_iMapping_Click);

            #line default
            #line hidden
                return;

            case 6:

            #line 19 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.m_iMapping_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.layoutGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.RefImage = ((System.Windows.Controls.Image)(target));

            #line 52 "..\..\..\MainWindow.xaml"
                this.RefImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.RefImage_MouseLeftButtonDown1);

            #line default
            #line hidden
                return;

            case 9:
                this.checkNoStretch = ((System.Windows.Controls.CheckBox)(target));

            #line 54 "..\..\..\MainWindow.xaml"
                this.checkNoStretch.Checked += new System.Windows.RoutedEventHandler(this.checkNoStretch_Checked);

            #line default
            #line hidden

            #line 54 "..\..\..\MainWindow.xaml"
                this.checkNoStretch.Unchecked += new System.Windows.RoutedEventHandler(this.checkNoStretch_Unchecked);

            #line default
            #line hidden
                return;

            case 10:
                this.internallayout = ((System.Windows.Controls.Grid)(target));
                return;

            case 11:
                this.Text1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.Text2 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.Button1 = ((System.Windows.Controls.Button)(target));

            #line 89 "..\..\..\MainWindow.xaml"
                this.Button1.Click += new System.Windows.RoutedEventHandler(this.Button1_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.sliderx = ((System.Windows.Controls.Slider)(target));

            #line 96 "..\..\..\MainWindow.xaml"
                this.sliderx.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 15:
                this.slidery = ((System.Windows.Controls.Slider)(target));

            #line 104 "..\..\..\MainWindow.xaml"
                this.slidery.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 16:
                this.sliderz = ((System.Windows.Controls.Slider)(target));

            #line 113 "..\..\..\MainWindow.xaml"
                this.sliderz.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 17:
                this.Button3 = ((System.Windows.Controls.Button)(target));

            #line 115 "..\..\..\MainWindow.xaml"
                this.Button3.Click += new System.Windows.RoutedEventHandler(this.Button3_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.Button4 = ((System.Windows.Controls.Button)(target));

            #line 117 "..\..\..\MainWindow.xaml"
                this.Button4.Click += new System.Windows.RoutedEventHandler(this.Button4_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.Button5 = ((System.Windows.Controls.Button)(target));

            #line 118 "..\..\..\MainWindow.xaml"
                this.Button5.Click += new System.Windows.RoutedEventHandler(this.Button5_Click);

            #line default
            #line hidden

            #line 118 "..\..\..\MainWindow.xaml"
                this.Button5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Button5_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 20:
                this.Button6 = ((System.Windows.Controls.Button)(target));

            #line 119 "..\..\..\MainWindow.xaml"
                this.Button6.Click += new System.Windows.RoutedEventHandler(this.Button6_Click);

            #line default
            #line hidden

            #line 119 "..\..\..\MainWindow.xaml"
                this.Button6.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Button6_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 21:
                this.Button7 = ((System.Windows.Controls.Button)(target));

            #line 120 "..\..\..\MainWindow.xaml"
                this.Button7.Click += new System.Windows.RoutedEventHandler(this.Button7_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.sliderBrightness = ((System.Windows.Controls.Slider)(target));

            #line 121 "..\..\..\MainWindow.xaml"
                this.sliderBrightness.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.sliderContrast = ((System.Windows.Controls.Slider)(target));

            #line 129 "..\..\..\MainWindow.xaml"
                this.sliderContrast.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 24:
                this.ImageMesh = ((System.Windows.Controls.Image)(target));

            #line 147 "..\..\..\MainWindow.xaml"
                this.ImageMesh.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ImageMesh_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 25:
                this.chkImageMesh = ((System.Windows.Controls.CheckBox)(target));

            #line 150 "..\..\..\MainWindow.xaml"
                this.chkImageMesh.Checked += new System.Windows.RoutedEventHandler(this.chkImageMesh_Checked);

            #line default
            #line hidden

            #line 150 "..\..\..\MainWindow.xaml"
                this.chkImageMesh.Unchecked += new System.Windows.RoutedEventHandler(this.chkImageMesh_Unchecked);

            #line default
            #line hidden
                return;

            case 26:
                this.chkGrid = ((System.Windows.Controls.CheckBox)(target));

            #line 151 "..\..\..\MainWindow.xaml"
                this.chkGrid.Checked += new System.Windows.RoutedEventHandler(this.chkGrid_Checked);

            #line default
            #line hidden

            #line 151 "..\..\..\MainWindow.xaml"
                this.chkGrid.Unchecked += new System.Windows.RoutedEventHandler(this.chkGrid_Unchecked);

            #line default
            #line hidden
                return;

            case 27:
                this.sliderRed = ((System.Windows.Controls.Slider)(target));

            #line 163 "..\..\..\MainWindow.xaml"
                this.sliderRed.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 28:
                this.sliderGreen = ((System.Windows.Controls.Slider)(target));

            #line 166 "..\..\..\MainWindow.xaml"
                this.sliderGreen.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 29:
                this.sliderBlue = ((System.Windows.Controls.Slider)(target));

            #line 169 "..\..\..\MainWindow.xaml"
                this.sliderBlue.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 30:
                this.labelColor = ((System.Windows.Controls.Label)(target));
                return;

            case 31:
                this.sliderAmb = ((System.Windows.Controls.Slider)(target));

            #line 173 "..\..\..\MainWindow.xaml"
                this.sliderAmb.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderColor_ValueChanged);

            #line default
            #line hidden
                return;

            case 32:
                this.vscrollz = ((System.Windows.Controls.Slider)(target));

            #line 189 "..\..\..\MainWindow.xaml"
                this.vscrollz.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 33:
                this.vscroll = ((System.Windows.Controls.Slider)(target));

            #line 198 "..\..\..\MainWindow.xaml"
                this.vscroll.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 34:
                this.GridVSnap = ((System.Windows.Controls.Grid)(target));

            #line 200 "..\..\..\MainWindow.xaml"
                this.GridVSnap.PreviewMouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.GridVSnap_PreviewMouseWheel);

            #line default
            #line hidden
                return;

            case 35:
                this.VSnap0 = ((System.Windows.Controls.Image)(target));

            #line 209 "..\..\..\MainWindow.xaml"
                this.VSnap0.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 209 "..\..\..\MainWindow.xaml"
                this.VSnap0.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 36:
                this.VSnap1 = ((System.Windows.Controls.Image)(target));

            #line 210 "..\..\..\MainWindow.xaml"
                this.VSnap1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 210 "..\..\..\MainWindow.xaml"
                this.VSnap1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 37:
                this.VSnap2 = ((System.Windows.Controls.Image)(target));

            #line 211 "..\..\..\MainWindow.xaml"
                this.VSnap2.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 211 "..\..\..\MainWindow.xaml"
                this.VSnap2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 38:
                this.VSnap3 = ((System.Windows.Controls.Image)(target));

            #line 212 "..\..\..\MainWindow.xaml"
                this.VSnap3.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 212 "..\..\..\MainWindow.xaml"
                this.VSnap3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 39:
                this.VSnap4 = ((System.Windows.Controls.Image)(target));

            #line 213 "..\..\..\MainWindow.xaml"
                this.VSnap4.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 213 "..\..\..\MainWindow.xaml"
                this.VSnap4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 40:
                this.VSnap5 = ((System.Windows.Controls.Image)(target));

            #line 214 "..\..\..\MainWindow.xaml"
                this.VSnap5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseRightButtonDown);

            #line default
            #line hidden

            #line 214 "..\..\..\MainWindow.xaml"
                this.VSnap5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.VSnap_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 41:
                this.GridFModel = ((System.Windows.Controls.Grid)(target));

            #line 217 "..\..\..\MainWindow.xaml"
                this.GridFModel.PreviewMouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.GridFModel_PreviewMouseWheel);

            #line default
            #line hidden
                return;

            case 42:
                this.FModel0 = ((System.Windows.Controls.Image)(target));

            #line 226 "..\..\..\MainWindow.xaml"
                this.FModel0.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 227 "..\..\..\MainWindow.xaml"
                this.FModel0.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 43:
                this.FModel1 = ((System.Windows.Controls.Image)(target));

            #line 228 "..\..\..\MainWindow.xaml"
                this.FModel1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 229 "..\..\..\MainWindow.xaml"
                this.FModel1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 44:
                this.FModel2 = ((System.Windows.Controls.Image)(target));

            #line 230 "..\..\..\MainWindow.xaml"
                this.FModel2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 231 "..\..\..\MainWindow.xaml"
                this.FModel2.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 45:
                this.FModel3 = ((System.Windows.Controls.Image)(target));

            #line 232 "..\..\..\MainWindow.xaml"
                this.FModel3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 233 "..\..\..\MainWindow.xaml"
                this.FModel3.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 46:
                this.FModel4 = ((System.Windows.Controls.Image)(target));

            #line 234 "..\..\..\MainWindow.xaml"
                this.FModel4.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 235 "..\..\..\MainWindow.xaml"
                this.FModel4.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 47:
                this.FModel5 = ((System.Windows.Controls.Image)(target));

            #line 236 "..\..\..\MainWindow.xaml"
                this.FModel5.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 237 "..\..\..\MainWindow.xaml"
                this.FModel5.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Image_Face_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 48:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 49:
                this.ColorImage = ((System.Windows.Controls.Image)(target));

            #line 240 "..\..\..\MainWindow.xaml"
                this.ColorImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ColorImage_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 50:
                this.MeshGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 51:
                this.MeshImage = ((System.Windows.Controls.Image)(target));

            #line 242 "..\..\..\MainWindow.xaml"
                this.MeshImage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MeshImage_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 242 "..\..\..\MainWindow.xaml"
                this.MeshImage.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MeshImage_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 52:
                this.viewport3d = ((System.Windows.Controls.Viewport3D)(target));

            #line 244 "..\..\..\MainWindow.xaml"
                this.viewport3d.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseDown);

            #line default
            #line hidden

            #line 244 "..\..\..\MainWindow.xaml"
                this.viewport3d.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseRightButtonDown);

            #line default
            #line hidden
                return;

            case 53:
                this.amlight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 54:
                this.dirlight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 55:
                this.theGeometry = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 56:
                this.theMaterial = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 57:
                this.hscroll = ((System.Windows.Controls.Slider)(target));

            #line 373 "..\..\..\MainWindow.xaml"
                this.hscroll.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slider_ValueChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #47
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((WPF三维图形.Window1)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.viewport3d = ((System.Windows.Controls.Viewport3D)(target));

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.viewport3d_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseMove += new System.Windows.Input.MouseEventHandler(this.viewport3d_MouseMove);

            #line default
            #line hidden

            #line 16 "..\..\Window1.xaml"
                this.viewport3d.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.viewport3d_MouseWheel);

            #line default
            #line hidden
                return;

            case 4:
                this.ppc = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 5:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 6:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 8:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 10:
                this.Box01 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 11:
                this.DefaultMaterial = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 12:
                this.reset = ((System.Windows.Controls.Button)(target));

            #line 57 "..\..\Window1.xaml"
                this.reset.Click += new System.Windows.RoutedEventHandler(this.reset_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #48
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.my_viewport = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 2:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 3:
                this.Wedge = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.geometry_model_3d = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 5:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 6:
                this.rotate_x = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 7:
                this.rotate_y = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 8:
                this.rotate_z = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 9:
                this.slider_x = ((System.Windows.Controls.Slider)(target));
                return;

            case 10:
                this.slider_y = ((System.Windows.Controls.Slider)(target));
                return;

            case 11:
                this.slider_z = ((System.Windows.Controls.Slider)(target));
                return;

            case 12:
                this.textbox_b = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.textbox_a = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.textbox_c = ((System.Windows.Controls.TextBox)(target));
                return;

            case 15:
                this.textbox_d = ((System.Windows.Controls.TextBox)(target));
                return;

            case 16:
                this.build_perspective = ((System.Windows.Controls.Button)(target));

            #line 90 "..\..\MainWindow.xaml"
                this.build_perspective.Click += new System.Windows.RoutedEventHandler(this.Build_perspective_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.Build_ortogonal = ((System.Windows.Controls.Button)(target));

            #line 91 "..\..\MainWindow.xaml"
                this.Build_ortogonal.Click += new System.Windows.RoutedEventHandler(this.Build_ortogonal_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #49
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.oldgrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.roomName = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.label2 = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.comboBox1 = ((System.Windows.Controls.ComboBox)(target));
     
     #line 27 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.comboBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox1_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.label3 = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.button3 = ((System.Windows.Controls.Button)(target));
     
     #line 38 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.viewport1 = ((System.Windows.Controls.Viewport3D)(target));
     
     #line 41 "..\..\..\..\DeviceMigrations\addposition.xaml"
     this.viewport1.MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.rightleftdown);
     
     #line default
     #line hidden
     return;
     case 10:
     this.myPerspectiveCamera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 11:
     this.FurnitureContainer2 = ((System.Windows.Media.Media3D.ContainerUIElement3D)(target));
     return;
     case 12:
     this.viewportLightsModelVisual3D = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.ambientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 14:
     this.directionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 15:
     this.spotLight = ((System.Windows.Media.Media3D.SpotLight)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #50
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainWindow.xaml"
                ((_3DCubeImages.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.ColorLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 3:
                this.imageBrush1 = ((System.Windows.Media.ImageBrush)(target));
                return;

            case 4:
                this.myRotate3D = ((System.Windows.Media.Media3D.RotateTransform3D)(target));
                return;

            case 5:
                this.rotate = ((System.Windows.Media.Media3D.AxisAngleRotation3D)(target));
                return;

            case 6:
                this.rotateAnimation = ((System.Windows.Media.Animation.Rotation3DAnimation)(target));
                return;

            case 7:
                this.ColorAnimation1 = ((System.Windows.Media.Animation.ColorAnimation)(target));
                return;

            case 8:
                this.ColorAnimation2 = ((System.Windows.Media.Animation.ColorAnimation)(target));
                return;

            case 9:
                this.ColorAnimation3 = ((System.Windows.Media.Animation.ColorAnimation)(target));
                return;

            case 10:
                this.listFile1 = ((System.Windows.Controls.ListView)(target));

            #line 116 "..\..\MainWindow.xaml"
                this.listFile1.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.ListFile1_MouseUp);

            #line default
            #line hidden
                return;

            case 11:
                this.button2 = ((System.Windows.Controls.Button)(target));

            #line 123 "..\..\MainWindow.xaml"
                this.button2.Click += new System.Windows.RoutedEventHandler(this.Button2_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #51
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            kinectSensorChooser1.KinectSensorChanged += new DependencyPropertyChangedEventHandler(kinectSensorChooser1_KinectSensorChanged);
            DirectionalLight DirLight1 = new DirectionalLight();
            DirLight1.Color = Colors.White;
            DirLight1.Direction = new Vector3D(1, 1, 1);

            PerspectiveCamera Camera1 = new PerspectiveCamera();
            Camera1.FarPlaneDistance = 2000;
            Camera1.NearPlaneDistance = 10;
            Camera1.FieldOfView = 10;
            Camera1.Position = new Point3D(160, 120, -1000);
            Camera1.LookDirection = new Vector3D(0, 0, 1);
            Camera1.UpDirection = new Vector3D(0, -1, 0);

            Model3DGroup modelGroup = new Model3DGroup();

            int i = 0;

            for (int y = 0; y < 240; y += s) //was 240
            {
                for (int x = 0; x < 320; x += s)
                {
                    points[i] = Triangle(x, y, s, new SolidColorBrush(Colors.White));

            //hitLabel.SetValue("hit: " + x.ToString() + " " y.ToString
                    //points[i]=MCube(x,y);
                    points[i].Transform = new TranslateTransform3D(0, 0, 0);
                    modelGroup.Children.Add(points[i]);

                    i++;
                }
            }

            modelGroup.Children.Add(DirLight1);
            ModelVisual3D modelsVisual = new ModelVisual3D();
            modelsVisual.Content = modelGroup;
            Viewport3D myViewport = new Viewport3D();
            myViewport.IsHitTestVisible = false;
            myViewport.Camera = Camera1;
            myViewport.Children.Add(modelsVisual);
            canvas1.Children.Add(myViewport);

            myViewport.Height = canvas1.Height;
            myViewport.Width = canvas1.Width;
            Canvas.SetTop(myViewport, 0);
            Canvas.SetLeft(myViewport, 0);
        }
Пример #52
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\Window1.xaml"
                ((WaveSim.Window1)(target)).MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Window_MouseWheel);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.btnStart = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\Window1.xaml"
                this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 5:
                this.camMain = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 6:
                this.vis3DLighting = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.dirLightMain = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.gmodMain = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 9:
                this.meshMain = ((System.Windows.Media.Media3D.MeshGeometry3D)(target));
                return;

            case 10:
                this.matDiffuseMain = ((System.Windows.Media.Media3D.DiffuseMaterial)(target));
                return;

            case 11:
                this.slidPeakHeight = ((System.Windows.Controls.Slider)(target));

            #line 53 "..\..\Window1.xaml"
                this.slidPeakHeight.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slidPeakHeight_ValueChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.lblDropDepth = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.slidNumDrops = ((System.Windows.Controls.Slider)(target));

            #line 55 "..\..\Window1.xaml"
                this.slidNumDrops.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.slidNumDrops_ValueChanged);

            #line default
            #line hidden
                return;

            case 14:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #53
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 24 "..\..\..\Model3DViewer\Model3DView.xaml"
     ((RageLib.Models.Model3DViewer.Model3DView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.OnLoaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.MainViewport = ((System.Windows.Controls.Viewport3D)(target));
     return;
     case 3:
     this.Camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 4:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 5:
     this.Headlight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 6:
     this.Root = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 7:
     this.CaptureBorder = ((System.Windows.Controls.Border)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #54
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.RobotSubscription = ((ConverterSystems.Workstation.Services.UaSubscription)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 4:
                this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 5:
                this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 6:
                this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 8:
                this.Base = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.ShoulderAssembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 10:
                this.Shoulder = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 11:
                this.ShoulderGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 12:
                this.ShoulderMotorGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 13:
                this.LowerArmMotorGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 14:
                this.BaseMotor2Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 15:
                this.LowerArmAssembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.LowerArm = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 17:
                this.LowerArmGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 18:
                this.UpperArm2Assembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 19:
                this.UpperArm2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 20:
                this.UpperArm2Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 21:
                this.Logo3Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 22:
                this.UpperArmTwistMotorGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 23:
                this.UpperArmMotorGeometry = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 24:
                this.TwistAssembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 25:
                this.UpperArm = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 26:
                this.UpperArmGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 27:
                this.Logo1Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 28:
                this.Logo2Geo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 29:
                this.WristBendAssembly = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 30:
                this.Wrist = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 31:
                this.WristGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 32:
                this.ToolFlangeGeo = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #55
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((WpfPhotoAlbum.MainWindow)(target));
                return;

            case 2:
                this.Storyboard1_BeginStoryboard = ((System.Windows.Media.Animation.BeginStoryboard)(target));
                return;

            case 3:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.image10 = ((System.Windows.Controls.Image)(target));
                return;

            case 5:
                this.image9 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 6:
                this.image9ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 7:
                this.image9Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 8:
                this.AmbientContainer5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 9:
                this.Ambient5 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 10:
                this.DirectionalContainer5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 11:
                this.Directional5 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 12:
                this.image8 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 13:
                this.image8ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.image8Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 15:
                this.AmbientContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.Ambient4 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 17:
                this.DirectionalContainer4 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 18:
                this.Directional4 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 19:
                this.image7 = ((System.Windows.Controls.Image)(target));
                return;

            case 20:
                this.image6 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 21:
                this.image6ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 22:
                this.image6Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 23:
                this.AmbientContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 24:
                this.Ambient3 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 25:
                this.DirectionalContainer3 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 26:
                this.Directional3 = ((System.Windows.Media.Media3D.PointLight)(target));
                return;

            case 27:
                this.image5 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 28:
                this.image5ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 29:
                this.image5Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 30:
                this.AmbientContainer2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 31:
                this.Ambient2 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 32:
                this.DirectionalContainer2 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 33:
                this.Directional2 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 34:
                this.image4 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 35:
                this.image4ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 36:
                this.image4Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 37:
                this.AmbientContainer1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 38:
                this.Ambient1 = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 39:
                this.DirectionalContainer1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 40:
                this.Directional1 = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 41:
                this.image3 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 42:
                this.orthographicCamera = ((System.Windows.Media.Media3D.OrthographicCamera)(target));
                return;

            case 43:
                this.image3ModelContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 44:
                this.image3Model = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
                return;

            case 45:
                this.AmbientContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 46:
                this.Ambient = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 47:
                this.DirectionalContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 48:
                this.Directional = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 49:
                this.image2 = ((System.Windows.Controls.Image)(target));
                return;

            case 50:
                this.image1 = ((System.Windows.Controls.Image)(target));
                return;

            case 51:
                this.rectangle1 = ((System.Windows.Shapes.Rectangle)(target));

            #line 732 "..\..\MainWindow.xaml"
                this.rectangle1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 52:
                this.rectangle2 = ((System.Windows.Shapes.Rectangle)(target));

            #line 745 "..\..\MainWindow.xaml"
                this.rectangle2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 53:
                this.rectangle3 = ((System.Windows.Shapes.Rectangle)(target));

            #line 758 "..\..\MainWindow.xaml"
                this.rectangle3.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 54:
                this.textblock1 = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #56
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cm = ((System.Windows.Controls.ContextMenu)(target));
                return;

            case 2:

            #line 18 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_0);

            #line default
            #line hidden
                return;

            case 3:

            #line 19 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_1);

            #line default
            #line hidden
                return;

            case 4:

            #line 20 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_2);

            #line default
            #line hidden
                return;

            case 5:

            #line 21 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_3);

            #line default
            #line hidden
                return;

            case 6:

            #line 22 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_4);

            #line default
            #line hidden
                return;

            case 7:

            #line 23 "..\..\ClockWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Shadow_5);

            #line default
            #line hidden
                return;

            case 8:
                this.ClockGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 9:
                this.viewport3D1 = ((System.Windows.Controls.Viewport3D)(target));
                return;

            case 10:
                this.DigitDropShadow = ((System.Windows.Media.Effects.DropShadowBitmapEffect)(target));
                return;

            case 11:
                this.PCamera_clock1 = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
                return;

            case 12:
                this.ModelVisual3D_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 13:
                this.AmbientLightContainer_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 14:
                this.AmbLight_10h = ((System.Windows.Media.Media3D.AmbientLight)(target));
                return;

            case 15:
                this.DirectionalLightContainer_10h = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 16:
                this.DirectionalLight_10h = ((System.Windows.Media.Media3D.DirectionalLight)(target));
                return;

            case 17:
                this.ModelVisual3D_1m = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 18:
                this.DefaultGroup_1m = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 19:
                this.GeometryModel3DGeometry_1m = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 779 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_1m.Changed += new System.EventHandler(this.GeometryModel3D_1mChanged);

            #line default
            #line hidden
                return;

            case 20:
                this.ModelVisual3D_10s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 21:
                this.DefaultGroup_10s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 22:
                this.GeometryModel3DGeometry_10s = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 808 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_10s.Changed += new System.EventHandler(this.GeometryModel3D_10sChanged);

            #line default
            #line hidden
                return;

            case 23:
                this.ModelVisual3D_1s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 24:
                this.DefaultGroup_1s = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 25:
                this.GeometryModel3DGeometry_1s = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 837 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_1s.Changed += new System.EventHandler(this.GeometryModel3D_1sChanged);

            #line default
            #line hidden
                return;

            case 26:
                this.ModelVisual3D_div1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 27:
                this.DefaultGroup_div1 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
                return;

            case 28:
                this.GeometryModel3DGeometry_div1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));

            #line 866 "..\..\ClockWindow.xaml"
                this.GeometryModel3DGeometry_div1.Changed += new System.EventHandler(this.GeometryModel3D_10sChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #57
0
		///<summary>Objects are added in this step as all gray.  Colors are set in a separate step.</summary>
		public void AddObjectGroup(D3ObjectGroup group) {
			_model3Dgroup=new Model3DGroup();		
			DirectionalLight light=new DirectionalLight(Colors.WhiteSmoke,new Vector3D(-3,-3,-3));
			_model3Dgroup.Children.Add(light);
			DirectionalLight light2=new DirectionalLight(Colors.LightGray,new Vector3D(2.8,-3,-3));
			_model3Dgroup.Children.Add(light2);
			//AmbientLight ambientLight=new AmbientLight(Colors.DarkGray);
			//_model3Dgroup.Children.Add(ambientLight);
			objectNames=new List<string>();
			objectNames.Add("light1");
			objectNames.Add("light2");//to maintain 1:1
			for(int i=0;i<group.D3Objects.Count;i++) {
				MeshGeometry3D meshGeometry3D=new MeshGeometry3D();
				Point3DCollection points=group.D3Objects[i].GenerateVertices();
				meshGeometry3D.Positions=points;
				PointCollection textures=group.D3Objects[i].GenerateTextures();
				meshGeometry3D.TextureCoordinates=textures;
				Vector3DCollection vectors=group.D3Objects[i].GenerateNormals();
				meshGeometry3D.Normals=vectors;
				Int32Collection indices=group.D3Objects[i].GenerateIndices();
				meshGeometry3D.TriangleIndices=indices;
				GeometryModel3D geometryModel3D=new GeometryModel3D();
				geometryModel3D.Geometry=meshGeometry3D;
				//materials
				MaterialGroup materialGroup=new MaterialGroup();
				DiffuseMaterial diffuseMaterial=new DiffuseMaterial();
				if(group.D3Objects[i].TextureMap!=null) {
					ImageBrush imageBrush=new ImageBrush(D3Helper.ConvertImage(group.D3Objects[i].TextureMap));
					imageBrush.ViewportUnits=BrushMappingMode.Absolute;
					ScaleTransform scaleTransform=new ScaleTransform(1,-1);//scale y -1 to flip vertically
					TranslateTransform translateTransform=new TranslateTransform(0,1);//shift up one after flipping
					TransformGroup transformGroup=new TransformGroup();
					transformGroup.Children.Add(scaleTransform);
					transformGroup.Children.Add(translateTransform);
					imageBrush.Transform=transformGroup;
					diffuseMaterial.Brush=imageBrush;
				}
				else if(group.TextureMap!=null && group.D3Objects[i].VertexNormals[0].Texture!=null) {//a group texture is specified and this object uses texture mapping
					ImageBrush imageBrush=new ImageBrush(D3Helper.ConvertImage(group.TextureMap));
					imageBrush.ViewportUnits=BrushMappingMode.Absolute;
					ScaleTransform scaleTransform=new ScaleTransform(1,-1);//scale y -1 to flip vertically
					TranslateTransform translateTransform=new TranslateTransform(0,1);//shift up one after flipping
					TransformGroup transformGroup=new TransformGroup();
					transformGroup.Children.Add(scaleTransform);
					transformGroup.Children.Add(translateTransform);
					imageBrush.Transform=transformGroup;
					diffuseMaterial.Brush=imageBrush;
				}
				else {
					diffuseMaterial.Brush=new SolidColorBrush(Colors.Gray);
					//diffuseMaterial.Color=Colors.Gray;//this didn't work.  Needs brush.
				}
				materialGroup.Children.Add(diffuseMaterial);
				//specular material at 1
				SpecularMaterial specularMaterial=new SpecularMaterial();
				specularMaterial.Brush=new SolidColorBrush(Colors.White);
				specularMaterial.SpecularPower=150;//smaller numbers give more reflection.  150 is minimal specular.
				materialGroup.Children.Add(specularMaterial);
				geometryModel3D.Material=materialGroup;
				_model3Dgroup.Children.Add(geometryModel3D);
				objectNames.Add(group.D3Objects[i].Name);
			}
			ModelVisual3D modelVisual3D=new ModelVisual3D();
			modelVisual3D.Content=_model3Dgroup;
			myViewport.Children.Add(modelVisual3D);
		}
Пример #58
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Window = ((freelqnce.MainWindow)(target));
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     
     #line 13 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_left);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 14 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_right);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 15 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.move_up);
     
     #line default
     #line hidden
     return;
     case 6:
     this.down = ((System.Windows.Controls.Button)(target));
     
     #line 16 "..\..\MainWindow.xaml"
     this.down.Click += new System.Windows.RoutedEventHandler(this.move_down);
     
     #line default
     #line hidden
     return;
     case 7:
     this.viewport = ((System.Windows.Controls.Viewport3D)(target));
     
     #line 19 "..\..\MainWindow.xaml"
     this.viewport.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.MouseHitTest);
     
     #line default
     #line hidden
     return;
     case 8:
     this.camera = ((System.Windows.Media.Media3D.PerspectiveCamera)(target));
     return;
     case 9:
     this.World = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 10:
     this.AmbientLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 11:
     this.AmbientLight = ((System.Windows.Media.Media3D.AmbientLight)(target));
     return;
     case 12:
     this.DirectionalLightContainer = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 13:
     this.DirectionalLight = ((System.Windows.Media.Media3D.DirectionalLight)(target));
     return;
     case 14:
     this.ear_int_pCylinder5 = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 15:
     this.ear_fullmodel_initialShadingGroup1 = ((System.Windows.Media.Media3D.GeometryModel3D)(target));
     return;
     case 16:
     this.model = ((System.Windows.Media.Media3D.ModelVisual3D)(target));
     return;
     case 17:
     this.group = ((System.Windows.Media.Media3D.Model3DGroup)(target));
     return;
     case 18:
     
     #line 1737 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     case 19:
     
     #line 1738 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Zoom_plus);
     
     #line default
     #line hidden
     return;
     case 20:
     
     #line 1740 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_right);
     
     #line default
     #line hidden
     return;
     case 21:
     
     #line 1741 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_left);
     
     #line default
     #line hidden
     return;
     case 22:
     
     #line 1742 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_down);
     
     #line default
     #line hidden
     return;
     case 23:
     
     #line 1743 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Trans_up);
     
     #line default
     #line hidden
     return;
     case 24:
     
     #line 1745 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);
     
     #line default
     #line hidden
     return;
     case 25:
     
     #line 1746 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);
     
     #line default
     #line hidden
     return;
     case 26:
     this.checkcolor1 = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 27:
     this.labelrouge = ((System.Windows.Controls.Label)(target));
     return;
     case 28:
     this.checkcolor2 = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 29:
     this.labelbleu = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #59
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //Initialize the motion proxy using the text in the ipBox
            MotionProxy mp = new MotionProxy(ipBox.Text, 9559);

            //Initialize the text to speech proxy using the text in the ipBox
            ttsp = new TextToSpeechProxy(ipBox.Text, 9559);

            //Initialize the robots posture proxy using the text in the ipBox
            RobotPostureProxy rpp = new RobotPostureProxy(ipBox.Text, 9559);

               //Wakes the robot up, tells the robot to stand and say hello
                mp.wakeUp();
                rpp.goToPosture("StandInit", .5f);
            ttsp.say("Hola");

            //Sets up lighting of the camera with a white color and directs it in the appropriate direction
            DirectionalLight DirLight1 = new DirectionalLight();
            DirLight1.Color = Colors.White;
            DirLight1.Direction = new Vector3D(1, 1, 1);

            //Setting up the camera so that the picture we see is in a good position
            PerspectiveCamera Camera1 = new PerspectiveCamera();
            Camera1.FarPlaneDistance = 16000;
            Camera1.NearPlaneDistance = 10;

            //Zoomed in with a 45 degree field of view
            Camera1.FieldOfView = 45;

            //50 mm away from the point cloud and centered in the middle
            Camera1.Position = new Point3D(320, 240, -50);

            //Flips the camera so that we see everything right side up
            Camera1.LookDirection = new Vector3D(0, 0, 1);
            Camera1.UpDirection = new Vector3D(0, -1, 0);

            //Creates a new model 3D group to hold the sets of 3D models
            Model3DGroup modelGroup = new Model3DGroup();

            //builds the 3D model
            int i = 0;
            for (int y = 0; y < 480; y += pointDen)
            {
                for (int x = 0; x < 640; x += pointDen)
                {
                    points[i] = Triangle(x, y, pointDen);
                    points[i].Transform = new TranslateTransform3D(0, 0, 0);
                    modelGroup.Children.Add(points[i]);
                    i++;
                }
            }

            //Adds the directional light to the model group
            modelGroup.Children.Add(DirLight1);

            ModelVisual3D modelsVisual = new ModelVisual3D();
            modelsVisual.Content = modelGroup;
            Viewport3D myViewport = new Viewport3D();
            myViewport.IsHitTestVisible = false;
            myViewport.Camera = Camera1;
            myViewport.Children.Add(modelsVisual);
            canvas1.Children.Add(myViewport);
            myViewport.Height = canvas1.Height;
            myViewport.Width = canvas1.Width;
            Canvas.SetTop(myViewport, 0);
            Canvas.SetLeft(myViewport, 0);

            sensor = KinectSensor.KinectSensors[0];
            sensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
            sensor.DepthFrameReady += DepthFrameReady;
            sensor.Start();
        }
Пример #60
-1
        private Robot robot; //the robot to display!

        #endregion Fields

        #region Constructors

        public ViewPlatform(Viewport3D viewport, MotorManager motorManager, Robot robot)
        {
            this.robot = robot;
            robot.intialise(viewport);
            this.motorManager = motorManager;
            //Add myself as a listener for the motor manager:
            this.motorManager.addListener(this);
            //Create a focussed camera to watch the origin:
            focussedCamera = new FocussedCamera(200, 0, 0);
            //Create the perspective camera!
            camera = getCamera(focussedCamera.Location, focussedCamera.Direction);
            viewport.Camera = camera;
            //Now to construct the light:
            light = getLight(Colors.White,focussedCamera.Direction);
            ModelVisual3D visual = new ModelVisual3D();
            visual.Content = light;
            viewport.Children.Add(visual);
            ModelVisual3D visual2 = new ModelVisual3D();
            //Now add in the robot too!
            updateMotors();
            outerModel = new Model3DGroup();
            outerModel.Children.Add(robot.getRobot());
            currentMatTransform = (MatrixTransform3D)MatrixTransform3D.Identity;
            TranslateTransform3D trans = new TranslateTransform3D();
            outerModel.Children[0] = Transforms.applyTransform((Model3DGroup)outerModel.Children[0],currentMatTransform);
            visual2.Content = outerModel;
            viewport.Children.Add(visual2);
            //Phew! That should be it...
            viewport.ClipToBounds = true;
        }