// // 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); }
// // 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); }
// public bool Equals(CTrans ct) { if (null == ct) { return(false); } return(this.T.Equals(ct.T) && this.R.Equals(ct.R)); }
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); }
// 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); }
public CTrans(CTrans ct) { this.m_T = ct.T; this.m_R = ct.R; // no Norm needed here }
// 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))); }
// B1 = this; #if false // res(L) = B1'(B2(L)), B2(L)=B1(res(L)); public CTrans MakeRelative(CTrans B2) { return(this.MakeInverse().MakeSuperpose(B2)); }