Ejemplo n.º 1
0
        public void ToPose()
        {
            var srt  = new SrtTransform(new Vector3F(4, 5, 6), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(1, 2, 3));
            var pose = srt.ToPose();

            Assert.AreEqual(pose.Position, srt.Translation);
            Assert.IsTrue(Matrix33F.AreNumericallyEqual(pose.Orientation, srt.Rotation.ToRotationMatrix33()));

            srt  = new SrtTransform(new Vector3F(4, 5, 6), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(1, 2, 3));
            pose = (Pose)srt;

            Assert.AreEqual(pose.Position, srt.Translation);
            Assert.IsTrue(Matrix33F.AreNumericallyEqual(pose.Orientation, srt.Rotation.ToRotationMatrix33()));
        }
Ejemplo n.º 2
0
        public void ToPose()
        {
            var srt = new SrtTransform(new Vector3F(4, 5, 6), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(1, 2, 3));
              var pose = srt.ToPose();

              Assert.AreEqual(pose.Position, srt.Translation);
              Assert.IsTrue(Matrix33F.AreNumericallyEqual(pose.Orientation, srt.Rotation.ToRotationMatrix33()));

              srt = new SrtTransform(new Vector3F(4, 5, 6), new QuaternionF(1, 2, 3, 4).Normalized, new Vector3F(1, 2, 3));
              pose = (Pose)srt;

              Assert.AreEqual(pose.Position, srt.Translation);
              Assert.IsTrue(Matrix33F.AreNumericallyEqual(pose.Orientation, srt.Rotation.ToRotationMatrix33()));
        }