Points on lines where the two lines are the closest together
- by James Bedford
Hey guys,
I'm trying to find the points on two lines where the two lines are the closest. I've implemented the following method (Points and Vectors are as you'd expect, and a Line consists of a Point on the line and a non-normalized direction Vector from that point):
void CDClosestPointsOnTwoLines(Line line1, Line line2, Point* closestPoints)
{
…