예제 #1
0
 /// <summary>
 /// Applies the inverse of this transformation to the given transformation.
 /// </summary>
 /// <param name="other"></param>
 public Transform2d ApplyInverse(Transform2d other)
 {
     other.Rotation    = Rotation.ApplyInverse(other.Rotation);
     other.Translation = ApplyInverse(other.Translation);
     other.Scale      /= Scale;
     return(other);
 }
예제 #2
0
 /// <summary>
 /// Applies this transformation to the given transformation.
 /// </summary>
 /// <param name="other"></param>
 public Transform2d Apply(Transform2d other)
 {
     other.Rotation    = Rotation.Apply(other.Rotation);
     other.Translation = Apply(other.Translation);
     other.Scale      *= Scale;
     return(other);
 }
예제 #3
0
 /// <summary>
 /// Creates a relative transformation from t0 to t1.
 /// </summary>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 public static Transform2d CreateFromTo(Transform2d from, Transform2d to)
 {
     return(to.Apply(from.Inverse));
 }
예제 #4
0
 /// <summary>
 /// Creates a relative transformation from t0 to t1.
 /// </summary>
 /// <param name="t0"></param>
 /// <param name="t1"></param>
 /// <returns></returns>
 public static Transform2d CreateRelative(Transform2d t0, Transform2d t1)
 {
     return(t1.Apply(t0.Inverse));
 }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="t0"></param>
 /// <param name="t1"></param>
 public static Transform2d Multiply(Transform2d t0, Transform2d t1)
 {
     return(t0.Apply(t1));
 }
예제 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="transform"></param>
 /// <param name="point"></param>
 /// <returns></returns>
 public static Vec2d Multiply(Transform2d transform, Vec2d point)
 {
     return(transform.Apply(point));
 }