import { Vector3 } from 'three'; /** * A utility class to find and store the closest geometry to a given origin point. * @template T - The type of the geometry. * @beta */ export declare class ClosestGeometryFinder { private _closestGeometry; private readonly _origin; private _minDistanceSquared; /** * Creates an instance of ClosestGeometryFinder. * * @param origin - The origin point from which distances are measured. */ constructor(origin: Vector3); /** * Sets the minimum distance to the closest geometry. * * @param value - The minimum distance. */ set minDistance(value: number); /** * Gets the minimum distance to the closest geometry. * * @returns The minimum distance. */ get minDistance(): number; /** * Gets the closest geometry found so far. * * @returns The closest geometry or undefined if no geometry has been added. */ getClosestGeometry(): T | undefined; /** * Sets the closest geometry. * * @param geometry - The geometry to set as the closest. */ setClosestGeometry(geometry: T): void; /** * Checks if a given point is closer to the origin than the current closest geometry. * * @param point - The point to check. * @returns True if the point is closer, false otherwise. */ isClosest(point: Vector3): boolean; /** * Clears the closest geometry and resets the minimum distance. */ clear(): void; /** * Adds a geometry if the given point is closer to the origin than the current closest geometry. * * @param point - The point associated with the geometry. * @param geometry - The geometry to add. * @returns True if the geometry was added, false otherwise. */ add(point: Vector3, geometry: T): boolean; /** * Lazily adds a geometry if the given point is closer to the origin than the current closest geometry. * * @param point - The point associated with the geometry. * @param geometryCreator - A function that creates the geometry to add. * @returns True if the geometry was added, false otherwise. */ addLazy(point: Vector3, geometryCreator: () => T): boolean; }