예제 #1
0
            //-------------------------------------------------------//
            public static clMatrix3x2 MatrixMult(clMatrix3x2 A, clMatrix3x2 B)
            {
                clMatrix3x2 C = new clMatrix3x2();

                C.m.m11 = A.m.m11 * B.m.m11 + A.m.m12 * B.m.m21 + A.m.m13 * 0;
                C.m.m12 = A.m.m11 * B.m.m12 + A.m.m12 * B.m.m22 + A.m.m13 * 0;
                C.m.m13 = A.m.m11 * B.m.m13 + A.m.m12 * B.m.m23 + A.m.m13 * 1;

                C.m.m21 = A.m.m21 * B.m.m11 + A.m.m22 * B.m.m21 + A.m.m23 * 0;
                C.m.m22 = A.m.m21 * B.m.m12 + A.m.m22 * B.m.m22 + A.m.m23 * 0;
                C.m.m23 = A.m.m21 * B.m.m13 + A.m.m22 * B.m.m23 + A.m.m23 * 1;

                return(C);
            }
예제 #2
0
            //-------------------------------------------------------//
            public static clMatrix3x2 MatrixMult(clMatrix3x2 A, clMatrix3x2 B)
            {
                clMatrix3x2 C = new clMatrix3x2();

                C.m.m11 = A.m.m11 * B.m.m11 + A.m.m12 * B.m.m21 + A.m.m13 * 0;
                C.m.m12 = A.m.m11 * B.m.m12 + A.m.m12 * B.m.m22 + A.m.m13 * 0;
                C.m.m13 = A.m.m11 * B.m.m13 + A.m.m12 * B.m.m23 + A.m.m13 * 1;

                C.m.m21 = A.m.m21 * B.m.m11 + A.m.m22 * B.m.m21 + A.m.m23 * 0;
                C.m.m22 = A.m.m21 * B.m.m12 + A.m.m22 * B.m.m22 + A.m.m23 * 0;
                C.m.m23 = A.m.m21 * B.m.m13 + A.m.m22 * B.m.m23 + A.m.m23 * 1;

                return C;
            }
예제 #3
0
        //---------------------------------------------------//
        /// <summary>
        /// randers the polyline to [outAreaPicture] and [outLinePicture]. [outAreaPicture] will be filled with [RGBColor]. [outLinePicture] will only be outlined with [RGBColor].
        /// </summary>
        /// <param name="outAreaPicture">Picture-Buffer.<br /> <b>No</b> [RGBColor] values are allowed within the buffer-data!<br /> Can be NULL.</param>
        /// <param name="outLinePicture">Picture-Buffer.<br /> Can be NULL.</param>
        /// <param name="partIndex">Index of the Part to draw</param>
        /// <param name="matrix">Homogeneous coordinates to transform the point data</param>
        /// <param name="RGBColor">RGB color to draw with</param>
        public void addRasterObject(int[,] outAreaPicture, int[,] outLinePicture, int partIndex, clMatrix3x2 matrix, int RGBColor)
        {
            int w = 0;
            int h = 0;

            if (outLinePicture != null)
            {
                w = outLinePicture.GetLength(0);
                h = outLinePicture.GetLength(1);
            }
            else if (outAreaPicture != null)
            {
                w = outAreaPicture.GetLength(0);
                h = outAreaPicture.GetLength(1);
            }
            else
            {
                return;
            }


            int i = sf_addRasterObject(m_SLI_lib, outAreaPicture, outLinePicture, partIndex, matrix.m, RGBColor, w, h);

            checkForErros();

            //System.Diagnostics.Debug.WriteLine("addRasterObject() return = " + i);
        }
예제 #4
0
 private static extern Int32 sf_addRasterObject(int sliI, int [,] outFilledPicture, int [,] outLinePicture, int partIndex, clMatrix3x2.ty_Matrix matrix, int color, int width, int height);
예제 #5
0
        //---------------------------------------------------//
        /// <summary>
        /// randers the polyline to [outAreaPicture] and [outLinePicture]. [outAreaPicture] will be filled with [RGBColor]. [outLinePicture] will only be outlined with [RGBColor].
        /// </summary>
        /// <param name="outAreaPicture">Picture-Buffer.<br /> <b>No</b> [RGBColor] values are allowed within the buffer-data!<br /> Can be NULL.</param>
        /// <param name="outLinePicture">Picture-Buffer.<br /> Can be NULL.</param>
        /// <param name="partIndex">Index of the Part to draw</param>
        /// <param name="matrix">Homogeneous coordinates to transform the point data</param>
        /// <param name="RGBColor">RGB color to draw with</param>
        public void addRasterObject(int[,] outAreaPicture, int[,] outLinePicture, int partIndex, clMatrix3x2 matrix, int RGBColor)
        {
            int w=0;
            int h=0;
            if (outLinePicture != null)
            {
                w=outLinePicture.GetLength(0);
                h=outLinePicture.GetLength(1);
            }
            else if (outAreaPicture !=  null)
            {
                w=outAreaPicture.GetLength(0);
                h=outAreaPicture.GetLength(1);
            }
            else
            {
                return;
            }


            int i = sf_addRasterObject(m_SLI_lib, outAreaPicture, outLinePicture, partIndex, matrix.m, RGBColor, w, h);
            checkForErros();

            //System.Diagnostics.Debug.WriteLine("addRasterObject() return = " + i);
        }