Beispiel #1
0
        public void IntersectMiddleTest()
        {
            var tri = new TriangleIntersector(Vector3.J, -Vector3.I, new Vector3(1, -1, 0));
            var edge = new Edge(Vector3.K, -Vector3.K);

            Assert.That(tri.FindIntersections(edge), Is.EquivalentTo(new[] { new Intersection(Vector3.Zero, Vector3.K) }));
        }
Beispiel #2
0
        public void IntersectParalellTest()
        {
            var tri = new TriangleIntersector(Vector3.J, -Vector3.I, new Vector3(1, -1, 0));
            var edge = new Edge(Vector3.I, -Vector3.I);

            Assert.That(tri.FindIntersections(edge), Is.EquivalentTo(Enumerable.Empty<Intersection>()));
        }
Beispiel #3
0
 public void EdgeIntersectTest(TriangleIntersector t, Edge e, IEnumerable<Intersection> intersects)
 {
     Assert.That(t.FindIntersections(e), Is.EquivalentTo(intersects));
 }