public void ShouldNotIntersectWithParallelRay(float x, float y, float z) { var p = new XZPlane(); var r = CreateRay(CreatePoint(x, y, z), CreateVector(0, 0, 1)); var xs = p.LocalIntersect(r); xs.Should().BeEmpty(); }
public void ShouldIntersectWithPerpendicularRay(float px, float py, float pz, float vx, float vy, float vz) { var p = new XZPlane(); var r = CreateRay(CreatePoint(px, py, pz), CreateVector(vx, vy, vz)); var xs = p.LocalIntersect(r); xs.Should().ContainSingle().And.Subject.First().T.Should().Be(1); xs.First().Shape.Should().Be(p); }