Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <param name="epsilon"></param>
 /// <returns></returns>
 public bool ApproxEquals(ref Transform3d other, double epsilon = D.ZeroTolerance)
 {
     return
         (Translation.ApproxEquals(other.Translation, epsilon) &&
          Rotation.ApproxEquals(ref other.Rotation, epsilon) &&
          Scale.ApproxEquals(other.Scale, epsilon));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Applies the inverse of this transformation to the given transformation in place.
 /// </summary>
 /// <param name="other"></param>
 public Transform3d ApplyInverse(ref Transform3d other)
 {
     return(new Transform3d
     {
         Rotation = Rotation.ApplyInverse(ref other.Rotation),
         Translation = ApplyInverse(other.Translation),
         Scale = other.Scale / Scale
     });
 }
Ejemplo n.º 3
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)
        {
            var inv = from.Inverse;

            return(to.Apply(ref inv));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates relative transformation from t0 to t1.
 /// </summary>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 public static Transform3d CreateFromTo(Transform3d from, Transform3d to)
 {
     return(CreateFromTo(ref from, ref to));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <param name="epsilon"></param>
 /// <returns></returns>
 public bool ApproxEquals(Transform3d other, double epsilon = D.ZeroTolerance)
 {
     return(ApproxEquals(ref other, epsilon));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Applies the inverse of this transformation to the given transformation in place.
 /// </summary>
 /// <param name="other"></param>
 public Transform3d ApplyInverse(Transform3d other)
 {
     return(ApplyInverse(ref other));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Applies this transformation to the given transformation in place.
 /// </summary>
 /// <param name="other"></param>
 public Transform3d Apply(Transform3d other)
 {
     return(Apply(ref other));
 }