Back to class index
| Line::ClosestPointLineLineSyntaxvoid Line::ClosestPointLineLine(const float4 &start0, const float4 &dir0, const float4 &start1, const float4 &dir1, float &d, float &d2); [18 lines of code]Computes the closest point pair on two lines. The first line is specified by two points start0 and end0. The second line is specified by two points start1 and end1. The implementation of this function follows http://paulbourke.net/geometry/lineline3d/ . Note This is a low-level utility function. You probably want to use ClosestPoint() or Distance() instead. Parametersfloat &d [out]Receives the normalized distance of the closest point along the first line.float &d2 [out]Receives the normalized distance of the closest point along the second line. Return ValueReturns the closest point on line start0<->end0 to the second line. See Also |