@Test public void testIsPointInFront() { ILine line = Line.fromDirection(Vector2.fromXY(42, 1337), Vector2.fromX(1)); assertThat(line.isPointInFront(Vector2.fromXY(42, 1337)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(42.1, 1337)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(43, 1337)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(1000, 1337)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(41, 1337)), is(false)); line = Line.fromDirection(Vector2.fromXY(-1, 2), Vector2.fromXY(1, 1)); assertThat(line.isPointInFront(Vector2.fromXY(-1, 2)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(0, 3)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(-2, 1)), is(false)); line = Line.fromDirection(Vector2f.ZERO_VECTOR, Vector2.fromY(5)); assertThat(line.isPointInFront(Vector2.fromXY(1, 0)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(-1, 0)), is(true)); assertThat(line.isPointInFront(Vector2.fromXY(1, -1)), is(false)); }
public static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector) { return new Line(supportVector, directionVector); }
Line extends ALine { public static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector) { return new Line(supportVector, directionVector); } }
Line extends ALine { public static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector) { return new Line(supportVector, directionVector); } @SuppressWarnings("unused") private  Line(); private  Line(final IVector2 sV, final IVector2 dV); protected  Line(final ILine line); }
Line extends ALine { public static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector) { return new Line(supportVector, directionVector); } @SuppressWarnings("unused") private  Line(); private  Line(final IVector2 sV, final IVector2 dV); protected  Line(final ILine line); static Line fromPoints(final IVector2 pFrom, final IVector2 pTo); static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector); @SuppressWarnings("squid:S1166") // Exception from solver not logged static Optional<Line> fromPointsList(final List<IVector2> points); static Line copyOf(final ILine line); @Override IVector2 supportVector(); @Override IVector2 directionVector(); @Override final boolean equals(final Object o); @Override final int hashCode(); @Override String toString(); }
Line extends ALine { public static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector) { return new Line(supportVector, directionVector); } @SuppressWarnings("unused") private  Line(); private  Line(final IVector2 sV, final IVector2 dV); protected  Line(final ILine line); static Line fromPoints(final IVector2 pFrom, final IVector2 pTo); static Line fromDirection(final IVector2 supportVector, final IVector2 directionVector); @SuppressWarnings("squid:S1166") // Exception from solver not logged static Optional<Line> fromPointsList(final List<IVector2> points); static Line copyOf(final ILine line); @Override IVector2 supportVector(); @Override IVector2 directionVector(); @Override final boolean equals(final Object o); @Override final int hashCode(); @Override String toString();  }