Ejemplo n.º 1
0
        //
        // res(L) = CTrans(tr,rt)(this(L))
        public CTrans MakeApplyRt(ref RPoint tr, ref QPoint rt)
        {
            CTrans res = new CTrans(this);

            res.ApplyRt(ref tr, ref rt);
            return(res);
        }
Ejemplo n.º 2
0
        //
        // res(L) = this(B2(L))
        public CTrans MakeSuperpose(CTrans B2)
        {
            CTrans res = new CTrans(B2);

            res.ApplyRt(ref this.m_T, ref this.m_R);
            return(res);
        }
Ejemplo n.º 3
0
 //
 public bool Equals(CTrans ct)
 {
     if (null == ct)
     {
         return(false);
     }
     return(this.T.Equals(ct.T) && this.R.Equals(ct.R));
 }
Ejemplo n.º 4
0
        static public SharpDX.Matrix CTrans2Matrix(CTrans ct)
        {
            Quaternion qRotation = new Quaternion();

            qRotation.X = (float)-ct.R.X; qRotation.Y = (float)ct.R.Y; qRotation.Z = (float)ct.R.Z;
            qRotation.W = (float)-ct.R.R;
            SharpDX.Matrix M = SharpDX.Matrix.RotationQuaternion(qRotation);
            M.M41 = (float)-ct.T.X; M.M42 = (float)ct.T.Y; M.M43 = (float)ct.T.Z;
            return(M);
        }
Ejemplo n.º 5
0
        // res=this'; L=this(res(L))=res(this(L))
        public CTrans MakeInverse()
        {
            QPoint QT = new QPoint(RPoint.Zero - this.T, 0);

            QT.RMul(ref this.m_R);
            QT.LDiv(ref this.m_R);
            CTrans res = new CTrans(QT.PT, this.m_R);

            res.m_R.Conj();
            return(res);
        }
Ejemplo n.º 6
0
 public CTrans(CTrans ct)
 {
     this.m_T = ct.T;
     this.m_R = ct.R;             // no Norm needed here
 }
Ejemplo n.º 7
0
 // B1 = this
 // B1(B2(L)) = B2(res(L)), res(L)=B2'(B1(B2(L)))
 public CTrans MakePullDown(CTrans B2)
 {
     return(B2.MakeRelative(this.MakeSuperpose(B2)));
 }
Ejemplo n.º 8
0
        // B1 = this;
#if false
        // res(L) = B1'(B2(L)), B2(L)=B1(res(L));
        public CTrans MakeRelative(CTrans B2)
        {
            return(this.MakeInverse().MakeSuperpose(B2));
        }