|Back to class index|
Syntaxfloat3 Line::ClosestPointLineLine(float3 start0, float3 end0, float3 start1, float3 end1, float *d, float *d2); [16 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/ .
This is a low-level utility function. You probably want to use ClosestPoint() or Distance() instead.
float *d [out]If specified, receives the normalized distance of the closest point along the first line. This pointer may be left null.float *d2 [out]If specified, receives the normalized distance of the closest point along the second line. This pointer may be left null.
Returns the closest point on line start0<->end0 to the second line.
28.737nsecs/call ≈ 34.8M calls/second ≈ 579.98k calls/frame (@ 60fps).
On 2014-07-24 06:37, anonymous wrote:
Leave a Comment