Exemple #1
0
        /// <summary>
        /// Multiplacation of a <see cref="Scale3d"/> with a <see cref="M34d"/>.
        /// </summary>
        public static M34d Multiply(Scale3d scale, M34d mat)
        {
            return(new M34d(
                       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
                       ));
        }
Exemple #2
0
        /// <summary>
        /// Multiplacation of a <see cref="Shift3d"/> with a <see cref="M34d"/>.
        /// </summary>
        public static M34d Multiply(Shift3d shift, M34d m)
        {
            return(new M34d(
                       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 M34d Multiply(Rot2d rot, M34d mat)
        {
            double a = (double)System.Math.Cos(rot.Angle);
            double b = (double)System.Math.Sin(rot.Angle);

            return(new M34d(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));
        }
Exemple #4
0
 public static M34d Multiply(M33d m, Euclidean3d r)
 {
     return(M34d.Multiply(m, (M34d)r));
 }