Esempio n. 1
0
        public void CreateUpDownCameraCoor(double[] ux, double[] uy, double[] dx, double[] dy)
        {
            try
            {
                if (ux.Length != uy.Length || ux.Length != dx.Length || ux.Length != dy.Length || ux.Length == 0)
                {
                    return;
                }
                HTuple Hom2D;
                HOperatorSet.VectorToHomMat2d(ux, uy, dx, dy, out Hom2D);
                m_Hom2Dutd = Hom2D.Clone();
                HOperatorSet.VectorToHomMat2d(dx, dy, ux, uy, out Hom2D);
                m_Hom2Ddtu = Hom2D.Clone();

                HTuple qx, qy;
                HTuple qx1, qy1;
                HOperatorSet.AffineTransPoint2d(m_Hom2Ddtu, dx[0], dy[0], out qx, out qy);
                HOperatorSet.AffineTransPoint2d(m_Hom2Dutd, qx, qy, out qx1, out qy1);
            }
            catch (Exception e)
            {
                String S = e.Message;
            }

            return;
        }
Esempio n. 2
0
        public void CreateDownRobotCoor(double[] dx, double[] dy, double[] rx, double[] ry)
        {
            if (rx.Length != ry.Length || dx.Length != dy.Length || rx.Length != dx.Length || rx.Length == 0)
            {
                return;
            }
            HTuple Hom2D;
            HTuple Hom2D1;

            HOperatorSet.VectorToHomMat2d(dx, dy, rx, ry, out Hom2D);
            m_Hom2Ddtr = Hom2D.Clone();
            HOperatorSet.VectorToHomMat2d(rx, ry, dx, dy, out Hom2D1);
            m_Hom2Drtd = Hom2D1.Clone();
            HTuple qx, qy;
            HTuple qx1, qy1;

            HOperatorSet.AffineTransPoint2d(m_Hom2Ddtr, dx[0], dy[0], out qx, out qy);
            HOperatorSet.AffineTransPoint2d(m_Hom2Drtd, qx, qy, out qx1, out qy1);
            return;
        }
Esempio n. 3
0
 public void CreateURCoor(double[] ux, double[] uy, double[] rx, double[] ry)
 {
     try
     {
         if (ux.Length != uy.Length || ux.Length != rx.Length || ux.Length != ry.Length || ux.Length == 0)
         {
             return;
         }
         HTuple Hom2D;
         HOperatorSet.VectorToHomMat2d(ux, uy, rx, ry, out Hom2D);
         m_Hom2Dutr = Hom2D.Clone();
         HOperatorSet.VectorToHomMat2d(rx, ry, ux, uy, out Hom2D);
         m_Hom2Drtu = Hom2D.Clone();
         HTuple qx, qy;
         HTuple qx1, qy1;
         HOperatorSet.AffineTransPoint2d(m_Hom2Dutr, ux[0], uy[0], out qx, out qy);
         HOperatorSet.AffineTransPoint2d(m_Hom2Drtu, qx, qy, out qx1, out qy1);
     }
     catch (Exception e)
     {
         String S = e.Message;
     }
 }