Example #1
0
        public void ProjectPoint()
        {
            if (TestRuntime.CheckXcodeVersion(7, 0))
            {
                Assert.Ignore("This doesn't seem to work properly in the iOS 9+ or macOS 10.11+");
            }

            // SK3Node loads SCNRenderer dynamically, so make sure it's actually loaded.
            GC.KeepAlive(Class.GetHandle(typeof(SCNRenderer)));

            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.ProjectPoint(new Vector3(4, 5, 6));
                }
#endif
                var v = node.ProjectPoint(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 ProjectPoint()
        {
            if (TestRuntime.CheckXcodeVersion(7, 0))
            {
                Assert.Ignore("This doesn't seem to work properly in the iOS 9+ or macOS 10.11+");
            }

            // SK3Node loads SCNRenderer dynamically, so make sure it's actually loaded.
            GC.KeepAlive(Class.GetHandle(typeof(SCNRenderer)));

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