@Test public void testToLine() { IHalfLine halfLine = HalfLine.fromDirection(Vector2f.ZERO_VECTOR, Vector2f.Y_AXIS); ILine line = halfLine.toLine(); assertThat(halfLine.supportVector(), is(line.supportVector())); assertThat(halfLine.directionVector().isParallelTo(line.directionVector()), is(true)); assertThat(halfLine.directionVector().getLength(), closeTo(1.0d, ACCURACY)); }
@Override public ILine toLine() { return Line.createNewWithoutCopy(supportVector(), directionVector()); }
HalfLine extends AUnboundedLine implements IHalfLine { @Override public ILine toLine() { return Line.createNewWithoutCopy(supportVector(), directionVector()); } }
HalfLine extends AUnboundedLine implements IHalfLine { @Override public ILine toLine() { return Line.createNewWithoutCopy(supportVector(), directionVector()); } private  HalfLine(final IVector2 supportVector, final IVector2 directionVector); }
HalfLine extends AUnboundedLine implements IHalfLine { @Override public ILine toLine() { return Line.createNewWithoutCopy(supportVector(), directionVector()); } private  HalfLine(final IVector2 supportVector, final IVector2 directionVector); static IHalfLine fromDirection(final IVector2 supportVector, final IVector2 directionVector); @Override boolean equals(final Object other); @Override int hashCode(); @Override IVector2 closestPointOnLine(final IVector2 point); @Override ILine toLine(); @Override IHalfLine copy(); @Override Optional<IVector2> intersectLine(final ILine line); @Override Optional<IVector2> intersectHalfLine(final IHalfLine other); @Override Optional<IVector2> intersectSegment(final ILineSegment segment); @Override boolean isPointInFront(final IVector2 point); @Override String toString(); }
HalfLine extends AUnboundedLine implements IHalfLine { @Override public ILine toLine() { return Line.createNewWithoutCopy(supportVector(), directionVector()); } private  HalfLine(final IVector2 supportVector, final IVector2 directionVector); static IHalfLine fromDirection(final IVector2 supportVector, final IVector2 directionVector); @Override boolean equals(final Object other); @Override int hashCode(); @Override IVector2 closestPointOnLine(final IVector2 point); @Override ILine toLine(); @Override IHalfLine copy(); @Override Optional<IVector2> intersectLine(final ILine line); @Override Optional<IVector2> intersectHalfLine(final IHalfLine other); @Override Optional<IVector2> intersectSegment(final ILineSegment segment); @Override boolean isPointInFront(final IVector2 point); @Override String toString();  }