Example #1
0
        public static Vector3 Prod(CS_Matrix a, Vector3 b)
        {
            Matrix  mt = a._matrix; mt.Transpose();
            Vector4 v4 = Vector3.Transform(b, mt);

            return(new Vector3(v4.X, v4.Y, v4.Z));
        }
Example #2
0
        public static CS_Matrix RotX(float radAngle)
        {
            CS_Matrix rmm = new CS_Matrix();
            rmm._matrix = Matrix.RotationX(-radAngle);

            return rmm;
        }
Example #3
0
        public static CS_Matrix RotAxis(float radAngle, Vector3 axis)
        {
            CS_Matrix rmm = new CS_Matrix();
            rmm._matrix = Matrix.RotationAxis(axis, -radAngle);

            return rmm;
        }
Example #4
0
        public static CS_Matrix Prod(CS_Matrix a, CS_Matrix b)
        {
            CS_Matrix r = new CS_Matrix();

            r._matrix = a._matrix * b._matrix;
            return(r);
        }
Example #5
0
        public static CS_Matrix RotAxis(float radAngle, Vector3 axis)
        {
            CS_Matrix rmm = new CS_Matrix();

            rmm._matrix = Matrix.RotationAxis(axis, -radAngle);

            return(rmm);
        }
Example #6
0
        public static CS_Matrix RotX(float radAngle)
        {
            CS_Matrix rmm = new CS_Matrix();

            rmm._matrix = Matrix.RotationX(-radAngle);

            return(rmm);
        }
Example #7
0
        public static CS_Matrix RotXZ(float radDelta, float radRho)
        {
            Matrix rotZ = Matrix.RotationZ(-radRho);
            Matrix rotX = Matrix.RotationX(-radDelta);

            CS_Matrix rmm = new CS_Matrix();
            rmm._matrix = rotZ * rotX;

            return rmm;
        }
Example #8
0
        public static CS_Matrix RotAxisZ(float radDelta, float radRho)
        {
            float a = (float)Math.Cos(radRho);
            float b = (float)Math.Sin(radRho);

            CS_Matrix rmm = new CS_Matrix();
            rmm._matrix = Matrix.RotationAxis(new Vector3(a,b,0),-radDelta);

            return rmm;
        }
Example #9
0
        public static CS_Matrix RotAxisZ(float radDelta, float radRho)
        {
            float a = (float)Math.Cos(radRho);
            float b = (float)Math.Sin(radRho);

            CS_Matrix rmm = new CS_Matrix();

            rmm._matrix = Matrix.RotationAxis(new Vector3(a, b, 0), -radDelta);

            return(rmm);
        }
Example #10
0
        public static CS_Matrix RotXZ(float radDelta, float radRho)
        {
            Matrix rotZ = Matrix.RotationZ(-radRho);
            Matrix rotX = Matrix.RotationX(-radDelta);

            CS_Matrix rmm = new CS_Matrix();

            rmm._matrix = rotZ * rotX;

            return(rmm);
        }
Example #11
0
 public static Vector3 Prod(CS_Matrix a, Vector3 b)
 {
     Matrix mt = a._matrix; mt.Transpose();
     Vector4 v4 = Vector3.Transform(b, mt);
     return new Vector3(v4.X, v4.Y, v4.Z);
 }
Example #12
0
 public static CS_Matrix Prod(CS_Matrix a, CS_Matrix b)
 {
     CS_Matrix r = new CS_Matrix();
     r._matrix = a._matrix * b._matrix;
     return r;
 }