import { Camera } from "three";
import { InstancedRenderItem } from "../utils/InstancedRenderList";
import { LODRenderList } from "./LOD";
/**
 * A custom sorting callback for render items.
 */
export type CustomSortCallback = (list: InstancedRenderItem[]) => void;
/**
 * Callback invoked when an instance is within the frustum.
 * @param index The index of the instance.
 * @param camera The camera used for rendering.
 * @param cameraLOD The camera used for LOD calculations (provided only if LODs are initialized).
 * @param LODindex The LOD level of the instance (provided only if LODs are initialized and `sortObjects` is false).
 * @returns True if the instance should be rendered, false otherwise.
 */
export type OnFrustumEnterCallback = (index: number, camera: Camera, cameraLOD?: Camera, LODindex?: number) => boolean;
declare module "../InstancedMesh2" {
    interface InstancedMesh2 {
        /**
         * Performs frustum culling and manages LOD visibility.
         * @param camera The main camera used for rendering.
         * @param cameraLOD An optional camera for LOD calculations. Defaults to the main camera.
         */
        performFrustumCulling(camera: Camera, cameraLOD?: Camera): void;
        /** @internal */ frustumCulling(camera: Camera): void;
        /** @internal */ updateIndexArray(): void;
        /** @internal */ updateRenderList(): void;
        /** @internal */ BVHCulling(camera: Camera): void;
        /** @internal */ linearCulling(camera: Camera): void;
        /** @internal */ frustumCullingLOD(LODrenderList: LODRenderList, camera: Camera, cameraLOD: Camera): void;
        /** @internal */ BVHCullingLOD(LODrenderList: LODRenderList, indexes: Uint32Array[], sortObjects: boolean, camera: Camera, cameraLOD: Camera): void;
        /** @internal */ linearCullingLOD(LODrenderList: LODRenderList, indexes: Uint32Array[], sortObjects: boolean, camera: Camera, cameraLOD: Camera): void;
        /** @internal */ getObjectLODIndexForDistance(levels: {
            distance: number;
        }[], distance: number): number;
    }
}
