/** @packageDocumentation * @module RangeSearch */ import { CurveLocationDetail, CurveLocationDetailPair } from "../../curve/CurveLocationDetail"; import { LineString3d } from "../../curve/LineString3d"; import { Point3d } from "../../geometry3d/Point3dVector3d"; /** * Handler class for searching a range tree containing the segments of a linestring. * * Facilitates multiple searches for closest point and close approach calculations. * @public */ export declare class LineString3dRangeTreeContext { /** Polyline points being searched, indexed by the range tree */ lineString: LineString3d; /** Diagnostic: number of range tests that have returned true */ numRangeTestTrue: number; /** Diagnostic: number of range tests that have returned false */ numRangeTestFalse: number; /** Diagnostic: number of points tested */ numPointTest: number; /** Diagnostic: number of searches. */ numSearch: number; /** Range tree, whose appData are indices into the linestring points array */ private _rangeTreeRoot; /** Constructor: capture inputs, initialize debug counters */ private constructor(); /** * Create a range tree context for the polyline points: * * initialize with segment ranges * * appData are segment indices * @param linestring captured if LineString3d, otherwise copied * @param maxChildPerNode maximum children per range tree node (default 4) * @param maxAppDataPerLeaf maximum segment indices per leaf node (default 4) */ static createCapture(points: Point3d[] | LineString3d, maxChildPerNode?: number, maxAppDataPerLeaf?: number): LineString3dRangeTreeContext | undefined; /** * Search the range tree for closest point(s) to spacePoint. * @param spacePoint point to test * @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point. * @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point */ searchForClosestPoint(spacePoint: Point3d, maxDist?: number): CurveLocationDetail | CurveLocationDetail[] | undefined; /** * Search the range trees for closest approach(es) between the polylines. * @param contextA first polyline context * @param contextB second polyline context * @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach. * @return closest approach detail pair(s), one per context, with detail.a set to the approach distance */ static searchForClosestApproach(contextA: LineString3dRangeTreeContext, contextB: LineString3dRangeTreeContext, maxDist?: number): CurveLocationDetailPair | CurveLocationDetailPair[] | undefined; } //# sourceMappingURL=LineString3dRangeTreeContext.d.ts.map