Line3
A geometric line segment represented by a start and end point.
Constructor
start --
Vector3 Start of the line segment
end --
Vector3 End of the line segment
The start and end vectors default to origin vectors if none are set.
Properties
Methods
Sets the start and end values by copying the provided vectors.
Copies the passed line's start and end vectors to this line.
Return a new copy of this
Line3.
Returns true if both line's start and end points are equal.
Returns the length of the line segment.
Returns the line segment's length squared.
Apply a matrix transform to the line segment.
t --
Float Use values 0-1 to return a result on the line segment.
optionalTarget --
Vector Optional target to set the result.
Return 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.
optionalTarget --
Vector3 Optional target to set the result.
Return the center of the line segment.
optionalTarget --
Vector3 Optional target to set the result.
Returns the delta vector of the line segment, or the end vector minus the start vector.
Returns the closets point on the line. If clamp to line is true, then the returned value will be clamped to the line segment.
Returns a point parameter based on the closest point as projected on the line segement. If clamp to line is true, then the returned value will be between 0 and 1.
Source
src/math/Line3.js
Edit