A geometric line segment represented by a start and end point.
start — Start of the line segment. Default is (0, 0, 0)
.
end — End of the line segment. Default is (0, 0, 0)
.
Creates a new Line3.
Vector3 representing the start point of the line.
Vector3 representing the end point of the line.
Applies a matrix transform to the line segment.
t — Use values 0-1 to return a position along the line segment.
target — the result will be copied into this Vector3.
Returns a vector at a certain position along the line. When t = 0, it returns the start vector,
and when t = 1 it returns the end vector.
Returns a new Line3 with the same start and end vectors as this one.
point — return the closest point on the line to this point.
clampToLine — whether to clamp the returned value to the line segment.
target — the result will be copied into this Vector3.
Returns the closets point on the line. If clampToLine is true, then the returned value will be clamped to the line segment.
point — the point for which to return a point parameter.
clampToLine — Whether to clamp the result to the range [0, 1]
.
Returns a point parameter based on the closest point as projected on the line segment. If clampToLine is true, then the returned value will be between 0 and 1.
Copies the passed line's start and end vectors to this line.
target — the result will be copied into this Vector3.
Returns the delta vector of the line segment (end vector minus the start vector).
Returns the Euclidean distance (straight-line distance) between the line's start and end points.
Returns the square of the Euclidean distance (straight-line distance) between the line's start and end vectors.
line — Line3 to compare with this one.
Returns true if both line's start and end points are equal.
target — the result will be copied into this Vector3.
Returns the center of the line segment.
start — set the start point of the line.
end — set the end point of the line.
Sets the start and end values by copying the provided vectors.
For more info on how to obtain the source code of this module see this page.