/// <summary> /// /// </summary> /// <param name="other"></param> /// <param name="tolerance"></param> /// <returns></returns> public bool ApproxEquals(ref Transform3d other, double tolerance = zMath.ZeroTolerance) { return (Translation.ApproxEquals(other.Translation, tolerance) && Rotation.ApproxEquals(ref other.Rotation, tolerance) && Scale.ApproxEquals(other.Scale, tolerance)); }
/// <summary> /// Creates relative transformation from t0 to t1. /// </summary> /// <param name="from"></param> /// <param name="to"></param> /// <returns></returns> public static Transform3d CreateFromTo(ref Transform3d from, ref Transform3d to) { return(to.Apply(from.Inverse)); }
/// <summary> /// Applies the inverse of this transformation to the given transformation. /// </summary> /// <param name="other"></param> public void ApplyInverse(ref Transform3d other, ref Transform3d result) { Rotation.ApplyInverse(ref other.Rotation, ref result.Rotation); result.Translation = ApplyInverse(other.Translation); result.Scale = other.Scale / Scale; }
/// <summary> /// Applies the inverse of this transformation to the given transformation in place. /// </summary> /// <param name="other"></param> public void ApplyInverse(ref Transform3d other) { ApplyInverse(ref other, ref other); }
/// <summary> /// Applies the inverse of this transformation to the given transformation. /// </summary> /// <param name="other"></param> public Transform3d ApplyInverse(Transform3d other) { ApplyInverse(ref other, ref other); return(other); }
/// <summary> /// Applies this transformation to the given transformation in place. /// </summary> /// <param name="other"></param> public void Apply(ref Transform3d other) { Apply(ref other, ref other); }
/// <summary> /// Applies this transformation to the given transformation. /// </summary> /// <param name="other"></param> public Transform3d Apply(Transform3d other) { Apply(ref other, ref other); return(other); }