コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="shear"></param>
        /// <returns></returns>
        public static TransformMatrix2d HorizontalShearingTransform(Double shear)
        {
            TransformMatrix2d result = (TransformMatrix2d)DoubleMatrix.Identity(2);

            result[1, 0] = shear;
            return(result);
        }
コード例 #2
0
 public static Double FittingError(
     Point2dCollection sourcePoints,
     Point2dCollection targetPoints,
     TransformMatrix2d transform)
 {
     return(0);
 }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="shear"></param>
        /// <returns></returns>
        public static TransformMatrix2d VerticalShearingTransform(Double shear)
        {
            TransformMatrix2d result = (TransformMatrix2d)DoubleMatrix.Identity(2);

            result[0, 1] = shear;
            return(result);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="scale"></param>
        /// <returns></returns>
        public static TransformMatrix2d ScalingTransform(Double scale)
        {
            TransformMatrix2d result = new TransformMatrix2d();

            result[0, 0] = scale;
            result[1, 1] = scale;
            return(result);
        }
コード例 #5
0
        /*************************/
        /* PUBLIC STATIC METHODS */
        /*************************/

        /// <summary>
        ///
        /// </summary>
        /// <param name="angle">Counterclockwise rotation angle in radians</param>
        /// <returns></returns>
        public static TransformMatrix2d RotationTransform(Double angleRadians)
        {
            TransformMatrix2d result = new TransformMatrix2d();

            result[0, 0] = Math.Cos(angleRadians);
            result[1, 0] = -Math.Sin(angleRadians);
            result[0, 1] = Math.Sin(angleRadians);
            result[1, 1] = Math.Cos(angleRadians);
            return(result);
        }