searchForClosestPoint Method
Search the range tree for closest facet(s) to spacePoint.
searchForClosestPoint(spacePoint: Readonly<WritableXAndY> | Readonly<WritableXYAndZ>, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetail | FacetLocationDetail[] | undefined
@returns closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
| Parameter | Type | Description |
|---|---|---|
| spacePoint | Readonly<WritableXAndY> | Readonly<WritableXYAndZ> | point to test |
| maxDist | number | collect facet locations at no more than this distance from spacePoint. If undefined, return only the closest facet location. |
| searchFacetInterior | boolean | whether to include facet interiors in search. Default is false: just consider facet boundaries. |
Returns - FacetLocationDetail | FacetLocationDetail[] | undefined
closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
Defined in
Last Updated: 04 June, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.