/**
 * @module vim-loader
 */
import * as THREE from 'three';
import { InsertableSubmesh } from './progressive/insertableSubmesh';
import { Vim } from './vim';
import { InstancedSubmesh } from './progressive/instancedSubmesh';
import { ModelMaterial } from './materials/viewerMaterials';
/**
 * Wrapper around THREE.Mesh
 * Keeps track of what VIM instances are part of this mesh.
 * Is either merged on instanced.
 */
export declare class Mesh {
    /**
     * the wrapped THREE mesh
     */
    mesh: THREE.Mesh;
    /**
     * Vim file from which this mesh was created.
     */
    vim: Vim | undefined;
    /**
     * Whether the mesh is merged or not.
     */
    merged: boolean;
    /**
     * Indices of the g3d instances that went into creating the mesh
     */
    instances: number[];
    /**
     * startPosition of each submesh on a merged mesh.
     */
    submeshes: number[];
    /**
     * bounding box of each instance
     */
    boxes: THREE.Box3[];
    /**
     * Set to true to ignore SetMaterial calls.
     */
    ignoreSceneMaterial: boolean;
    /**
     * Total bounding box for this mesh.
     */
    boundingBox: THREE.Box3;
    /**
     * initial material.
     */
    private _material;
    private constructor();
    static createMerged(mesh: THREE.Mesh, instances: number[], boxes: THREE.Box3[], submeshes: number[]): Mesh;
    static createInstanced(mesh: THREE.Mesh, instances: number[], boxes: THREE.Box3[]): Mesh;
    /**
     * Overrides mesh material, set to undefine to restore initial material.
     */
    setMaterial(value: ModelMaterial): void;
    /**
     * Returns submesh for given index.
     */
    getSubMesh(index: number): StandardSubmesh;
    /**
     * Returns submesh corresponding to given face on a merged mesh.
     */
    getSubmeshFromFace(faceIndex: number): StandardSubmesh;
    /**
     *
     * @returns Returns all submeshes
     */
    getSubmeshes(): StandardSubmesh[];
    private binarySearch;
    private unionAllBox;
}
export type MergedSubmesh = StandardSubmesh | InsertableSubmesh;
export type Submesh = MergedSubmesh | InstancedSubmesh;
export declare class SimpleInstanceSubmesh {
    mesh: THREE.InstancedMesh;
    get three(): THREE.InstancedMesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.InstancedMeshEventMap>;
    index: number;
    readonly merged = false;
    constructor(mesh: THREE.InstancedMesh, index: number);
}
export declare class StandardSubmesh {
    mesh: Mesh;
    index: number;
    constructor(mesh: Mesh, index: number);
    equals(other: Submesh): boolean;
    /**
     * Returns parent three mesh.
     */
    get three(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
    /**
     * True if parent mesh is merged.
     */
    get merged(): boolean;
    /**
     * Returns vim instance associated with this submesh.
     */
    get instance(): number;
    /**
     * Returns bounding box for this submesh.
     */
    get boundingBox(): THREE.Box3;
    /**
     * Returns starting position in parent mesh for merged mesh.
     */
    get meshStart(): number;
    /**
     * Returns ending position in parent mesh for merged mesh.
     */
    get meshEnd(): number;
    /**
     * Returns vim object for this submesh.
     */
    get object(): import("./object3D").Object3D;
}
