示例#1
0
        public void Test_Apply()
        {
            var q1 = new Quaternion (90, 0, 0, 1);
            var q2 = new Quaternion (90, 0, 1, 0);
            var q3 = new Quaternion (90, 1, 0, 0);
            var v1 = q1.Apply (new Vector3 (1, 0, 0));
            var v2 = q2.Apply (new Vector3 (0, 1, 0));
            var v3 = q3.Apply (new Vector3 (0, 0, 1));

            Assert.AreEqual (new Vector3 (0, 1, 0), v1);
            Assert.AreEqual (new Vector3 (0, 1, 0), v2);
            Assert.AreEqual (new Vector3 (0, -1, 0), v3);
        }