Esempio n. 1
0
        public void IntersectCoplanarRay()
        {
            var p  = new Plane();
            var r  = new Ray(0f, 0f, 0f, 0f, 0f, 1f);
            var xs = p.IntersectLocal(ref r);

            Assert.AreEqual(xs.Count, 0);
        }
Esempio n. 2
0
        public void IntersectPlaneFromBelow()
        {
            var p  = new Plane();
            var r  = new Ray(0f, -1f, 0f, 0f, 1f, 0f);
            var xs = p.IntersectLocal(ref r);

            Assert.AreEqual(xs.Count, 1);
            Assert.AreEqual(xs[0].Distance, 1f);
            Assert.AreEqual(xs[0].Object, p);
        }