/** @packageDocumentation * @module RangeSearch */ import { XAndY, XYAndZ } from "../../geometry3d/XYZProps"; import { FacetLocationDetail, FacetLocationDetailPair } from "../FacetLocationDetail"; import { Polyface, PolyfaceVisitor } from "../Polyface"; /** * Handler class for searching a range tree containing the facets of a polyface. * * Facilitates multiple searches for closest point and close approach calculations. * @public */ export declare class PolyfaceRangeTreeContext { /** Visitor for the polyface being searched */ visitor: PolyfaceVisitor; /** Whether all facets to visit are known to be convex. */ convexFacets: boolean; /** Diagnostic: number of range tests that have returned true. */ numRangeTestTrue: number; /** Diagnostic: number of range tests that have been returned false */ numRangeTestFalse: number; /** Diagnostic: number of facet tests. */ numFacetTest: number; /** Diagnostic: number of searches performed. */ numSearch: number; /** Range tree, whose appData are facet (read) indices */ private _rangeTreeRoot; /** Constructor: capture inputs, initialize debug counters */ private constructor(); /** * Create a range tree context for the Polyface facets. * * This is a very simple construction that splits "right and left parts" of the facet sequence. * * Facets with any recognizable "left to right" or "top to bottom" sequencing will have very effective search structures. * @param visitor access to facets, captured if PolyfaceVisitor * @param maxChildPerNode maximum children per range tree node (default 4) * @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4) * @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false) */ static createCapture(visitor: Polyface | PolyfaceVisitor, maxChildPerNode?: number, maxAppDataPerLeaf?: number, convexFacets?: boolean): PolyfaceRangeTreeContext | undefined; /** * Search the range tree for closest facet(s) to spacePoint. * @param spacePoint point to test * @param maxDist collect facet locations at no more than this distance from spacePoint. If undefined, return only the closest facet location. * @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries. * @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point */ searchForClosestPoint(spacePoint: XYAndZ | XAndY, maxDist?: number, searchFacetInterior?: boolean): FacetLocationDetail | FacetLocationDetail[] | undefined; /** * Search the range trees for closest approach(es) between the polyfaces. * @param contextA first polyface context * @param contextB second polyface context * @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach. * @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries. * @return closest approach detail pair(s), one per context, with detail.a set to the approach distance */ static searchForClosestApproach(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior?: boolean): FacetLocationDetailPair | FacetLocationDetailPair[] | undefined; } //# sourceMappingURL=PolyfaceRangeTreeContext.d.ts.map