Пример #1
0
        public void RotationMatrixTest()
        {
            Matrix matrix = Utilities.GenerateMatrix();

            Quaternion expected = Utilities.ConvertFrom(Microsoft.Xna.Framework.Quaternion.CreateFromRotationMatrix(
                                                            Utilities.ConvertToXna(matrix)));

            Quaternion actual;

            actual = Quaternion.RotationMatrix(matrix);
            Utilities.AreEqual(expected, actual);
        }
Пример #2
0
        public void RotationMatrixByRefTest()
        {
            Matrix     matrix         = Utilities.GenerateMatrix();
            Matrix     matrixExpected = matrix;
            Quaternion result;

            Quaternion resultExpected = Utilities.ConvertFrom(Microsoft.Xna.Framework.Quaternion.CreateFromRotationMatrix(
                                                                  Utilities.ConvertToXna(matrix)));

            Quaternion.RotationMatrix(ref matrix, out result);
            Utilities.AreEqual(matrixExpected, matrix);
            Utilities.AreEqual(resultExpected, result);
        }