Tao.Ode SDK Documentation |
|
Ode.dClosestLineSegmentPoints Method
Given two line segments A and B with endpoints a1-a2 and b1-b2, return the points on A and B that are closest to each other (in cp1 and cp2). In the case of parallel lines where there are multiple solutions, a solution involving the endpoint of at least one line will be returned. This will work correctly for zero length lines, e.g. if a1==a2 and/or b1==b2.
Parameters
-
a1
- A dVector3 containing endpoint 1 of line segment A
-
a2
- A dVector3 containing endpoint 2 of line segment A
-
b1
- A dVector3 containing endpoint 1 of line segment B
-
b2
- A dVector3 containing endpoint 2 of line segment B
-
cp1
- A dVector3 returning the closest point on A
-
cp2
- A dVector3 returning the closest point on B
See Also
Ode Class | Tao.Ode Namespace