Пример #1
0
        public void RotateX(double radians)
        {
            Matrix3 m = new Matrix3();

            m.SetRotateX(radians);
            Set(this * m);
        }
Пример #2
0
        public void RotateX(double radiansX)
        {
            Matrix3 rotate = new Matrix3();

            rotate.SetRotateX(radiansX);
            Set(this * rotate);
        }
Пример #3
0
        // rotates y and z according to the Sin and Cos of the radian specified
        public void RotateX(double xRadians)
        {
            Matrix3 rot = new Matrix3();

            rot.SetRotateX(xRadians);
            Set(this * rot);
        }
Пример #4
0
        void SetEuler(float pitch, float yaw, float roll)
        {
            Matrix3 x = new Matrix3();
            Matrix3 y = new Matrix3();
            Matrix3 z = new Matrix3();

            x.SetRotateX(pitch);
            y.SetRotateY(yaw);
            z.SetRotateZ(roll);
            Set(z * y * x);
        }
Пример #5
0
        public void SetEuler(float pitch, float yaw, float roll)
        {
            Matrix3 x = new Matrix3();
            Matrix3 y = new Matrix3();
            Matrix3 z = new Matrix3();

            x.SetRotateX(pitch);
            y.SetRotateY(yaw);
            z.SetRotateZ(roll);
            // combine rotations in a specific order
            Set(z * y * x);
        }
Пример #6
0
        // gets angles from origin points - more research to see how this is implemented
        public void SetEuler(float pitch, float yaw, float roll)
        {
            Matrix3 x = new Matrix3();
            Matrix3 y = new Matrix3();
            Matrix3 z = new Matrix3();

            x.SetRotateX(pitch);
            y.SetRotateY(yaw);
            z.SetRotateZ(roll);

            // rotate in a certain order
            Set(z * y * x);
        }
Пример #7
0
        // SetEuler --> Set rotation simultaneously using Vector3
        public void SetEuler(Vector2 rotation)
        {
            Matrix3 x = new Matrix3();
            Matrix3 y = new Matrix3();

            x.SetRotateX(rotation.x);
            y.SetRotateY(rotation.y);

            Matrix3 result = y * x;

            m1 = result.m1;
            m2 = result.m2;
            m4 = result.m4;
            m5 = result.m5;
        }
Пример #8
0
        // SetEuler --> Set rotation simultaneously using three floats
        public void SetEuler(float xRot, float yRot)
        {
            Matrix3 x = new Matrix3();
            Matrix3 y = new Matrix3();

            x.SetRotateX(xRot);
            y.SetRotateY(yRot);

            Matrix3 result = y * x;

            m1 = result.m1;
            m2 = result.m2;
            m4 = result.m4;
            m5 = result.m5;
        }
Пример #9
0
        static void Main(string[] args)
        {
            Matrix3 m3a = new Matrix3();

            m3a.SetRotateX(3.98f);
            m3a.PrintMatrixToConsole();

            Matrix3 m3c = new Matrix3();

            m3c.SetRotateZ(9.62f);
            m3c.PrintMatrixToConsole();

            Console.ReadKey();

            // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app!
        }
Пример #10
0
        public void RotateX(float rotation)
        {
            Matrix3 m = new Matrix3();

            m.SetRotateX(rotation);
            m = this * m;

            m1 = m.m1;
            m2 = m.m2;
            m3 = m.m3;

            m4 = m.m4;
            m5 = m.m5;
            m6 = m.m6;

            m7 = m.m7;
            m8 = m.m8;
            m9 = m.m9;
        }