Beispiel #1
0
        /// <summary>
        /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="M34f"/>.
        /// </summary>
        public static M34f Multiply(Scale3f scale, M34f mat)
        {
            return(new M34f(
                       scale.X * mat.M00,
                       scale.X * mat.M01,
                       scale.X * mat.M02,
                       scale.X * mat.M03,

                       scale.Y * mat.M10,
                       scale.Y * mat.M11,
                       scale.Y * mat.M12,
                       scale.Y * mat.M13,

                       scale.Z * mat.M20,
                       scale.Z * mat.M21,
                       scale.Z * mat.M22,
                       scale.Z * mat.M23
                       ));
        }
Beispiel #2
0
        /// <summary>
        /// Multiplacation of a <see cref="Shift3f"/> with a <see cref="M34f"/>.
        /// </summary>
        public static M34f Multiply(Shift3f shift, M34f m)
        {
            return(new M34f(
                       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
                       ));
        }
        public static M34f Multiply(Rot2f rot, M34f mat)
        {
            float a = (float)System.Math.Cos(rot.Angle);
            float b = (float)System.Math.Sin(rot.Angle);

            return(new M34f(a * mat.M00 +
                            b * mat.M10,

                            a * mat.M01 +
                            b * mat.M11,

                            a * mat.M02 +
                            b * mat.M12,

                            a * mat.M03 +
                            b * mat.M13,

                            -b * mat.M00 +
                            a * mat.M10,

                            -b * mat.M01 +
                            a * mat.M11,

                            -b * mat.M02 +
                            a * mat.M12,

                            -b * mat.M03 +
                            a * mat.M13,

                            mat.M20,

                            mat.M21,

                            mat.M22,

                            mat.M23));
        }
Beispiel #4
0
 public static M34f Multiply(M33f m, Euclidean3f r)
 {
     return(M34f.Multiply(m, (M34f)r));
 }