/** @packageDocumentation
 * @module RangeSearch
 */
import { CurveLocationDetail, CurveLocationDetailPair } from "../../curve/CurveLocationDetail";
import { Point3d } from "../../geometry3d/Point3dVector3d";
import { Range3d } from "../../geometry3d/Range";
import { XAndY, XYAndZ } from "../../geometry3d/XYZProps";
import { FacetLocationDetail, FacetLocationDetailPair } from "../FacetLocationDetail";
import { LineString3dRangeTreeContext } from "./LineString3dRangeTreeContext";
import { MinimumValueTester } from "./MinimumValueTester";
import { Point3dArrayRangeTreeContext } from "./Point3dArrayRangeTreeContext";
import { PolyfaceRangeTreeContext } from "./PolyfaceRangeTreeContext";
import { SingleTreeSearchHandler, TwoTreeDistanceMinimizationSearchHandler } from "./RangeTreeNode";
/**
 * Helper class for searching for the closest point in a set of points.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
 * @internal
 */
export declare class SingleTreeSearchHandlerForClosestPointInArray extends SingleTreeSearchHandler<number> {
    /** The calling context */
    context: Point3dArrayRangeTreeContext;
    /** Evolving search state */
    searchState: MinimumValueTester<number>;
    /** Space point for the search  */
    spacePoint: Point3d;
    /**
     * Constructor
     * @param spacePoint cloned
     * @param context captured
     * @param maxDist collect points at no more than this distance from spacePoint
     */
    constructor(spacePoint: XAndY | XYAndZ, context: Point3dArrayRangeTreeContext, maxDist?: number);
    /** Return the current closest point */
    getResult(): CurveLocationDetail | undefined;
    /** Return the collected closest points (if collecting) */
    getSavedItems(): CurveLocationDetail[] | undefined;
    /**
     * Return true if appData within the range should be offered to `processAppData`.
     * @param range range containing items to be tested.
     * @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
     */
    isRangeActive(range: Range3d): boolean;
    /** Test a point indexed in the range tree as candidate for "closest" */
    processAppData(candidateIndex: number): void;
}
/**
 * Helper class for searching for the closest approach between sets of points.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
 * @internal
 */
export declare class TwoTreeSearchHandlerForPoint3dArrayPoint3dArrayCloseApproach extends TwoTreeDistanceMinimizationSearchHandler<number> {
    /** Context for first set of points */
    contextA: Point3dArrayRangeTreeContext;
    /** Context for second set of points */
    contextB: Point3dArrayRangeTreeContext;
    /** Search state with current min distance point pair */
    searchState: MinimumValueTester<CurveLocationDetailPair>;
    /** True if and only if both contexts specify xy-only. */
    private _xyOnly?;
    /**
     * Constructor
     * @param contextA captured
     * @param contextB captured
     * @param maxDist collect points at no more than this separation distance
     */
    constructor(contextA: Point3dArrayRangeTreeContext, contextB: Point3dArrayRangeTreeContext, maxDist?: number);
    /** Return the current closest approach */
    getResult(): CurveLocationDetailPair | undefined;
    /** Return the collected close approaches (if collecting) */
    getSavedItems(): CurveLocationDetailPair[] | undefined;
    /** Get current min distance */
    getCurrentDistance(): number;
    /** Whether to ignore z-coordinates in distance computations. */
    getXYOnly(): boolean;
    /** Compute and test the distance between two points, given their indices. */
    processAppDataPair(indexA: number, indexB: number): void;
}
/**
 * Helper class for searching for the closest point in a linestring.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
 * @internal
 */
export declare class SingleTreeSearchHandlerForClosestPointOnLineString3d extends SingleTreeSearchHandler<number> {
    /** The calling context */
    context: LineString3dRangeTreeContext;
    /** Evolving search state */
    searchState: MinimumValueTester<CurveLocationDetail>;
    /** Space point for the search */
    spacePoint: Point3d;
    /**
     * Constructor
     * @param spacePoint cloned
     * @param context captured
     * @param maxDist collect points at no more than this distance from spacePoint
     */
    constructor(spacePoint: Point3d, context: LineString3dRangeTreeContext, maxDist?: number);
    /** Return the current closest point */
    getResult(): CurveLocationDetail | undefined;
    /** Return the collected closest points (if collecting) */
    getSavedItems(): CurveLocationDetail[] | undefined;
    /**
     * Return true if appData within the range should be offered to `processAppData`.
     * @param range range containing items to be tested.
     * @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
     */
    isRangeActive(range: Range3d): boolean;
    private _workSegment?;
    /** Test a segment indexed in the range tree as candidate for "closest" */
    processAppData(candidateIndex: number): void;
}
/**
 * Helper class for searching for the closest approach between linestrings.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring CurveLocationDetail).
 * @internal
 */
export declare class TwoTreeSearchHandlerForLineString3dLineString3dCloseApproach extends TwoTreeDistanceMinimizationSearchHandler<number> {
    /** Context for first polyline */
    contextA: LineString3dRangeTreeContext;
    /** Context for second polyline */
    contextB: LineString3dRangeTreeContext;
    /** Search state with current min distance point pair */
    searchState: MinimumValueTester<CurveLocationDetailPair>;
    /**
     * Constructor
     * @param contextA captured
     * @param contextB captured
     * @param maxDist collect points at no more than this separation distance
     */
    constructor(contextA: LineString3dRangeTreeContext, contextB: LineString3dRangeTreeContext, maxDist?: number);
    /**
     * Return the current closest approach.
     * * Details contain linestring *and* segment data, cf. [[LineString3d.convertLocalToGlobalDetail]]
     */
    getResult(): CurveLocationDetailPair | undefined;
    /** Return the collected close approaches (if collecting) */
    getSavedItems(): CurveLocationDetailPair[] | undefined;
    /** Get current min distance */
    getCurrentDistance(): number;
    private static _workSegmentA?;
    private static _workSegmentB?;
    /** Compute and test the closest approach between two segments, given their indices. */
    processAppDataPair(indexA: number, indexB: number): void;
}
/**
 * Helper class for searching for the closest point in a polyface.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
 * @internal
 */
export declare class SingleTreeSearchHandlerForClosestPointOnPolyface extends SingleTreeSearchHandler<number> {
    /** The calling context */
    context: PolyfaceRangeTreeContext;
    /** Evolving search state */
    searchState: MinimumValueTester<FacetLocationDetail>;
    /** Space point for the search */
    spacePoint: Point3d;
    /** Whether to include facet interior in search */
    searchFacetInterior: boolean;
    /**
     * Constructor
     * @param spacePoint point to test
     * @param context captured
     * @param maxDist collect points at no more than this distance from spacePoint
     * @param searchFacetInterior true: search facet interior + boundary; false: just boundary
     */
    constructor(spacePoint: XYAndZ | XAndY, context: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior?: boolean);
    /** Return the current closest point */
    getResult(): FacetLocationDetail | undefined;
    /** Return the collected closest points (if collecting) */
    getSavedItems(): FacetLocationDetail[] | undefined;
    /**
     * Return true if appData within the range should be offered to `processAppData`.
     * @param range range containing items to be tested.
     * @returns true if the spacePoint is within the range or close enough that a point in the range could be the closest.
     */
    isRangeActive(range: Range3d): boolean;
    /** Test a facet indexed in the range tree as candidate for "closest" */
    processAppData(candidateIndex: number): void;
}
/**
 * Helper class for searching for the closest approach between polyfaces.
 * * Future optimization: avoid sqrt by using squared distance throughout (would require refactoring FacetLocationDetail).
 * @internal
 */
export declare class TwoTreeSearchHandlerForFacetFacetCloseApproach extends TwoTreeDistanceMinimizationSearchHandler<number> {
    /** Context for first polyface */
    contextA: PolyfaceRangeTreeContext;
    /** Context for second polyface */
    contextB: PolyfaceRangeTreeContext;
    /** Search state with current min distance and facet pair */
    searchState: MinimumValueTester<FacetLocationDetailPair>;
    /** Whether to include facet interior in search */
    searchFacetInterior: boolean;
    /** Constructor
     * @param contextA captured
     * @param contextB captured
     * @param maxDist collect points at no more than this separation distance
     * @param searchFacetInterior true: search facet interior + boundary; false: just boundary
    */
    constructor(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior?: boolean);
    /** Return the facets with closest approach */
    getResult(): FacetLocationDetailPair | undefined;
    /** Return the collected close approaches (if collecting) */
    getSavedItems(): FacetLocationDetailPair[] | undefined;
    /** Get current min distance */
    getCurrentDistance(): number;
    /** Compute and test the closest approach between two facets, given their indices. */
    processAppDataPair(indexA: number, indexB: number): void;
}
//# sourceMappingURL=RangeTreeSearchHandlers.d.ts.map