Exemple #1
0
        /// <summary>
        /// Multiplacation of a <see cref="M4__x4t__"/> with a <see cref="Shift__x3t__"/>.
        /// </summary>
        public static M4__x4t__ Multiply(M4__x4t__ matrix, Shift__x3t__ shift)
        {
            return(new M4__x4t__(
                       matrix.M00,
                       matrix.M01,
                       matrix.M02,
                       matrix.M00 * shift.X +
                       matrix.M01 * shift.Y +
                       matrix.M02 * shift.Z +
                       matrix.M03,

                       matrix.M10,
                       matrix.M11,
                       matrix.M12,
                       matrix.M10 * shift.X +
                       matrix.M11 * shift.Y +
                       matrix.M12 * shift.Z +
                       matrix.M13,

                       matrix.M20,
                       matrix.M21,
                       matrix.M22,
                       matrix.M20 * shift.X +
                       matrix.M21 * shift.Y +
                       matrix.M22 * shift.Z +
                       matrix.M23,

                       matrix.M30,
                       matrix.M31,
                       matrix.M32,
                       matrix.M33
                       ));
        }
 /// <summary>
 /// Creates new Identity <see cref="M4__x4t__"/> with a <see cref="Shift__x3t__"/> for translation.
 /// </summary>
 /// <param name="shift"></param>
 /// <returns>A <see cref="M4__x4t__"/> translation matrix.</returns>
 public static M4__x4t__ Translation(Shift__x3t__ shift)
 {
     return(new M4__x4t__(1, 0, 0, shift.X,
                          0, 1, 0, shift.Y,
                          0, 0, 1, shift.Z,
                          0, 0, 0, 1));
 }
 public static M3__x4t__ Multiply(M3__x3t__ m, Shift__x3t__ t)
 {
     return(new M3__x4t__(
                m.M00, m.M01, m.M02, m.M00 * t.X + m.M01 * t.Y + m.M02 * t.Z,
                m.M10, m.M11, m.M12, m.M10 * t.X + m.M11 * t.Y + m.M12 * t.Z,
                m.M20, m.M21, m.M22, m.M20 * t.X + m.M21 * t.Y + m.M22 * t.Z
                ));
 }
Exemple #4
0
 public override bool Equals(object obj)
 {
     if (obj is Shift__x3t__)
     {
         Shift__x3t__ shift = (Shift__x3t__)obj;
         return(V.X == shift.X && V.Y == shift.Y && V.Z == shift.Z);
     }
     return(false);
 }
Exemple #5
0
        /// <summary>
        /// Multiplacation of a <see cref="Shift__x3t__"/> with a <see cref="M3__x4t__"/>.
        /// </summary>
        public static M3__x4t__ Multiply(Shift__x3t__ shift, M3__x4t__ m)
        {
            return(new M3__x4t__(
                       m.M00,
                       m.M01,
                       m.M02,
                       m.M03 + shift.X,

                       m.M10,
                       m.M11,
                       m.M12,
                       m.M13 + shift.Y,

                       m.M20,
                       m.M21,
                       m.M22,
                       m.M23 + shift.Z
                       ));
        }
Exemple #6
0
        public static M3__x4t__ Multiply(M2__x2t__ matrix, Shift__x3t__ shift)
        {
            return(new M3__x4t__(matrix.M00,
                                 matrix.M01,
                                 0,
                                 matrix.M00 * shift.X +
                                 matrix.M01 * shift.Y,

                                 matrix.M10,
                                 matrix.M11,
                                 0,
                                 matrix.M10 * shift.X +
                                 matrix.M11 * shift.Y,

                                 0,
                                 0,
                                 1,
                                 shift.Z));
        }
Exemple #7
0
        /// <summary>
        /// Multiplacation of a <see cref="Scale__x3t__"/> with a <see cref="Shift__x3t__"/>.
        /// </summary>
        public static M3__x4t__ Multiply(Scale__x3t__ scale, Shift__x3t__ shift)
        {
            return(new M3__x4t__(
                       scale.X,
                       0,
                       0,
                       scale.X * shift.X,

                       0,
                       scale.Y,
                       0,
                       scale.Y * shift.Y,

                       0,
                       0,
                       scale.Z,
                       scale.Z * shift.Z

                       ));
        }
Exemple #8
0
        /// <summary>
        /// Multiplacation of a <see cref="Shift__x3t__"/> with a <see cref="M4__x4t__"/>.
        /// </summary>
        public static M4__x4t__ Multiply(Shift__x3t__ shift, M4__x4t__ m)
        {
            return(new M4__x4t__(
                       m.M00 + shift.X * m.M30,
                       m.M01 + shift.X * m.M31,
                       m.M02 + shift.X * m.M32,
                       m.M03 + shift.X * m.M33,

                       m.M10 + shift.Y * m.M30,
                       m.M11 + shift.Y * m.M31,
                       m.M12 + shift.Y * m.M32,
                       m.M13 + shift.Y * m.M33,

                       m.M20 + shift.Z * m.M30,
                       m.M21 + shift.Z * m.M31,
                       m.M22 + shift.Z * m.M32,
                       m.M23 + shift.Z * m.M33,

                       m.M30,
                       m.M31,
                       m.M32,
                       m.M33
                       ));
        }
Exemple #9
0
 /// <summary>
 /// Calculates the multiplacation of a <see cref="Shift__x3t__"/> with a __ft__ scalar.
 /// </summary>
 public static Shift__x3t__ operator *(__ft__ value, Shift__x3t__ shift)
 {
     return(Shift__x3t__.Multiply(shift, value));
 }
Exemple #10
0
 /// <summary>
 /// Multiplication of two <see cref="Shift__x3t__"/>s.
 /// </summary>
 public static Shift__x3t__ Multiply(Shift__x3t__ shift0, Shift__x3t__ shift1)
 {
     return(new Shift__x3t__(shift0.X + shift1.X,
                             shift0.Y + shift1.Y,
                             shift0.Z + shift1.Z));
 }
Exemple #11
0
 /// <summary>
 /// Division of a <see cref="Shift__x3t__"/> instance with a __ft__ scalar.
 /// </summary>
 public static Shift__x3t__ Divide(Shift__x3t__ shift, __ft__ val)
 {
     return(Multiply(shift, 1 / val));
 }
Exemple #12
0
 /// <summary>
 /// Calculates the division of a __ft__ scalar with a <see cref="Shift__x3t__"/>.
 /// </summary>
 public static Shift__x3t__ operator /(__ft__ val, Shift__x3t__ shift)
 {
     return(Shift__x3t__.Divide(val, shift));
 }
Exemple #13
0
 /// <summary>
 /// Division of a __ft__ scalar with a <see cref="Shift__x3t__"/>.
 /// </summary>
 public static Shift__x3t__ Divide(__ft__ value, Shift__x3t__ shift)
 {
     return(Multiply(Reciprocal(shift), value));
 }
Exemple #14
0
 /// <summary>
 /// Calculates the multiplacation of a <see cref="Shift__x3t__"/> with a <see cref="M3__x4t__"/>.
 /// </summary>
 public static M3__x4t__ operator *(Shift__x3t__ shift, M3__x4t__ mat)
 {
     return(Shift__x3t__.Multiply(shift, mat));
 }
Exemple #15
0
 /// <summary>
 /// Calculates the division of a <see cref="Shift__x3t__"/> with a __ft__ scalar.
 /// </summary>
 public static Shift__x3t__ operator /(Shift__x3t__ shift, __ft__ val)
 {
     return(Shift__x3t__.Divide(shift, val));
 }
Exemple #16
0
 /// <summary>
 /// Calculates the multiplacation of a <see cref="Shift__x3t__"/> with a <see cref="Shift__x3t__"/>.
 /// </summary>
 public static Shift__x3t__ operator *(Shift__x3t__ shift0, Shift__x3t__ shift1)
 {
     return(Shift__x3t__.Multiply(shift0, shift1));
 }
Exemple #17
0
 /// <summary>
 /// Calculates the multiplacation of a <see cref="Shift__x3t__"/> with a <see cref="Scale__x3t__"/>.
 /// </summary>
 public static M3__x4t__ operator *(Shift__x3t__ shift, Scale__x3t__ scale)
 {
     return(Shift__x3t__.Multiply(shift, scale));
 }
Exemple #18
0
        //different calculations for shift vectors

        /// <summary>
        /// Multiplacation of a float scalar with a <see cref="Shift__x3t__"/>.
        /// </summary>
        public static Shift__x3t__ Multiply(Shift__x3t__ shift, __ft__ value)
        {
            return(new Shift__x3t__(shift.X * value,
                                    shift.Y * value,
                                    shift.Z * value));
        }
Exemple #19
0
 /// <summary>
 /// </summary>
 public static M3__x4t__ operator *(Shift__x3t__ shift, Rot__x3t__ rot)
 {
     return(Shift__x3t__.Multiply(shift, (M3__x4t__)rot));
 }
Exemple #20
0
 /// <summary>
 /// Negates the values of a <see cref="Shift__x3t__"/> instance.
 /// </summary>
 public static Shift__x3t__ operator -(Shift__x3t__ shift)
 {
     return(Shift__x3t__.Negate(shift));
 }
Exemple #21
0
 /// <summary>
 /// Calculates the reciprocal of a <see cref="Shift__x3t__"/>.
 /// </summary>
 public static Shift__x3t__ Reciprocal(Shift__x3t__ shift)
 {
     return(new Shift__x3t__(1 / shift.X, 1 / shift.Y, 1 / shift.Z));
 }
Exemple #22
0
 /// <summary>
 /// Negates all values of a <see cref="Shift__x3t__"/>.
 /// </summary>
 public static Shift__x3t__ Negate(Shift__x3t__ shift)
 {
     return(new Shift__x3t__(-shift.X, -shift.Y, -shift.Z));
 }