import { Box3, Ray } from "@aura3d/math";
import { Geometry } from "./Geometry";
import { type RenderItem, type RenderMaterial } from "./ForwardPass";
export interface LodLevel {
    readonly name: string;
    readonly geometry: Geometry;
    readonly material?: RenderMaterial;
    readonly maxDistance?: number;
    readonly minScreenSize?: number;
}
export interface LodSelectionInput {
    readonly distance: number;
    readonly screenSize: number;
    readonly levels: readonly LodLevel[];
}
export interface LodSelection {
    readonly level: LodLevel;
    readonly levelIndex: number;
    readonly reason: "distance" | "screen-size" | "fallback";
}
export interface StaticBatchInput {
    readonly geometry: Geometry;
    readonly material: RenderMaterial;
    readonly modelMatrix: Float32Array | readonly number[];
    readonly batchKey: string;
    readonly label?: string;
}
export interface StaticBatchOptions {
    readonly maxInstancesPerBatch?: number;
    readonly labelPrefix?: string;
}
export interface StaticBatchResult {
    readonly renderItems: readonly RenderItem[];
    readonly logicalItems: number;
    readonly submittedItems: number;
    readonly batches: number;
    readonly unbatchedItems: number;
    readonly maxInstancesPerBatch: number;
    readonly drawCallReduction: number;
}
export interface StaticSpatialItem<T = unknown> {
    readonly id: string;
    readonly bounds: StaticSpatialBounds;
    readonly payload?: T;
}
export interface StaticSpatialBounds {
    readonly min: readonly [number, number, number];
    readonly max: readonly [number, number, number];
}
export interface StaticBoundsIntersector {
    intersectsBox(box: Box3): boolean;
}
export interface StaticBoundsBvhOptions {
    readonly maxLeafSize?: number;
    readonly maxDepth?: number;
}
export interface StaticBoundsBvh<T = unknown> {
    readonly root: StaticBoundsBvhNode;
    readonly items: readonly StaticSpatialItem<T>[];
    readonly diagnostics: StaticBoundsBvhBuildDiagnostics;
}
export interface StaticBoundsBvhNode {
    readonly id: number;
    readonly bounds: StaticSpatialBounds;
    readonly depth: number;
    readonly itemCount: number;
    readonly itemIndices?: readonly number[];
    readonly left?: StaticBoundsBvhNode;
    readonly right?: StaticBoundsBvhNode;
}
export interface StaticBoundsBvhBuildDiagnostics {
    readonly objectCount: number;
    readonly bvhNodes: number;
    readonly leafNodes: number;
    readonly maxDepth: number;
    readonly buildTimeMs: number;
}
export interface StaticBoundsBvhQueryOptions {
    readonly bounds?: StaticSpatialBounds;
    readonly frustum?: StaticBoundsIntersector;
}
export interface StaticBoundsBvhQueryResult<T = unknown> {
    readonly items: readonly StaticSpatialItem<T>[];
    readonly diagnostics: StaticBoundsBvhTraversalDiagnostics;
}
export interface StaticBoundsBvhTraversalDiagnostics {
    readonly totalObjects: number;
    readonly visibleObjects: number;
    readonly culledObjects: number;
    readonly bvhNodes: number;
    readonly visitedNodes: number;
    readonly rejectedNodes: number;
    readonly boundsTests: number;
    readonly leafTests: number;
    readonly traversalTimeMs: number;
}
export interface StaticBoundsBvhUpdateResult<T = unknown> {
    readonly bvh: StaticBoundsBvh<T>;
    readonly updatedObjects: number;
    readonly strategy: "rebuild";
}
export interface StaticBoundsBvhRaycastHit<T = unknown> {
    readonly item: StaticSpatialItem<T>;
    readonly distance: number;
    readonly point: readonly [number, number, number];
}
export interface StaticBoundsBvhRaycastResult<T = unknown> {
    readonly hits: readonly StaticBoundsBvhRaycastHit<T>[];
    readonly diagnostics: StaticBoundsBvhRaycastDiagnostics;
}
export interface StaticBoundsBvhRaycastDiagnostics {
    readonly totalObjects: number;
    readonly hitObjects: number;
    readonly bvhNodes: number;
    readonly visitedNodes: number;
    readonly rejectedNodes: number;
    readonly boundsTests: number;
    readonly leafTests: number;
    readonly traversalTimeMs: number;
}
export declare function selectLodLevel(input: LodSelectionInput): LodSelection;
export declare function batchStaticRenderItems(items: readonly StaticBatchInput[], options?: StaticBatchOptions): StaticBatchResult;
export declare function buildStaticBoundsBvh<T = unknown>(items: readonly StaticSpatialItem<T>[], options?: StaticBoundsBvhOptions): StaticBoundsBvh<T>;
export declare function queryStaticBoundsBvh<T = unknown>(bvh: StaticBoundsBvh<T>, options?: StaticBoundsBvhQueryOptions): StaticBoundsBvhQueryResult<T>;
export declare function updateStaticBoundsBvh<T = unknown>(bvh: StaticBoundsBvh<T>, updatedItems: readonly StaticSpatialItem<T>[], options?: StaticBoundsBvhOptions): StaticBoundsBvhUpdateResult<T>;
export declare function raycastStaticBoundsBvh<T = unknown>(bvh: StaticBoundsBvh<T>, ray: Ray): StaticBoundsBvhRaycastResult<T>;
//# sourceMappingURL=SceneOptimization.d.ts.map