searchForClosestApproach MethodStatic
Search the range trees for closest approach(es) between the point arrays.
searchForClosestApproach(contextA: Point3dArrayRangeTreeContext, contextB: Point3dArrayRangeTreeContext, maxDist?: number): undefined | CurveLocationDetailPair | CurveLocationDetailPair[]
@returns closest approach detail pair(s), one per context, each with the following fields set:
- detail.point = the point at closest approach
- detail.fraction = the index of detail.point in the points array
- detail.a = the closest approach distance
Parameter | Type | Description |
---|---|---|
contextA | Point3dArrayRangeTreeContext | first point array context |
contextB | Point3dArrayRangeTreeContext | second point array context |
maxDist | number | collect close approaches separated by no more than this distance. If undefined, return only the closest approach. |
Returns - undefined | CurveLocationDetailPair | CurveLocationDetailPair[]
closest approach detail pair(s), one per context, each with the following fields set:
- detail.point = the point at closest approach
- detail.fraction = the index of detail.point in the points array
- detail.a = the closest approach distance
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.