/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */ /** */
import { BimProductMeshDescriptor } from './bim-format-types';
import { IBimIfcLoaderElement } from './bim-ifc-loader-element';
import { BimCoreApiClient } from './client/BimCoreApiClient';
import { FastTransform } from '../math/FastTransform';
import { GeometryArrayOffset, GeometryArrays } from './GeometryBuffer';
import { Vector3 } from './babylonjs-maths-import';
import { BimProductMesh } from './BimProductMesh';
import { type MeshStoreLoaderOptions, WasmGeometryProcessor } from '@twinfinity/geometry';
import type { BimTransform } from './bim-format-types';
import { type VertexData } from '@twinfinity/geometry';
export interface BimVertexDataRepositoryOptions {
    geometryProcessor?: WasmGeometryProcessor;
    wasmLoaderOptions?: MeshStoreLoaderOptions;
}
export interface WriteBatchResult {
    aabb: {
        minX: number;
        minY: number;
        minZ: number;
        maxX: number;
        maxY: number;
        maxZ: number;
    };
    vertexCount: number;
    indexCount: number;
}
export declare class BimVertexDataRepository {
    private readonly _bimApiClient;
    private _vertexDataBlock;
    private readonly _requestedMeshDescriptorHashes;
    private readonly _v2FormatMeshHashes;
    private readonly _meshDescriptorByHash;
    private readonly _loadedUrls;
    private _geometryProcessor;
    private _geometryProcessorPromise;
    constructor(_bimApiClient: BimCoreApiClient, options?: BimVertexDataRepositoryOptions);
    /**
     * Reads edge indices for a mesh as a freshly-allocated Uint32Array (or undefined when
     * the mesh has no edges or is not loaded). The copy is intentional: callers are free
     * to retain the returned array across {@link releaseV2MeshSourcesFor} / {@link releaseV2MeshSources}
     * calls, which would otherwise detach an underlying view.
     */
    readEdgeIndices(hash: string): Uint32Array | undefined;
    /** Releases retained V2 geometry buffers after all edges have been read. */
    releaseV2MeshSources(): void;
    /**
     * Releases retained V2 geometry buffers for a specific set of mesh hashes.
     * Use this when several loader elements share one repository — each element releases
     * only the hashes it consumed, so concurrent peers can still resolve their edges.
     */
    releaseV2MeshSourcesFor(hashes: ReadonlySet<string>): void;
    get hasBatchSupport(): boolean;
    setGeometryProcessor(processor: WasmGeometryProcessor): void;
    load(loaderElement: IBimIfcLoaderElement): Promise<boolean>;
    get sizeInBytes(): number;
    get wasmMemoryUsage(): {
        used: number;
        capacity: number;
        allocated: number;
        outputBuffers: number;
    };
    clear(): void;
    dispose(): void;
    private static readonly _emptyVertexData;
    get(md: BimProductMeshDescriptor): VertexData;
    write(ifcProductMesh: BimProductMesh, transform: FastTransform, destination: GeometryArrays, offset: GeometryArrayOffset, aabb: {
        min: Vector3;
        max: Vector3;
    }, options: {
        includeNormals?: boolean;
    }): {
        vertexCount: number;
        indexCount: number;
    };
    private writePerFaceNormals;
    writeBatch(meshes: BimProductMesh[], destination: GeometryArrays, offset: GeometryArrayOffset): WriteBatchResult | undefined;
    registerTransformsWithProcessor(loaderElement: IBimIfcLoaderElement, transforms: (BimTransform | undefined)[]): void;
    private registerDescriptorsWithProcessor;
    private fetchGeometry;
}
//# sourceMappingURL=bim-vertex-data-repository.d.ts.map