Beispiel #1
0
 /// <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));
 }
Beispiel #2
0
 /// <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));
 }
Beispiel #3
0
 /// <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;
 }
Beispiel #4
0
 /// <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);
 }
Beispiel #5
0
 /// <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);
 }
Beispiel #6
0
 /// <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);
 }
Beispiel #7
0
 /// <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);
 }