SolidKit3D.Math3D.ClosestLineSegmentPoints
From Solid Graphics Wiki
| ||||||||
The ClosestLineSegmentPoints function calculates positions and coordinates of closest points of two line segments.
public static void ClosestLineSegmentPoints
(
ref Point P0,
ref Point P1,
ref Point Q0,
ref Point Q1,
out float s,
out float t,
out bool parallel
);
Parameters
| P0 | x,y,z coordinates of first point defining the first line segment |
| P1 | x,y,z coordinates of second point defining the first line segment |
| Q0 | x,y,z coordinates of first point defining the second line segment |
| Q1 | x,y,z coordinates of second point defining the second line segment |
| s | the function will store the position of closest point on lying on the first line segment into the variable pointed by s. The position can be then translated to point coordinates using the Math3D.LinePositionToPoint function. |
| t | the function will store into t position of the closest point lying on the second line segment. |
| parallel | the function will set to parallel to true if the line segments are parallel to each other, or to false when they are not parallel. |
See Also
