public class LineSegment2d extends LineSegment<Coords2d>
end, start
Constructor and Description |
---|
LineSegment2d(Coords2d start,
Coords2d end)
Creates a new line segment using the two given end points.
|
Modifier and Type | Method and Description |
---|---|
LineSegment2d |
common(LineSegment2d lc)
Calculates the common part of the two line segments if there are any.
|
boolean |
isOnLineSegment(Coords2d c)
Return true if the given point is on the segment.
|
boolean |
isParallel(LineSegment2d ls)
Checks if the two line segments are parallel.
|
static List<LineSegment2d> |
lineSegmentSeries2d(List<Coords2d> coords)
Returns with the list of line segments which is denoted by this series of points.
|
LineSegment2d |
next(Coords2d c)
Creates the next segment of the line segment series.
|
static LineSegment2d |
startLineSegmentSeries(Coords2d p)
Starts a series of line segments.
|
contains, equals, getEnd, getStart, hasCommon, hashCode, lineSegmentSeries, toString
public static LineSegment2d startLineSegmentSeries(Coords2d p)
LineSegment.lineSegmentSeries(List)
method to convert a
list of coordinates to a list of line segments.p
- the starting pointpublic static List<LineSegment2d> lineSegmentSeries2d(List<Coords2d> coords)
coords
- the list of pointspublic LineSegment2d next(Coords2d c)
LineSegment
next
in class LineSegment<Coords2d>
c
- the next point of the point seriespublic boolean isParallel(LineSegment2d ls)
ls
- the other line segmentpublic boolean isOnLineSegment(Coords2d c)
c
- the point to be checkedpublic LineSegment2d common(LineSegment2d lc)
lc
- the other line segmentCopyright © 2014–2020, Printing in 3D. All rights reserved.