@Test public void GetMinTranslation_LineAndCircleAreDisjoint_ReturnsNull() { Circle circle = new Circle(0, 0, 5); Line line = new Line(6, 0, 6, 5); assertNull(overlapper.getMinTranslation(line, circle)); }
@Test public void GetMinTranslation_LineAndCircleAreTouchingButDontOverlap_ReturnsNull() { Circle circle = new Circle(0, 0, 5); Line line = new Line(5, -5, 5, 5); assertNull(overlapper.getMinTranslation(line, circle)); }
@Test public void GetMinTranslation_ClosestVertexTranslation() { Circle circle = new Circle(-4, 0, 5); Line line = new Line(0, 0, 4, 0); assertEquals( new Translation(new Vector2f(-1, 0), 1f), overlapper.getMinTranslation(line, circle)); }