Directed line segment between two points.
Parameters: |
|
---|
Return True if this line segment is approximately equal to another, within precision limits.
Return True if the specified point is on the line segment.
Return the distance between the given point and the line segment.
Create a line segment from a normal vector perpendicular to the line containing the segment, the offset distance from that line to origin, and the signed distances along that line from the projection of the origin to the start and end points of the segment respectively.
Parameters: |
|
---|
Create a line segment from one or more collinear points. The first point is assumed to be the anchor. The order of the remaining points is unimportant, however they must all be collinear. The furthest point from the anchor determines the line segment’s vector.
Parameters: |
|
---|
Return True if the specified point is ahead of the endpoint of the line segment with respect to its direction.
Return True if the specified point is behind the anchor point with respect to the direction of the line segment.
Return True if the specified point is in the space to the left of, but not behind the line segment.
Return True if the specified point is in the space to the right of, but not behind the line segment.
Compute the projection of a point onto the line segment. This is the closest point on the segment to the specified point.
Parameters: |
|
---|
The anchor, or starting point of the line segment.
Direction of the line as a unit vector. You may set this attribute to any non-null vector, however it will be normalized to unit-length.
The end point of the line sequence.
The distance between the line segments endpoints.
Return a containing line collinear with this line segment.
The midpoint of the line segment (read-only).
Normal unit vector perpendicular to the line. You may set this attribute to any non-null vector, however it will be normalized to unit-length. Modifying this will also affect the direction vector accordingly.
Return the two endpoints of the line segment as a sequence.
The starting point of the line segment. Alias for anchor
The vector that comprises the length and direction of the line segment from its anchor point.