LineSegment
A strictly linear 2D segment.
Think of LineSegment as a more limited representation of the Segment2D, . While both LineSegment and Segment2D are capable of describing straight lines, LineSegment is only capable of dealing with straight lines you'd generally only use LineSegment if you strictly want to work with problems in the linear segment domain.
LineSegments are easy to extend in length thanks to their simple two-point construction.
Parameters
Start of the line segment.
End of the line segment.
Functions
Finds the shortest distance to the LineSegment from given point.
Extends the length of the segment to the given targetLength.
Finds point on the LineSegment that is nearest to the given point.
Calculates the point at a given distance along this LineSegment.
Rotates the LineSegment around a point on the segment.
Samples a new LineSegment from the current LineSegment starting at t0 and ending at t1.
Properties
Returns ShapeContour representation of the LineSegment.
Returns Segment2D representation of the LineSegment.
Returns Shape representation of the LineSegment.