Example #1
0
        public void UnprojectPoint()
        {
#if MONOMAC
            Assert.Ignore("This doesn't seem to work properly in macOS 10.12");
#else
            if (UIDevice.CurrentDevice.CheckSystemVersion(9, 0))
            {
                Assert.Ignore("This doesn't seem to work properly in the iOS 9");
            }
#endif

            using (var node = new SK3DNode()) {
#if !MONOMAC
                if (Runtime.Arch == Arch.SIMULATOR && IntPtr.Size == 4)
                {
                    // 32-bit simulator returns 0,0,0 the first time
                    // this is executed for some reason, so just
                    // ignore that.
                    node.UnprojectPoint(new Vector3(4, 5, 6));
                }
#endif
                var v = node.UnprojectPoint(new Vector3(1, 2, 3));
                Assert.AreEqual(1, v.X, "#x1");
                Assert.AreEqual(2, v.Y, "#y1");
                Assert.AreEqual(3, v.Z, "#z1");
            }
        }
Example #2
0
        public void UnprojectPoint()
        {
#if MONOMAC
            Assert.Ignore("This doesn't seem to work properly in macOS 10.12");
#elif __IOS__ || __TVOS__
            if (TestRuntime.CheckXcodeVersion(7, 0))
            {
                Assert.Ignore("This doesn't seem to work properly in the iOS 9");
            }
#endif

            using (var node = new SK3DNode()) {
                var v = node.UnprojectPoint(new Vector3(1, 2, 3));
                Assert.AreEqual(1, v.X, "#x1");
                Assert.AreEqual(2, v.Y, "#y1");
                Assert.AreEqual(3, v.Z, "#z1");
            }
        }