Exemplo n.º 1
0
        public void ToLocalDirection()
        {
            var a = new SrtTransform(new Vector3F(1, 2, 7), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(4, -5, 6));
            var v = new Vector3F(7, 9, -12);

            var result1 = a.ToLocalDirection(v);
            var result2 = a.Rotation.ToRotationMatrix33().Transposed *v;

            Assert.IsTrue(Vector3F.AreNumericallyEqual(result1, result2));
        }
Exemplo n.º 2
0
        public void ToLocalDirection()
        {
            var a = new SrtTransform(new Vector3F(1, 2, 7), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(4, -5, 6));
              var v = new Vector3F(7, 9, -12);

              var result1 = a.ToLocalDirection(v);
              var result2 = a.Rotation.ToRotationMatrix33().Transposed * v;
              Assert.IsTrue(Vector3F.AreNumericallyEqual(result1, result2));
        }