Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
        public static CS_Matrix RotX(float radAngle)
        {
            CS_Matrix rmm = new CS_Matrix();
            rmm._matrix = Matrix.RotationX(-radAngle);

            return rmm;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
        public static CS_Matrix RotX(float radAngle)
        {
            CS_Matrix rmm = new CS_Matrix();

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

            return(rmm);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }