findClosestPointsLineSegments

Find the closest points on the two line segments, store the point on the first line segment in <code>resultA</code> and the point on the second line segment in <code>resultB</code>, and return the square distance between both points. <p> Reference: Book "Real-Time Collision Detection" chapter 5.1.9 "Closest Points of Two Line Segments"

@param a0X the x coordinate of the first line segment's first end point @param a0Y the y coordinate of the first line segment's first end point @param a0Z the z coordinate of the first line segment's first end point @param a1X the x coordinate of the first line segment's second end point @param a1Y the y coordinate of the first line segment's second end point @param a1Z the z coordinate of the first line segment's second end point @param b0X the x coordinate of the second line segment's first end point @param b0Y the y coordinate of the second line segment's first end point @param b0Z the z coordinate of the second line segment's first end point @param b1X the x coordinate of the second line segment's second end point @param b1Y the y coordinate of the second line segment's second end point @param b1Z the z coordinate of the second line segment's second end point @param resultA will hold the point on the first line segment @param resultB will hold the point on the second line segment @return the square distance between the two closest points

public static
double
findClosestPointsLineSegments
(
double a0X
,
double a0Y
,
double a0Z
,
double a1X
,
double a1Y
,
double a1Z
,
double b0X
,
double b0Y
,
double b0Z
,
double b1X
,
double b1Y
,
double b1Z
,,)

Meta