import { PerspectiveCamera, Box3, Matrix4 } from 'three'; import { SectorMetadata } from '../../../../cad-parsers'; import { PrioritizedArea } from '../../../../cad-styling'; export declare class WeightFunctionsHelper { private readonly _camera; private _minSectorDistance; private _maxSectorDistance; private readonly _modifiedFrustums; constructor(camera: PerspectiveCamera); reset(): void; addCandidateSectors(sectors: SectorMetadata[], modelMatrix: Matrix4): void; computeTransformedSectorBounds(sectorBounds: Box3, modelMatrix: Matrix4, out: Box3): void; /** * Computes a weight in range [0-1], where 1 means close to camera and 0 means far away. */ computeDistanceToCameraWeight(transformedSectorBounds: Box3): number; /** * Compute a weight in range [0-1] where 1 means the sector covers the entire screen * and 0 means no coverage. * @param transformedSectorBounds * @returns */ computeScreenAreaWeight(transformedSectorBounds: Box3): number; /** * Compute a weight in range [0-1] based on at what "depths" * in the frustum the sector is placed. * @param transformedSectorBounds */ computeFrustumDepthWeight(transformedSectorBounds: Box3): number; /** * Computes a weight based on placement in sector tree (i.e. prioritize) * sectors right below root sector. * @param sector */ computeSectorTreePlacementWeight(sector: SectorMetadata): number; /** * Computes a weight based on how large the biggest node within the sector * will be on screen (a number in range [0-1]). */ computeMaximumNodeScreenSizeWeight(transformedSectorBounds: Box3, maxNodeDiagonalLength: number): number; /** * Returns a weight that is the maximum of the extra priority in intersecting prioritized areas. * @param transformedSectorBounds Bounds of sectors in "Reveal coordinates". * @param prioritizedAreas Zero or more areas with associated priorities. */ computePrioritizedAreaWeight(transformedSectorBounds: Box3, prioritizedAreas: PrioritizedArea[]): number; private distanceToCamera; }