/// <summary> /// Multiplies 2 Euclidean transformations. /// This concatenates the two rigid transformations into a single one, first b is applied, then a. /// Attention: Multiplication is NOT commutative! /// </summary> public static __e2t__ Multiply(__e2t__ a, __e2t__ b) { //a.Rot * b.Rot, a.Trans + a.Rot * b.Trans return(new __e2t__(__r2t__.Multiply(a.Rot, b.Rot), a.Trans + a.Rot.TransformDir(b.Trans))); }
public static M2__s3f__ Multiply(M2__s2f__ m, __e2t__ r) { return(M2__s3f__.Multiply(m, (M2__s3f__)r)); }
public static bool ApproxEqual(__e2t__ r0, __e2t__ r1, __ft__ angleTol, __ft__ posTol) { return(__v2t__.ApproxEqual(r0.Trans, r1.Trans, posTol) && __r2t__.ApproxEqual(r0.Rot, r1.Rot, angleTol)); }
public static bool ApproxEqual(__e2t__ r0, __e2t__ r1) { return(ApproxEqual(r0, r1, Constant <__ft__> .PositiveTinyValue, Constant <__ft__> .PositiveTinyValue)); }
/// <summary> /// Transforms point p (p.w is presumed 1.0) by the inverse of the rigid transformation r. /// </summary> public static __v2t__ InvTransformPos(__e2t__ r, __v2t__ p) { return(r.Rot.InvTransformPos(p - r.Trans)); }
/// <summary> /// Transforms direction vector v (v.w is presumed 0.0) by the inverse of the rigid transformation r. /// Actually, only the rotation is used. /// </summary> public static __v2t__ InvTransformDir(__e2t__ r, __v2t__ v) { return(r.Rot.InvTransformDir(v)); }
/// <summary> /// Transforms point p (p.w is presumed 1.0) by rigid transformation r. /// </summary> public static __v2t__ TransformPos(__e2t__ r, __v2t__ p) { return(r.Rot.TransformPos(p) + r.Trans); }