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