示例#1
0
        public static warp_Matrix rotateMatrix(float dx, float dy, float dz)
        {
            warp_Matrix res = new warp_Matrix();

            float SIN;
            float COS;

            if (dx != 0)
            {
                warp_Matrix m = new warp_Matrix();
                SIN   = warp_Math.sin(dx);
                COS   = warp_Math.cos(dx);
                m.m11 = COS;
                m.m12 = SIN;
                m.m21 = -SIN;
                m.m22 = COS;

                res.transform(m);
            }
            if (dy != 0)
            {
                warp_Matrix m = new warp_Matrix();
                SIN   = warp_Math.sin(dy);
                COS   = warp_Math.cos(dy);
                m.m00 = COS;
                m.m02 = SIN;
                m.m20 = -SIN;
                m.m22 = COS;

                res.transform(m);
            }
            if (dz != 0)
            {
                warp_Matrix m = new warp_Matrix();
                SIN   = warp_Math.sin(dz);
                COS   = warp_Math.cos(dz);
                m.m00 = COS;
                m.m01 = SIN;
                m.m10 = -SIN;
                m.m11 = COS;

                res.transform(m);
            }

            return(res);
        }
        public static warp_Matrix rotateMatrix(float dx, float dy, float dz)
        {
            warp_Matrix res=new warp_Matrix();

            float SIN;
            float COS;

            if (dx!=0)
            {
                warp_Matrix m =new warp_Matrix();
                SIN=warp_Math.sin(dx);
                COS=warp_Math.cos(dx);
                m.m11=COS;
                m.m12=SIN;
                m.m21=-SIN;
                m.m22=COS;

                res.transform(m);
            }
            if (dy!=0)
            {
                warp_Matrix m =new warp_Matrix();
                SIN=warp_Math.sin(dy);
                COS=warp_Math.cos(dy);
                m.m00=COS;
                m.m02=SIN;
                m.m20=-SIN;
                m.m22=COS;

                res.transform(m);
            }
            if (dz!=0)
            {
                warp_Matrix m =new warp_Matrix();
                SIN=warp_Math.sin(dz);
                COS=warp_Math.cos(dz);
                m.m00=COS;
                m.m01=SIN;
                m.m10=-SIN;
                m.m11=COS;

                res.transform(m);
            }

            return res;
        }
示例#3
0
 public void project(warp_Matrix m)
 {
     matrix2 = m.getClone();
     matrix2.transform(m);
     v2 = v.transform(matrix2);
 }
 public void project(warp_Matrix m)
 {
     matrix2 = m.getClone();
     matrix2.transform(m);
     v2 = v.transform(matrix2);
 }
示例#5
0
 public void transform(warp_Matrix m)
 {
     matrix.transform(m);
     normalmatrix.transform(m);
 }