コード例 #1
0
ファイル: CG2.cs プロジェクト: AleynikovSergey/3dPoint
 public Input()
 {
     for (int i = 0; i < count; ++i)
     {
         _points3D[i] = new Point4d();
     }
 }
コード例 #2
0
ファイル: CG2.cs プロジェクト: AleynikovSergey/3dPoint
        public void InpPoints(int x1, int y1, int z1, int x2, int y2, int z2, int width)
        {
            xt = x1;
            yt = y1;
            zt = z1;
            xc = x2;
            yc = y2;
            zc = z2;

            double length = width / 2 - 10;

            _points3D[0]  = new Point4d(0, 0, 0);       //начало кординат
            _points3D[1]  = new Point4d(length, 0, 0);  //конец оси Х
            _points3D[2]  = new Point4d(-length, 0, 0); //начало оси Х
            _points3D[3]  = new Point4d(0, length, 0);  //конец оси Y
            _points3D[4]  = new Point4d(0, -length, 0); //начало оси Y
            _points3D[5]  = new Point4d(0, 0, length);  //конец оси Z
            _points3D[6]  = new Point4d(0, 0, -length); //начало оси Z
            _points3D[7]  = new Point4d(x1, y1, z1);
            _points3D[8]  = new Point4d(x1, 0, 0);      //проекция точки на ось X
            _points3D[9]  = new Point4d(0, y1, 0);      //проекция точки на ось Y
            _points3D[10] = new Point4d(0, 0, z1);      //проекция точки на ось Z
            _points3D[11] = new Point4d(x1, y1, 0);     // T1
            _points3D[12] = new Point4d(x1, 0, z1);     // T2
            _points3D[13] = new Point4d(0, y1, z1);     // T3

            _points3C[7]  = new Point4d(x2, y2, z2);
            _points3C[8]  = new Point4d(x2, 0, 0);  //проекция точки на ось X
            _points3C[9]  = new Point4d(0, y2, 0);  //проекция точки на ось Y
            _points3C[10] = new Point4d(0, 0, z2);  //проекция точки на ось Z
            _points3C[11] = new Point4d(x2, y2, 0); // T1
            _points3C[12] = new Point4d(x2, 0, z2); // T2
            _points3C[13] = new Point4d(0, y2, z2); // T3
        }
コード例 #3
0
ファイル: CG2.cs プロジェクト: AleynikovSergey/3dPoint
 private Point Convert3(Point4d p)
 {
     return(new Point((int)(-p.X + x0), (int)(-p.Z + y0)));
 }