computePointToLineDistance

computePointToLineDistance()
computePointToLineDistance(point: Point3, lineBegin: Point3, lineEnd: Point3, out_closestPointOnLine: Point3): number

Computes the shortest distance between a point and a line segment.

Parameters

point: Point3

lineBegin: Point3

The start point of the line segment to compute against.

lineEnd: Point3

The end point of the line segment to compute against.

out_closestPointOnLine: Point3

The out parameter for a closest point on the line segment to the point.

Returns: number

The distance from the point and the closest point on the line.