Example #1
0
 /// <summary>
 /// Applies the inverse of this rotation to the given rotation.
 /// </summary>
 /// <param name="other"></param>
 public Rotation2d ApplyInverse(Rotation2d other)
 {
     other._x = ApplyInverse(other._x);
     return(other);
 }
Example #2
0
 /// <summary>
 /// Creates a relative rotation from t0 to t1.
 /// </summary>
 /// <param name="r0"></param>
 /// <param name="r1"></param>
 /// <returns></returns>
 public static Rotation2d CreateRelative(Rotation2d r0, Rotation2d r1)
 {
     return(r1.Apply(r0.Inverse));
 }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="r0"></param>
 /// <param name="r1"></param>
 /// <returns></returns>
 public static Rotation2d Multiply(Rotation2d r0, Rotation2d r1)
 {
     return(r0.Apply(r1));
 }
Example #4
0
 /// <summary>
 /// Applies this rotation to the given rotation.
 /// </summary>
 /// <param name="other"></param>
 public Rotation2d Apply(Rotation2d other)
 {
     other._x = Apply(other._x);
     return(other);
 }
Example #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="rotation"></param>
 /// <param name="vector"></param>
 public static Vec2d Multiply(Rotation2d rotation, Vec2d vector)
 {
     return(rotation.Apply(vector));
 }
Example #6
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;
 }
Example #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="scale"></param>
 /// <param name="rotation"></param>
 /// <param name="translation"></param>
 public Transform2d(Vec2d scale, Rotation2d rotation, Vec2d translation)
 {
     Scale       = scale;
     Rotation    = rotation;
     Translation = translation;
 }
Example #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="origin"></param>
 /// <param name="x"></param>
 public Orient2d(Vec2d origin, Vec2d x)
 {
     Rotation    = new Rotation2d(x);
     Translation = origin;
 }
Example #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="rotation"></param>
 /// <param name="translation"></param>
 public Orient2d(Rotation2d rotation, Vec2d translation)
 {
     Rotation    = rotation;
     Translation = translation;
 }