예제 #1
0
파일: Form1.cs 프로젝트: Mexahoid/CSF
        public Form1()
        {
            InitializeComponent();
            this.polygons = new polygon[2];

            polygons[0] = new polygon();
            polygons[0].color = Brushes.Green;
            polygons[0].points = new point3d[] { new point3d(400, 100,5), new point3d(460, 100,5), new point3d(460, 120,5), new point3d(400, 120,5) };

            polygons[1] = new polygon();
            polygons[1].color = Brushes.Red;
            polygons[1].points = new point3d[] { new point3d(400, 100,5), new point3d(420, 100,5), new point3d(420, 200,5), new point3d(400, 200,5) };
        }
예제 #2
0
파일: Form1.cs 프로젝트: Mexahoid/CSF
        public Form1()
        {
            InitializeComponent();
              this.MouseWheel += new MouseEventHandler(this_MouseWheel);
              InitializeComponent();
              this.tp = new polygon[1];
              this.trn = new polygon[1];
              InitializeComponent();
              this.polygons = new polygon[20];
              //Вертикальная палка спереди слева
              polygons[0] = new polygon();
              polygons[0].color = Brushes.Gray;
              polygons[0].points = new point3d[] { new point3d(300, 150, 0), new point3d(320, 150, 0), new point3d(320, 250, 0), new point3d(300, 250, 0) };

              //Вертикальная палка спереди справа
              polygons[1] = new polygon();
              polygons[1].color = Brushes.Gray;
              polygons[1].points = new point3d[] { new point3d(440, 150, 0), new point3d(460, 150, 0), new point3d(460, 250, 0), new point3d(440, 250, 0) };

              //Наклонная палка спереди слева
              polygons[2] = new polygon();
              polygons[2].color = Brushes.Gray;
              polygons[2].points = new point3d[] { new point3d(320, 150, 0), new point3d(380, 200, 0), new point3d(380, 220, 0), new point3d(320, 170, 0) };

              //Наклонная палка спереди справа
              polygons[3] = new polygon();
              polygons[3].color = Brushes.Gray;
              polygons[3].points = new point3d[] { new point3d(440, 150, 0), new point3d(380, 200, 0), new point3d(380, 220, 0), new point3d(440, 170, 0) };

              //Вертикальная палка слева сбоку
              polygons[4] = new polygon();
              polygons[4].color = Brushes.Brown;
              polygons[4].points = new point3d[] { new point3d(300, 150, 0), new point3d(300, 150, -20), new point3d(300, 250, -20), new point3d(300, 250, 0) };
              trn[0] = polygons[1];

              //Вертикальная палка слева сбоку
              polygons[5] = new polygon();
              polygons[5].color = Brushes.Brown;
              polygons[5].points = new point3d[] { new point3d(320, 150, 0), new point3d(320, 150, -20), new point3d(320, 250, -20), new point3d(320, 250, 0) };
              trn[0] = polygons[1];

              //Вертикальная палка справа сбоку
              polygons[6] = new polygon();
              polygons[6].color = Brushes.Brown;
              polygons[6].points = new point3d[] { new point3d(440, 150, 0), new point3d(440, 150, -20), new point3d(440, 250, -20), new point3d(440, 250, 0) };
              trn[0] = polygons[1];

              //Вертикальная палка справа сбоку
              polygons[7] = new polygon();
              polygons[7].color = Brushes.Brown;
              polygons[7].points = new point3d[] { new point3d(460, 150, 0), new point3d(460, 150, -20), new point3d(460, 250, -20), new point3d(460, 250, 0) };
              trn[0] = polygons[1];

              //Вертикальная палка сзади
              polygons[8] = new polygon();
              polygons[8].color = Brushes.Red;
              polygons[8].points = new point3d[] { new point3d(300, 150, -20), new point3d(320, 150, -20), new point3d(320, 250, -20), new point3d(300, 250, -20) };

              //Вертикальная палка сзади
              polygons[9] = new polygon();
              polygons[9].color = Brushes.Red;
              polygons[9].points = new point3d[] { new point3d(440, 150, -20), new point3d(460, 150, -20), new point3d(460, 250, -20), new point3d(440, 250, -20) };

              //Наклонная палка спереди слева
              polygons[10] = new polygon();
              polygons[10].color = Brushes.Red;
              polygons[10].points = new point3d[] { new point3d(320, 150, -20), new point3d(380, 200, -20), new point3d(380, 220, -20), new point3d(320, 170, -20) };

              //Наклонная палка спереди справа
              polygons[11] = new polygon();
              polygons[11].color = Brushes.Red;
              polygons[11].points = new point3d[] { new point3d(440, 150, -20), new point3d(380, 200, -20), new point3d(380, 220, -20), new point3d(440, 170, -20) };

              // Горизонт. шапка сверху
              polygons[12] = new polygon();
              polygons[12].color = Brushes.Pink;
              polygons[12].points = new point3d[] { new point3d(300, 150, -20), new point3d(320, 150, -20), new point3d(320, 150, 0), new point3d(300, 150, 0) };

              // Горизонт. шапка сверху
              polygons[13] = new polygon();
              polygons[13].color = Brushes.Pink;
              polygons[13].points = new point3d[] { new point3d(440, 150, -20), new point3d(460, 150, -20), new point3d(460, 150, 0), new point3d(440, 150, 0) };

              //Нижняя часть
              polygons[14] = new polygon();
              polygons[14].color = Brushes.Blue;
              polygons[14].points = new point3d[] { new point3d(300, 250, 0), new point3d(300, 250, -20), new point3d(320, 250, -20), new point3d(320, 250, 0) };

              //Нижняя часть
              polygons[15] = new polygon();
              polygons[15].color = Brushes.Blue;
              polygons[15].points = new point3d[] { new point3d(460, 250, 0), new point3d(460, 250, -20), new point3d(440, 250, -20), new point3d(440, 250, 0) };

              // Наклон сверху
              polygons[16] = new polygon();
              polygons[16].color = Brushes.Pink;
              polygons[16].points = new point3d[] { new point3d(320, 150, -20), new point3d(380, 200, -20), new point3d(380, 200, 0), new point3d(320, 150, 0) };

              // Наклон сверху
              polygons[17] = new polygon();
              polygons[17].color = Brushes.Pink;
              polygons[17].points = new point3d[] { new point3d(440, 150, -20), new point3d(380, 200, -20), new point3d(380, 200, 0), new point3d(440, 150, 0) };

              // Наклон снизу
              polygons[18] = new polygon();
              polygons[18].color = Brushes.Blue;
              polygons[18].points = new point3d[] { new point3d(320, 170, -20), new point3d(380, 220, -20), new point3d(380, 220, 0), new point3d(320, 170, 0) };

              // Наклон снизу
              polygons[18] = new polygon();
              polygons[18].color = Brushes.Blue;
              polygons[18].points = new point3d[] { new point3d(320, 170, -20), new point3d(380, 220, -20), new point3d(380, 220, 0), new point3d(320, 170, 0) };

              // Наклон снизу
              polygons[19] = new polygon();
              polygons[19].color = Brushes.Blue;
              polygons[19].points = new point3d[] { new point3d(440, 170, -20), new point3d(380, 220, -20), new point3d(380, 220, 0), new point3d(440, 170, 0) };

              trn[0] = polygons[1];

              for (int i = 0; i < 20; i++)
            polygons[i].oldpoints = new oldpoint3d[4] { new oldpoint3d(0, 0, 0), new oldpoint3d(0, 0, 0), new oldpoint3d(0, 0, 0), new oldpoint3d(0, 0, 0) };
        }