public void LineSegment_DoesIntersectNotTouchingPlane_ShouldReturnTrue_IfEndPointsAreOnOppositeSidesOfThePlane() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 1, 1), Point.MakePointWithInches(-1, -1, -1)); Plane plane = new Plane(Direction.Right); lineSegment.DoesIntersectNotTouching(plane).Should().BeTrue(); }
public void LineSegment_DoesIntersectNotTouchingPlane_ShouldReturnFalse_IfBothEndPointsAreOnPlane() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 0, 0)); Plane plane = new Plane(Direction.Right); lineSegment.DoesIntersectNotTouching(plane).Should().BeFalse(); }
public void LineSegment_DoesIntersectNotTouchingPlane_ShouldReturnFalse_IfEndPointsAreOnTheSameSideOfThePlane() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 1, 1), Point.MakePointWithInches(2, 2, 2)); Plane plane = new Plane(Direction.Right); lineSegment.DoesIntersectNotTouching(plane).Should().BeFalse(); }
public void LineSegment_DoesIntersectNotTouchingLineSegment_ShouldThrowException_IfPassedLineSegmentIsNull() { LineSegment lineSegment1 = new LineSegment(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment2 = null; Action intersect = () => lineSegment1.DoesIntersectNotTouching(lineSegment2); intersect.ShouldThrow<Exception>(); }
public void LineSegment_DoesIntersectNotTouchingLineSegment_ShouldReturnTrue_IfIntersectionPointIsNotOnAnyEndPoints() { LineSegment lineSegment1 = new LineSegment(Point.MakePointWithInches(2, 2, 2)); LineSegment lineSegment2 = new LineSegment(Point.MakePointWithInches(0, 1, 0), Point.MakePointWithInches(2, 1, 2)); lineSegment1.DoesIntersectNotTouching(lineSegment2).Should().BeTrue(); }
public void LineSegment_DoesIntersectNotTouchingLineSegment_ShouldReturnFalse_IfIntersectionPointIsOneOfTheEndPointOfBothSegments() { LineSegment lineSegment1 = new LineSegment(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment2 = new LineSegment(Point.MakePointWithInches(1, 1, 1), Point.MakePointWithInches(2, 2, 2)); lineSegment1.DoesIntersectNotTouching(lineSegment2).Should().BeFalse(); }
public void LineSegment_DoesIntersectNotTouchingLineSegment_ShouldReturnFalse_IfSegmentsDoNotIntersect() { LineSegment lineSegment1 = new LineSegment(Point.MakePointWithInches(1, 1, 1)); LineSegment lineSegment2 = new LineSegment(Point.MakePointWithInches(1, 0, 0), Point.MakePointWithInches(2, 0, 0)); lineSegment1.DoesIntersectNotTouching(lineSegment2).Should().BeFalse(); }
public void LineSegment_DoesIntersectNotTouchingPlane_ShouldThrowException_IfPlaneIsNull() { LineSegment lineSegment = new LineSegment(Point.MakePointWithInches(1, 1, 1), Point.MakePointWithInches(-1, -1, -1)); Plane plane = null; Action intersect = () => lineSegment.DoesIntersectNotTouching(plane); intersect.ShouldThrow<Exception>(); }