import { ConsumedSector } from '../../../cad-parsers'; import { DetermineSectorsPayload, SectorLoadingSpent } from './culling/types'; import { SectorCuller } from './culling/SectorCuller'; import { ModelStateHandler } from './ModelStateHandler'; /** * Loads sector based on a given camera pose, a set of models and budget. * Uses {@link SectorCuller} to determine what to load, {@link SectorDownloadScheduler} to * load sectors and {@link ModelStateHandler} to keep track of what has been * loaded to avoid loading data that's already available. * * The caller is responsible for making the result from the load operation visible * on screen. */ export declare class SectorLoader { private readonly _modelStateHandler; private readonly _progressHelper; private readonly _collectStatisticsCallback; private readonly _sectorCuller; private readonly _continuousModelStreaming; private readonly _sectorDownloadScheduler; private _batchId; constructor(sectorCuller: SectorCuller, modelStateHandler: ModelStateHandler, collectStatisticsCallback: (spent: SectorLoadingSpent) => void, progressCallback: (sectorsLoaded: number, sectorsScheduled: number, sectorsCulled: number) => void, continuousModelStreaming: boolean); loadSectors(input: DetermineSectorsPayload): AsyncIterable; reportNewSectorsLoaded(loadedCountChange: number): void; private shouldLoad; private getSectorCuller; /** * Culls the batch against already loaded geometry and queues the remaining sectors for download. * Resolves to no downloads if the load is superseded. */ private startBatch; /** * Yields the sectors of a batch as they finish downloading, and reports progress. * Stops as soon as the load is superseded. */ private consumeBatch; private startLoadingBatch; }