Example #1
0
        internal void RefreshPictureBox(Point3DF LocationCam, Point3DF VzgladCam, List <Object> Wolrd)
        {
            List <Object>       WorldCam         = new List <Object>();
            List <Object>       WorldHide        = new List <Object>();
            List <List <Line> > WorldConvertTo2D = new List <List <Line> >();

            g.Clear(Color.White);
            //List<Object> Corworld = ConvertCoordinate.CorectObj(World);
            for (int i = 0; i < Wolrd.Count; i++)
            {
                WorldCam.Add(ConvertCoordinate.ConvertWorldtoCam(VzgladCam, LocationCam, World[i]));
            }
            //List<Object> CorworldCam = ConvertCoordinate.CorectObj(WorldCam);
            List <Line> lines   = HideLineCusk.CuskLineHide(WorldCam);
            List <Line> lines2D = ConvertCoordinate.Camto2D(lines, 5);

            drawing(lines2D, mash);/*
                                    * for (int i = 0; i < Wolrd.Count; i++)
                                    * WorldHide.Add(ConvertCoordinate.ObjectHideLine(WorldCam[i], WorldCam));
                                    * for (int i = 0; i < Wolrd.Count; i++)
                                    * WorldConvertTo2D.Add(ConvertCoordinate.Camto2D(WorldHide[i], 5));
                                    * for (int i = 0; i < Wolrd.Count; i++)
                                    * drawing(WorldConvertTo2D[i], mash);*/
            pictureBox1.Image = DrawArea;
        }
Example #2
0
        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            List <Object> WorldCam = new List <Object>();

            for (int i = 0; i < World.Count; i++)
            {
                WorldCam.Add(ConvertCoordinate.ConvertWorldtoCam(VzgladCam, LocationCam, World[i]));
            }
            Object SunO = new Object();

            SunO.Points.Add(Sun);
            Object     SunOC   = ConvertCoordinate.ConvertWorldtoCam(VzgladCam, LocationCam, SunO);
            TrasirLuch TRrLuch = new TrasirLuch(WorldCam, SunOC.Points[0], ColSun, focus, mash, pictureBox1.Width, pictureBox1.Height);

            TRrLuch.Luch(e.X, e.Y);
        }
Example #3
0
        private void закраситьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <Object> WorldCam = new List <Object>();

            for (int i = 0; i < World.Count; i++)
            {
                WorldCam.Add(ConvertCoordinate.ConvertWorldtoCam(VzgladCam, LocationCam, World[i]));
            }
            Object SunO = new Object();

            SunO.Points.Add(Sun);
            Object     SunOC   = ConvertCoordinate.ConvertWorldtoCam(VzgladCam, LocationCam, SunO);
            TrasirLuch TRrLuch = new TrasirLuch(WorldCam, SunOC.Points[0], ColSun, focus, mash, pictureBox1.Width, pictureBox1.Height);

            TRrLuch.ImageBDraw(35);
            pictureBox1.Image = TRrLuch.GetBitmap();
        }