Ejemplo n.º 1
0
        public void ToLocalPosition()
        {
            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.ToLocalPosition(v);
            var result2 = a.ToMatrix44F().Inverse.TransformPosition(v);

            Assert.IsTrue(Vector3F.AreNumericallyEqual(result1, result2));
        }
Ejemplo n.º 2
0
        public void ToLocalPosition()
        {
            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.ToLocalPosition(v);
              var result2 = a.ToMatrix44F().Inverse.TransformPosition(v);
              Assert.IsTrue(Vector3F.AreNumericallyEqual(result1, result2));
        }