import { Box3, Material, Object3D, WebGLRenderer } from 'three';
import { NodeRenderView } from '../tree/NodeRenderView';
import { Batch, BatchUpdateRange, GeometryType } from './Batch';
import SpeckleInstancedMesh from '../objects/SpeckleInstancedMesh';
export interface DrawGroup {
    start: number;
    count: number;
    materialIndex?: number;
}
export default class InstancedMeshBatch implements Batch {
    static readonly INSTANCE_TRANSFORM_BUFFER_STRIDE = 16;
    static readonly INSTANCE_GRADIENT_BUFFER_STRIDE = 1;
    id: string;
    subtreeId: string;
    renderViews: NodeRenderView[];
    private geometry;
    batchMaterial: Material;
    mesh: SpeckleInstancedMesh;
    private instanceTransformBuffer0;
    private instanceTransformBuffer1;
    private transformBufferIndex;
    private instanceGradientBuffer;
    private needsShuffle;
    private needsFlatten;
    get bounds(): Box3;
    get drawCalls(): number;
    get minDrawCalls(): number;
    get maxDrawCalls(): number;
    get triCount(): number;
    get vertCount(): number;
    constructor(id: string, subtreeId: string, renderViews: NodeRenderView[]);
    get geometryType(): GeometryType;
    get renderObject(): Object3D;
    getCount(): number;
    get materials(): Material[];
    get groups(): Array<DrawGroup>;
    setBatchMaterial(material: Material): void;
    onUpdate(deltaTime: number): void;
    onRender(renderer: WebGLRenderer): void;
    /** Note: You can only set visibility on ranges that exist as draw groups! */
    setVisibleRange(...ranges: BatchUpdateRange[]): void;
    getVisibleRange(): BatchUpdateRange;
    getOpaque(): BatchUpdateRange;
    getTransparent(): BatchUpdateRange;
    getStencil(): BatchUpdateRange;
    setBatchBuffers(...range: BatchUpdateRange[]): void;
    setDrawRanges(...ranges: BatchUpdateRange[]): void;
    private getDrawRangeCollision;
    private geDrawRangeInclusion;
    private flattenDrawGroups;
    private shuffleDrawGroups;
    resetDrawRanges(): void;
    private getCurrentTransformBuffer;
    private getNextTransformBuffer;
    private getCurrentGradientBuffer;
    buildBatch(): void;
    getRenderView(index: number): NodeRenderView;
    getMaterialAtIndex(index: number): Material;
    getMaterial(rv: NodeRenderView): Material;
    private makeInstancedMeshGeometry;
    private updateGradientIndexBufferData;
    purge(): void;
}
